This commit is contained in:
sxu 2024-09-07 20:50:54 +08:00
parent 98a45fd27e
commit f15593e866
1 changed files with 13 additions and 12 deletions

View File

@ -259,6 +259,19 @@ public class BackReceiveServiceImpl implements BackReceiveService {
res = insertSad(newTaskId, bfList);
}
List<BackApplyInfo> allList = backReceiveMapper.getAllList(record);
List<BackApplyInfo> allList2 = allList.stream().filter(o -> o.getTypeId().equals(record.getTypeId())).collect(Collectors.toList());
if (allList2 != null && allList2.size() > 0) {
res = updateSlt(record, allList2);
if (res == 0) {
throw new RuntimeException("该机具未被领料使用");
}
BackApplyInfo b = allList2.get(0);
record.setTypeId(b.getTypeId());
int postStoreNum = backReceiveMapper.getmaChineByCt(record);
record.setPostStoreNum(postStoreNum);
}
//完成退料的部分更新 back_check_details is_finished=1此部分不支持撤回
finishBackCheckDetails(record);
@ -268,18 +281,6 @@ public class BackReceiveServiceImpl implements BackReceiveService {
record.setMaintenanceNum(maintenanceNum);
record.setScrapNum(scrapNum);
}
List<BackApplyInfo> allList = backReceiveMapper.getAllList(record);
if (allList != null && allList.size() > 0) {
res = updateSlt(record, allList);
if (res == 0) {
throw new RuntimeException("该机具未被领料使用");
}
BackApplyInfo b = allList.get(0);
record.setTypeId(b.getTypeId());
int postStoreNum = backReceiveMapper.getmaChineByCt(record);
record.setPostStoreNum(postStoreNum);
}
}
return res;