|
|
@ -431,7 +431,14 @@ public class BomManagementServiceImpl extends ServiceImpl<BomManagementMapper, B |
|
|
if (components.size() > 1) { |
|
|
if (components.size() > 1) { |
|
|
throw new RuntimeException("序号已存在!"); |
|
|
throw new RuntimeException("序号已存在!"); |
|
|
} |
|
|
} |
|
|
|
|
|
// 更新BOM子物料 |
|
|
bomManagementMapper.updateBomComponent(data); |
|
|
bomManagementMapper.updateBomComponent(data); |
|
|
|
|
|
|
|
|
|
|
|
// ✅ 如果包含 familyID,同时更新物料主数据的FamilyID |
|
|
|
|
|
if (data.getFamilyID() != null && !data.getFamilyID().isEmpty()) { |
|
|
|
|
|
partInformationMapper.updateFamilyId(data); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 查询bom子明细列表 |
|
|
// 查询bom子明细列表 |
|
|
BomDetailEntity bomDetail = new BomDetailEntity(); |
|
|
BomDetailEntity bomDetail = new BomDetailEntity(); |
|
|
BeanUtils.copyProperties(data,bomDetail); |
|
|
BeanUtils.copyProperties(data,bomDetail); |
|
|
|