From adb59aa17bcc5425f4b85b450cad484548f369ba Mon Sep 17 00:00:00 2001 From: "Link.Zhao" Date: Wed, 23 Mar 2022 20:05:30 +0800 Subject: [PATCH 01/10] =?UTF-8?q?REPORT-66853=20=E8=80=81=E5=86=B3?= =?UTF-8?q?=E7=AD=96=E6=8A=A5=E8=A1=A8-=E6=B2=A1=E6=9C=89=E5=8B=BE?= =?UTF-8?q?=E9=80=89=E5=9B=BE=E7=89=87=E5=8E=8B=E7=BC=A9=EF=BC=8C=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E5=9D=97=E8=AE=BE=E7=BD=AE=E5=9B=BE=E7=89=87=E4=B8=BB?= =?UTF-8?q?=E4=BD=93=E5=A1=AB=E5=85=85=EF=BC=8Cweb=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E6=97=B6=E5=9B=BE=E7=89=87=E4=BC=9A=E6=A8=A1=E7=B3=8A=201?= =?UTF-8?q?=E3=80=81=E4=BF=AE=E6=94=B9=E4=BA=86jpg=E5=9B=BE=E5=83=8F?= =?UTF-8?q?=E7=9A=84=E5=AD=98=E5=82=A8=E6=96=B9=E5=BC=8F=EF=BC=8C=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E5=8E=9F=E6=96=87=E4=BB=B6=E7=9B=B4=E6=8E=A5=E5=AD=98?= =?UTF-8?q?=E5=82=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/gui/frpane/ImgChooseWrapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/ImgChooseWrapper.java b/designer-base/src/main/java/com/fr/design/gui/frpane/ImgChooseWrapper.java index 19823d8b4..1f8475869 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/ImgChooseWrapper.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/ImgChooseWrapper.java @@ -105,7 +105,7 @@ public class ImgChooseWrapper { } else { BufferedImage image = BaseUtils.readImage(selectedFile.getPath()); String type = ImageUtils.getImageType(selectedFile); - imageWithSuffix = new ImageWithSuffix(image, type); + imageWithSuffix = new ImageWithSuffix(image, type, selectedFile.getPath()); } CoreGraphHelper.waitForImage(imageWithSuffix); From 310ec18e723435af5c391f75865de5aa2b12439b Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 9 May 2022 10:41:29 +0800 Subject: [PATCH 02/10] =?UTF-8?q?REPORT-71082=20alphafine=E5=9C=A8?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E5=B8=AE=E5=8A=A9=E6=96=87=E6=A1=A3=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E5=90=8E=20=E4=BC=9A=E8=87=AA=E5=8A=A8=E8=B7=B3?= =?UTF-8?q?=E5=88=B0=E6=9C=80=E5=BA=95=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/alphafine/component/AlphaFineList.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineList.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineList.java index b58a3e51b..665af5665 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineList.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineList.java @@ -3,6 +3,7 @@ package com.fr.design.mainframe.alphafine.component; import com.fr.design.mainframe.alphafine.AlphaFineConstants; import com.fr.design.mainframe.alphafine.AlphaFineHelper; import com.fr.design.mainframe.alphafine.cell.model.AlphaCellModel; +import com.fr.design.mainframe.alphafine.cell.model.DocumentModel; import com.fr.design.mainframe.alphafine.preview.ResultShowPane; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; @@ -26,7 +27,10 @@ public class AlphaFineList extends JList { AlphaCellModel selectedValue = getSelectedValue(); if (e.getClickCount() == AlphaFineConstants.DEFAULT_CLICK_COUNT && selectedValue.hasAction()) { // 点击搜索结果 主页面移动到后面 - AlphaFineHelper.getAlphaFineDialog().toBack(); + if (!(selectedValue instanceof DocumentModel)) { + // 帮助文档不跳转 + AlphaFineHelper.getAlphaFineDialog().toBack(); + } dealWithSearchResult(); } } From 8fa4db6705b5fee8a20a5e1cc4f7c98a73d4dd3f Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 9 May 2022 10:43:03 +0800 Subject: [PATCH 03/10] =?UTF-8?q?REPORT-70681=20=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E8=BE=93=E5=87=BA=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alphafine/search/manager/impl/DocumentSearchManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/DocumentSearchManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/DocumentSearchManager.java index 7a74ee6c1..bc3b214d0 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/DocumentSearchManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/DocumentSearchManager.java @@ -11,6 +11,7 @@ import com.fr.design.mainframe.alphafine.search.SearchTextBean; import com.fr.design.mainframe.alphafine.search.manager.fun.AlphaFineSearchProvider; import com.fr.general.http.HttpToolbox; import com.fr.json.JSONArray; +import com.fr.json.JSONException; import com.fr.json.JSONObject; import com.fr.log.FineLoggerFactory; import com.fr.stable.ArrayUtils; @@ -82,6 +83,8 @@ public class DocumentSearchManager implements AlphaFineSearchProvider { } } } + } catch (JSONException jsonException) { + FineLoggerFactory.getLogger().warn(jsonException, jsonException.getMessage()); } catch (Exception e) { FineLoggerFactory.getLogger().error("document search error: " + e.getMessage()); } From 437eacd0441949eb9e157f237f04437271f62b0b Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 9 May 2022 12:31:55 +0800 Subject: [PATCH 04/10] =?UTF-8?q?REPORT-71083=20=E6=B8=85=E7=A9=BA?= =?UTF-8?q?=E5=90=8E=20=E9=87=8D=E6=96=B0=E6=90=9C=E7=B4=A2=E5=90=8C?= =?UTF-8?q?=E6=A0=B7=E5=86=85=E5=AE=B9=E6=97=A0=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/alphafine/component/AlphaFineFrame.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java index d97710ef1..86edc6caa 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java @@ -282,6 +282,7 @@ public class AlphaFineFrame extends JFrame { @Override public void mousePressed(MouseEvent e) { searchTextField.setText(StringUtils.EMPTY); + beforeSearchStr = StringUtils.EMPTY; clearLabel.setVisible(false); } }); @@ -543,6 +544,8 @@ public class AlphaFineFrame extends JFrame { if (StringUtils.isNotEmpty(searchTextField.getText())) { clearLabel.setVisible(true); SearchTooltipPopup.getInstance().show(searchTextFieldWrapperPane); + } else { + beforeSearchStr = StringUtils.EMPTY; } AlphaFineToolTipList alphaFineToolTipList = SearchTooltipPopup.getInstance().getAlphaFineToolTipList(); if (e.getKeyCode() == KeyEvent.VK_ENTER) { From d19abdf10d8762b0e1901b41a7ad0ea4005d7cf3 Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 9 May 2022 12:40:24 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=20REPORT-71083=20=E6=B8=85=E7=A9=BA?= =?UTF-8?q?=E5=90=8E=20=E9=87=8D=E6=96=B0=E6=90=9C=E7=B4=A2=E5=90=8C?= =?UTF-8?q?=E6=A0=B7=E5=86=85=E5=AE=B9=E6=97=A0=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/alphafine/component/AlphaFineFrame.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java index 86edc6caa..218b244ba 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java @@ -593,6 +593,7 @@ public class AlphaFineFrame extends JFrame { SearchTooltipPopup.getInstance().hide(); clearLabel.setVisible(false); switchType(selectedType); + beforeSearchStr = StringUtils.EMPTY; } else if (searchTextField.hasFocus()) { clearLabel.setVisible(true); SearchTooltipPopup.getInstance().show(searchTextFieldWrapperPane); From 9f4492592dcd13bd7dc9b44f28d30431d68467f2 Mon Sep 17 00:00:00 2001 From: "Link.Zhao" Date: Mon, 9 May 2022 16:01:28 +0800 Subject: [PATCH 06/10] =?UTF-8?q?REPORT-71052=20=E3=80=90=E5=86=92?= =?UTF-8?q?=E7=83=9F=E3=80=91=E5=8D=95=E5=85=83=E6=A0=BC=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=89=80=E6=9C=89=E8=B6=85=E9=93=BE=EF=BC=8C=E5=86=8D=E6=AC=A1?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B6=85=E9=93=BE=EF=BC=8C=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E6=81=A2=E5=A4=8D=E4=B8=BA=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E8=93=9D=E5=AD=97+=E4=B8=8B=E5=88=92=E7=BA=BF=201=E3=80=81?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java b/designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java index b3bbaf1df..f2b807602 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java @@ -89,7 +89,7 @@ public class HyperlinkGroupPaneActionImpl implements HyperlinkGroupPaneActionPro } // 首次添加超链接,将文字样式默认改为蓝色下划线 - if (editCellElement.getNameHyperlinkGroup() == null && hyperlinkGroupPane.getCurrentEvent() != null && hyperlinkGroupPane.getCurrentEvent().getType() == ListDataEvent.INTERVAL_ADDED) { + if ((editCellElement.getNameHyperlinkGroup() == null || editCellElement.getNameHyperlinkGroup().size() == 0) && hyperlinkGroupPane.getCurrentEvent() != null && hyperlinkGroupPane.getCurrentEvent().getType() == ListDataEvent.INTERVAL_ADDED) { editCellElement.setStyle(elementStyle.deriveFRFont(frFont)); } From 191b18826b895a974ea5fa454d134172d0ee8056 Mon Sep 17 00:00:00 2001 From: "Link.Zhao" Date: Mon, 9 May 2022 16:04:09 +0800 Subject: [PATCH 07/10] =?UTF-8?q?REPORT-71052=20=E3=80=90=E5=86=92?= =?UTF-8?q?=E7=83=9F=E3=80=91=E5=8D=95=E5=85=83=E6=A0=BC=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=89=80=E6=9C=89=E8=B6=85=E9=93=BE=EF=BC=8C=E5=86=8D=E6=AC=A1?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B6=85=E9=93=BE=EF=BC=8C=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E6=81=A2=E5=A4=8D=E4=B8=BA=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E8=93=9D=E5=AD=97+=E4=B8=8B=E5=88=92=E7=BA=BF=201=E3=80=81?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/gui/frpane/ImgChooseWrapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/ImgChooseWrapper.java b/designer-base/src/main/java/com/fr/design/gui/frpane/ImgChooseWrapper.java index 1f8475869..19823d8b4 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/ImgChooseWrapper.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/ImgChooseWrapper.java @@ -105,7 +105,7 @@ public class ImgChooseWrapper { } else { BufferedImage image = BaseUtils.readImage(selectedFile.getPath()); String type = ImageUtils.getImageType(selectedFile); - imageWithSuffix = new ImageWithSuffix(image, type, selectedFile.getPath()); + imageWithSuffix = new ImageWithSuffix(image, type); } CoreGraphHelper.waitForImage(imageWithSuffix); From e4af85f87cb09cfb85ee6bf5ea6ff87c48c2f8a2 Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 9 May 2022 17:41:13 +0800 Subject: [PATCH 08/10] =?UTF-8?q?REPORT-71157=20alphafine=20=E9=AB=98?= =?UTF-8?q?=E7=BA=A7=E6=90=9C=E7=B4=A2=E5=8A=9F=E8=83=BD=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alphafine/component/AlphaFineFrame.java | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java index 218b244ba..100e58cd3 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java @@ -77,6 +77,18 @@ import javax.swing.Timer; public class AlphaFineFrame extends JFrame { private static final String ADVANCED_SEARCH_MARK = "k:"; + private static final String ACTION_MARK_SHORT = "k:1 "; + private static final String ACTION_MARK = "k:setting "; + private static final String DOCUMENT_MARK_SHORT = "k:2 "; + private static final String DOCUMENT_MARK = "k:help "; + private static final String FILE_MARK_SHORT = "k:3 "; + private static final String FILE_MARK = "k:reportlets "; + private static final String CPT_MARK = "k:cpt "; + private static final String FRM_MARK = "k:frm "; + private static final String DS_MARK = "k:ds "; + private static final String DS_NAME = "dsname=\""; + private static final String PLUGIN_MARK_SHORT = "k:4 "; + private static final String PLUGIN_MARK = "k:shop "; private static final int TIMER_DELAY = 300; @@ -663,7 +675,7 @@ public class AlphaFineFrame extends JFrame { private void doSearch(String text) { initSearchLoadingPane(); - SearchTextBean searchTextBean = new SearchTextBean(text, segmentationResult); + SearchTextBean searchTextBean = generateSearchTextBean(text); this.productNewsSearchWorkerManager.doSearch(searchTextBean); this.settingSearchWorkerManager.doSearch(searchTextBean); this.fileSearchWorkerManager.doSearch(searchTextBean); @@ -671,6 +683,21 @@ public class AlphaFineFrame extends JFrame { this.pluginSearchWorkerManager.doSearch(searchTextBean); } + private SearchTextBean generateSearchTextBean(String searchText) { + if (searchText.startsWith(ACTION_MARK_SHORT) || searchText.startsWith(ACTION_MARK) + || searchText.startsWith(DOCUMENT_MARK_SHORT) || searchText.startsWith(DOCUMENT_MARK)) { + return new SearchTextBean(StringUtils.EMPTY, new String[]{getStoreText(searchText)}); + } else if (searchText.startsWith(FILE_MARK_SHORT) || searchText.startsWith(FILE_MARK) + || searchText.startsWith(CPT_MARK) || searchText.startsWith(FRM_MARK) + || searchText.startsWith(PLUGIN_MARK_SHORT) || searchText.startsWith(PLUGIN_MARK)) { + return new SearchTextBean(getStoreText(searchText), new String[]{getStoreText(searchText)}); + } else if (searchText.startsWith(DS_MARK)) { + return new SearchTextBean(getStoreText(searchText), new String[]{DS_NAME + getStoreText(searchText)}); + } else { + return new SearchTextBean(searchText, segmentationResult); + } + } + /** * 仅搜索依赖网络的搜索项 * From 7ad91ed466cca3ec4864eb8bdb29de6ccae06511 Mon Sep 17 00:00:00 2001 From: Yvan Date: Mon, 9 May 2022 19:05:29 +0800 Subject: [PATCH 09/10] =?UTF-8?q?REPORT-69725=20=E8=BF=9C=E7=A8=8B?= =?UTF-8?q?=E9=9B=86=E7=BE=A4=E7=8E=AF=E5=A2=83=EF=BC=8C=E5=AD=98=E5=82=A8?= =?UTF-8?q?=E8=BF=87=E7=A8=8B=E6=95=B0=E6=8D=AE=E9=9B=86=E7=9A=84=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E6=B2=A1=E6=9C=89=E5=A4=8D=E5=88=B6=E8=BF=87=E6=9D=A5?= =?UTF-8?q?=20=E3=80=90=E9=97=AE=E9=A2=98=E5=8E=9F=E5=9B=A0=E3=80=91?= =?UTF-8?q?=E7=B2=98=E8=B4=B4=E6=95=B0=E6=8D=AE=E9=9B=86=E7=9A=84=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E6=98=AF=E4=BD=BF=E7=94=A8TableDataWrapper=E7=94=9F?= =?UTF-8?q?=E6=88=90TableDataPane=20+=20=E4=BD=BF=E7=94=A8=E5=BD=93?= =?UTF-8?q?=E4=BD=BF=E7=94=A8TableDataPane=E7=94=9F=E6=88=90=E6=96=B0?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E9=9B=86=EF=BC=9B=E5=9C=A8=E7=94=9F?= =?UTF-8?q?=E6=88=90TableDataPane=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C?= =?UTF-8?q?=E4=BC=9A=E8=B0=83=E7=94=A8=E5=AF=B9=E5=BA=94Class=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E7=9A=84=E6=9E=84=E9=80=A0=E6=96=B9=E6=B3=95=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6populateBean=E4=B8=80=E4=B8=8B=EF=BC=9B=E5=AF=B9?= =?UTF-8?q?=E4=BA=8E=E5=AD=98=E5=82=A8=E8=BF=87=E7=A8=8B=EF=BC=8CProcedure?= =?UTF-8?q?DataPane=E5=9C=A8populateBean=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=E4=BC=9A=E5=9C=A8SwingWorker=E7=9A=84doInBackground()=E4=B8=AD?= =?UTF-8?q?=E5=8E=BB=E5=81=9A=E4=B8=80=E6=AC=A1=E6=9F=A5=E8=AF=A2=EF=BC=8C?= =?UTF-8?q?=E7=84=B6=E5=90=8E=E5=9C=A8done()=E6=9B=B4=E6=96=B0=E5=8F=82?= =?UTF-8?q?=E6=95=B0=EF=BC=9B=E8=BF=9C=E7=A8=8B=E8=BF=9E=E6=8E=A5=E4=B8=8B?= =?UTF-8?q?=EF=BC=8C=E6=9F=A5=E8=AF=A2=E7=9A=84=E8=BF=87=E7=A8=8B=E5=8F=98?= =?UTF-8?q?=E9=95=BF=EF=BC=8C=E5=AF=BC=E8=87=B4=E8=BF=98=E6=B2=A1=E6=9D=A5?= =?UTF-8?q?=E5=BE=97=E5=8F=8A=E6=9B=B4=E6=96=B0=E4=B8=8A=E5=8F=82=E6=95=B0?= =?UTF-8?q?=EF=BC=8C=E5=90=8E=E7=BB=AD=E4=BD=BF=E7=94=A8TableDataPane?= =?UTF-8?q?=E7=94=9F=E6=88=90=E6=96=B0=E7=9A=84=E6=95=B0=E6=8D=AE=E9=9B=86?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=8F=82=E6=95=B0=E4=B8=BA=E7=A9=BA=EF=BC=8C?= =?UTF-8?q?=E5=9B=A0=E6=AD=A4=E5=88=9B=E5=BB=BADataModel=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=E5=90=8E=E5=8F=B0=E6=8A=A5=E9=94=99=E7=BC=BA=E5=A4=B1?= =?UTF-8?q?=E5=8F=82=E6=95=B0=EF=BC=8C=E5=89=8D=E7=AB=AF=E8=A1=A8=E7=8E=B0?= =?UTF-8?q?=E4=B8=BA=E6=95=B0=E6=8D=AE=E9=9B=86=E7=BC=96=E8=BE=91=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E4=B8=8A=E6=B2=A1=E5=8F=82=E6=95=B0=20=E3=80=90?= =?UTF-8?q?=E6=94=B9=E5=8A=A8=E6=96=B9=E6=A1=88=E3=80=911.=E4=B8=93?= =?UTF-8?q?=E5=B1=9E=E4=BA=8E=E5=AD=98=E5=82=A8=E8=BF=87=E7=A8=8B=E7=9A=84?= =?UTF-8?q?ProcedureDataPane=E4=B8=AD=E6=8F=90=E4=BE=9B=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8F=82=E6=95=B0=E7=9A=84=E6=96=B9=E6=B3=95?= =?UTF-8?q?=EF=BC=9B2.=E5=AF=B9=E5=A4=8D=E5=88=B6=E7=B2=98=E8=B4=B4?= =?UTF-8?q?=E6=97=B6=E8=B0=83=E7=94=A8=E7=9A=84=E7=94=9F=E6=88=90TableData?= =?UTF-8?q?Pane=E7=9A=84=E6=96=B9=E6=B3=95=E5=8C=85=E4=BA=86=E4=B8=80?= =?UTF-8?q?=E5=B1=82=EF=BC=8C=E7=84=B6=E5=90=8E=E5=88=A4=E6=96=AD=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E4=B8=BA=E5=AD=98=E5=82=A8=E8=BF=87=E7=A8=8B=EF=BC=8C?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E6=98=AF=E7=9A=84=E8=AF=9D=EF=BC=8C=E5=B0=86?= =?UTF-8?q?=E6=BA=90TableData=E7=9A=84=E5=8F=82=E6=95=B0=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=BF=9B=E5=8E=BB=EF=BC=8C=E4=BF=9D=E8=AF=81?= =?UTF-8?q?=E5=90=8E=E9=9D=A2=E8=BF=99=E4=B8=AAPane=E9=87=8C=E6=98=AF?= =?UTF-8?q?=E4=B8=80=E7=9B=B4=E6=9C=89=E5=8F=82=E6=95=B0=E7=9A=84=20?= =?UTF-8?q?=E3=80=90review=E5=BB=BA=E8=AE=AE=E3=80=91=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E6=9C=89=E6=9B=B4=E5=A5=BD=E7=9A=84=E6=94=B9=E6=B3=95=EF=BC=8C?= =?UTF-8?q?=E8=BF=99=E9=87=8C=E8=BF=99=E4=B9=88=E6=94=B9=E4=B8=BB=E8=A6=81?= =?UTF-8?q?=E6=98=AF=E5=9B=A0=E4=B8=BA=E7=94=9F=E6=88=90TableDataPane?= =?UTF-8?q?=E5=92=8CpopulateBean=E7=9A=84=E4=BB=A3=E7=A0=81=E9=83=BD?= =?UTF-8?q?=E6=AF=94=E8=BE=83=E5=8F=A4=E8=80=81=EF=BC=8C=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E4=B9=9F=E4=B8=8D=E7=86=9F=EF=BC=8C=E4=B8=8D=E5=A4=AA=E6=95=A2?= =?UTF-8?q?=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/datapane/TableDataTreePane.java | 4 ++-- .../paste/TableDataFollowingPasteUtils.java | 20 +++++++++++++++++-- .../tabledatapane/ProcedureDataPane.java | 8 ++++++++ 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java index 8f03b1cfc..e42575177 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java @@ -19,6 +19,7 @@ import com.fr.design.data.datapane.management.search.pane.TreeSearchToolbarPane; import com.fr.design.data.datapane.management.search.searcher.TableDataSearchMode; import com.fr.design.data.datapane.management.search.TableDataTreeSearchManager; import com.fr.design.data.tabledata.StoreProcedureWorkerListener; +import com.fr.design.data.tabledata.paste.TableDataFollowingPasteUtils; import com.fr.design.data.tabledata.tabledatapane.AbstractTableDataPane; import com.fr.design.data.tabledata.tabledatapane.DBTableDataPane; import com.fr.design.data.tabledata.wrapper.AbstractTableDataWrapper; @@ -1132,8 +1133,7 @@ public class TableDataTreePane extends BasicTableDataTreePane { // 处理数据集名称 String dsName = getNoRepeatedDsName4Paste(dataWrapperEntry.getKey()); AbstractTableDataWrapper wrapper = dataWrapperEntry.getValue(); - AbstractTableDataPane tableDataPane = wrapper.creatTableDataPane(); - addDataPane(tableDataPane, dsName); + addDataPane(TableDataFollowingPasteUtils.generateTableDataPaneWhenPaste(wrapper), dsName); } } } diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java b/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java index f69312d47..e90b8a420 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java @@ -3,10 +3,12 @@ package com.fr.design.data.tabledata.paste; import com.fr.base.TableData; import com.fr.base.chart.BaseChartCollection; import com.fr.data.TableDataSource; +import com.fr.data.impl.storeproc.StoreProcedure; import com.fr.design.DesignModelAdapter; import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.datapane.TableDataTreePane; import com.fr.design.data.tabledata.tabledatapane.AbstractTableDataPane; +import com.fr.design.data.tabledata.tabledatapane.ProcedureDataPane; import com.fr.design.data.tabledata.wrapper.AbstractTableDataWrapper; import com.fr.design.data.tabledata.wrapper.TableDataWrapper; import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper; @@ -63,8 +65,7 @@ public class TableDataFollowingPasteUtils { continue; } AbstractTableDataWrapper tableDataWrapper = new TemplateTableDataWrapper(dataWrapperEntry.getValue(), dsName); - AbstractTableDataPane tableDataPane = tableDataWrapper.creatTableDataPane(); - tableDataTreePane.addDataPane(tableDataPane, dsName); + tableDataTreePane.addDataPane(generateTableDataPaneWhenPaste(tableDataWrapper), dsName); } } @@ -337,4 +338,19 @@ public class TableDataFollowingPasteUtils { return templeteDataSet; } + /** + * 生成粘贴(新建)时使用的AbstractTableDataPane + * 主要是为了处理StoreProcedure,它在远程情况下,无法及时获取参数。这边因为是复制粘贴,所以直接用原TableData的参数即可 + * @param tableDataWrapper wrapper + * @return AbstractTableDataPane + */ + public static AbstractTableDataPane generateTableDataPaneWhenPaste(AbstractTableDataWrapper tableDataWrapper) { + AbstractTableDataPane tableDataPane = tableDataWrapper.creatTableDataPane(); + TableData tableData = tableDataWrapper.getTableData(); + if (tableData instanceof StoreProcedure) { + StoreProcedure storeProcedure = (StoreProcedure) tableData; + ((ProcedureDataPane) tableDataPane).populateParameters(storeProcedure.getParameters()); + } + return tableDataPane; + } } diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java index d2a1918d4..a2a279b60 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java @@ -225,6 +225,14 @@ public class ProcedureDataPane extends AbstractTableDataPane imp } + /** + * 手动更新参数,用于上面populateBean方法中SwingWorker查询来不及的情况 + * @param procedureParameters + */ + public void populateParameters(StoreProcedureParameter[] procedureParameters) { + this.editorPane.populate(procedureParameters); + } + /** * 增加存储过程监听器 * From 1a49e536029074c7204514d3e3054c0d17bbea46 Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 9 May 2022 19:51:37 +0800 Subject: [PATCH 10/10] =?UTF-8?q?REPORT-67417=20=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E5=8E=86=E5=8F=B2/=E5=B7=B2=E8=AF=BB=E5=8A=A8=E6=80=81=20?= =?UTF-8?q?=E5=8A=A0=E4=B8=8A=E6=8C=81=E4=B9=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alphafine/AlphaFineConfigManager.java | 66 ++++++++++++++++++- 1 file changed, 64 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java b/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java index a8970f9d1..892c57ff8 100644 --- a/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java +++ b/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java @@ -9,7 +9,7 @@ import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLReadable; import com.fr.stable.xml.XMLable; import com.fr.stable.xml.XMLableReader; -import java.util.ArrayList; +import java.util.Arrays; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.List; @@ -99,7 +99,6 @@ public class AlphaFineConfigManager implements XMLable { private String cacheBuildNO; - // todo 暂不持久化 方便测试 /** * key: 登录的bbs用户 * value: alphaFine历史搜索记录 @@ -154,6 +153,10 @@ public class AlphaFineConfigManager implements XMLable { } else if (reader.isChildNode()) { if (ComparatorUtils.equals(reader.getTagName(), "ActionSearchTextCache")) { readActionSearchTextCacheXML(reader); + } else if ("SearchHistory".equals(reader.getTagName())) { + readHistorySearch(reader); + } else if ("ReadSet".equals(reader.getTagName())) { + readReadSet(reader); } } } @@ -180,6 +183,47 @@ public class AlphaFineConfigManager implements XMLable { }); } + private void readHistorySearch(XMLableReader reader) { + reader.readXMLObject(new XMLReadable() { + @Override + public void readXML(XMLableReader xmLableReader) { + if (ComparatorUtils.equals(reader.getTagName(), "history")) { + String tmpVal = reader.getElementValue(); + if (tmpVal != null) { + tmpVal = tmpVal.replace("[",StringUtils.EMPTY).replace("]",StringUtils.EMPTY); + Stack stack = new SizedStack<>(3); + List historyList = Arrays.asList(tmpVal.split(",")); + for (String history : historyList) { + stack.add(history.trim()); + } + historySearchMap.put(reader.getAttrAsString("user", StringUtils.EMPTY), stack); + } + } + } + }); + } + + + private void readReadSet(XMLableReader reader) { + reader.readXMLObject(new XMLReadable() { + @Override + public void readXML(XMLableReader xmLableReader) { + if (ComparatorUtils.equals(reader.getTagName(), "readId")) { + String tmpVal = reader.getElementValue(); + if (tmpVal != null) { + tmpVal = tmpVal.replace("[",StringUtils.EMPTY).replace("]",StringUtils.EMPTY); + String[] idArr = tmpVal.split(","); + Set setId = new HashSet<>(); + for (String id : idArr) { + setId.add(Long.parseLong(id.trim())); + } + readSetMap.put(reader.getAttrAsString("user", StringUtils.EMPTY), setId); + } + } + } + }); + } + @Override public void writeXML(XMLPrintWriter writer) { writer.startTAG("AlphaFineConfigManager"); @@ -198,6 +242,8 @@ public class AlphaFineConfigManager implements XMLable { .attr("needIntelligentCustomerService", this.isNeedIntelligentCustomerService()) .attr("productDynamics", this.isProductDynamics()); writeActionSearchTextCacheXML(writer); + writeSearchHistory(writer); + writeReadSet(writer); writer.end(); } @@ -212,6 +258,22 @@ public class AlphaFineConfigManager implements XMLable { writer.end(); } + private void writeSearchHistory(XMLPrintWriter writer) { + writer.startTAG("SearchHistory"); + for (Map.Entry> entry : historySearchMap.entrySet()) { + writer.startTAG("history").attr("user", entry.getKey()).textNode(entry.getValue().toString()).end(); + } + writer.end(); + } + + private void writeReadSet(XMLPrintWriter writer) { + writer.startTAG("ReadSet"); + for (Map.Entry> entry : readSetMap.entrySet()) { + writer.startTAG("readId").attr("user", entry.getKey()).textNode(entry.getValue().toString()).end(); + } + writer.end(); + } + public boolean isSearchOnLine() { return searchOnLine; }