|
|
|
@ -1031,6 +1031,22 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
|
partTypeChangeToManufactured(data, partRevision); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 类型由 Purchased 改为 Manufactured 新增Routing 增加新类型的BOM |
|
|
|
if ("Purchased".equals(partData.getPartType()) && "Manufactured".equals(data.getPartType())) { |
|
|
|
if (partRevision != null) { |
|
|
|
BomHeaderEntity bomHeader = new BomHeaderEntity(); |
|
|
|
bomHeader.setSite(data.getSite()); |
|
|
|
bomHeader.setPartNo(data.getPartNo()); |
|
|
|
bomHeader.setBomType("Manufacturing"); |
|
|
|
bomHeader.setEffPhaseInDate(partRevision.getEffPhaseInDate()); |
|
|
|
bomHeader.setEngRevision(partRevision.getEngRevision()); |
|
|
|
bomHeader.setEngChgLevel(1); |
|
|
|
savePartBomInfo(bomHeader); |
|
|
|
} |
|
|
|
savePartRoutingInfo2(data); |
|
|
|
} |
|
|
|
|
|
|
|
// 如果物料类型改为了 Purchased (raw) 则删除 BOM 和 routing |
|
|
|
if ("Purchased (raw)".equals(data.getPartType()) && !data.getPartType().equals(partData.getPartType())) { |
|
|
|
delBomAndRecipeAndRoutingByPartNo(data); |
|
|
|
|