he wei
2022-08-11 774e1e7283ce4bc5d4e8166806cc7a6f117adf39
'仲培调试'
1个文件已修改
8 ■■■■ 已修改文件
src/main/java/com/whyc/service/WorksheetLinkService.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/WorksheetLinkService.java
@@ -309,6 +309,7 @@
                                nowHistoryList.remove(nowHistory);
                            }
                        });*/
                        if(nowHistoryList.size()!=0) {
                        Iterator<ComponentProductHistory> iterator = nowHistoryList.iterator();
                        while (iterator.hasNext()){
                            ComponentProductHistory next = iterator.next();
@@ -317,6 +318,7 @@
                            ){
                                iterator.remove();
                                break;
                                }
                            }
                        }
                        //下个版本新增替换的散装件-产品列表
@@ -352,6 +354,7 @@
                            nowHistoryList.remove(nowHistory);
                        }
                    });*/
                    if(nowHistoryList.size()!=0) {
                    Iterator<ComponentProductHistory> iterator = nowHistoryList.iterator();
                    while (iterator.hasNext()){
                        ComponentProductHistory next = iterator.next();
@@ -360,6 +363,7 @@
                        ){
                            iterator.remove();
                            break;
                            }
                        }
                    }
@@ -377,8 +381,8 @@
                //处理完成,进行表单数据更新,分为nowHistoryList,newHistoryList,nowBomHistoryList
                //nowHistoryList.forEach(nowHis->nowHis.setEVersion(nextVersion));
                newHistoryList.forEach(newHis->{newHis.setEVersion(nextVersion);newHis.setSVersion(nextVersion);});
                nowBomHistoryList.forEach(nowBomHis->nowBomHis.setEVersion(nextVersion));
                if(newHistoryList.size()!=0){newHistoryList.forEach(newHis->{newHis.setEVersion(nextVersion);newHis.setSVersion(nextVersion);});}
                if(nowBomHistoryList.size()!=0){nowBomHistoryList.forEach(nowBomHis->nowBomHis.setEVersion(nextVersion));}
                if(nowHistoryList.size()!=0){cphService.updateVersionBatch(nowHistoryList);}
                if(newHistoryList.size()!=0){cphService.insertBatch(newHistoryList);}