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 f9786d3..b61a254 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 @@ -359,10 +359,11 @@ public class ToSAPServiceImpl { // 将消息记录log表 ErpMessageLog erplog = new ErpMessageLog(); erplog.setEventUser(user); - erplog.setServerName("WmsToErp"); - erplog.setEventName("FGStockIn"); + erplog.setServerName("WmsToSAP"); + erplog.setEventName("MatailInReverse"); erplog.setInterfaceTime(TimeStampUtil.getCurrentTime(TimeStampUtil.FORMAT_DEFAULT)); -// erplog.setMessageId(RECEIVEACTNO); +// erplog.setMessageId(undoId); + erplog.setMessageId(undoId); erplog.setSendMsg2(makeFGStockIn); erplog.setSendMsg(makeFGStockIn); erplog.setReturnMsg2(sapreturn); @@ -723,24 +724,24 @@ public class ToSAPServiceImpl { // itemsData.add(item); // // } -// String sendData = ToSAPMessageUtil.mm067(eventUser, bodyData, itemsData); +//String sendData = ToSAPMessageUtil.mm067(eventUser, bodyData, itemsData); - Map headData = new HashMap<>(); - Map bodyData = new HashMap<>(); + JSONObject MainData = new JSONObject(true); Map headJSonData = new HashMap<>(); Map bodyJSonData = new HashMap<>(); - headData.put("HEAD",headJSonData); - bodyData.put("BODY",bodyJSonData); + MainData.put("HEAD",headJSonData); + MainData.put("BODY",bodyJSonData); headJSonData.put("INTF_ID",""); - headJSonData.put("SRC_SYSTEM",""); + headJSonData.put("SRC_SYSTEM","WMS"); + headJSonData.put("DEST_SYSTEM","SAP"); headJSonData.put("SRC_MSGID",""); headJSonData.put("BACKUP1",""); headJSonData.put("BACKUP2",""); - bodyJSonData.put("MBLNR", ""); - bodyJSonData.put("MJAHR", ""); + bodyJSonData.put("MBLNR", undoId); + bodyJSonData.put("MJAHR", "2025"); - String sendData = ""; + String sendData = MainData.toJSONString(); return sendData; } public String qtrNoInvoice(String receiveRequestName, String siteName, String reActo, String user) { diff --git a/zi-wms-pda/src/main/java/com/cim/idm/service/Impl/ProductIntoServiceImpl.java b/zi-wms-pda/src/main/java/com/cim/idm/service/Impl/ProductIntoServiceImpl.java index 346002d..e9359ce 100644 --- a/zi-wms-pda/src/main/java/com/cim/idm/service/Impl/ProductIntoServiceImpl.java +++ b/zi-wms-pda/src/main/java/com/cim/idm/service/Impl/ProductIntoServiceImpl.java @@ -294,6 +294,9 @@ public class ProductIntoServiceImpl implements FGStockInService { throw new Exception("请选择正确的入库信息"); } EventInfo eventInfo = EventInfoUtil.makeEventInfo("receiveMesShippInfo", user, "receiveMesShippInfo"); + + List arrayList = new ArrayList (); + //将查询的结果写入MaterialPacking表 for(int i=0;i fgStockInInfo = toSapDao.getFgStockInInfo(boxList); + //封装为Json的字符串 String json = JSON.toJSONString(fgStockInInfo); - String undoID = toSAPService.FGStockInByManulIn(json, user); + //现sap没有手动直接入库 +// String undoID = toSAPService.FGStockInByManulIn(json, user); + + //手动先入到线边仓,再转库 + String aimErpFactory = boxList.get(0).getErpFactory(); + String aimErpLocation = boxList.get(0).getErpLocation(); + String aimLOcationName = boxList.get(0).getLocationName(); + String undoID = toSAPService.NoSourceChangeLocation(arrayList,aimErpFactory, + aimErpLocation, aimLOcationName, user ); //更新物料凭证和库存状态