update 取消物料入库请求,修复未删除BS_MES_SHIPPED记录,导致取消后再次入库提示重复问题
This commit is contained in:
parent
1666603fa1
commit
824ade1e4a
@ -245,7 +245,7 @@ public class MESToWMSServiceImpl implements MESToWMSService {
|
||||
|
||||
String billCode = toSAPService.cancelShipInter(undoId, user, payMentDate);
|
||||
if (billCode == null) {
|
||||
throw new GlobalException("报送ERP失败,请联系IT处理!");
|
||||
throw new GlobalException("报送SAP失败,请联系IT处理!");
|
||||
}
|
||||
|
||||
|
||||
@ -262,11 +262,13 @@ public class MESToWMSServiceImpl implements MESToWMSService {
|
||||
setEventInfo.setUserColumns(hashMap);
|
||||
RemoveInfo removeInfo = new RemoveInfo();
|
||||
for (Map<String, Object> MP : MPlIST) {
|
||||
|
||||
String MATERIALPACKINGNAME = MP.get("MATERIALPACKINGNAME").toString();
|
||||
/*
|
||||
//根据当前的数据跟新完工报告且删除入库表的数据
|
||||
String sql = "SELECT M.RECEIVEREQUESTNAME,M.RECEIVEREQUESTDETAILNAME,M.QTY FROM MATERIALPACKINGSUB M WHERE M.MATERIALPACKINGNAME = :MATERIALPACKINGNAME\r\n" +
|
||||
"UNION \r\n" +
|
||||
"SELECT M.RECEIVEREQUESTNAME,M.RECEIVEREQUESTDETAILNAME,M.QTY FROM MATERIALPACKINGSUBHISTORY M WHERE M.MATERIALPACKINGNAME = :MATERIALPACKINGNAME";
|
||||
String MATERIALPACKINGNAME = MP.get("MATERIALPACKINGNAME").toString();
|
||||
hashMap.put("MATERIALPACKINGNAME", MATERIALPACKINGNAME);
|
||||
List<Map<String, Object>> queryForList = IDMFrameServiceProxy.getSqlTemplate().queryForList(sql, hashMap);
|
||||
for (int i = 0; i < queryForList.size(); i++) {
|
||||
@ -307,6 +309,9 @@ public class MESToWMSServiceImpl implements MESToWMSService {
|
||||
String MESsQL = " UPDATE BS_MES_SHIPPED T SET T.RECEIVE_FLAG = 'N' WHERE T.LOTNAME = :MATERIALPACKINGNAME ";
|
||||
IDMFrameServiceProxy.getSqlTemplate().update(MESsQL, hashMap);
|
||||
}
|
||||
*/
|
||||
String MESsQL = " DELETE FROM BS_MES_SHIPPED T WHERE T.LOTNAME = :MATERIALPACKINGNAME ";
|
||||
IDMFrameServiceProxy.getSqlTemplate().update(MESsQL, hashMap);
|
||||
MaterialPackingServiceProxy.getMaterialPackingService().remove(new MaterialPackingKey("SDK", MATERIALPACKINGNAME), makeEventInfo, removeInfo);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user