From 6edd217e4e9e4a08570ec8399a72b9e6b330747b Mon Sep 17 00:00:00 2001 From: mengjiao <3338049200@qq,com> Date: Tue, 18 Jun 2024 10:50:01 +0800 Subject: [PATCH] =?UTF-8?q?wms=E6=88=90=E5=93=81=E9=80=80=E8=B4=A7?= =?UTF-8?q?=E6=8F=90=E5=8D=95=E4=BF=AE=E6=94=B93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../op/sap/service/impl/SapItemSyncImpl.java | 4 +- .../wms/mapper/WmsRuturnPutEmbryoMapper.java | 2 + .../impl/WmsProductPutServiceImpl.java | 51 ++++++------- .../mapper/wms/WmsRuturnPutEmbryoMapper.xml | 75 +++++++++++++++++++ 4 files changed, 102 insertions(+), 30 deletions(-) diff --git a/op-modules/op-sap/src/main/java/com/op/sap/service/impl/SapItemSyncImpl.java b/op-modules/op-sap/src/main/java/com/op/sap/service/impl/SapItemSyncImpl.java index 3eefe63d..598501d9 100644 --- a/op-modules/op-sap/src/main/java/com/op/sap/service/impl/SapItemSyncImpl.java +++ b/op-modules/op-sap/src/main/java/com/op/sap/service/impl/SapItemSyncImpl.java @@ -524,13 +524,15 @@ public class SapItemSyncImpl implements SapItemSyncService { String LIFNR_NM=maraTable.getString("LIFNR_NM");//货运代理描述 String ZSAREA=maraTable.getString("ZSAREA");//销售大区 String BZTXT1=maraTable.getString("BZTXT1");//销售大区描述 + String POSNR=maraTable.getString("POSNR");//交货项目 log.info("物料号:"+MATNR+"物料描述:"+MAKTX+"交货单:"+VBELN+"销售单:"+VBELN_VA+"销售凭证类型:"+AUART+"销售凭证类型描述:"+BEZEI+ "数量:"+MENGE+"单位:"+MEINS+"计划日期:"+TDDAT+"送达方:"+KUNNR+"送达方描述:"+KUNNR_NM+"货运代理:"+LIFNR+ - "货运代理描述:"+LIFNR_NM+"销售大区:"+ZSAREA+"销售大区描述:"+BZTXT1); + "货运代理描述:"+LIFNR_NM+"销售大区:"+ZSAREA+"销售大区描述:"+BZTXT1+"交货项目:"+POSNR); map.put("MATNR",MATNR); map.put("MAKTX",MAKTX); map.put("VBELN",VBELN); map.put("VBELN_VA",VBELN_VA); + map.put("POSNR",POSNR); map.put("AUART",AUART); map.put("BEZEI",BEZEI); map.put("MENGE",MENGE); diff --git a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsRuturnPutEmbryoMapper.java b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsRuturnPutEmbryoMapper.java index 31f01906..1de6f9b4 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsRuturnPutEmbryoMapper.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsRuturnPutEmbryoMapper.java @@ -21,4 +21,6 @@ public interface WmsRuturnPutEmbryoMapper { * @return 成品退货入库集合 */ public List selectWmsRuturnPutEmbryoList(WmsRuturnPutEmbryo wmsRuturnPutEmbryo); + + void insertWmsRuturnPutEmbryo(WmsRuturnPutEmbryo wmsRuturnPutEmbryo1); } 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 eb365e37..81fe2b75 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 @@ -936,35 +936,28 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService { 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(wmsRuturnPutEmbryo.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(wmsRuturnPutEmbryo.getCreateBy()); - wmsSellOutEmbryo1.setCreateTime(new Date()); - //用行项目和订单进行判断 - // WmsSellOutEmbryo wmsSellOutEmbryo2= wmsRuturnPutEmbryoMapper.selectWmsRuturnPutEmbryo(VBELN,MATNR); -// if (wmsSellOutEmbryo2==null){ -// wmsSellOutEmbryoMapper.insertWmsSellOutEmbryo(wmsSellOutEmbryo1); -// }else { -// results="已经存在"; -// } + String POSNR=stringStringMap.get("POSNR");//交货项目 + WmsRuturnPutEmbryo wmsRuturnPutEmbryo1=new WmsRuturnPutEmbryo(); + wmsRuturnPutEmbryo1.setProductOrder(VBELN); + wmsRuturnPutEmbryo1.setFactoryCode(wmsRuturnPutEmbryo.getFactoryCode()); + wmsRuturnPutEmbryo1.setProductCode(MATNR); + wmsRuturnPutEmbryo1.setAttr10(POSNR); + List wmsRuturnPutEmbryoList= wmsRuturnPutEmbryoMapper.selectWmsRuturnPutEmbryoList(wmsRuturnPutEmbryo1); + if ( wmsRuturnPutEmbryoList.size()==0){ + wmsRuturnPutEmbryo1.setPlanQuantity(new BigDecimal(MENGE)); + wmsRuturnPutEmbryo1.setStatus("0"); + wmsRuturnPutEmbryo1.setUnitOfMeasure(MEINS); + wmsRuturnPutEmbryo1.setAttr9(VBELN_VA); + wmsRuturnPutEmbryo1.setCreateBy(wmsRuturnPutEmbryo.getCreateBy()); + wmsRuturnPutEmbryo1.setCreateTime(new Date()); + wmsRuturnPutEmbryo1.setActiveFlag("1"); + wmsRuturnPutEmbryo1.setProductName(MAKTX); + wmsRuturnPutEmbryo1.setSapStatus("0"); + wmsRuturnPutEmbryo1.setId(IdUtils.fastSimpleUUID()); + wmsRuturnPutEmbryoMapper.insertWmsRuturnPutEmbryo(wmsRuturnPutEmbryo1); + }else { + results="已经存在"; + } } } return results; diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/WmsRuturnPutEmbryoMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/WmsRuturnPutEmbryoMapper.xml index f77bd2da..d16d7d81 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/WmsRuturnPutEmbryoMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/WmsRuturnPutEmbryoMapper.xml @@ -148,6 +148,81 @@ where id=#{id} + + + insert into wms_ruturn_put_embryo + + id, + factory_code, + product_order, + wh_code, + wa_code, + wl_code, + product_name, + product_code, + product_sort, + specification, + unit_of_measure, + plan_quantity, + put_quantity, + status, + SAP_status, + SAP_proof, + SAP_message, + put_date, + attr1, + attr2, + attr3, + attr4, + attr5, + attr6, + attr7, + attr8, + attr9, + attr10, + create_by, + create_time, + update_by, + update_time, + active_flag, + + + #{id}, + #{factoryCode}, + #{productOrder}, + #{whCode}, + #{waCode}, + #{wlCode}, + #{productName}, + #{productCode}, + #{productSort}, + #{speciFication}, + #{unitOfMeasure}, + #{planQuantity}, + #{putQuantity}, + #{status}, + #{sapStatus}, + #{sapProof}, + #{sapMessage}, + #{putDate}, + #{attr1}, + #{attr2}, + #{attr3}, + #{attr4}, + #{attr5}, + #{attr6}, + #{attr7}, + #{attr8}, + #{attr9}, + #{attr10}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{activeFlag}, + + + insert into wms_ruturn_put_embryo_record