|
|
|
@ -621,25 +621,17 @@ public class MasterPartInformationServiceImpl extends ServiceImpl<MasterPartInfo |
|
|
|
partIfsCatalogModel.setTechnicalSpecNo(technicalSpecNo); |
|
|
|
partIfsCatalogModel.setTechnicalClass(ifsPart.getCodeNo()); // 模板编码 |
|
|
|
partIfsCatalogModel.setOkYesNo(okYesNo); |
|
|
|
TblBaseDataEntity baseData = partInformationMapper.getTblBaseData("part_catalog"); |
|
|
|
if (baseData == null) { |
|
|
|
throw new RuntimeException("请在tbl_base_data中维护接口所需人员数据!"); |
|
|
|
} |
|
|
|
partIfsCatalogModel.setOkSign(baseData.getBaseData()); |
|
|
|
partIfsCatalogModel.setOkSign(ifsUser.getIfsUsername()); |
|
|
|
partIfsCatalogModel.setDtOk(DateUtils.getStringNow2()); |
|
|
|
List<PartIfsCatalogProperty> propertyList = partInformationMapper.getMasterPartPropertyList(plmMasterPart.getPartNo(), plmMasterPart.getCodeNo(), "MP"); // 属性对象 |
|
|
|
|
|
|
|
String addMasterPartModelURL = apiUrl + "/technical/class/syncTechnicalClass"; |
|
|
|
ResponseData addMasterPartModelResponse = HttpClientUtil.doPostByRawWithPLM(addMasterPartModelURL, partIfsCatalogModel); |
|
|
|
if (!"200".equals(addMasterPartModelResponse.getCode())) { |
|
|
|
throw new RuntimeException("IFS物料件模板新增异常:" + addMasterPartModelResponse.getMsg()); |
|
|
|
List<PartIfsCatalogProperty> propertyList = partInformationMapper.getMasterPartPropertyList("*", plmMasterPart.getPartNo(), plmMasterPart.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()) { |
|
|
|
String addMasterPartPropertyURL = apiUrl + "/technical/class/modifyTechnicalClassAttributes"; |
|
|
|
ResponseData addMasterPartPropertyResponse = HttpClientUtil.doPostByRawWithPLM(addMasterPartPropertyURL, propertyList); |
|
|
|
if (!"200".equals(addMasterPartPropertyResponse.getCode())) { |
|
|
|
throw new RuntimeException("IFS物料件属性新增异常:" + addMasterPartPropertyResponse.getMsg()); |
|
|
|
Map<String, String> addMasterPartPropertyResponse = technicalClassBean.modifyTechnicalClassAttributes(srv, propertyList); |
|
|
|
if (!"200".equals(addMasterPartPropertyResponse.get("resultCode"))) { |
|
|
|
throw new RuntimeException("IFS 物料件属性新增异常:" + addMasterPartPropertyResponse.get("resultMsg")); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|