Browse Source

2025-01-25

优化
master
fengyuan_yang 12 months ago
parent
commit
b41c94e854
  1. 41
      src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java

41
src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java

@ -4191,30 +4191,29 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe
if (!"200".equals(addResponse.get("resultCode"))) { if (!"200".equals(addResponse.get("resultCode"))) {
throw new RuntimeException("IFS物料件新增异常:" + addResponse.get("resultMsg")); throw new RuntimeException("IFS物料件新增异常:" + addResponse.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());
List<PartIfsCatalogProperty> propertyList = partInformationMapper.getMasterPartPropertyList("*", ifsPart.getPartNo(), ifsPart.getCodeNo(), "MP"); // 属性对象
Map<String, String> addMasterPartModelResponse = technicalClassBean.syncTechnicalClass(srv, partIfsCatalogModel);
if (!"200".equals(addMasterPartModelResponse.get("resultCode"))) {
throw new RuntimeException("IFS 物料件模板新增异常:" + addMasterPartModelResponse.get("resultMsg"));
}
if (!propertyList.isEmpty()) {
Map<String, String> 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<String, String> addMasterPartModelResponse = technicalClassBean.syncTechnicalClass(srv, partIfsCatalogModel);
if (!"200".equals(addMasterPartModelResponse.get("resultCode"))) {
throw new RuntimeException("IFS 物料件模板新增异常:" + addMasterPartModelResponse.get("resultMsg"));
} }
} }
} }
List<PartIfsCatalogProperty> propertyList = partInformationMapper.getMasterPartPropertyList("*", ifsPart.getPartNo(), ifsPart.getCodeNo(), "MP"); // 属性对象
if (!propertyList.isEmpty()) {
Map<String, String> addMasterPartPropertyResponse = technicalClassBean.modifyTechnicalClassAttributes(srv, propertyList);
if (!"200".equals(addMasterPartPropertyResponse.get("resultCode"))) {
throw new RuntimeException("IFS 物料件属性新增异常:" + addMasterPartPropertyResponse.get("resultMsg"));
}
}
} }
} }
} }

Loading…
Cancel
Save