| | |
| | | && 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明细包含 继承的产品子件物料,继承关系保留 |