This commit is contained in:
parent
63439f1c73
commit
c0831402b0
|
|
@ -209,7 +209,7 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
scrapNum += bi.getBackNum();
|
scrapNum += bi.getBackNum();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.error("check001退料接收:{},{},{},{}", maxBackNumBackEnd, passNum, maintenanceNum, scrapNum);
|
log.error("退料接收总数与详细数据对比结果:maxBackNumBackEnd={},passNum={},maintenanceNum={},scrapNum={}", maxBackNumBackEnd, passNum, maintenanceNum, scrapNum);
|
||||||
if (maxBackNumBackEnd < passNum + maintenanceNum + scrapNum) {
|
if (maxBackNumBackEnd < passNum + maintenanceNum + scrapNum) {
|
||||||
log.error("TypeId={}所提交的退料数量大于最大退料数,可能您的退料已被别人退掉了!", bai.getTypeId());
|
log.error("TypeId={}所提交的退料数量大于最大退料数,可能您的退料已被别人退掉了!", bai.getTypeId());
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -259,31 +259,18 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
res = insertSad(newTaskId, bfList);
|
res = insertSad(newTaskId, bfList);
|
||||||
}
|
}
|
||||||
|
|
||||||
// List<BackApplyInfo> allList = backReceiveMapper.getAllList(record);
|
//更新结算表 slt_agreement_info
|
||||||
// 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);
|
|
||||||
// }
|
|
||||||
|
|
||||||
res = updateSlt4Bean(record, bai);
|
res = updateSlt4Bean(record, bai);
|
||||||
if (res == 0) {
|
if (res == 0) {
|
||||||
throw new RuntimeException("该机具未被领料使用");
|
throw new RuntimeException("该机具未被领料使用");
|
||||||
}
|
}
|
||||||
int postStoreNum = backReceiveMapper.getmaChineByCt(record);
|
|
||||||
record.setPostStoreNum(postStoreNum);
|
|
||||||
|
|
||||||
|
|
||||||
//完成退料的部分,更新 back_check_details 为 is_finished=1,此部分不支持撤回
|
//完成退料的部分,更新 back_check_details 为 is_finished=1,此部分不支持撤回
|
||||||
finishBackCheckDetails(record);
|
finishBackCheckDetails(record);
|
||||||
|
|
||||||
//库存日志
|
//库存日志
|
||||||
|
int postStoreNum = backReceiveMapper.getmaChineByCt(record);
|
||||||
|
record.setPostStoreNum(postStoreNum);
|
||||||
record.setBackNum(passNum + maintenanceNum + scrapNum);
|
record.setBackNum(passNum + maintenanceNum + scrapNum);
|
||||||
record.setPassNum(passNum);
|
record.setPassNum(passNum);
|
||||||
record.setMaintenanceNum(maintenanceNum);
|
record.setMaintenanceNum(maintenanceNum);
|
||||||
|
|
@ -328,32 +315,32 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int updateSlt(BackApplyInfo record, List<BackApplyInfo> hgList) {
|
// private int updateSlt(BackApplyInfo record, List<BackApplyInfo> hgList) {
|
||||||
for (BackApplyInfo bean : hgList) {
|
// for (BackApplyInfo bean : hgList) {
|
||||||
List<SltAgreementInfo> infoList = backReceiveMapper.getStlInfo(bean);
|
// List<SltAgreementInfo> infoList = backReceiveMapper.getStlInfo(bean);
|
||||||
if (infoList.size() > 0) {
|
// if (infoList.size() > 0) {
|
||||||
Integer backNum = bean.getBackNum();
|
// Integer backNum = bean.getBackNum();
|
||||||
for (SltAgreementInfo info : infoList) {
|
// for (SltAgreementInfo info : infoList) {
|
||||||
Integer num = info.getNum();
|
// Integer num = info.getNum();
|
||||||
if (backNum.equals(num)) {
|
// if (backNum.equals(num)) {
|
||||||
backReceiveMapper.updateStlInfo(info, record);
|
// backReceiveMapper.updateStlInfo(info, record);
|
||||||
break;
|
// break;
|
||||||
} else if (backNum > num) {
|
// } else if (backNum > num) {
|
||||||
backNum = backNum - num;
|
// backNum = backNum - num;
|
||||||
backReceiveMapper.updateStlInfo(info, record);
|
// backReceiveMapper.updateStlInfo(info, record);
|
||||||
} else if (backNum < num) {
|
// } else if (backNum < num) {
|
||||||
Integer many = num - backNum;
|
// Integer many = num - backNum;
|
||||||
backReceiveMapper.updateStlInfoTwo(info, record, backNum);
|
// backReceiveMapper.updateStlInfoTwo(info, record, backNum);
|
||||||
backReceiveMapper.insStlInfoTwo(info, many);
|
// backReceiveMapper.insStlInfoTwo(info, many);
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
return 0;
|
// return 0;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
return 1;
|
// return 1;
|
||||||
}
|
// }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<BackApplyInfo> codeQuery(BackApplyInfo record) {
|
public List<BackApplyInfo> codeQuery(BackApplyInfo record) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue