This commit is contained in:
parent
98a45fd27e
commit
f15593e866
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue