whycxzp
2022-09-09 937a0d3c7c2554a7e00759e0506fc34c33ee8309
修复
1个文件已修改
11 ■■■■■ 已修改文件
src/main/java/com/whyc/service/ProductService.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/ProductService.java
@@ -330,12 +330,15 @@
                && relatedProduct.getCustomCode().equals(product.getCustomCode())
                )
            ) { //属于是产品升级或基于标准产品定制
                List<MaterialProductHistory> mpList;
                List<MaterialProductHistory> mpList = new LinkedList<>();
                if (latestProduct != null && enabledProduct != null) { //产品升级
                    mpList = mphService.getListByParentCodeAndCustomCodeAndVersion(parentCode, customCode, enabledProduct.getVersion());
                }else{ //基于标准产品定制
                    int standardEnabledVersion = getVersion(parentCode, "").getVersion();
                    mpList = mphService.getListByParentCodeAndCustomCodeAndVersion(parentCode,"",standardEnabledVersion);
                }else{ //基于标准产品定制/新添加标准产品
                    Product version = getVersion(parentCode, "");
                    if(version!=null) { //新添加标准产品
                        int standardEnabledVersion = version.getVersion();
                        mpList = mphService.getListByParentCodeAndCustomCodeAndVersion(parentCode, "", standardEnabledVersion);
                    }
                }
                if (mpList.size() != 0) { //存在关联关系
                    //当前的产品bom明细包含 继承的产品子件物料,继承关系保留