Browse Source

2025-01-25

优化
master
fengyuan_yang 1 year ago
parent
commit
26a97440e1
  1. 5
      src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java

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

@ -431,6 +431,7 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe
bomHeader.setBomType("Purchase");
}
bomHeader.setEffPhaseInDate(data.getCreateDate());
bomHeader.setEngRevision(partRevision.getEngRevision());
bomHeader.setEngChgLevel(1);
if ("Manufactured Recipe".equals(data.getPartType())) {
savePartRecipeInfo(bomHeader);
@ -601,7 +602,7 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe
bomHeader.setBomType("Purchase");
}
bomHeader.setEffPhaseInDate(data.getCreateDate());
bomHeader.setEngRevision("1");
bomHeader.setEngRevision(partRevision.getEngRevision());
bomHeader.setEngChgLevel(1);
if ("Manufactured Recipe".equals(data.getPartType())) {
savePartRecipeInfo(bomHeader);
@ -2960,7 +2961,7 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe
throw new RuntimeException("不存在与该物料相同的BOM类型!");
}
// 对所选替代的版本进行去重
TreeSet<BomDetailVo> bomHeaderList = bomAlternativeList.stream().collect(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(BomDetailEntity::getEngChgLevel))));
TreeSet<BomDetailVo> bomHeaderList = bomAlternativeList.stream().collect(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(BomDetailEntity::getEngChgLevel).thenComparing(BomDetailEntity::getBomType))));
for (BomDetailVo bomDetailVo : bomHeaderList) {
BomHeaderEntity bomHeader = new BomHeaderEntity();
bomHeader.setSite(ifsPart.getSite());

Loading…
Cancel
Save