yangyj 2 hónapja
szülő
commit
094e336a6e

+ 10 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/formula/impl/ExecutorMeter.java

@@ -2514,12 +2514,20 @@ public class ExecutorMeter extends FormulaExecutor {
 
         /*删除没有计量的章节*/
         public LinkedHashMap<String,NodeTable> removeNodeTable(LinkedHashMap<String,List<MeterApply>> meterApplyGroup){
-            List<NodeTable> table2E16= tec.getTableAll().stream().filter(e-> Pattern.matches("【2-16】工程计量表(\\(\\d+章\\))?",e.getNodeName().replaceAll("\\s+",""))).collect(Collectors.toList());
+            List<NodeTable> table2E16= tec.getTableAll().stream().filter(e-> e.getNodeName().replaceAll("\\s+","").contains("【2-16】工程计量表")).collect(Collectors.toList());
             table2E16.stream().filter(e->e.getNodeName().equals("【2-16】工程计量表")).findAny().ifPresent(t->{
                 t.setNodeName(t.getNodeName()+"(100章)");
             });
             List<String>chapters =new ArrayList<>(meterApplyGroup.keySet());
-            List<Long> removeIds=table2E16.stream().filter(t->!BaseUtils.inChain(chapters,t.getNodeName())).map(NodeTable::getPKeyId).collect(Collectors.toList());
+            List<Long> removeIds=table2E16.stream().filter(t->{
+                String name =RegexUtil.findResult("(?<=\\()\\d+章(保通道路)?(?=\\))",t.getNodeName());
+                for(String s:chapters){
+                    if(s.equals(name)){
+                        return  false;
+                    }
+                }
+                return true;
+            }).map(NodeTable::getPKeyId).collect(Collectors.toList());
             /*删除没有计量的章节*/
             tec.getTableAll().removeIf(n->removeIds.contains(n.getPKeyId()));
             table2E16.removeIf(n->removeIds.contains(n.getPKeyId()));