| | |
| | | mpList = mphService.getListWithMaterialInfo(mpList); |
| | | List<String> newBomMaterialStrList = bomList.stream().map(bom -> bom.getSubCode() + "/" + bom.getSubModel()).collect(Collectors.toList()); |
| | | mpList = mpList.stream().filter(mp -> newBomMaterialStrList.contains(mp.getSubMaterial().getSubCode() + "/" + mp.getSubMaterial().getSubModel())).collect(Collectors.toList()); |
| | | if(mpList.size()!=0) { |
| | | if (latestProduct.getVersion().intValue() == enabledProduct.getVersion()) { |
| | | //最新版本生效,关联关系版本连着的 |
| | | mphService.updateVersionBatch(mpList); |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }else{ //属于不同产品继承关联关系 |
| | | List<MaterialProductHistory> mpList = mphService.getListByParentCodeAndCustomCodeAndVersion(relatedProduct.getParentCode(), relatedProduct.getCustomCode(), relatedProduct.getVersion()); |
| | | if(mpList.size()!=0) { |