| | |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.enums.QaReportTypeEnum; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.*; |
| | | import com.ruoyi.system.dto.BatchCollectSamplesDTO; |
| | | import com.ruoyi.system.dto.BatchSendSamplesDTO; |
| | | import com.ruoyi.system.dto.TSamplingRecordDTO; |
| | | import com.ruoyi.system.mapper.SysUserMapper; |
| | | import com.ruoyi.system.model.*; |
| | | import com.ruoyi.system.query.TSamplingRecordQuery; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | |
| | | */ |
| | | @Api(tags = "取样记录管理") |
| | | @RestController |
| | | @RequestMapping("/t-sampling-record") |
| | | @RequestMapping("") |
| | | public class TSamplingRecordController { |
| | | |
| | | private final TSamplingRecordService samplingRecordService; |
| | |
| | | /** |
| | | * 获取取样记录管理列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:samplingRecord:list')") |
| | | //@PreAuthorize("@ss.hasPermi('system:samplingRecord:list')") |
| | | @ApiOperation(value = "获取取样记录分页列表", response = TSamplingRecordQuery.class) |
| | | @PostMapping(value = "/api/t-sampling-record/pageList") |
| | | public R<PageInfo<TSamplingRecordVO>> pageList(@RequestBody String param) { |
| | |
| | | /** |
| | | * 添加取样记录管理 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:samplingRecord:add')") |
| | | //@PreAuthorize("@ss.hasPermi('system:samplingRecord:add')") |
| | | @Log(title = "取样记录信息-新增取样记录", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "添加取样记录",response = TSamplingRecordDTO.class) |
| | | @PostMapping(value = "/api/t-sampling-record/add") |
| | |
| | | /** |
| | | * 修改取样记录 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:samplingRecord:edit')") |
| | | //@PreAuthorize("@ss.hasPermi('system:samplingRecord:edit')") |
| | | @Log(title = "取样记录信息-修改取样记录", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "修改取样记录") |
| | | @PostMapping(value = "/api/t-sampling-record/update") |
| | |
| | | /** |
| | | * 修改取样操作记录 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:samplingRecordOperation:edit')") |
| | | //@PreAuthorize("@ss.hasPermi('system:samplingRecordOperation:edit')") |
| | | @Log(title = "取样记录信息-修改取样操作记录", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "修改取样操作记录") |
| | | @PostMapping(value = "/api/t-sampling-record/updateRecordOperation") |
| | |
| | | /** |
| | | * 修改取样操作记录 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:samplingRecordOperation:edit')") |
| | | //@PreAuthorize("@ss.hasPermi('system:samplingRecordOperation:edit')") |
| | | @Log(title = "取样记录信息-实验员提交取样记录", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "实验员提交取样记录") |
| | | @PostMapping(value = "/api/t-sampling-record/commitRecord") |
| | |
| | | /** |
| | | * 查看取样记录详情 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:samplingRecord:detail')") |
| | | //@PreAuthorize("@ss.hasPermi('system:samplingRecord:detail')") |
| | | @ApiOperation(value = "查看取样记录详情") |
| | | @GetMapping(value = "/open/t-sampling-record/getDetailById") |
| | | public R<TSamplingRecordVO> getDetailById(@RequestParam String id) { |
| | |
| | | /** |
| | | * 删除取样记录 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:samplingRecord:delete')") |
| | | //@PreAuthorize("@ss.hasPermi('system:samplingRecord:delete')") |
| | | @Log(title = "取样记录信息-删除取样记录", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "删除取样记录") |
| | | @DeleteMapping(value = "/open/t-sampling-record/deleteById") |
| | |
| | | /** |
| | | * 批量删除取样记录 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:samplingRecord:delete')") |
| | | //@PreAuthorize("@ss.hasPermi('system:samplingRecord:delete')") |
| | | @Log(title = "取样记录信息-删除取样记录", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "批量删除取样记录") |
| | | @DeleteMapping(value = "/open/t-sampling-record/deleteByIds") |
| | |
| | | /** |
| | | * 批量送样 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:samplingRecord:sendSamples')") |
| | | //@PreAuthorize("@ss.hasPermi('system:samplingRecord:sendSamples')") |
| | | @Log(title = "取样记录信息-批量送样", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "批量送样") |
| | | @ApiOperation(value = "批量送样",response = BatchSendSamplesDTO.class) |
| | | @PostMapping(value = "/open/t-sampling-record/batchSendSamples") |
| | | public R<Boolean> batchSendSamples(@RequestBody String param) { |
| | | BatchSendSamplesDTO batchSendSamplesDTO = JSON.parseObject(param, BatchSendSamplesDTO.class); |
| | |
| | | /** |
| | | * 批量删除取样记录 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:samplingRecord:collectSamples')") |
| | | //@PreAuthorize("@ss.hasPermi('system:samplingRecord:collectSamples')") |
| | | @Log(title = "取样记录信息-批量收样", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "批量收样") |
| | | @ApiOperation(value = "批量收样",response = BatchCollectSamplesDTO.class) |
| | | @PostMapping(value = "/open/t-sampling-record/batchCollectSamples") |
| | | public R<Boolean> batchCollectSamples(@RequestBody String param) { |
| | | BatchCollectSamplesDTO batchCollectSamplesDTO = JSON.parseObject(param, BatchCollectSamplesDTO.class); |