From 4aa80a332a34e43061d7271601a44b2f16c510f7 Mon Sep 17 00:00:00 2001 From: mengjiao <3338049200@qq,com> Date: Mon, 8 Apr 2024 10:42:15 +0800 Subject: [PATCH] =?UTF-8?q?wms=E9=94=80=E5=94=AE=E5=87=BA=E5=BA=93?= =?UTF-8?q?=E7=9A=84=E6=8F=90=E5=8D=95=E6=8E=A5=E5=8F=A331?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/WmsToWCSmissionController.java | 1 + .../op/wms/service/IWmsProductPutService.java | 2 +- .../impl/WmsProductPutServiceImpl.java | 72 ++++++++++++++++++- 3 files changed, 72 insertions(+), 3 deletions(-) diff --git a/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsToWCSmissionController.java b/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsToWCSmissionController.java index 3df730b7..062794f3 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsToWCSmissionController.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsToWCSmissionController.java @@ -262,6 +262,7 @@ public class WmsToWCSmissionController { public AjaxResult selectSnCorrelationBarcode(@RequestBody WmsProductPutTrayCode wmsProductPutTrayCode) { return AjaxResult.success(wmsProductPutService.selectSnCorrelationBarcode(wmsProductPutTrayCode)); } + /** * 成品销售出库--查询接口 * diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/IWmsProductPutService.java b/op-modules/op-wms/src/main/java/com/op/wms/service/IWmsProductPutService.java index a55262ab..f1fd022d 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/IWmsProductPutService.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/IWmsProductPutService.java @@ -87,7 +87,7 @@ public interface IWmsProductPutService { String deletSnCorrelationBarcode(WmsProductPutTrayCode wmsProductPutTrayCode); - List selectFinishedProductSales(WmsSellOutEmbryo wmsSellOutEmbryo); + String selectFinishedProductSales(WmsSellOutEmbryo wmsSellOutEmbryo); /** * 成品销售出库--确认接口 * diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsProductPutServiceImpl.java b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsProductPutServiceImpl.java index a294539a..8d02a1a0 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsProductPutServiceImpl.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsProductPutServiceImpl.java @@ -674,9 +674,77 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService { return result; } + /** + * + "MAKTX": "榄菊果蔬餐具净(海盐柠檬)1kg×10",描述 物料描述 + "KUNNR": "0001010404", //送达方 + "VBELN": "0081003133", //交货单 + "ZSAREA": "", //销售大区 + "BZTXT1": "", //销售大区描述 + "KUNNR_NM": "上海大润发有限公司(华东高新总仓)", //送达方描述 + "MENGE": "6.000", //数量 + "MEINS": "KAR", //单位 + "LIFNR_NM": "上海中集公联集装箱储运有限公司", //货运代理描述 + "TDDAT": "2202-02-09", //计划日期 + "LIFNR": "0000400213", //货运代理 + "VBELN_VA": "0000738138", //销售单 + "MATNR": "000000010201020100" 物料描述 + * @param wmsSellOutEmbryo + * @return + */ @Override - public List selectFinishedProductSales(WmsSellOutEmbryo wmsSellOutEmbryo) { - return null; + public String selectFinishedProductSales(WmsSellOutEmbryo wmsSellOutEmbryo) { + String results="提单成功"; + DynamicDataSourceContextHolder.push("ds_" + wmsSellOutEmbryo.getFactoryCode()); + Map objectMap=new HashMap<>(); +// objectMap.put("S_MATNR","");//物料号, +// objectMap.put("S_TDDAT","");//String 计划运输日期 + objectMap.put("VBELN_VA",wmsSellOutEmbryo.getDeliveryOrder());//交货单 + R result = remoteSapService.FPinventory(objectMap); + int code = result.getCode(); + String msg = result.getMsg(); + if(code==200){ + List> mapList= (List>) result.getData(); + for ( Map stringStringMap: mapList){ + String MAKTX=stringStringMap.get("MAKTX");//物料描述 + String MATNR=stringStringMap.get("MATNR");//物料号 + String KUNNR=stringStringMap.get("KUNNR");//送达方 + String VBELN=stringStringMap.get("VBELN");//交货单---一销售单对多交货单 + String VBELN_VA=stringStringMap.get("VBELN_VA");//销售单 + String MENGE=stringStringMap.get("MENGE");//数量 + String MEINS=stringStringMap.get("MEINS");//单位 + String TDDAT=stringStringMap.get("TDDAT");//计划日期 + String KUNNR_NM=stringStringMap.get("KUNNR_NM");//送达方描述 + String LIFNR=stringStringMap.get("LIFNR");//货运代理 + String LIFNR_NM=stringStringMap.get("LIFNR_NM");//货运代理描述 + String ZSAREA=stringStringMap.get("ZSAREA");//销售大区 + String BZTXT1=stringStringMap.get("BZTXT1");//销售大区描述 + WmsSellOutEmbryo wmsSellOutEmbryo1=new WmsSellOutEmbryo(); + wmsSellOutEmbryo1.setId(IdUtils.fastSimpleUUID()); + wmsSellOutEmbryo1.setDeliveryOrder(VBELN);//交货单号 + wmsSellOutEmbryo1.setAttr1(VBELN_VA); + wmsSellOutEmbryo1.setProductCode(MATNR); + wmsSellOutEmbryo1.setProductName(MAKTX); + wmsSellOutEmbryo1.setFactoryCode(wmsSellOutEmbryo.getFactoryCode()); + wmsSellOutEmbryo1.setOutQuantity(new BigDecimal("0")); + wmsSellOutEmbryo1.setAttr2(KUNNR); + wmsSellOutEmbryo1.setAttr3(KUNNR_NM); + wmsSellOutEmbryo1.setAttr4(LIFNR); + wmsSellOutEmbryo1.setAttr5(LIFNR_NM); + wmsSellOutEmbryo1.setAttr6(ZSAREA); + wmsSellOutEmbryo1.setAttr7(BZTXT1); + wmsSellOutEmbryo1.setAttr8(TDDAT); + wmsSellOutEmbryo1.setPlanQuantity(new BigDecimal(MENGE)); + wmsSellOutEmbryo1.setUnitOfMeasure(MEINS); + wmsSellOutEmbryo1.setStatus("0"); + wmsSellOutEmbryo1.setSapStatus("0"); + wmsSellOutEmbryo1.setActiveFlag("1"); + wmsSellOutEmbryo1.setCreateBy(wmsSellOutEmbryo.getCreateBy()); + wmsSellOutEmbryo1.setCreateTime(new Date()); + wmsSellOutEmbryoMapper.insertWmsSellOutEmbryo(wmsSellOutEmbryo1); + } + } + return results; } @Override