From 734668c3b15137744cbe0756f6a29218da69426d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvan-=E6=AC=A7=E9=98=B3=E5=B8=86?= Date: Wed, 9 Nov 2022 16:30:10 +0800 Subject: [PATCH 1/3] =?UTF-8?q?REPORT-84331=20=E3=80=90=E5=86=92=E7=83=9F?= =?UTF-8?q?=E3=80=91=E6=9C=AC=E5=9C=B0=E7=9B=AE=E5=BD=95=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=EF=BC=8C=E8=BF=98=E6=8F=90=E7=A4=BA=E6=88=91=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E4=B8=8D=E4=B8=80=E8=87=B4=20=E3=80=90?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=8E=9F=E5=9B=A0=E3=80=91jar=E5=8C=85?= =?UTF-8?q?=E5=92=8C=E6=8F=92=E4=BB=B6=E7=9A=84=E7=89=88=E6=9C=AC=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=EF=BC=8C=E5=9D=87=E4=BC=9A=E5=9C=A8=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E5=90=AF=E5=8A=A8=E5=90=8E=E8=BF=90=E8=A1=8C=E4=B8=80?= =?UTF-8?q?=E6=AC=A1=EF=BC=8C=E4=BD=86=E6=98=AFjar=E5=8C=85=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E5=88=A4=E6=96=AD=E4=BA=86=E6=98=AF=E5=90=A6=E4=B8=BA?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E7=9B=AE=E5=BD=95=EF=BC=8C=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E6=9C=AA=E5=88=A4=E6=96=AD=EF=BC=8C=E5=9B=A0?= =?UTF-8?q?=E6=AD=A4=E8=BF=9B=E8=A1=8C=E4=BA=86=E6=8F=92=E4=BB=B6=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=EF=BC=8C=E5=90=8C=E6=97=B6=E5=8F=88=E5=9B=A0=E4=B8=BA?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=90=8C=E5=AD=A6=E6=9C=AC=E5=9C=B0=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E5=90=8CID=E7=9A=84=E5=A4=9A=E4=B8=AA=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E6=8F=92=E4=BB=B6=EF=BC=8C=E5=AF=BC=E8=87=B4=E4=BA=86?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E7=BB=93=E6=9E=9C=E4=B8=BA"XXX=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E7=89=88=E6=9C=AC=E4=B8=8D=E4=B8=80=E8=87=B4"?= =?UTF-8?q?=EF=BC=8C=E5=B9=B6=E7=BB=99=E5=87=BA=E5=BC=B9=E7=AA=97=E6=8F=90?= =?UTF-8?q?=E9=86=92=20=E3=80=90=E6=94=B9=E5=8A=A8=E6=80=9D=E8=B7=AF?= =?UTF-8?q?=E3=80=91=E5=B0=86"=E5=88=A4=E6=96=AD=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E4=B8=BA=E6=9C=AC=E5=9C=B0=E7=9B=AE=E5=BD=95"=E7=9A=84?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E6=8F=90=E5=89=8D=EF=BC=8C=E5=85=88=E5=88=A4?= =?UTF-8?q?=E6=96=AD=EF=BC=8C=E5=86=8D=E5=8E=BB=E5=81=9Ajar=E5=92=8C?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E6=A3=80=E6=9F=A5=EF=BC=8C=20=E3=80=90review?= =?UTF-8?q?=E5=BB=BA=E8=AE=AE=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../versioncheck/VersionCheckUtils.java | 46 +++++++++++-------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java b/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java index 55dfe60cf1..bd208749e8 100644 --- a/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java +++ b/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java @@ -88,7 +88,23 @@ public class VersionCheckUtils { public static boolean versionCheck(String envName) { - return checkLocalAndRemoteJartime(envName) && checkLocalAndRemotePlugin().size() == 0; + if (needCheckConsistency(envName)) { + return checkLocalAndRemoteJartime(envName) && checkLocalAndRemotePlugin().size() == 0; + } + return true; + } + + /** + * 判断是否需要检查Jartime和插件的一致性 + * + * @param selectedEnvName 当前工作目录名称 + * @return + */ + private static boolean needCheckConsistency(String selectedEnvName) { + DesignerEnvManager envManager = DesignerEnvManager.getEnvManager(); + DesignerWorkspaceInfo selectedEnv = envManager.getWorkspaceInfo(selectedEnvName); + // 当前工作目录为远程工作目录时,需要检查 + return selectedEnv.getType() == DesignerWorkspaceType.Remote; } public static boolean versionCheck(DesignerWorkspaceInfo selectedEnv) { @@ -139,21 +155,17 @@ public class VersionCheckUtils { } public static boolean checkLocalAndRemoteJartime(DesignerWorkspaceInfo selectedEnv) { - //是否需要做服务校验 - if (needCheckBranch(selectedEnv)) { - String localBranch; - String remoteBranch = getRemoteBranch(selectedEnv); - localBranch = GeneralUtils.readFullBuildNO(); - //通过是否包含#来避免当前版本为非安装版本(主要是内部开发版本) - if (localBranch.contains("#") && ComparatorUtils.equals(localBranch, remoteBranch)) { - //说明版本一致,仅做日志记录 - FineLoggerFactory.getLogger().info("Remote Designer version consistency"); - return true; - } else { - return false; - } + String localBranch; + String remoteBranch = getRemoteBranch(selectedEnv); + localBranch = GeneralUtils.readFullBuildNO(); + //通过是否包含#来避免当前版本为非安装版本(主要是内部开发版本) + if (localBranch.contains("#") && ComparatorUtils.equals(localBranch, remoteBranch)) { + //说明版本一致,仅做日志记录 + FineLoggerFactory.getLogger().info("Remote Designer version consistency"); + return true; + } else { + return false; } - return true; } public static List getNoExistServiceDescription(String envName) { @@ -267,10 +279,6 @@ public class VersionCheckUtils { return df.format(jarDate); } - private static boolean needCheckBranch(DesignerWorkspaceInfo selectedEnv) { - return selectedEnv.getType() == DesignerWorkspaceType.Remote; - } - public static JSONArray checkLocalAndRemotePlugin() { JSONArray differentPlugins = new JSONArray(); JSONArray remotePlugins = FRContext.getCommonOperator().getPluginStatus(); From 94b58223b43d3c5c41808a83f7e60f4b39c62f9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvan-=E6=AC=A7=E9=98=B3=E5=B8=86?= Date: Wed, 9 Nov 2022 16:34:30 +0800 Subject: [PATCH 2/3] =?UTF-8?q?REPORT-84331=20=E3=80=90=E5=86=92=E7=83=9F?= =?UTF-8?q?=E3=80=91=E6=9C=AC=E5=9C=B0=E7=9B=AE=E5=BD=95=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=EF=BC=8C=E8=BF=98=E6=8F=90=E7=A4=BA=E6=88=91=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E4=B8=8D=E4=B8=80=E8=87=B4=20=E5=A4=84?= =?UTF-8?q?=E7=90=86=E4=BB=A3=E7=A0=81=E8=B4=A8=E9=87=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/versioncheck/VersionCheckUtils.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java b/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java index bd208749e8..a6a2d7896a 100644 --- a/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java +++ b/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java @@ -70,6 +70,7 @@ public class VersionCheckUtils { private static final String GROUP = "group"; private static final String BI = "bi"; private static final String BIPREFIX = "com.finebi"; + private static final String DEVELOP_BRANCH_MARK = "#"; private static final Set pluginsNeedIgnore = new HashSet<>(); static { pluginsNeedIgnore.addAll(Arrays.asList( @@ -158,8 +159,8 @@ public class VersionCheckUtils { String localBranch; String remoteBranch = getRemoteBranch(selectedEnv); localBranch = GeneralUtils.readFullBuildNO(); - //通过是否包含#来避免当前版本为非安装版本(主要是内部开发版本) - if (localBranch.contains("#") && ComparatorUtils.equals(localBranch, remoteBranch)) { + // 通过是否包含"#"来避免当前版本为非安装版本(主要是内部开发版本) + if (localBranch.contains(DEVELOP_BRANCH_MARK) && ComparatorUtils.equals(localBranch, remoteBranch)) { //说明版本一致,仅做日志记录 FineLoggerFactory.getLogger().info("Remote Designer version consistency"); return true; From 2f3a9296bc8ec834c3102f1d20d9c2185433c5e2 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Wed, 9 Nov 2022 17:01:11 +0800 Subject: [PATCH 3/3] =?UTF-8?q?REPORT-80695=20=E6=A8=A1=E6=9D=BF=E6=9F=A5?= =?UTF-8?q?=E6=89=BE=E6=9B=BF=E6=8D=A2=E4=BA=8C=E6=9C=9F=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=95=B0=E6=8D=AE=E5=88=97=E4=B8=8E=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=9B=BF=E6=8D=A2=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../replace/action/setting/CellGroupType.java | 24 +++++++++++++++++++ .../action/setting/SettingController.java | 16 +++++++++++++ 2 files changed, 40 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/action/setting/CellGroupType.java b/designer-realize/src/main/java/com/fr/design/actions/replace/action/setting/CellGroupType.java index 27aebee07d..161aca91f4 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/action/setting/CellGroupType.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/action/setting/CellGroupType.java @@ -246,4 +246,28 @@ public enum CellGroupType { DSColumn column = (DSColumn) cellElement.getValue(); column.setGrouper(grouper); } + + /** + * 是否修改过 + * + * @param info 存储信息的数据结构 + * @param inputStr 用户输入的第一级下拉框内容 + * @param extraStr 用户输入的第二级下拉框内容 + * @return 修改过返回true + */ + public boolean isEverChanged(Info info, String inputStr, String extraStr) { + return !isNeed(getCellElementFromInfo(info), inputStr, extraStr); + } + + /** + * 从Info中获取CellElement + * 能到这一步肯定是单元格数据列类型 + * + * @param info 存储查找替换信息的数据结构 + * @return CellElement + */ + public CellElement getCellElementFromInfo(Info info) { + CellElement cellElement = (CellElement) info.getContent().getReplaceObject(); + return cellElement; + } } diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/action/setting/SettingController.java b/designer-realize/src/main/java/com/fr/design/actions/replace/action/setting/SettingController.java index 0b481a1272..676bfba9cb 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/action/setting/SettingController.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/action/setting/SettingController.java @@ -156,6 +156,15 @@ public enum SettingController implements ShowValue { type.replace(info, firstStr, secondStr); } } + + @Override + public boolean isEverChanged(Info info, String inputStr, String extraStr) { + CellGroupType type = CellGroupType.match(inputStr); + if (type != null) { + return type.isEverChanged(info, inputStr, extraStr); + } + return false; + } }, /** * 单元格-数据列 @@ -224,6 +233,13 @@ public enum SettingController implements ShowValue { dsColumn.setColumn(TableDataColumn.createColumn(secondStr)); } + + @Override + public boolean isEverChanged(Info info, String inputStr, String extraStr) { + CellElement cellElement = (CellElement) info.getContent().getReplaceObject(); + DSColumn dsColumn = (DSColumn) cellElement.getValue(); + return !isNeed(dsColumn, inputStr, extraStr); + } }, /** * 数据源-数据连接