This commit is contained in:
sxu 2024-09-07 20:39:43 +08:00
parent 4b8923c8cc
commit 98a45fd27e
1 changed files with 13 additions and 13 deletions

View File

@ -185,7 +185,7 @@ public class BackReceiveServiceImpl implements BackReceiveService {
record.setNum(num); record.setNum(num);
//修改任务状态 //修改任务状态
List<BackApplyInfo> list = totalList.stream().filter(o -> o.getTypeId().equals(record.getTypeId())).collect(Collectors.toList()); List<BackApplyInfo> list = totalList.stream().filter(o -> o.getModelId().equals(record.getTypeId())).collect(Collectors.toList());
if (!CollectionUtils.isEmpty(totalList)) { if (!CollectionUtils.isEmpty(totalList)) {
for (BackApplyInfo backApplyInfo : list) { for (BackApplyInfo backApplyInfo : list) {
maxBackNumBackEnd += backApplyInfo.getMaxBackNumBackend(); maxBackNumBackEnd += backApplyInfo.getMaxBackNumBackend();
@ -259,18 +259,6 @@ public class BackReceiveServiceImpl implements BackReceiveService {
res = insertSad(newTaskId, bfList); res = insertSad(newTaskId, bfList);
} }
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);
}
//完成退料的部分更新 back_check_details is_finished=1此部分不支持撤回 //完成退料的部分更新 back_check_details is_finished=1此部分不支持撤回
finishBackCheckDetails(record); finishBackCheckDetails(record);
@ -280,6 +268,18 @@ public class BackReceiveServiceImpl implements BackReceiveService {
record.setMaintenanceNum(maintenanceNum); record.setMaintenanceNum(maintenanceNum);
record.setScrapNum(scrapNum); 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; return res;