| | |
| | | if (StringUtils.isEmpty(data.getAlternativeNo())) { |
| | | data.setAlternativeNo("*"); |
| | | } |
| | | if (StringUtils.isEmpty(data.getChildPartNo()) || StringUtils.isEmpty(data.getChildVersion()) || StringUtils.isEmpty(data.getFatherPartNo()) || StringUtils.isEmpty(data.getFatherVersion())) { |
| | | throw new RuntimeException("缺少零件数据编号或者版本"); |
| | | } |
| | | if (StringUtils.isEmpty(data.getQpa())) { |
| | | throw new RuntimeException("缺少数量"); |
| | | } |
| | | if (StringUtils.isEmpty(data.getLineItemNo())) { |
| | | throw new RuntimeException("缺少行项号"); |
| | | } |
| | | if (StringUtils.isEmpty(data.getOperationName())) { |
| | | throw new RuntimeException("缺少工序"); |
| | | } |
| | | //if (StringUtils.isEmpty(data.getChildPartNo()) || StringUtils.isEmpty(data.getChildVersion()) || StringUtils.isEmpty(data.getFatherPartNo()) || StringUtils.isEmpty(data.getFatherVersion())) { |
| | | // throw new RuntimeException("缺少零件数据编号或者版本"); |
| | | //} |
| | | //if (StringUtils.isEmpty(data.getQpa())) { |
| | | // throw new RuntimeException("缺少数量"); |
| | | //} |
| | | //if (StringUtils.isEmpty(data.getLineItemNo())) { |
| | | // throw new RuntimeException("缺少行项号"); |
| | | //} |
| | | //if (StringUtils.isEmpty(data.getOperationName())) { |
| | | // throw new RuntimeException("缺少工序"); |
| | | //} |
| | | data.setStructureType(StringUtils.isEmpty(data.getStructureType()) ? "M" : dicbomtype.get(data.getStructureType())); |
| | | list.add(data); |
| | | // 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM |