|
|
|
@ -700,6 +700,11 @@ public class BomManagementServiceImpl extends ServiceImpl<BomManagementMapper, B |
|
|
|
if (componentPartList.isEmpty()) { |
|
|
|
throw new RuntimeException("请先维护子物料!"); |
|
|
|
} |
|
|
|
// 校验子件的单位用量不能为0 |
|
|
|
boolean b = componentPartList.stream().anyMatch(a -> (a.getQtyPerAssembly() == null || a.getQtyPerAssembly().equals(BigDecimal.ZERO))); |
|
|
|
if (b) { |
|
|
|
throw new RuntimeException("子件单位用量不能为0!"); |
|
|
|
} |
|
|
|
HashMap<String, Object> map = new HashMap<>(); |
|
|
|
// 查出Bom替代的当前状态 |
|
|
|
List<BomDetailEntity> checkList = bomManagementMapper.checkBomDetailOnlyOne(data); |
|
|
|
|