| | |
| | | @PutMapping("/dispose") |
| | | @Operation(summary = "执行不合格品处置") |
| | | @PreAuthorize("@ss.hasPermission('mes:qc-ncr:dispose')") |
| | | public CommonResult<Boolean> disposeNcr(@Valid @RequestBody MesQcNcrDisposeReqVO disposeReqVO) { |
| | | ncrService.disposeNcr(disposeReqVO.getId(), |
| | | disposeReqVO.getHandlerUserId(), disposeReqVO.getHandleResult()); |
| | | public CommonResult<MesQcNcrDisposeRespVO> disposeNcr(@Valid @RequestBody MesQcNcrDisposeReqVO disposeReqVO) { |
| | | return success(ncrService.disposeNcr(disposeReqVO)); |
| | | } |
| | | |
| | | @PutMapping("/submit-approval") |
| | | @Operation(summary = "提交不合格品处理单审批") |
| | | @Parameter(name = "id", description = "编号", required = true) |
| | | @PreAuthorize("@ss.hasPermission('mes:qc-ncr:update')") |
| | | public CommonResult<Boolean> submitNcrApproval(@RequestParam("id") Long id) { |
| | | ncrService.submitNcrApproval(id); |
| | | return success(true); |
| | | } |
| | | |
| | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获得不合格品处理单详情") |
| | | @Parameter(name = "id", description = "编号", required = true, example = "1024") |
| | | @PreAuthorize("@ss.hasPermission('mes:qc-ncr:query')") |
| | | public CommonResult<MesQcNcrRespVO> getNcr(@RequestParam("id") Long id) { |
| | | MesQcNcrDO ncr = ncrService.getNcr(id); |
| | | return success(buildNcrRespVOList(Collections.singletonList(ncr)).get(0)); |
| | |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获得不合格品处理单分页") |
| | | @PreAuthorize("@ss.hasPermission('mes:qc-ncr:query')") |
| | | public CommonResult<PageResult<MesQcNcrRespVO>> getNcrPage(@Valid MesQcNcrPageReqVO pageReqVO) { |
| | | PageResult<MesQcNcrDO> pageResult = ncrService.getNcrPage(pageReqVO); |
| | | return success(new PageResult<>(buildNcrRespVOList(pageResult.getList()), pageResult.getTotal())); |