From 2148c6a8300406a1bef370bdd7ef4b05fa2b16e4 Mon Sep 17 00:00:00 2001 From: "John.Ying" Date: Tue, 6 Dec 2022 17:24:17 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-13706=20=E4=BF=9D=E5=AD=98=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E6=97=B6=EF=BC=8C=E4=B8=8D=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E5=AF=B9=E6=AF=8F=E4=B8=80=E4=B8=AA=E6=95=B0=E6=8D=AE=E9=9B=86?= =?UTF-8?q?=E9=83=BD=E5=8E=BB=E8=AF=B7=E6=B1=82=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/DesignModelAdapter.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/DesignModelAdapter.java b/designer-base/src/main/java/com/fr/design/DesignModelAdapter.java index 013c703fb2..bd4130a853 100644 --- a/designer-base/src/main/java/com/fr/design/DesignModelAdapter.java +++ b/designer-base/src/main/java/com/fr/design/DesignModelAdapter.java @@ -276,22 +276,28 @@ public abstract class DesignModelAdapter map, Filter filter) { Iterator it = this.getBook().getTableDataNameIterator(); + List names = new ArrayList<>(); try { - // 清空下缓存 - tableDataParametersMap.clear(); + List tableDatas = new ArrayList<>(); while (it.hasNext()) { String name = it.next(); TableData tableData = this.getBook().getTableData(name); - ParameterProvider[] parameterProviders = DataOperator.getInstance().getTableDataParameters(tableData); + tableDatas.add(tableData); + names.add(name); + } + ParameterProvider[][] totalParameterProviders = DataOperator.getInstance().getTotalTableDataParameters(tableDatas); + tableDataParametersMap.clear(); + for (int i = 0; i < totalParameterProviders.length; i++) { + ParameterProvider[] parameterProviders = totalParameterProviders[i]; if (filter != null) { ParameterApplyHelper.addPara2Map(map, parameterProviders, filter, null, ParameterSource.DEFAULT_SOURCE); } else { ParameterApplyHelper.addPara2Map(map, parameterProviders, null, ParameterSource.TEMPLATE_SOURCE); } - tableDataParametersMap.put(name, parameterProviders); + tableDataParametersMap.put(names.get(i), parameterProviders); } } catch (Exception e) { - FineLoggerFactory.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e, e.getMessage()); } }