philip 4 years ago
parent 8eb343adde
commit 56982f9a29

@ -33,7 +33,7 @@ public class InspectionTaskController {
@PostMapping("/save") @PostMapping("/save")
public R getInspectionTaskList(@RequestBody Map<String, Object> paramMap){ public R getInspectionTaskList(@RequestBody Map<String, Object> paramMap){
inspectionTaskService.saveTask(paramMap); inspectionTaskService.saveTask(paramMap);
return R.ok("保存成功"); return R.ok(null,"保存成功");
} }
@ResponseBody @ResponseBody
@RequestMapping(method = RequestMethod.POST, value = "/createTask") @RequestMapping(method = RequestMethod.POST, value = "/createTask")

@ -210,6 +210,7 @@ public class PodTemplateServiceImpl implements PodTemplateService {
if (StringUtil.isBlank(resrce)){ if (StringUtil.isBlank(resrce)){
throw new BaseException("资源不能为空"); throw new BaseException("资源不能为空");
} }
sfcDtoList.forEach(sfcDto -> { sfcDtoList.forEach(sfcDto -> {
String site = CommonMethods.getSite(); String site = CommonMethods.getSite();
String operation = sfcDto.getOperation(); String operation = sfcDto.getOperation();
@ -220,14 +221,6 @@ public class PodTemplateServiceImpl implements PodTemplateService {
String dispatchNo = sfcDto.getDispatchNo(); String dispatchNo = sfcDto.getDispatchNo();
Sfc sfcServiceById = sfcService.getById(HandleEnum.SFC.getHandle(site, sfc)); Sfc sfcServiceById = sfcService.getById(HandleEnum.SFC.getHandle(site, sfc));
BigDecimal qty=new BigDecimal(sfcServiceById.getQty().toString()); 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<InspectionItemDetail> inspectionItemDetails = inspectionItemService.selectQualityInspection(sfc, operation, stepId, Constants.INSPECTION_TYPE_Z); List<InspectionItemDetail> inspectionItemDetails = inspectionItemService.selectQualityInspection(sfc, operation, stepId, Constants.INSPECTION_TYPE_Z);
if (inspectionItemDetails.size()>0&&inspectionItemDetails.get(0)!=null) { if (inspectionItemDetails.size()>0&&inspectionItemDetails.get(0)!=null) {
@ -240,7 +233,13 @@ public class PodTemplateServiceImpl implements PodTemplateService {
throw new BaseException("自检任务不合格,不能完成请检查"); 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());
}); });
} }
} }

Loading…
Cancel
Save