|
|
|
@ -4191,30 +4191,29 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
|
if (!"200".equals(addResponse.get("resultCode"))) { |
|
|
|
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")); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|