This commit is contained in:
parent
4b8923c8cc
commit
98a45fd27e
|
|
@ -185,7 +185,7 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
|||
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)) {
|
||||
for (BackApplyInfo backApplyInfo : list) {
|
||||
maxBackNumBackEnd += backApplyInfo.getMaxBackNumBackend();
|
||||
|
|
@ -259,18 +259,6 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
|||
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,此部分不支持撤回
|
||||
finishBackCheckDetails(record);
|
||||
|
||||
|
|
@ -280,6 +268,18 @@ 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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue