Browse Source

2025-01-24

优化
master
fengyuan_yang 12 months ago
parent
commit
a1bd307a2b
  1. 27
      src/main/java/com/spring/modules/part/service/impl/MasterPartInformationServiceImpl.java
  2. 6
      src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java

27
src/main/java/com/spring/modules/part/service/impl/MasterPartInformationServiceImpl.java

@ -368,7 +368,7 @@ public class MasterPartInformationServiceImpl extends ServiceImpl<MasterPartInfo
valueData.setItemNo((double) itemNo++); valueData.setItemNo((double) itemNo++);
valueData.setPropertiesItemNo(item.getAttribute()); valueData.setPropertiesItemNo(item.getAttribute());
if ("Numeric".equals(item.getAttributeType())) { if ("Numeric".equals(item.getAttributeType())) {
valueData.setNumValue(Double.valueOf(item.getValueNo()));
valueData.setNumValue(StringUtils.isNotBlank(item.getValueNo()) ? Double.valueOf(item.getValueNo()) : null);
} else { } else {
valueData.setTextValue(item.getValueText() == null ? "" : item.getValueText()); valueData.setTextValue(item.getValueText() == null ? "" : item.getValueText());
} }
@ -484,15 +484,6 @@ public class MasterPartInformationServiceImpl extends ServiceImpl<MasterPartInfo
ifsProperty.add(property); ifsProperty.add(property);
} }
} }
// 同步IFS
// if (dataUrl && "Y".equals(partData.getOfficialFlag())) {
// if (!ifsProperty.isEmpty()) {
// Map<String, String> addMasterPartPropertyResponse = technicalClassBean.syncTechnicalClass(srv, ifsProperty);
// if (!"200".equals(addMasterPartPropertyResponse.get("resultCode"))) {
// throw new RuntimeException("IFS物料属性新增异常:" + addMasterPartPropertyResponse.get("resultMsg"));
// }
// }
// }
} }
/** /**
@ -517,14 +508,14 @@ public class MasterPartInformationServiceImpl extends ServiceImpl<MasterPartInfo
} }
} }
// 同步IFS // 同步IFS
// if (dataUrl && "Y".equals(partData.getOfficialFlag())) {
// if (!ifsProperty.isEmpty()) {
// Map<String, String> deleteMasterPartPropertyResponse = technicalClassBean.removeTechnicalClass(srv, ifsProperty);
// if (!"200".equals(deleteMasterPartPropertyResponse.get("resultCode"))) {
// throw new RuntimeException("IFS物料属性删除异常:" + deleteMasterPartPropertyResponse.get("resultMsg"));
// }
// }
// }
if (dataUrl && "Y".equals(partData.getOfficialFlag())) {
if (!ifsProperty.isEmpty()) {
Map<String, String> deleteMasterPartPropertyResponse = technicalClassBean.removeTechnicalClassAttributes(srv, ifsProperty);
if (!"200".equals(deleteMasterPartPropertyResponse.get("resultCode"))) {
throw new RuntimeException("IFS物料属性删除异常:" + deleteMasterPartPropertyResponse.get("resultMsg"));
}
}
}
} }
/** /**

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

@ -3719,7 +3719,7 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe
partItem.setItemNo((double) count++); partItem.setItemNo((double) count++);
partItem.setPropertiesItemNo(ifsInventoryItem.getAttribute()); partItem.setPropertiesItemNo(ifsInventoryItem.getAttribute());
partItem.setTextValue(ifsInventoryItem.getValueText()); partItem.setTextValue(ifsInventoryItem.getValueText());
partItem.setNumValue(Double.valueOf(ifsInventoryItem.getValueNo()));
partItem.setNumValue(org.apache.commons.lang3.StringUtils.isNotBlank(ifsInventoryItem.getValueNo()) ? Double.valueOf(ifsInventoryItem.getValueNo()) : null);
partItem.setRecordType("MP"); partItem.setRecordType("MP");
partItemList.add(partItem); partItemList.add(partItem);
} }
@ -3868,8 +3868,8 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe
partItem.setSubCodeSeqNo(Double.valueOf("1")); partItem.setSubCodeSeqNo(Double.valueOf("1"));
partItem.setItemNo((double) count++); partItem.setItemNo((double) count++);
partItem.setPropertiesItemNo(ifsInventoryItem.getCharacteristicCode()); partItem.setPropertiesItemNo(ifsInventoryItem.getCharacteristicCode());
partItem.setTextValue(ifsInventoryItem.getAttrValueAlpha());
partItem.setNumValue(Double.valueOf(ifsInventoryItem.getAttrValueNumeric()));
partItem.setTextValue(org.apache.commons.lang3.StringUtils.isNotBlank(ifsInventoryItem.getAttrValueAlpha()) ? ifsInventoryItem.getAttrValueAlpha() : "");
partItem.setNumValue(org.apache.commons.lang3.StringUtils.isNotBlank(ifsInventoryItem.getAttrValueNumeric()) ? Double.valueOf(ifsInventoryItem.getAttrValueNumeric()) : null);
partItem.setRecordType("IP"); partItem.setRecordType("IP");
partItemList.add(partItem); partItemList.add(partItem);
} }

Loading…
Cancel
Save