This commit is contained in:
sxu 2024-09-07 14:47:45 +08:00
parent adf408ae8e
commit 2082e43f19
1 changed files with 6 additions and 5 deletions

View File

@ -165,10 +165,6 @@ public class BackReceiveServiceImpl implements BackReceiveService {
private int getEndBackResult(BackApplyInfo record, List<BackApplyInfo> allList1, int taskId) {
int res = 0;
int maxBackNumBackEnd = 0;
int passNum = 0;
int maintenanceNum = 0;
int scrapNum = 0;
List<BackApplyInfo> totalList = backReceiveMapper.receiveView4Backend(record);
boolean allZeros = totalList.stream().allMatch(n -> Double.valueOf(n.getNum()).intValue() == 0);
if (allZeros) {
@ -180,6 +176,10 @@ public class BackReceiveServiceImpl implements BackReceiveService {
if (allList1 != null && allList1.size() > 0) {
for (BackApplyInfo bai : allList1) {
int maxBackNumBackEnd = 0;
int passNum = 0;
int maintenanceNum = 0;
int scrapNum = 0;
record.setTypeId(bai.getTypeId());
int num = backReceiveMapper.getmaChineByCt(record);
record.setNum(num);
@ -211,7 +211,8 @@ public class BackReceiveServiceImpl implements BackReceiveService {
}
log.error("check001退料接收:{},{},{},{}", maxBackNumBackEnd, passNum, maintenanceNum, scrapNum);
if (maxBackNumBackEnd < passNum + maintenanceNum + scrapNum) {
throw new RuntimeException("提交退料数量大于最大退料数,可能您的退料已被别人退掉了");
log.error("TypeId={}所提交的退料数量大于最大退料数,可能您的退料已被别人退掉了!", bai.getTypeId());
continue;
}
//更加退料接收的数据创建下一步流程