diff --git a/common/src/main/java/com/foreverwin/mesnac/common/controller/InspectionTaskController.java b/common/src/main/java/com/foreverwin/mesnac/common/controller/InspectionTaskController.java index 9f727651..2e8b71ae 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/controller/InspectionTaskController.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/controller/InspectionTaskController.java @@ -33,7 +33,7 @@ public class InspectionTaskController { @PostMapping("/save") public R getInspectionTaskList(@RequestBody Map paramMap){ inspectionTaskService.saveTask(paramMap); - return R.ok("保存成功"); + return R.ok(null,"保存成功"); } @ResponseBody @RequestMapping(method = RequestMethod.POST, value = "/createTask") diff --git a/production/src/main/java/com/foreverwin/mesnac/production/service/impl/PodTemplateServiceImpl.java b/production/src/main/java/com/foreverwin/mesnac/production/service/impl/PodTemplateServiceImpl.java index 35da3455..92abfd5d 100644 --- a/production/src/main/java/com/foreverwin/mesnac/production/service/impl/PodTemplateServiceImpl.java +++ b/production/src/main/java/com/foreverwin/mesnac/production/service/impl/PodTemplateServiceImpl.java @@ -210,6 +210,7 @@ public class PodTemplateServiceImpl implements PodTemplateService { if (StringUtil.isBlank(resrce)){ throw new BaseException("资源不能为空"); } + sfcDtoList.forEach(sfcDto -> { String site = CommonMethods.getSite(); String operation = sfcDto.getOperation(); @@ -220,14 +221,6 @@ public class PodTemplateServiceImpl implements PodTemplateService { String dispatchNo = sfcDto.getDispatchNo(); Sfc sfcServiceById = sfcService.getById(HandleEnum.SFC.getHandle(site, sfc)); BigDecimal qty=new BigDecimal(sfcServiceById.getQty().toString()); - try { - sfcCrossService.completeAction(site, currentRevisionRef.getHandle(),resrce,sfcServiceById.getHandle(),qty); - } catch (Exception e) { - ExceptionUtil.throwException(e); - } - //更改派工单状态 - sfcDispatchCommonService.updateSfcDispatchStatus(site,CommonMethods.getUser(),dispatchNo, DispatchStatusEnum.COMPLETE.getCode()); - //是否有自检检验项目 List inspectionItemDetails = inspectionItemService.selectQualityInspection(sfc, operation, stepId, Constants.INSPECTION_TYPE_Z); if (inspectionItemDetails.size()>0&&inspectionItemDetails.get(0)!=null) { @@ -240,7 +233,13 @@ public class PodTemplateServiceImpl implements PodTemplateService { throw new BaseException("自检任务不合格,不能完成请检查"); } } - + try { + sfcCrossService.completeAction(site, currentRevisionRef.getHandle(),resrce,sfcServiceById.getHandle(),qty); + } catch (Exception e) { + ExceptionUtil.throwException(e); + } + //更改派工单状态 + sfcDispatchCommonService.updateSfcDispatchStatus(site,CommonMethods.getUser(),dispatchNo, DispatchStatusEnum.COMPLETE.getCode()); }); } }