|
|
|
@ -298,21 +298,18 @@ public class PodTemplateServiceImpl implements PodTemplateService {
|
|
|
|
|
InspectionTask inspectionTask = list.get(0);
|
|
|
|
|
String result = inspectionTask.getResult();
|
|
|
|
|
if (!inspectionTask.getStatus().equals(Constants.INSPECTION_TASK_STATUS_COMPLETE)||StringUtil.isBlank(result)){
|
|
|
|
|
|
|
|
|
|
String checkUser = resrceMapper.findCustomFieldByResrce(site, inspectionTask.getResrce(), "CHECK_USR");
|
|
|
|
|
throw new BaseException("请联系"+checkUser+",处理专检任务。");
|
|
|
|
|
|
|
|
|
|
// if (routerStep.getRework().equals("true") && stepId.startsWith("9")){
|
|
|
|
|
// return;
|
|
|
|
|
// }else if (!result.equals(Constants.RSESULT_OK )||StringUtil.isBlank(result)){
|
|
|
|
|
//
|
|
|
|
|
// String checkUser = resrceMapper.findCustomFieldByResrce(site, inspectionTask.getResrce(), "CHECK_USR");
|
|
|
|
|
// throw new BaseException("请联系"+checkUser+",处理专检任务。");
|
|
|
|
|
// }
|
|
|
|
|
/***
|
|
|
|
|
* 判断这道工序是否是返修工序,返修工序不校验上工序不合格
|
|
|
|
|
*/
|
|
|
|
|
}else if (routerStep.getRework().equals("true") && stepId.startsWith("9") && !result.equals(Constants.RSESULT_OK )){
|
|
|
|
|
}else if ( !result.equals(Constants.RSESULT_OK ) && inspectionTask.getStatus().equals(Constants.INSPECTION_TASK_STATUS_COMPLETE)
|
|
|
|
|
&& !routerStep.getRework().equals("true") && !stepId.startsWith("9")){
|
|
|
|
|
String checkUser = resrceMapper.findCustomFieldByResrce(site, inspectionTask.getResrce(), "CHECK_USR");
|
|
|
|
|
throw new BaseException("上工序不合格无法开始本工序,请联系"+checkUser+"处理专检任务");
|
|
|
|
|
}
|
|
|
|
|
/***
|
|
|
|
|
* 判断这道工序是否是返修工序,返修工序不校验上工序不合格
|
|
|
|
|
*/
|
|
|
|
|
else if (routerStep.getRework().equals("true") && stepId.startsWith("9") && !result.equals(Constants.RSESULT_OK )){
|
|
|
|
|
try {
|
|
|
|
|
sfcCrossService.startAction(site, currentRevisionRef.getHandle(), resrce, sfcServiceById.getHandle(), qty);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
@ -322,14 +319,16 @@ public class PodTemplateServiceImpl implements PodTemplateService {
|
|
|
|
|
sfcDispatchCommonService.updateSfcDispatchStatus(site, CommonMethods.getUser(), dispatchNo, DispatchStatusEnum.START.getCode(),null);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
try {
|
|
|
|
|
sfcCrossService.startAction(site, currentRevisionRef.getHandle(), resrce, sfcServiceById.getHandle(), qty);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
ExceptionUtil.throwException(e);
|
|
|
|
|
}
|
|
|
|
|
//更改派工单状态
|
|
|
|
|
sfcDispatchCommonService.updateSfcDispatchStatus(site, CommonMethods.getUser(), dispatchNo, DispatchStatusEnum.START.getCode(),null);
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
sfcCrossService.startAction(site, currentRevisionRef.getHandle(), resrce, sfcServiceById.getHandle(), qty);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
ExceptionUtil.throwException(e);
|
|
|
|
|
}
|
|
|
|
|
//更改派工单状态
|
|
|
|
|
sfcDispatchCommonService.updateSfcDispatchStatus(site, CommonMethods.getUser(), dispatchNo, DispatchStatusEnum.START.getCode(),null);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|