|
|
|
@ -220,10 +220,14 @@ public class PodTemplateServiceImpl implements PodTemplateService {
|
|
|
|
|
QueryWrapper<InspectionTask> queryWrapper = new QueryWrapper<>();
|
|
|
|
|
queryWrapper.eq(InspectionTask.CATEGORY, Constants.INSPECTION_TYPE_P);
|
|
|
|
|
queryWrapper.eq(InspectionTask.SFC, sfc);
|
|
|
|
|
queryWrapper.ne(InspectionTask.RESULT, Constants.RSESULT_OK);
|
|
|
|
|
queryWrapper.orderByDesc(InspectionTask.CREATED_DATE_TIME);
|
|
|
|
|
List<InspectionTask> list = inspectionTaskService.list(queryWrapper);
|
|
|
|
|
if (!list.isEmpty()) {
|
|
|
|
|
throw new BaseException("请完成专检检验任务");
|
|
|
|
|
InspectionTask inspectionTask = list.get(0);
|
|
|
|
|
String result = inspectionTask.getResult();
|
|
|
|
|
if (!inspectionTask.getStatus().equals(Constants.INSPECTION_TASK_STATUS_COMPLETE)||StringUtil.isBlank(result)||!result.equals(Constants.RSESULT_OK)){
|
|
|
|
|
throw new BaseException("请完成专检检验任务");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
sfcCrossService.startAction(site, currentRevisionRef.getHandle(), resrce, sfcServiceById.getHandle(), qty);
|
|
|
|
@ -289,7 +293,7 @@ public class PodTemplateServiceImpl implements PodTemplateService {
|
|
|
|
|
inspectionTaskService.createTask(paramMap);
|
|
|
|
|
} else {
|
|
|
|
|
paramMap.put("CATEGORY", Constants.INSPECTION_TYPE_P);
|
|
|
|
|
inspectionTaskService.createCompleteTask(paramMap);
|
|
|
|
|
inspectionTaskService.createNewTask(paramMap);
|
|
|
|
|
}
|
|
|
|
|
//首件创建
|
|
|
|
|
inspectionItemDetails = inspectionItemService.selectQualityInspection(sfc, operation, stepId, Constants.INSPECTION_TYPE_S);
|
|
|
|
|