|
@@ -131,6 +131,12 @@ public class ReportCheckServiceImpl implements ReportCheckService {
|
|
|
log.error("无法根据ID:{}获取到输出物料信息", id);
|
|
|
throw new CustomException("无法获取到输出物料信息");
|
|
|
}
|
|
|
+ // 获取工序作业明细信息
|
|
|
+ ApsProcessOperationProcessEquDo currentProcessOperationEqu = apsProcessOperationProcessEquService.getById(reportRecordsDo.getProcessequid());
|
|
|
+ if (currentProcessOperationEqu == null) {
|
|
|
+ log.error("无法找到当前报工记录对应的工序作业信息");
|
|
|
+ throw new CustomException("无法找到当前报工记录对应的工序作业信息");
|
|
|
+ }
|
|
|
LambdaUpdateWrapper<ApsReportRecordsDo> reportUpdateWrapper = new LambdaUpdateWrapper<>();
|
|
|
//根据输出物料信息,赋值更新报工记录的合格信息
|
|
|
//定义检验等级排序,从大->小
|
|
@@ -146,7 +152,9 @@ public class ReportCheckServiceImpl implements ReportCheckService {
|
|
|
if (reportRecordsDo.getReportifblankprocess().equals("是")) {
|
|
|
reportUpdateWrapper.set(ApsReportRecordsDo::getBlanklevel, checkLevel);
|
|
|
} else {
|
|
|
- if (StringUtils.isNotBlank(reportRecordsDo.getBatchnumber())) {
|
|
|
+ //是否坯料工序!=是,并且是第一道工序,并且输入批次号不为空,并且在线上在制品可以找到对应的检验等级
|
|
|
+ if (StringUtils.isBlank(currentProcessOperationEqu.getPreviousprocessesids())
|
|
|
+ && StringUtils.isNotBlank(reportRecordsDo.getBatchnumber())) {
|
|
|
List<String> inputBatchNumber = Arrays.asList(reportRecordsDo.getBatchnumber().split(","));
|
|
|
List<ApsWorkInProgressInventoryDo> inputList = apsWorkInProgressInventoryService.list(new LambdaQueryWrapper<ApsWorkInProgressInventoryDo>()
|
|
|
.in(ApsWorkInProgressInventoryDo::getBatchnumber, inputBatchNumber)
|
|
@@ -200,12 +208,6 @@ public class ReportCheckServiceImpl implements ReportCheckService {
|
|
|
log.error("无法根据ID:{}获取到工序作业信息", id);
|
|
|
throw new CustomException("无法获取到工序作业信息,请联系系统管理员!");
|
|
|
}
|
|
|
- // 获取工序作业明细信息
|
|
|
- ApsProcessOperationProcessEquDo currentProcessOperationEqu = apsProcessOperationProcessEquService.getById(reportRecordsDo.getProcessequid());
|
|
|
- if (currentProcessOperationEqu == null) {
|
|
|
- log.error("无法找到当前报工记录对应的工序作业信息");
|
|
|
- throw new CustomException("无法找到当前报工记录对应的工序作业信息");
|
|
|
- }
|
|
|
// 获取工序作业对应的输出物料信息
|
|
|
List<ApsProcessOperationOutMaterDo> operationOutMaterDoList = apsProcessOperationOutMaterService.list(new LambdaQueryWrapper<ApsProcessOperationOutMaterDo>()
|
|
|
.eq(ApsProcessOperationOutMaterDo::getMainid, currentProcessOperationId)
|