diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOrderServiceImpl.java b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOrderServiceImpl.java index 04a94a77..f88747b4 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOrderServiceImpl.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOrderServiceImpl.java @@ -612,10 +612,34 @@ public class OdsProcureOrderServiceImpl implements IOdsProcureOrderService { SapPurchaseOrderQuery sapPurchaseOrderQuery=new SapPurchaseOrderQuery(); sapPurchaseOrderQuery.setEbeln(odsProcureOrder.getProcureCode()); R result= remoteSapService.sapPurchaseOrderSync(sapPurchaseOrderQuery); - List sapPurchaseOrderQueryList=new ArrayList<>(); - sapPurchaseOrderQueryList= (List) result.getData(); - // sapPurchaseOrderQueryList - return null; + List> mapList = new ArrayList<>(); + mapList= (List>) result.getData(); + for(Map sapPurchaseOrderQuery1:mapList){ + OdsProcureOrder order =new OdsProcureOrder(); + order.setProcureCode(sapPurchaseOrderQuery1.get("ebeln")); + order.setSiteCode(sapPurchaseOrderQuery1.get("werks")); + order.setUserDefined3(sapPurchaseOrderQuery1.get("ebelp"));//批次 + order.setMaterialCode(sapPurchaseOrderQuery1.get("matnr")); + order.setMaterialDesc(sapPurchaseOrderQuery1.get("maktx")); + order.setActive("1"); + List orderList= odsProcureOrderMapper.selectOdsProcureOrderList(order); + if (orderList.size()>0){ + continue; + } + order.setPlanNumber(new BigDecimal(sapPurchaseOrderQuery1.get("menge"))); + order.setUnit(sapPurchaseOrderQuery1.get("meins")); + order.setSupplierCode(sapPurchaseOrderQuery1.get("lifnr")); + order.setUserDefined9(sapPurchaseOrderQuery1.get("zmenge")); + order.setUserDefined10(sapPurchaseOrderQuery1.get("elikz")); + order.setUserDefined11(sapPurchaseOrderQuery1.get("eindt")); + order.setCreateBy(odsProcureOrder.getCreateBy()); + order.setPlanDate(new Date()); + order.setOrderStatus("0"); + //order.setID(IdUtils.fastSimpleUUID()); + order.setCreateDate(new Date()); + odsProcureOrderMapper.insertOdsProcureOrder(order); + } + return AjaxResult.success(); } public String DesignatedPalletOutboundWCS(WMSDesignatedPalle wmsDesignatedPalle){