From 5e478a72020cb36ab34214f308f516fc6bcd5b29 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Thu, 26 Jun 2025 13:10:29 +0800 Subject: [PATCH] =?UTF-8?q?2025-06-26=20IFS=E5=90=8C=E6=AD=A5=E6=97=B6?= =?UTF-8?q?=E9=80=9F=E5=BA=A6=E6=AF=94=E8=BE=83=E6=85=A2=EF=BC=8C=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E7=9B=91=E5=90=AC=20=E5=93=AA=E9=87=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=94=B9=E5=93=AA=E9=87=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/PartInformationServiceImpl.java | 84 +++++++++++-------- .../modules/part/vo/PartInformationVo.java | 7 +- 2 files changed, 52 insertions(+), 39 deletions(-) diff --git a/src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java b/src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java index a1a6029c..a00e23b4 100644 --- a/src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java +++ b/src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java @@ -814,43 +814,53 @@ public class PartInformationServiceImpl extends ServiceImpl ifsProperty) { Server srv = getIfsServer(data.getUpdateBy()); - PartIfsInventory partIfsInventory = getPartIfsInventory(data); // 主表对象 - PartIfsInventoryConfig partIfsInventoryConfig = getPartIfsInventoryConfig(data); // costs对象 - PartIfsInventoryManufacture partIfsInventoryManufacture = getPartIfsInventoryManufacture(data); // Manufacturing对象 - PartIfsInventoryPlan partIfsInventoryPlan = getPartIfsInventoryPlan(data); // planning对象 - PartIfsInventoryModel partIfsInventoryModel = new PartIfsInventoryModel(); // 物料模板对象 - partIfsInventoryModel.setContract(data.getSite()); - partIfsInventoryModel.setPartNo(data.getPartNo()); - - // 同步主表数据 - Map updateInventoryPartResponse = inventoryServiceBean.modifyInventoryPart(srv, partIfsInventory); - if (!"200".equals(updateInventoryPartResponse.get("resultCode"))) { - throw new RuntimeException("ifs 库存件修改异常信息:" + updateInventoryPartResponse.get("resultMsg")); - } - // 同步Costs表数据 - Map addInventoryPartCostsResponse = inventoryServiceBean.modifyInventoryPartCost(srv, partIfsInventoryConfig); - if (!"200".equals(addInventoryPartCostsResponse.get("resultCode"))) { - throw new RuntimeException("ifs 库存件Costs修改异常信息:" + addInventoryPartCostsResponse.get("resultMsg")); - } - // 同步Manufacturing表数据 - Map addInventoryPartManufacturingResponse = inventoryServiceBean.modifyInventoryPartManufacture(srv, partIfsInventoryManufacture); - if (!"200".equals(addInventoryPartManufacturingResponse.get("resultCode"))) { - throw new RuntimeException("ifs 库存件Manufacturing修改异常信息:" + addInventoryPartManufacturingResponse.get("resultMsg")); - } - // 同步Planning表数据 - Map addInventoryPartPlanningResponse = inventoryServiceBean.modifyInventoryPartPlan(srv, partIfsInventoryPlan); - if (!"200".equals(addInventoryPartPlanningResponse.get("resultCode"))) { - throw new RuntimeException("ifs 库存件Planning修改异常信息:" + addInventoryPartPlanningResponse.get("resultMsg")); - } - // 同步物料属性, 先删除再新增 - Map deleteInventoryPartPropertyResponse = inventoryServiceBean.removeInventoryPartCharacteristicsByPartNo(srv, partIfsInventoryModel); - if (!"200".equals(deleteInventoryPartPropertyResponse.get("resultCode"))) { - throw new RuntimeException("IFS库存件属性删除异常:" + deleteInventoryPartPropertyResponse.get("resultMsg")); - } - if (!ifsProperty.isEmpty()) { - Map addInventoryPartPropertyResponse = inventoryServiceBean.syncInventoryPartCharacteristics(srv, ifsProperty); - if (!"200".equals(addInventoryPartPropertyResponse.get("resultCode"))) { - throw new RuntimeException("IFS库存件属性新增异常:" + addInventoryPartPropertyResponse.get("resultMsg")); + + if (data.getMainInfoFlag()) { + PartIfsInventory partIfsInventory = getPartIfsInventory(data); // 主表对象 + // 同步主表数据 + Map updateInventoryPartResponse = inventoryServiceBean.modifyInventoryPart(srv, partIfsInventory); + if (!"200".equals(updateInventoryPartResponse.get("resultCode"))) { + throw new RuntimeException("ifs 库存件修改异常信息:" + updateInventoryPartResponse.get("resultMsg")); + } + } + if (data.getCostsInfoFlag()) { + PartIfsInventoryConfig partIfsInventoryConfig = getPartIfsInventoryConfig(data); // costs对象 + // 同步Costs表数据 + Map addInventoryPartCostsResponse = inventoryServiceBean.modifyInventoryPartCost(srv, partIfsInventoryConfig); + if (!"200".equals(addInventoryPartCostsResponse.get("resultCode"))) { + throw new RuntimeException("ifs 库存件Costs修改异常信息:" + addInventoryPartCostsResponse.get("resultMsg")); + } + } + if (data.getManufacturingInfoFlag()) { + PartIfsInventoryManufacture partIfsInventoryManufacture = getPartIfsInventoryManufacture(data); // Manufacturing对象 + // 同步Manufacturing表数据 + Map addInventoryPartManufacturingResponse = inventoryServiceBean.modifyInventoryPartManufacture(srv, partIfsInventoryManufacture); + if (!"200".equals(addInventoryPartManufacturingResponse.get("resultCode"))) { + throw new RuntimeException("ifs 库存件Manufacturing修改异常信息:" + addInventoryPartManufacturingResponse.get("resultMsg")); + } + } + if (data.getPlanningInfoFlag()) { + PartIfsInventoryPlan partIfsInventoryPlan = getPartIfsInventoryPlan(data); // planning对象 + // 同步Planning表数据 + Map addInventoryPartPlanningResponse = inventoryServiceBean.modifyInventoryPartPlan(srv, partIfsInventoryPlan); + if (!"200".equals(addInventoryPartPlanningResponse.get("resultCode"))) { + throw new RuntimeException("ifs 库存件Planning修改异常信息:" + addInventoryPartPlanningResponse.get("resultMsg")); + } + } + if (data.getPartItemInfoFlag()) { + PartIfsInventoryModel partIfsInventoryModel = new PartIfsInventoryModel(); // 物料模板对象 + partIfsInventoryModel.setContract(data.getSite()); + partIfsInventoryModel.setPartNo(data.getPartNo()); + // 同步物料属性, 先删除再新增 + Map deleteInventoryPartPropertyResponse = inventoryServiceBean.removeInventoryPartCharacteristicsByPartNo(srv, partIfsInventoryModel); + if (!"200".equals(deleteInventoryPartPropertyResponse.get("resultCode"))) { + throw new RuntimeException("IFS库存件属性删除异常:" + deleteInventoryPartPropertyResponse.get("resultMsg")); + } + if (!ifsProperty.isEmpty()) { + Map addInventoryPartPropertyResponse = inventoryServiceBean.syncInventoryPartCharacteristics(srv, ifsProperty); + if (!"200".equals(addInventoryPartPropertyResponse.get("resultCode"))) { + throw new RuntimeException("IFS库存件属性新增异常:" + addInventoryPartPropertyResponse.get("resultMsg")); + } } } } diff --git a/src/main/java/com/spring/modules/part/vo/PartInformationVo.java b/src/main/java/com/spring/modules/part/vo/PartInformationVo.java index d7a7971c..18de4116 100644 --- a/src/main/java/com/spring/modules/part/vo/PartInformationVo.java +++ b/src/main/java/com/spring/modules/part/vo/PartInformationVo.java @@ -167,8 +167,11 @@ public class PartInformationVo extends PartInformationEntity { private String fromPartNo; private String fromPartDesc; private String copyFlag; - private String virtualPartNo; - private String ifHasPeifang; + private Boolean mainInfoFlag; + private Boolean costsInfoFlag; + private Boolean manufacturingInfoFlag; + private Boolean planningInfoFlag; + private Boolean partItemInfoFlag; }