From 6e75aeb6d1dfafc8184a52349610ad4fa31bfbe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=AD=E9=A3=9E?= Date: Mon, 24 Mar 2025 14:06:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../idm/service/impl/ToSAPServiceImpl.java | 25 ++++++++++--------- .../service/Impl/ProductIntoServiceImpl.java | 17 ++++++++++++- 2 files changed, 29 insertions(+), 13 deletions(-) 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 ); //更新物料凭证和库存状态