From b41c94e85413de9296176bd3cefed3b23057ad92 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Sat, 25 Jan 2025 10:14:24 +0800 Subject: [PATCH] =?UTF-8?q?2025-01-25=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/PartInformationServiceImpl.java | 41 +++++++++---------- 1 file changed, 20 insertions(+), 21 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 c759af50..48c953f7 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 @@ -4191,30 +4191,29 @@ public class PartInformationServiceImpl extends ServiceImpl propertyList = partInformationMapper.getMasterPartPropertyList("*", ifsPart.getPartNo(), ifsPart.getCodeNo(), "MP"); // 属性对象 - Map addMasterPartModelResponse = technicalClassBean.syncTechnicalClass(srv, partIfsCatalogModel); - if (!"200".equals(addMasterPartModelResponse.get("resultCode"))) { - throw new RuntimeException("IFS 物料件模板新增异常:" + addMasterPartModelResponse.get("resultMsg")); - } - if (!propertyList.isEmpty()) { - Map addMasterPartPropertyResponse = technicalClassBean.modifyTechnicalClassAttributes(srv, propertyList); - if (!"200".equals(addMasterPartPropertyResponse.get("resultCode"))) { - throw new RuntimeException("IFS 物料件属性新增异常:" + addMasterPartPropertyResponse.get("resultMsg")); + // 同步物料件属性 + if (org.apache.commons.lang3.StringUtils.isNotBlank(ifsPart.getCodeNo())) { + PartIfsCatalogModel partIfsCatalogModel = new PartIfsCatalogModel(); // 模板对象 + partIfsCatalogModel.setLuName(luName); + partIfsCatalogModel.setKeyRef("PART_NO=" + ifsPart.getPartNo() + "^"); // 物料编码 + partIfsCatalogModel.setTechnicalSpecNo(technicalSpecNo); + partIfsCatalogModel.setTechnicalClass(ifsPart.getCodeNo()); // 模板编码 + partIfsCatalogModel.setOkYesNo(okYesNo); + partIfsCatalogModel.setOkSign(ifsUser.getIfsUsername()); + partIfsCatalogModel.setDtOk(DateUtils.getStringNow2()); + Map addMasterPartModelResponse = technicalClassBean.syncTechnicalClass(srv, partIfsCatalogModel); + if (!"200".equals(addMasterPartModelResponse.get("resultCode"))) { + throw new RuntimeException("IFS 物料件模板新增异常:" + addMasterPartModelResponse.get("resultMsg")); } } } + List propertyList = partInformationMapper.getMasterPartPropertyList("*", ifsPart.getPartNo(), ifsPart.getCodeNo(), "MP"); // 属性对象 + if (!propertyList.isEmpty()) { + Map addMasterPartPropertyResponse = technicalClassBean.modifyTechnicalClassAttributes(srv, propertyList); + if (!"200".equals(addMasterPartPropertyResponse.get("resultCode"))) { + throw new RuntimeException("IFS 物料件属性新增异常:" + addMasterPartPropertyResponse.get("resultMsg")); + } + } } } }