diff --git a/zi-wms-inf/src/main/java/com/cim/idm/service/impl/ToSAPServiceImpl.java b/zi-wms-inf/src/main/java/com/cim/idm/service/impl/ToSAPServiceImpl.java index 36d5f80..27a67ff 100644 --- a/zi-wms-inf/src/main/java/com/cim/idm/service/impl/ToSAPServiceImpl.java +++ b/zi-wms-inf/src/main/java/com/cim/idm/service/impl/ToSAPServiceImpl.java @@ -2716,7 +2716,7 @@ public class ToSAPServiceImpl { } //MES上报工单消耗数据-261工单投料 - public String mesMaterialConsume( String user, String payMentDate, EventInfo eventInfo) throws Exception { + public String mesMaterialConsume( String user, String payMentDate, EventInfo eventInfo, String aufnr) throws Exception { String rcode; String undoId = ""; @@ -2799,7 +2799,7 @@ public class ToSAPServiceImpl { //item.put("ZLLITEM", maps.get(i).get("RESERVEDPROJECTNUMB")); item.put("ZLLITEM", maps.get(i).get("SHIPREQUESTDETAILNAME")); //AUFNR 订单号 - item.put("AUFNR", maps.get(i).get("WO")); + item.put("AUFNR", aufnr); String materialPackingName = maps.get(i).get("MATERIALPACKINGNAME") == null ? "" : maps.get(i).get("MATERIALPACKINGNAME").toString(); if (StringUtils.isNotEmpty(materialPackingName)){ materialPackingNameList.add(materialPackingName); diff --git a/zi-wms-pda/src/main/java/com/cim/idm/service/Impl/MESToWMSServiceImpl.java b/zi-wms-pda/src/main/java/com/cim/idm/service/Impl/MESToWMSServiceImpl.java index 0bf5b5e..1448e87 100644 --- a/zi-wms-pda/src/main/java/com/cim/idm/service/Impl/MESToWMSServiceImpl.java +++ b/zi-wms-pda/src/main/java/com/cim/idm/service/Impl/MESToWMSServiceImpl.java @@ -68,7 +68,7 @@ public class MESToWMSServiceImpl implements MESToWMSService { loginfo.setEventName("materialConsume_Request"); String siteName = System.getProperty("company", "SDK"); EventInfo eventInfo = new com.cim.idm.wmsextend.generic.util.EventInfoUtil().makeEventInfo("MES消耗UNDOID", "MES", "MES消耗UNDOID", "", ""); - + String aufnr = ""; List boxIdList = new ArrayList<>(); List qtyList = new ArrayList<>(); List mpList = new ArrayList<>(); @@ -118,6 +118,7 @@ public class MESToWMSServiceImpl implements MESToWMSService { } //调用存储MES_CONSUME String procedureName = "MES_CONSUME"; + aufnr = wo; // 调用存储过程返回参数 // IDMFrameServiceProxy.getSqlTemplate().getJdbcTemplate().execute(procedureName); Map bindMap = new HashMap() { @@ -145,7 +146,7 @@ public class MESToWMSServiceImpl implements MESToWMSService { } // 将工单的物料消耗数据传给SAP - String undoId = toSAPService.mesMaterialConsume("MES",payMentDate, eventInfo); + String undoId = toSAPService.mesMaterialConsume("MES",payMentDate, eventInfo,aufnr); result = AjaxResult.me().setSuccess(true).setErrorCode(200).setMessage("执行成功").setResultObj(undoId); loginfo.setResultCode("0"); loginfo.setReturnMsg(JSONObject.toJSONString(result));