whycxzp
2022-09-07 3ce1a98dc7411418f63836e1c011818ae2bd5501
修复
1个文件已修改
2 ■■■■■ 已修改文件
src/main/java/com/whyc/service/ProductService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/ProductService.java
@@ -336,6 +336,7 @@
                        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);
@@ -349,6 +350,7 @@
                        }
                    }
                }
                }
            }else{ //属于不同产品继承关联关系
                List<MaterialProductHistory> mpList = mphService.getListByParentCodeAndCustomCodeAndVersion(relatedProduct.getParentCode(), relatedProduct.getCustomCode(), relatedProduct.getVersion());
                if(mpList.size()!=0) {