|
|
|
@ -178,6 +178,7 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
|
partIfsInventory.setInvoiceConsideration(data.getInvoiceConsideration() == null ? "" : data.getInvoiceConsideration()); // 供应商发票事项 |
|
|
|
partIfsInventory.setZeroCostFlag(data.getZeroCostFlag() == null ? "" : data.getZeroCostFlag()); // 零成本 |
|
|
|
partIfsInventory.setPartCostGroupId(data.getPartCostGroupId() == null ? "" : data.getPartCostGroupId()); // 零件成本组 |
|
|
|
partIfsInventory.setEngAttribute(data.getCodeNo().isEmpty() ? "" : data.getCodeNo()); // 模板编码 |
|
|
|
return partIfsInventory; |
|
|
|
} |
|
|
|
|
|
|
|
@ -809,12 +810,13 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
|
if (!"200".equals(deleteInventoryPartPropertyResponse.getCode())) { |
|
|
|
throw new RuntimeException("IFS库存件属性删除异常:" + deleteInventoryPartPropertyResponse.getMsg()); |
|
|
|
} |
|
|
|
String addInventoryPartPropertyURL = apiUrl + "/part/ifs/syncInventoryPartCharacteristics"; |
|
|
|
ResponseData addInventoryPartPropertyResponse = HttpClientUtil.doPostByRawWithPLM(addInventoryPartPropertyURL, ifsProperty); |
|
|
|
if (!"200".equals(addInventoryPartPropertyResponse.getCode())) { |
|
|
|
throw new RuntimeException("IFS库存件属性新增异常:" + addInventoryPartPropertyResponse.getMsg()); |
|
|
|
if (!ifsProperty.isEmpty()) { |
|
|
|
String addInventoryPartPropertyURL = apiUrl + "/part/ifs/syncInventoryPartCharacteristics"; |
|
|
|
ResponseData addInventoryPartPropertyResponse = HttpClientUtil.doPostByRawWithPLM(addInventoryPartPropertyURL, ifsProperty); |
|
|
|
if (!"200".equals(addInventoryPartPropertyResponse.getCode())) { |
|
|
|
throw new RuntimeException("IFS库存件属性新增异常:" + addInventoryPartPropertyResponse.getMsg()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -1014,12 +1016,13 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
|
if (!"200".equals(deleteInventoryPartPropertyResponse.getCode())) { |
|
|
|
throw new RuntimeException("IFS库存件属性删除异常:" + deleteInventoryPartPropertyResponse.getMsg()); |
|
|
|
} |
|
|
|
String addInventoryPartPropertyURL = apiUrl + "/part/ifs/syncInventoryPartCharacteristics"; |
|
|
|
ResponseData addInventoryPartPropertyResponse = HttpClientUtil.doPostByRawWithPLM(addInventoryPartPropertyURL, ifsProperty); |
|
|
|
if (!"200".equals(addInventoryPartPropertyResponse.getCode())) { |
|
|
|
throw new RuntimeException("IFS库存件属性新增异常:" + addInventoryPartPropertyResponse.getMsg()); |
|
|
|
if (!ifsProperty.isEmpty()) { |
|
|
|
String addInventoryPartPropertyURL = apiUrl + "/part/ifs/syncInventoryPartCharacteristics"; |
|
|
|
ResponseData addInventoryPartPropertyResponse = HttpClientUtil.doPostByRawWithPLM(addInventoryPartPropertyURL, ifsProperty); |
|
|
|
if (!"200".equals(addInventoryPartPropertyResponse.getCode())) { |
|
|
|
throw new RuntimeException("IFS库存件属性新增异常:" + addInventoryPartPropertyResponse.getMsg()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -2933,13 +2936,13 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
|
} |
|
|
|
|
|
|
|
// 1.6 同步库存件的模板和属性 |
|
|
|
if (partIfsInventoryModel.getEngAttribute() != null && !partIfsInventoryModel.getEngAttribute().isEmpty()) { |
|
|
|
String addInventoryPartModelURL = apiUrl + "/part/ifs/modifyInventoryPartCharacteristicTemplate"; |
|
|
|
ResponseData addInventoryPartModelResponse = HttpClientUtil.doPostByRawWithPLM(addInventoryPartModelURL, partIfsInventoryModel); |
|
|
|
if (!"200".equals(addInventoryPartModelResponse.getCode())) { |
|
|
|
throw new RuntimeException("IFS库存件模板新增异常:" + addInventoryPartModelResponse.getMsg()); |
|
|
|
} |
|
|
|
} |
|
|
|
// if (partIfsInventoryModel.getEngAttribute() != null && !partIfsInventoryModel.getEngAttribute().isEmpty()) { |
|
|
|
// String addInventoryPartModelURL = apiUrl + "/part/ifs/modifyInventoryPartCharacteristicTemplate"; |
|
|
|
// ResponseData addInventoryPartModelResponse = HttpClientUtil.doPostByRawWithPLM(addInventoryPartModelURL, partIfsInventoryModel); |
|
|
|
// if (!"200".equals(addInventoryPartModelResponse.getCode())) { |
|
|
|
// throw new RuntimeException("IFS库存件模板新增异常:" + addInventoryPartModelResponse.getMsg()); |
|
|
|
// } |
|
|
|
// } |
|
|
|
if (!propertyList.isEmpty()) { |
|
|
|
String addInventoryPartPropertyURL = apiUrl + "/part/ifs/syncInventoryPartCharacteristics"; |
|
|
|
ResponseData addInventoryPartPropertyResponse = HttpClientUtil.doPostByRawWithPLM(addInventoryPartPropertyURL, propertyList); |
|
|
|
|