From b0a9e525c29de61085d392dcddc17fc8e6992a29 Mon Sep 17 00:00:00 2001 From: "alex.sung" Date: Tue, 21 Aug 2018 11:34:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=84=E8=8C=83=E5=9B=BD=E9=99=85=E5=8C=96?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=8F=8A=E5=9B=BD=E9=99=85=E5=8C=96=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alphafine/AlphaFineConfigManager.java | 29 +- .../help/alphafine/AlphaFineConfigPane.java | 33 +- .../alphafine/AlphaFineConstants.java | 21 +- .../design/mainframe/alphafine/CellType.java | 2 +- .../alphafine/cell/CellModelHelper.java | 4 + .../alphafine/cell/model/BottomModel.java | 57 +++ .../alphafine/cell/model/RobotModel.java | 95 ++++ .../cell/render/BottomCellRender.java | 39 ++ .../cell/render/ContentCellRender.java | 73 ++- .../alphafine/component/AlphaFineDialog.java | 479 ++++++++++++++---- .../component/AlphaFineTextField.java | 13 +- .../alphafine/preview/ContainsCirclePane.java | 36 ++ .../alphafine/preview/RobotPreviewPane.java | 41 ++ .../manager/fun/AlphaFineSearchProvider.java | 2 +- .../manager/impl/ActionSearchManager.java | 15 +- .../manager/impl/ComplementAdviceManager.java | 84 +++ .../manager/impl/DocumentSearchManager.java | 72 +-- .../manager/impl/FileSearchManager.java | 25 +- .../search/manager/impl/HotIssuesManager.java | 153 ++++++ .../manager/impl/PluginSearchManager.java | 75 +-- .../manager/impl/RecentSearchManager.java | 13 +- .../manager/impl/RecommendSearchManager.java | 119 ++++- .../manager/impl/SegmentationManager.java | 81 +++ .../manager/impl/SimilarSearchManeger.java | 101 ++++ .../alphafine/images/alphafine10.png | Bin 0 -> 248 bytes .../alphafine/images/alphafine10@2x.png | Bin 0 -> 303 bytes .../mainframe/alphafine/images/alphafine8.png | Bin 0 -> 372 bytes .../alphafine/images/alphafine8@2x.png | Bin 0 -> 618 bytes .../alphafine/images/alphafine_hot1.png | Bin 0 -> 789 bytes .../alphafine/images/alphafine_hot1@2x.png | Bin 0 -> 1743 bytes .../alphafine/images/alphafine_hot2.png | Bin 0 -> 1051 bytes .../alphafine/images/alphafine_hot2@2x.png | Bin 0 -> 2035 bytes .../alphafine/images/alphafine_hot3.png | Bin 0 -> 1590 bytes .../alphafine/images/alphafine_hot3@2x.png | Bin 0 -> 4069 bytes .../alphafine/images/alphafine_hot4.png | Bin 0 -> 634 bytes .../alphafine/images/alphafine_hot4@2x.png | Bin 0 -> 1193 bytes .../alphafine/images/alphafine_hot5.png | Bin 0 -> 1525 bytes .../alphafine/images/alphafine_hot5@2x.png | Bin 0 -> 3569 bytes .../alphafine/images/alphafine_hot6.png | Bin 0 -> 506 bytes .../alphafine/images/alphafine_hot6@2x.png | Bin 0 -> 828 bytes .../mainframe/alphafine/images/selected10.png | Bin 0 -> 14855 bytes .../alphafine/images/selected10@2x.png | Bin 0 -> 279 bytes .../mainframe/alphafine/images/selected8.png | Bin 0 -> 14941 bytes .../alphafine/images/selected8@2x.png | Bin 0 -> 488 bytes 44 files changed, 1423 insertions(+), 239 deletions(-) create mode 100644 designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/BottomModel.java create mode 100644 designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/RobotModel.java create mode 100644 designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/render/BottomCellRender.java create mode 100644 designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/ContainsCirclePane.java create mode 100644 designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/RobotPreviewPane.java create mode 100644 designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/ComplementAdviceManager.java create mode 100644 designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/HotIssuesManager.java create mode 100644 designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java create mode 100644 designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SimilarSearchManeger.java create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine10.png create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine10@2x.png create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine8.png create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine8@2x.png create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot1.png create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot1@2x.png create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot2.png create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot2@2x.png create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot3.png create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot3@2x.png create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot4.png create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot4@2x.png create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot5.png create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot5@2x.png create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot6.png create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot6@2x.png create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/selected10.png create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/selected10@2x.png create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/selected8.png create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/selected8@2x.png 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 b1c03c09bc..11bc0fb34c 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 @@ -55,6 +55,14 @@ public class AlphaFineConfigManager implements XMLable { * 应用中心 */ private boolean isContainPlugin = true; + /** + * 分词搜索 + */ + private boolean isNeedSegmentationCheckbox = true; + /** + * 智能客服 + */ + private boolean isNeedIntelligentCustomerService = true; /** * 快捷键 */ @@ -94,6 +102,8 @@ public class AlphaFineConfigManager implements XMLable { this.setContainAction(reader.getAttrAsBoolean("isContainAction", true)); this.setContainTemplate(reader.getAttrAsBoolean("isContainTemplate", true)); this.setContainFileContent(reader.getAttrAsBoolean("isContainFileContent", false)); + this.setNeedSegmentationCheckbox(reader.getAttrAsBoolean("isNeedSegmentationCheckbox", true)); + this.setNeedIntelligentCustomerService(reader.getAttrAsBoolean("isNeedIntelligentCustomerService", true)); this.setShortcuts(reader.getAttrAsString("shortcuts", getDefaultShortCuts())); this.setNeedRemind(reader.getAttrAsBoolean("isNeedRemind", true)); this.setOperateCount(reader.getAttrAsInt("operateCount", 0)); @@ -115,7 +125,9 @@ public class AlphaFineConfigManager implements XMLable { .attr("isContainPlugin", this.isContainPlugin()) .attr("isContainFileContent", this.isContainFileContent()) .attr("isNeedRemind", this.isNeedRemind()) - .attr("operateCount", this.getOperateCount()); + .attr("operateCount", this.getOperateCount()) + .attr("isNeedSegmentationCheckbox", this.isNeedSegmentationCheckbox()) + .attr("isNeedIntelligentCustomerService", this.isNeedIntelligentCustomerService()); writer.end(); } @@ -227,6 +239,21 @@ public class AlphaFineConfigManager implements XMLable { isNeedRemind = needRemind; } + public boolean isNeedSegmentationCheckbox() { + return isNeedSegmentationCheckbox; + } + + public void setNeedSegmentationCheckbox(boolean needSegmentationCheckbox) { + isNeedSegmentationCheckbox = needSegmentationCheckbox; + } + + public boolean isNeedIntelligentCustomerService() { + return isNeedIntelligentCustomerService; + } + + public void setNeedIntelligentCustomerService(boolean needIntelligentCustomerService) { + isNeedIntelligentCustomerService = needIntelligentCustomerService; + } public int getOperateCount() { return operateCount; } diff --git a/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigPane.java b/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigPane.java index ddb8e425c8..1520a7e1dd 100644 --- a/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigPane.java +++ b/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigPane.java @@ -8,7 +8,6 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayoutHelper; - import com.fr.log.FineLoggerFactory; import javax.swing.*; @@ -56,7 +55,7 @@ public class AlphaFineConfigPane extends BasicPane { private static final double COLUMN_GAP = 180; private static final double ROW_GAP = 25; private KeyStroke shortCutKeyStore = null; - private UICheckBox isEnabledCheckbox, isSearchOnlineCheckbox, isContainRecommendCheckbox, isContainActionCheckbox, isContainDocumentCheckbox, isContainTemplateCheckbox, isContainPluginCheckbox, isContainFileContentCheckbox; + private UICheckBox isEnabledCheckbox, isSearchOnlineCheckbox, isNeedSegmentationCheckbox, isNeedIntelligentCustomerService, isContainRecommendCheckbox, isContainActionCheckbox, isContainDocumentCheckbox, isContainTemplateCheckbox, isContainPluginCheckbox, isContainFileContentCheckbox; private UITextField shortcutsField; public AlphaFineConfigPane() { @@ -77,13 +76,21 @@ public class AlphaFineConfigPane extends BasicPane { private Component[][] initSearchRangeComponents() { Component[][] components = new Component[][]{ new Component[]{isContainRecommendCheckbox, isContainActionCheckbox, isContainDocumentCheckbox}, - new Component[]{isContainTemplateCheckbox, isContainPluginCheckbox, isContainFileContentCheckbox} + new Component[]{isContainTemplateCheckbox, isContainPluginCheckbox, isContainFileContentCheckbox}, + new Component[]{isNeedIntelligentCustomerService, null, null} + }; + return components; + } + + private Component[][] initOnlineComponents() { + Component[][] components = new Component[][]{ + new Component[]{isSearchOnlineCheckbox, isNeedSegmentationCheckbox, null} }; return components; } private void createSearchConfigPane(JPanel contentPane) { - double[] rowSize = {ROW_GAP, ROW_GAP}; + double[] rowSize = {ROW_GAP, ROW_GAP, ROW_GAP}; double[] columnSize = {COLUMN_GAP, COLUMN_GAP, COLUMN_GAP}; @@ -94,6 +101,7 @@ public class AlphaFineConfigPane extends BasicPane { isContainDocumentCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Community_Help")); isContainTemplateCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Templates")); isContainFileContentCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Templates_Content")); + isNeedIntelligentCustomerService = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_AlphaFine_Intelligent_Customer_Service")); JPanel searchConfigPane = TableLayoutHelper.createTableLayoutPane(initSearchRangeComponents(), rowSize, columnSize); northPane.add(searchConfigPane); contentPane.add(northPane); @@ -138,8 +146,9 @@ public class AlphaFineConfigPane extends BasicPane { } private void createOnlinePane(JPanel contentPane) { - JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_AlphaFine_Enable_Internet")); + JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_AlphaFine_Search_Type")); isSearchOnlineCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_AlphaFine_Enable_Internet_Search")); + isNeedSegmentationCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_AlphaFine_Enable_Segmentation")); isSearchOnlineCheckbox.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -147,17 +156,23 @@ public class AlphaFineConfigPane extends BasicPane { isContainRecommendCheckbox.setEnabled(false); isContainPluginCheckbox.setEnabled(false); isContainDocumentCheckbox.setEnabled(false); + isNeedIntelligentCustomerService.setEnabled(false); isContainRecommendCheckbox.setSelected(false); isContainPluginCheckbox.setSelected(false); isContainDocumentCheckbox.setSelected(false); + isNeedIntelligentCustomerService.setSelected(false); } else { isContainRecommendCheckbox.setEnabled(true); isContainPluginCheckbox.setEnabled(true); isContainDocumentCheckbox.setEnabled(true); + isNeedIntelligentCustomerService.setEnabled(true); } } }); - northPane.add(isSearchOnlineCheckbox); + double[] rowSize = {ROW_GAP}; + double[] columnSize = {COLUMN_GAP, COLUMN_GAP, COLUMN_GAP}; + JPanel onlinePane = TableLayoutHelper.createTableLayoutPane(initOnlineComponents(), rowSize, columnSize); + northPane.add(onlinePane); contentPane.add(northPane); } @@ -187,6 +202,10 @@ public class AlphaFineConfigPane extends BasicPane { this.isContainRecommendCheckbox.setSelected(alphaFineConfigManager.isContainRecommend() && alphaFineConfigManager.isSearchOnLine()); this.isContainRecommendCheckbox.setEnabled(alphaFineConfigManager.isSearchOnLine()); this.shortcutsField.setText(getDisplayShortCut(alphaFineConfigManager.getShortcuts())); + + this.isNeedSegmentationCheckbox.setSelected(alphaFineConfigManager.isNeedSegmentationCheckbox()); + this.isNeedIntelligentCustomerService.setSelected(alphaFineConfigManager.isNeedIntelligentCustomerService() && alphaFineConfigManager.isSearchOnLine()); + this.isNeedIntelligentCustomerService.setEnabled(alphaFineConfigManager.isSearchOnLine()); shortCutKeyStore = convert2KeyStroke(alphaFineConfigManager.getShortcuts()); } @@ -201,6 +220,8 @@ public class AlphaFineConfigPane extends BasicPane { alphaFineConfigManager.setSearchOnLine(this.isSearchOnlineCheckbox.isSelected()); alphaFineConfigManager.setContainTemplate(this.isContainTemplateCheckbox.isSelected()); alphaFineConfigManager.setContainFileContent(this.isContainFileContentCheckbox.isSelected()); + alphaFineConfigManager.setNeedSegmentationCheckbox(this.isNeedSegmentationCheckbox.isSelected()); + alphaFineConfigManager.setNeedIntelligentCustomerService(this.isNeedIntelligentCustomerService.isSelected()); alphaFineConfigManager.setShortcuts(shortCutKeyStore != null ? shortCutKeyStore.toString().replace(TYPE, DISPLAY_TYPE) : this.shortcutsField.getText()); designerEnvManager.setAlphaFineConfigManager(alphaFineConfigManager); try { diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java index 09de8e6ed8..cf7f04e0ae 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java @@ -2,7 +2,10 @@ package com.fr.design.mainframe.alphafine; import com.fr.general.CloudCenter; -import java.awt.*; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Font; + /** * Created by XiaXiang on 2017/5/10. @@ -31,6 +34,10 @@ public class AlphaFineConstants { public static final int CELL_TITLE_HEIGHT = 24; + public static final int HOT_ICON_LABEL_HEIGHT = 36; + + public static final int HOT_ITEMS = 6; + public static final Dimension FULL_SIZE = new Dimension(680, 460); @@ -40,6 +47,10 @@ public class AlphaFineConstants { public static final Dimension ICON_LABEL_SIZE = new Dimension(64, 64); + public static final Dimension HOT_ICON_LABEL_SIZE = new Dimension(36, 36); + + public static final Dimension HOT_ISSUES_JAPNEL_SIZE = new Dimension(213,182); + public static final Dimension CLOSE_BUTTON_SIZE = new Dimension(40, 40); public static final Color WHITE = new Color(0xf9f9f9); @@ -62,6 +73,8 @@ public class AlphaFineConstants { public static final Font MEDIUM_FONT = new Font("Song_TypeFace", 0, 12); + public static final Font MEDIUM_FONT_ANOTHER = new Font("HiraginoSansGB-W3", 0, 12); + public static final Font LARGE_FONT = new Font("Song_TypeFace", 0, 18); public static final Font GREATER_FONT = new Font("Song_TypeFace", 0, 20); @@ -87,7 +100,13 @@ public class AlphaFineConstants { public static final String SEARCH_API = CloudCenter.getInstance().acquireUrlByKind("af.cloud_search"); + public static final String ALPHA_ROBOT_SEARCH_TOKEN = "K8dl0Np6l0gs"; + + public static final String SIMILAR_SEARCH_URL_PREFIX = "http://robot.finereport.com/openapi/like.php?action=search&"; + + public static final String COMPLEMENT_ADVICE_SEARCH_URL_PREFIX = "http://robot.finereport.com/openapi/getkw.php?"; + public static final String ALPHA_HOT_SEARCH = "http://robot.finereport.com/openapi/hot.php"; } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/CellType.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/CellType.java index 0f4f61a42b..3d533e47bb 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/CellType.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/CellType.java @@ -4,7 +4,7 @@ package com.fr.design.mainframe.alphafine; * Created by XiaXiang on 2017/4/27. */ public enum CellType { - RECOMMEND(0), ACTION(1), DOCUMENT(2), FILE(3), PLUGIN(4), REUSE(5), NO_RESULT(6), MORE(7); + RECOMMEND(0), ACTION(1), DOCUMENT(2), FILE(3), PLUGIN(4), REUSE(5), NO_RESULT(6), MORE(7), RECOMMEND_ROBOT(8), BOTTOM(9), ROBOT(10); private int typeValue; diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/CellModelHelper.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/CellModelHelper.java index d838f50a9d..b388f5e8ed 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/CellModelHelper.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/CellModelHelper.java @@ -6,6 +6,7 @@ import com.fr.design.mainframe.alphafine.search.manager.impl.ActionSearchManager import com.fr.design.mainframe.alphafine.search.manager.impl.DocumentSearchManager; import com.fr.design.mainframe.alphafine.search.manager.impl.FileSearchManager; import com.fr.design.mainframe.alphafine.search.manager.impl.PluginSearchManager; +import com.fr.design.mainframe.alphafine.search.manager.impl.SimilarSearchManeger; import com.fr.json.JSONObject; /** @@ -31,6 +32,9 @@ public class CellModelHelper { case REUSE: cellModel = PluginSearchManager.getModelFromCloud(object.optJSONObject(RESULT)); break; + case ROBOT: + case RECOMMEND_ROBOT: + cellModel = SimilarSearchManeger.getModelFromCloud(object.optJSONObject(RESULT)); } return cellModel; diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/BottomModel.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/BottomModel.java new file mode 100644 index 0000000000..76528685eb --- /dev/null +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/BottomModel.java @@ -0,0 +1,57 @@ +package com.fr.design.mainframe.alphafine.cell.model; + +import com.fr.design.mainframe.alphafine.CellType; +import com.fr.json.JSONException; +import com.fr.json.JSONObject; +import com.fr.log.FineLoggerFactory; + +import java.awt.Desktop; +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; + +/** + * Created by alexsung on 2018/7/30. + */ +public class BottomModel extends AlphaCellModel { + /** + * 找不到答案?去论坛提问 + */ + public String getGoToWeb() { + return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Internet_Forum"); + } + + public BottomModel(String name, String content) { + super(name, content, CellType.BOTTOM); + } + + public BottomModel() { + super(null, null, CellType.BOTTOM); + } + + @Override + public JSONObject ModelToJson() throws JSONException { + return null; + } + + @Override + public String getStoreInformation() { + return null; + } + + @Override + public boolean hasAction() { + return true; + } + + @Override + public void doAction() { + try { + Desktop.getDesktop().browse(new URI("http://bbs.fanruan.com/post_newthread_ajax.php?action=newthread&fid=39")); + } catch (IOException e) { + FineLoggerFactory.getLogger().error(e.getMessage()); + } catch (URISyntaxException e) { + FineLoggerFactory.getLogger().error(e.getMessage()); + } + } +} diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/RobotModel.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/RobotModel.java new file mode 100644 index 0000000000..99ccab4bd0 --- /dev/null +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/RobotModel.java @@ -0,0 +1,95 @@ +package com.fr.design.mainframe.alphafine.cell.model; + +import com.fr.design.mainframe.alphafine.AlphaFineConstants; +import com.fr.design.mainframe.alphafine.AlphaFineHelper; +import com.fr.design.mainframe.alphafine.CellType; +import com.fr.general.http.HttpClient; +import com.fr.json.JSONException; +import com.fr.json.JSONObject; +import com.fr.log.FineLoggerFactory; +import org.apache.commons.codec.digest.DigestUtils; + + +import java.awt.Desktop; +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; + +/** + * Created by alex.sung on 2018/8/3. + */ +public class RobotModel extends AlphaCellModel { + + private String title; + private String content; + + //热门问题列表的list不需要渲染图标,所以这里需要区分一下 + private boolean isHotItemModel = false; + + public boolean isHotItemModel() { + return isHotItemModel; + } + + public void setHotItemModel(boolean hotItemModel) { + isHotItemModel = hotItemModel; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public static String getContent(String titleStr) { + String result; + String token = DigestUtils.md5Hex(AlphaFineConstants.ALPHA_ROBOT_SEARCH_TOKEN + titleStr); + String url = "http://robot.finereport.com/openapi/reply.php?action=search&msg=" + titleStr + "&token=" + token; + HttpClient httpClient = new HttpClient(url); + httpClient.asGet(); + result = httpClient.getResponseText(); + AlphaFineHelper.checkCancel(); + try { + JSONObject jsonObject = new JSONObject(result); + return jsonObject.optString("msg"); + } catch (JSONException e) { + FineLoggerFactory.getLogger().error("get robotmodel content error: " + e.getMessage()); + } + return null; + } + + public RobotModel(String title, String content) { + super(title, content, CellType.ROBOT); + this.title = title; + } + + @Override + public JSONObject ModelToJson() throws JSONException { + JSONObject object = JSONObject.create(); + try { + JSONObject modelObject = JSONObject.create(); + modelObject.put("title", getTitle()).put("content", getContent()).put("searchCount", getSearchCount()); + object.put("result", modelObject).put("cellType", getType().getTypeValue()); + } catch (JSONException e) { + FineLoggerFactory.getLogger().error("RobotModel: " + e.getMessage()); + } + return object; + } + + @Override + public String getStoreInformation() { + return null; + } + + @Override + public void doAction() { + try { + Desktop.getDesktop().browse(new URI("http://robot.finereport.com?send=" + super.getName())); + } catch (IOException e) { + FineLoggerFactory.getLogger().error(e.getMessage()); + } catch (URISyntaxException e) { + FineLoggerFactory.getLogger().error(e.getMessage()); + } + } +} diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/render/BottomCellRender.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/render/BottomCellRender.java new file mode 100644 index 0000000000..824fc3bfc0 --- /dev/null +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/render/BottomCellRender.java @@ -0,0 +1,39 @@ +package com.fr.design.mainframe.alphafine.cell.render; + +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.mainframe.alphafine.AlphaFineConstants; +import com.fr.design.mainframe.alphafine.cell.model.BottomModel; + +import javax.swing.*; +import java.awt.Component; +import java.awt.BorderLayout; +import java.awt.Dimension; + +/** + * Created by alex.sung on 2018/8/3. + */ +public class BottomCellRender implements ListCellRenderer { + @Override + public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { + + UILabel goToWebLabel = new UILabel(); + BottomModel bottomModel = (BottomModel) value; + JPanel panel = new JPanel(new BorderLayout()); + panel.setBackground(null); + panel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); + + JPanel line = new JPanel(); + line.setPreferredSize(new Dimension(200, 1)); + line.setBackground(AlphaFineConstants.GRAY); + panel.add(line, BorderLayout.NORTH); + + goToWebLabel.setFont(AlphaFineConstants.MEDIUM_FONT); + goToWebLabel.setText(bottomModel.getGoToWeb()); + goToWebLabel.setForeground(AlphaFineConstants.BLUE); + goToWebLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10)); + panel.add(goToWebLabel, BorderLayout.EAST); + + panel.setPreferredSize(new Dimension(list.getFixedCellWidth(), AlphaFineConstants.CELL_TITLE_HEIGHT)); + return panel; + } +} diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java index d8cd66d97e..367de258c5 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java @@ -4,11 +4,20 @@ import com.bulenkov.iconloader.IconLoader; import com.fr.design.gui.ilable.UILabel; import com.fr.design.mainframe.alphafine.AlphaFineConstants; import com.fr.design.mainframe.alphafine.cell.model.AlphaCellModel; +import com.fr.design.mainframe.alphafine.cell.model.BottomModel; import com.fr.design.mainframe.alphafine.cell.model.MoreModel; +import com.fr.design.mainframe.alphafine.cell.model.RobotModel; import com.fr.stable.StringUtils; -import javax.swing.*; -import java.awt.*; + +import javax.swing.BorderFactory; +import javax.swing.JList; +import javax.swing.JPanel; +import javax.swing.ListCellRenderer; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Component; /** * Created by XiaXiang on 2017/4/20. @@ -19,6 +28,14 @@ public class ContentCellRender implements ListCellRenderer { private static final String CELL_PATH = AlphaFineConstants.IMAGE_URL + "alphafine"; private static final String SUFFIX = ".png"; + private String searchText; + private String[] segmentationResult; + + public ContentCellRender(String searchText, String[] segmentationResult) { + this.searchText = searchText; + this.segmentationResult = segmentationResult; + } + @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { UILabel titleLabel = new UILabel(); @@ -26,21 +43,34 @@ public class ContentCellRender implements ListCellRenderer { if (value instanceof MoreModel) { return new TitleCellRender().getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); } + if (value instanceof BottomModel) { + return new BottomCellRender().getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); + } AlphaCellModel model = (AlphaCellModel) value; JPanel panel = new JPanel(new BorderLayout()); panel.setBackground(null); panel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); - titleLabel.setText(" " + model.getName()); + if (model.hasAction()) { if (isSelected) { + titleLabel.setText(" " + model.getName()); String iconUrl = SELECTED_PATH + model.getType().getTypeValue() + SUFFIX; panel.setBackground(AlphaFineConstants.BLUE); titleLabel.setForeground(Color.WHITE); - titleLabel.setIcon(IconLoader.getIcon(iconUrl)); + if(value instanceof RobotModel && ((RobotModel) value).isHotItemModel()){ + titleLabel.setIcon(null); + }else{ + titleLabel.setIcon(IconLoader.getIcon(iconUrl)); + } } else { + + titleLabel.setText(dealWithModelName(model.getName(), segmentationResult)); String iconUrl = CELL_PATH + model.getType().getTypeValue() + SUFFIX; - titleLabel.setIcon(IconLoader.getIcon(iconUrl)); - titleLabel.setForeground(AlphaFineConstants.BLACK); + if(value instanceof RobotModel && ((RobotModel) value).isHotItemModel()){ + titleLabel.setIcon(null); + }else{ + titleLabel.setIcon(IconLoader.getIcon(iconUrl)); + } } } else { @@ -66,4 +96,35 @@ public class ContentCellRender implements ListCellRenderer { panel.setPreferredSize(new Dimension(list.getFixedCellWidth(), AlphaFineConstants.CELL_HEIGHT)); return panel; } + + /** + * 处理model的显示颜色,将搜索词高亮 + * + * @param modelName + * @param strings + * @return + */ + public String dealWithModelName(String modelName, String strings[]) { + if (strings == null) { + return modelName; + } + for (int i = 0; i < strings.length; i++) { + String primaryStr = getReplacedString(modelName, strings[i]); + modelName = modelName.replaceAll("(?i)" + strings[i], "|" + strings[i] + "|"); + if(!StringUtils.isEmpty(primaryStr)){ + modelName = modelName.replaceAll(strings[i], primaryStr); + } + } + modelName = "" + modelName.replaceAll("\\|", "") + ""; + return modelName; + } + + private String getReplacedString(String modelName, String string) { + int index = modelName.toLowerCase().indexOf(string.toLowerCase()); + if(index == -1){ + return null; + } + return modelName.substring(index, index+string.length()); + + } } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java index ef791195d5..af7cf2d265 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java @@ -11,23 +11,11 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.mainframe.alphafine.AlphaFineConstants; import com.fr.design.mainframe.alphafine.AlphaFineHelper; import com.fr.design.mainframe.alphafine.cell.CellModelHelper; -import com.fr.design.mainframe.alphafine.cell.model.AlphaCellModel; -import com.fr.design.mainframe.alphafine.cell.model.FileModel; -import com.fr.design.mainframe.alphafine.cell.model.MoreModel; -import com.fr.design.mainframe.alphafine.cell.model.PluginModel; +import com.fr.design.mainframe.alphafine.cell.model.*; import com.fr.design.mainframe.alphafine.cell.render.ContentCellRender; -import com.fr.design.mainframe.alphafine.listener.DocumentAdapter; import com.fr.design.mainframe.alphafine.model.SearchResult; -import com.fr.design.mainframe.alphafine.preview.DocumentPreviewPane; -import com.fr.design.mainframe.alphafine.preview.FilePreviewPane; -import com.fr.design.mainframe.alphafine.preview.NoResultPane; -import com.fr.design.mainframe.alphafine.preview.PluginPreviewPane; -import com.fr.design.mainframe.alphafine.search.manager.impl.ActionSearchManager; -import com.fr.design.mainframe.alphafine.search.manager.impl.DocumentSearchManager; -import com.fr.design.mainframe.alphafine.search.manager.impl.FileSearchManager; -import com.fr.design.mainframe.alphafine.search.manager.impl.PluginSearchManager; -import com.fr.design.mainframe.alphafine.search.manager.impl.RecentSearchManager; -import com.fr.design.mainframe.alphafine.search.manager.impl.RecommendSearchManager; +import com.fr.design.mainframe.alphafine.preview.*; +import com.fr.design.mainframe.alphafine.search.manager.impl.*; import com.fr.design.mainframe.errorinfo.ErrorInfoUploader; import com.fr.design.mainframe.templateinfo.TemplateInfoCollector; import com.fr.form.main.Form; @@ -45,35 +33,11 @@ import com.fr.stable.StringUtils; import com.fr.stable.project.ProjectConstants; import javax.imageio.ImageIO; -import javax.swing.BorderFactory; -import javax.swing.DefaultListModel; -import javax.swing.ImageIcon; -import javax.swing.JList; -import javax.swing.JPanel; -import javax.swing.KeyStroke; -import javax.swing.SwingUtilities; -import javax.swing.SwingWorker; -import javax.swing.event.DocumentEvent; +import javax.swing.*; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; -import java.awt.AWTEvent; -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.Frame; -import java.awt.Graphics; -import java.awt.Image; -import java.awt.Point; -import java.awt.Rectangle; -import java.awt.Toolkit; -import java.awt.Window; -import java.awt.event.AWTEventListener; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.KeyAdapter; -import java.awt.event.KeyEvent; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; +import java.awt.*; +import java.awt.event.*; import java.awt.image.BufferedImage; import java.io.IOException; import java.net.URL; @@ -81,6 +45,8 @@ import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.HashMap; import java.util.concurrent.ExecutionException; +import java.util.regex.Matcher; +import java.util.regex.Pattern; /** * Created by XiaXiang on 2017/3/21. @@ -99,6 +65,7 @@ public class AlphaFineDialog extends UIDialog { 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 String SIMILAR_MARK = "k:robot "; private static final String PLACE_HOLDER = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine"); private static final int MAX_SHOW_SIZE = 12; @@ -116,9 +83,17 @@ public class AlphaFineDialog extends UIDialog { private SwingWorker searchWorker; private SwingWorker showWorker; private String storeText; + private String[] segmentationResult; //是否强制打开,因为面板是否关闭绑定了全局鼠标事件,这里需要处理一下 private boolean forceOpen; + private JPanel hotPane; + private JPanel backPane; + SearchResult modeList = null; + private static String beforeSearchStr = ""; + private static boolean isAlreadySearch = false; + private static boolean isAlreadyInitHot = false; + public AlphaFineDialog(Frame parent, boolean forceOpen) { super(parent); this.forceOpen = forceOpen; @@ -190,6 +165,45 @@ public class AlphaFineDialog extends UIDialog { }); topPane.add(closeButton, BorderLayout.EAST); add(topPane, BorderLayout.CENTER); + + if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isNeedIntelligentCustomerService()) { + initHotPane(); + } + } + + /** + * 初始化热门界面 + */ + private void initHotPane() { + hotPane = new JPanel(); + hotPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); + hotPane.setPreferredSize(AlphaFineConstants.CONTENT_SIZE); + hotPane.setLayout(new BorderLayout()); + + UILabel uiLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Hot")); + uiLabel.setFont(AlphaFineConstants.SMALL_FONT); + uiLabel.setForeground(AlphaFineConstants.DARK_GRAY); + JPanel panel = new JPanel(); + + hotPane.add(uiLabel, BorderLayout.NORTH); + hotPane.add(panel, BorderLayout.CENTER); + + GridLayout gridLayout = new GridLayout(2, 3, 3, 3); + panel.setLayout(gridLayout); + + String[][] ss = HotIssuesManager.getInstance().getHotIssues(); + + if(ss != null){ + for (int i = 0; i < ss.length; i++) { + panel.add(new HotIssueJpanel(ss[i], i + 1)); + } + }else { + for (int i = 0; i < AlphaFineConstants.HOT_ITEMS; i++) { + panel.add(new HotIssueJpanel(new String[]{" "}, i + 1)); + } + } + add(hotPane, BorderLayout.SOUTH); + setSize(AlphaFineConstants.FULL_SIZE); } /** @@ -208,7 +222,7 @@ public class AlphaFineDialog extends UIDialog { */ private void initProperties() { setUndecorated(true); - //addComponentListener(new ComponentHandler()); +//addComponentListener(new ComponentHandler()); setSize(AlphaFineConstants.FIELD_SIZE); centerWindow(this); @@ -230,20 +244,20 @@ public class AlphaFineDialog extends UIDialog { if (winSize.width > screenSize.width) { winSize.width = screenSize.width; } - //这里设置位置:水平居中,竖直偏上 +//这里设置位置:水平居中,竖直偏上 win.setLocation((screenSize.width - winSize.width) / 2, (screenSize.height - winSize.height) / AlphaFineConstants.SHOW_SIZE); } - // TODO: 2017/5/8 xiaxiang: 窗体圆角setShape()有毛边,重写paint方法可以解决毛边问题,但带来了别的问题,处理比较麻烦,暂用setShape(); -// public void paint(Graphics g){ -// Graphics2D g2 = (Graphics2D) g.create(); -// RenderingHints qualityHints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); -// qualityHints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); -// g2.setRenderingHints(qualityHints); -// g2.setPaint(Color.WHITE); -// g2.fillRoundRect(0, 0, getWidth(), getHeight(), 15, 15); -// g2.dispose(); -// } +// TODO: 2017/5/8 xiaxiang: 窗体圆角setShape()有毛边,重写paint方法可以解决毛边问题,但带来了别的问题,处理比较麻烦,暂用setShape(); +// public void paint(Graphics g){ +// Graphics2D g2 = (Graphics2D) g.create(); +// RenderingHints qualityHints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); +// qualityHints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); +// g2.setRenderingHints(qualityHints); +// g2.setPaint(Color.WHITE); +// g2.fillRoundRect(0, 0, getWidth(), getHeight(), 15, 15); +// g2.dispose(); +// } /** * 执行搜索 @@ -254,16 +268,21 @@ public class AlphaFineDialog extends UIDialog { showSearchResult(text); } - boolean isNoNeedSearch(String text) { - return ComparatorUtils.equals(PLACE_HOLDER, text) || text.contains("'") || StringUtils.isBlank(text); - } - @Override public void setVisible(boolean isVisible) { if (!isVisible) { dispose(); return; } + if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isNeedIntelligentCustomerService()) { + if (hotPane == null) { + initHotPane(); + } + }else{ + removeHotPane(); + setSize(AlphaFineConstants.FIELD_SIZE); + refreshContainer(); + } super.setVisible(isVisible); } @@ -289,8 +308,7 @@ public class AlphaFineDialog extends UIDialog { remove(searchResultPane); searchResultPane = null; } - setSize(AlphaFineConstants.FIELD_SIZE); - refreshContainer(); + } /** @@ -307,6 +325,8 @@ public class AlphaFineDialog extends UIDialog { * 初始化搜索面板 */ private void initSearchResultComponents() { + + searchResultList = new AlphaFineList(); searchResultList.setFixedCellHeight(AlphaFineConstants.CELL_HEIGHT); searchListModel = new SearchListModel(new SearchResult()); @@ -314,7 +334,7 @@ public class AlphaFineDialog extends UIDialog { searchResultPane = new JPanel(); searchResultPane.setPreferredSize(AlphaFineConstants.CONTENT_SIZE); searchResultPane.setLayout(new BorderLayout()); - searchResultList.setCellRenderer(new ContentCellRender()); + searchResultList.setCellRenderer(new ContentCellRender(storeText, segmentationResult)); leftSearchResultPane = new UIScrollPane(searchResultList); leftSearchResultPane.setBorder(null); @@ -424,17 +444,19 @@ public class AlphaFineDialog extends UIDialog { */ private void dealWithSearchText(String searchText) { if (searchText.startsWith(ACTION_MARK_SHORT) || searchText.startsWith(ACTION_MARK)) { - buildActionList(getStoreText(searchText)); + buildActionList(new String[]{getStoreText(searchText)}); } else if (searchText.startsWith(DOCUMENT_MARK_SHORT) || searchText.startsWith(DOCUMENT_MARK)) { - buildDocumentList(getStoreText(searchText)); + buildDocumentList(new String[]{getStoreText(searchText)}); } else if (searchText.startsWith(FILE_MARK_SHORT) || searchText.startsWith(FILE_MARK)) { - buildFileList(getStoreText(searchText)); + buildFileList(new String[]{getStoreText(searchText)}); } else if (searchText.startsWith(CPT_MARK) || searchText.startsWith(FRM_MARK)) { - buildFileList(searchText); + buildFileList(new String[]{searchText}); } else if (searchText.startsWith(DS_MARK)) { - buildFileList(DS_NAME + getStoreText(searchText)); + buildFileList(new String[]{DS_NAME + getStoreText(searchText)}); } else if (searchText.startsWith(PLUGIN_MARK_SHORT) || searchText.startsWith(PLUGIN_MARK)) { - buildPluginList(getStoreText(searchText)); + buildPluginList(new String[]{getStoreText(searchText)}); + } else if (searchText.startsWith(SIMILAR_MARK)) { + buildSimilarList(new String[]{getStoreText(searchText)}); } } @@ -467,39 +489,47 @@ public class AlphaFineDialog extends UIDialog { * @param searchText */ private void doNormalSearch(String searchText) { - buildRecentList(searchText); - buildRecommendList(searchText); - buildActionList(searchText); - buildFileList(searchText); - buildDocumentList(searchText); - buildPluginList(searchText); + if (segmentationResult != null) { + buildRecentList(segmentationResult); + buildRecommendList(segmentationResult); + buildActionList(segmentationResult); + buildFileList(segmentationResult); + buildDocumentList(segmentationResult); + buildPluginList(segmentationResult); + buildSimilarList(segmentationResult); + } + searchListModel.addElement(new BottomModel()); } - private void buildDocumentList(final String searchText) { + private void buildDocumentList(final String[] searchText) { addSearchResult(DocumentSearchManager.getInstance().getLessSearchResult(searchText)); } - private void buildFileList(final String searchText) { + private void buildFileList(final String[] searchText) { addSearchResult(FileSearchManager.getInstance().getLessSearchResult(searchText)); } - private void buildActionList(final String searchText) { + private void buildActionList(final String[] searchText) { addSearchResult(ActionSearchManager.getInstance().getLessSearchResult(searchText)); } - private void buildPluginList(final String searchText) { + private void buildPluginList(final String[] searchText) { addSearchResult(PluginSearchManager.getInstance().getLessSearchResult(searchText)); } - private void buildRecommendList(final String searchText) { + private void buildRecommendList(final String[] searchText) { addSearchResult(RecommendSearchManager.getInstance().getLessSearchResult(searchText)); } - private void buildRecentList(final String searchText) { + private void buildRecentList(final String[] searchText) { addSearchResult(RecentSearchManager.getInstance().getLessSearchResult(searchText)); } + private void buildSimilarList(final String[] searchText) { + addSearchResult(SimilarSearchManeger.getInstance().getLessSearchResult(searchText)); + } + private synchronized void addSearchResult(SearchResult searchResult) { for (AlphaCellModel object : searchResult) { AlphaFineHelper.checkCancel(); @@ -625,12 +655,42 @@ public class AlphaFineDialog extends UIDialog { validate(); repaint(); } - } catch (InterruptedException e) { - FineLoggerFactory.getLogger().error(e.getMessage()); - } catch (ExecutionException e) { - FineLoggerFactory.getLogger().error(e.getMessage()); + } catch (Exception e) { } + } + }; + this.showWorker.execute(); + break; + case ROBOT: + case RECOMMEND_ROBOT: + showDefaultPreviewPane(); + checkWorker(); + this.showWorker = new SwingWorker() { + @Override + protected String doInBackground() { + String content = RobotModel.getContent((selectedValue).getName()); + //去掉小帆底部的信息 + String regex1 = "
([\\s\\S]*?)class=\"jiaoyes\">YES
"; + String regex2 = "
"; + content = content.replaceAll(regex1, "") + .replaceAll(regex2, ""); + return content; + } + @Override + protected void done() { + if (!isCancelled() && rightSearchResultPane != null) { + rightSearchResultPane.removeAll(); + try { + rightSearchResultPane.add(new RobotPreviewPane((selectedValue).getName(), get())); + } catch (InterruptedException e) { + e.printStackTrace(); + } catch (ExecutionException e) { + e.printStackTrace(); + } + validate(); + repaint(); + } } }; this.showWorker.execute(); @@ -702,24 +762,74 @@ public class AlphaFineDialog extends UIDialog { } }); - searchTextField.getDocument().addDocumentListener(new DocumentAdapter() { + Timer timer = new Timer(300, new ActionListener() { @Override - protected void textChanged(DocumentEvent e) { - if (isNoNeedSearch(searchTextField.getText())) { + public void actionPerformed(ActionEvent e) { + if (!isAlreadyInitHot && searchTextField.getText().length() == 0) { + isAlreadyInitHot = true; removeSearchResult(); - } else { - try { - Thread.sleep(10); + refreshContainer(); + if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isNeedIntelligentCustomerService()) { + if (hotPane == null) { + initHotPane(); + setSize(AlphaFineConstants.FULL_SIZE); + } + }else{ + setSize(AlphaFineConstants.FIELD_SIZE); + } + refreshContainer(); + return; + } else if (beforeSearchStr.equals(searchTextField.getText()) && beforeSearchStr.length() != 0) { + if (isAlreadySearch) { + return; + } else { + removeHotPane(); + removeSearchResult(); + refreshContainer(); + if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isNeedSegmentationCheckbox()) { + //是高级搜索 + if(searchTextField.getText().toLowerCase().startsWith(ADVANCED_SEARCH_MARK)){ + segmentationResult = SegmentationManager.getInstance().startSegmentation(getStoreText(searchTextField.getText().toLowerCase())); + } + //是普通搜索 + else{ + segmentationResult = SegmentationManager.getInstance().startSegmentation(searchTextField.getText().toLowerCase()); + } + } else { + if(StringUtils.isEmpty(getRealSearchText(searchTextField.getText().toLowerCase()))){ + segmentationResult = null; + }else{ + segmentationResult = new String[]{getRealSearchText(searchTextField.getText().toLowerCase())}; + } + } doSearch(searchTextField.getText().toLowerCase()); - } catch (InterruptedException e1) { - FineLoggerFactory.getLogger().error(e1.getMessage()); + isAlreadySearch = true; } - + } else { + beforeSearchStr = searchTextField.getText(); + isAlreadySearch = false; + } + if (beforeSearchStr.equals(searchTextField.getText()) && beforeSearchStr.length() != 0) { + isAlreadyInitHot = false; } } - }); + }); + timer.start(); + } + /** + * 去除特殊字符,空格等 + */ + private String getRealSearchText(String searchText){ + String regEx = "[`~!@#$%^&*()+=|{}':;',\\[\\].<>/?~!@#¥%……&*()——+|{}【】';:”“’。,、?]"; + Pattern p = Pattern.compile(regEx); + Matcher m = p.matcher(searchText); + searchText = m.replaceAll("").trim().replaceAll(" ", ""); + if (searchText.length() == 0) { + return null; + } + return searchText; } /** @@ -760,7 +870,7 @@ public class AlphaFineDialog extends UIDialog { @Override public void checkValid() throws Exception { - //不处理 +//不处理 } /** @@ -780,6 +890,9 @@ public class AlphaFineDialog extends UIDialog { * @param cellModel */ private void saveLocalHistory(final AlphaCellModel cellModel) { + if(cellModel instanceof BottomModel){ + return; + } Thread sendThread = new Thread(new Runnable() { @Override public void run() { @@ -883,6 +996,13 @@ public class AlphaFineDialog extends UIDialog { case ACTION: moreResult = ActionSearchManager.getInstance().getMoreSearchResult(searchTextField.getText()); break; + case ROBOT: + case RECOMMEND_ROBOT: + moreResult = SimilarSearchManeger.getInstance().getMoreSearchResult(searchTextField.getText()); + break; + case RECOMMEND: + moreResult = RecommendSearchManager.getInstance().getMoreSearchResult(searchTextField.getText()); + break; default: moreResult = new SearchResult(); } @@ -953,7 +1073,7 @@ public class AlphaFineDialog extends UIDialog { /** * +-------------------------------------+ - * | 自定义JList | + * | 自定义JList | * +-------------------------------------+ */ private class AlphaFineList extends JList { @@ -1030,7 +1150,7 @@ public class AlphaFineDialog extends UIDialog { /** * +-------------------------------------+ - * | 自定义ListModel | + * | 自定义ListModel | * +-------------------------------------+ */ private class SearchListModel extends DefaultListModel { @@ -1135,4 +1255,171 @@ public class AlphaFineDialog extends UIDialog { } } + public void showIssuesList() { + if (this.searchWorker != null && !this.searchWorker.isDone()) { + this.searchWorker.cancel(true); + this.searchWorker = null; + } + this.searchWorker = new SwingWorker() { + @Override + protected Object doInBackground() throws Exception { + + resetContainer(); + for (AlphaCellModel object : modeList) { + searchListModel.addElement(object); + } + return null; + } + + @Override + protected void done() { + if (!isCancelled()) { + splitLabel.setIcon(null); + fireStopLoading(); + } + } + }; + this.searchWorker.execute(); + } + + /** + * 移除热门面板 + */ + private void removeHotPane() { + if (hotPane != null) { + remove(hotPane); + hotPane = null; + } + } + /** + * 增加返回面板 + */ + private void initBackPane() { + backPane = new JPanel(new BorderLayout()); + JLabel jLabel = new JLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Back")); + jLabel.setPreferredSize(new Dimension(680, 20)); + jLabel.setFont(AlphaFineConstants.SMALL_FONT); + jLabel.setForeground(AlphaFineConstants.DARK_GRAY); + backPane.add(jLabel, BorderLayout.CENTER); + jLabel.addMouseListener(new MouseListener() { + @Override + public void mouseClicked(MouseEvent e) { + if (searchResultPane != null) { + remove(searchResultPane); + searchResultPane = null; + } + if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isNeedIntelligentCustomerService()) { + if (hotPane == null) { + initHotPane(); + } + setSize(AlphaFineConstants.FULL_SIZE); + }else{ + setSize(AlphaFineConstants.FIELD_SIZE); + } + refreshContainer(); + } + + @Override + public void mousePressed(MouseEvent e) { + + } + + @Override + public void mouseReleased(MouseEvent e) { + + } + + @Override + public void mouseEntered(MouseEvent e) { + + } + + @Override + public void mouseExited(MouseEvent e) { + + } + }); + } + + /** + * +-------------------------------------+ + * | 自定义热门问题面板 | + * +-------------------------------------+ + */ + private class HotIssueJpanel extends JPanel { + + public HotIssueJpanel(String[] str, int pngIndex) { + this.setLayout(new BorderLayout()); + this.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); + this.setSize(AlphaFineConstants.HOT_ISSUES_JAPNEL_SIZE); + + JPanel pane1 = new JPanel(new BorderLayout()); + ContainsCirclePane circle = new ContainsCirclePane(pngIndex); + circle.setBorder(BorderFactory.createEmptyBorder(20,0,10,0)); + pane1.add(circle, BorderLayout.NORTH); + add(pane1, BorderLayout.NORTH); + + JPanel centerPanel = new JPanel(new BorderLayout()); + centerPanel.setBackground(Color.white); + UILabel title = new UILabel(); + title.setText(str[0]); + title.setFont(AlphaFineConstants.MEDIUM_FONT_ANOTHER); + title.setForeground(AlphaFineConstants.DARK_GRAY); + title.setHorizontalAlignment(JTextField.CENTER); + centerPanel.add(title); + add(centerPanel, BorderLayout.CENTER); + + JPanel bottomPanel = new JPanel(new BorderLayout()); + bottomPanel.setBackground(Color.white); + + GridLayout gridLayout = new GridLayout(2, 2); + + + for (int i = 1; i < str.length; i++) { + final UILabel subTitle = new UILabel(str[i]); + subTitle.setForeground(AlphaFineConstants.DARK_GRAY); + subTitle.setFont(AlphaFineConstants.MEDIUM_FONT_ANOTHER); + subTitle.addMouseListener(new MouseListener() { + @Override + public void mouseClicked(MouseEvent e) { + segmentationResult = null; + removeHotPane(); + if (searchResultPane == null) { + initSearchResultComponents(); + } + initBackPane(); + searchResultPane.add(backPane, BorderLayout.NORTH); + refreshContainer(); + modeList = HotIssuesManager.getInstance().getTitleSearchResult(subTitle.getText()); + showIssuesList(); + } + + @Override + public void mousePressed(MouseEvent e) { + + } + + @Override + public void mouseReleased(MouseEvent e) { + + } + + @Override + public void mouseEntered(MouseEvent e) { + + } + + @Override + public void mouseExited(MouseEvent e) { + + } + }); + bottomPanel.add(subTitle); + } + bottomPanel.setLayout(gridLayout); + bottomPanel.setBorder(BorderFactory.createEmptyBorder(0, 20, 22, 0)); + add(bottomPanel, BorderLayout.SOUTH); + } + } + } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineTextField.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineTextField.java index a60a763967..006c0b7b8d 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineTextField.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineTextField.java @@ -3,7 +3,10 @@ package com.fr.design.mainframe.alphafine.component; import com.fr.design.gui.itextfield.UITextField; import com.fr.report.web.button.Image; -import java.awt.*; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.RenderingHints; + /** * Created by XiaXiang on 2017/3/21. @@ -26,13 +29,7 @@ public class AlphaFineTextField extends UITextField { @Override public String getText() { - String text = super.getText(); - - if (text.trim().length() == 0 && placeHolder != null) { - text = placeHolder; - } - - return text; + return super.getText(); } @Override diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/ContainsCirclePane.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/ContainsCirclePane.java new file mode 100644 index 0000000000..e320c723a2 --- /dev/null +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/ContainsCirclePane.java @@ -0,0 +1,36 @@ +package com.fr.design.mainframe.alphafine.preview; + +import com.bulenkov.iconloader.IconLoader; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.mainframe.alphafine.AlphaFineConstants; + +import javax.swing.JPanel; +import java.awt.Color; +import java.awt.Graphics; + +/** + * @Author alex.sung + * created by 2018.08.15 + */ +public class ContainsCirclePane extends JPanel { + + public ContainsCirclePane(int pngIndex) { + UILabel iconLabel = new UILabel(IconLoader.getIcon(AlphaFineConstants.IMAGE_URL + "alphafine_hot" + pngIndex + ".png")); + iconLabel.setPreferredSize(AlphaFineConstants.HOT_ICON_LABEL_SIZE); + iconLabel.setOpaque(true); + iconLabel.setBackground(Color.WHITE); + add(iconLabel); + } + + @Override + public void paintComponent(Graphics g) { + super.paintComponent(g); + int height = AlphaFineConstants.HOT_ICON_LABEL_HEIGHT; + setBackground(Color.white); + int x0 = getSize().width / 2; + int y0 = height / 2 + 23; + int r = height / 2 + 9; + g.setColor(AlphaFineConstants.LIGHT_GRAY); + g.drawOval(x0 - r, y0 - r, r * 2, r * 2); + } +} diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/RobotPreviewPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/RobotPreviewPane.java new file mode 100644 index 0000000000..32c5cd8202 --- /dev/null +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/RobotPreviewPane.java @@ -0,0 +1,41 @@ +package com.fr.design.mainframe.alphafine.preview; + + +import com.fr.design.gui.itextarea.UITextArea; +import com.fr.design.mainframe.alphafine.AlphaFineConstants; + +import javax.swing.BorderFactory; +import javax.swing.JEditorPane; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.text.html.HTMLEditorKit; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Dimension; + + +/** + * Created by alex.sung on 2018/8/3. + */ +public class RobotPreviewPane extends JPanel { + + public RobotPreviewPane(String title, String content) { + this.setLayout(new BorderLayout()); + this.setBackground(Color.WHITE); + this.setPreferredSize(new Dimension(AlphaFineConstants.RIGHT_WIDTH, AlphaFineConstants.CONTENT_HEIGHT)); + UITextArea titleArea = new UITextArea(title); + titleArea.setBorder(null); + titleArea.setEditable(false); + titleArea.setForeground(AlphaFineConstants.BLUE); + titleArea.setFont(AlphaFineConstants.LARGE_FONT); + add(titleArea, BorderLayout.NORTH); + + JEditorPane editorPane = new JEditorPane(); + editorPane.setEditorKit(new HTMLEditorKit()); + editorPane.setText(content); + editorPane.setEditable(false); + JScrollPane jScrollPane = new JScrollPane(editorPane); + jScrollPane.setBorder(BorderFactory.createMatteBorder(5, 10, 0, 10, Color.white)); + add(jScrollPane, BorderLayout.CENTER); + } +} diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/fun/AlphaFineSearchProvider.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/fun/AlphaFineSearchProvider.java index 9d29433a23..b75aa894c4 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/fun/AlphaFineSearchProvider.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/fun/AlphaFineSearchProvider.java @@ -12,7 +12,7 @@ public interface AlphaFineSearchProvider { * @param searchText * @return */ - SearchResult getLessSearchResult(String searchText); + SearchResult getLessSearchResult(String[] searchText); /** * 获取剩余条数 diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/ActionSearchManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/ActionSearchManager.java index b17b14d068..6335be5615 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/ActionSearchManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/ActionSearchManager.java @@ -57,21 +57,23 @@ public class ActionSearchManager implements AlphaFineSearchProvider { } @Override - public synchronized SearchResult getLessSearchResult(String searchText) { + public synchronized SearchResult getLessSearchResult(String[] searchText) { filterModelList = new SearchResult(); lessModelList = new SearchResult(); moreModelList = new SearchResult(); - if (StringUtils.isBlank(searchText)) { + if (searchText.length == 0) { lessModelList.add(new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set"))); return lessModelList; } if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isContainAction()) { List updateActions = UpdateActionManager.getUpdateActionManager().getUpdateActions(); for (UpdateActionModel updateActionModel : updateActions) { - AlphaFineHelper.checkCancel(); - if (StringUtils.isNotBlank(updateActionModel.getSearchKey())) { - if (updateActionModel.getSearchKey().contains(searchText) && updateActionModel.getAction().isEnabled()) { - filterModelList.add(new ActionModel(updateActionModel.getActionName(), updateActionModel.getParentName(), updateActionModel.getAction())); + for (int j = 0; j < searchText.length; j++) { + AlphaFineHelper.checkCancel(); + if (StringUtils.isNotBlank(updateActionModel.getSearchKey())) { + if (updateActionModel.getSearchKey().contains(searchText[j]) && updateActionModel.getAction().isEnabled()) { + filterModelList.add(new ActionModel(updateActionModel.getActionName(), updateActionModel.getParentName(), updateActionModel.getAction())); + } } } } @@ -91,7 +93,6 @@ public class ActionSearchManager implements AlphaFineSearchProvider { lessModelList.addAll(result.subList(0, AlphaFineConstants.SHOW_SIZE)); moreModelList.addAll(result.subList(AlphaFineConstants.SHOW_SIZE, result.size())); } - } return lessModelList; } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/ComplementAdviceManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/ComplementAdviceManager.java new file mode 100644 index 0000000000..c548a1b47c --- /dev/null +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/ComplementAdviceManager.java @@ -0,0 +1,84 @@ +package com.fr.design.mainframe.alphafine.search.manager.impl; + +import com.fr.design.DesignerEnvManager; +import com.fr.design.mainframe.alphafine.AlphaFineConstants; +import com.fr.design.mainframe.alphafine.AlphaFineHelper; +import com.fr.design.mainframe.alphafine.cell.model.RobotModel; +import com.fr.design.mainframe.alphafine.model.SearchResult; +import com.fr.general.http.HttpClient; +import com.fr.json.JSONArray; +import com.fr.json.JSONException; +import com.fr.json.JSONObject; +import com.fr.json.JSONTokener; +import com.fr.log.FineLoggerFactory; +import com.fr.stable.StringUtils; +import org.apache.commons.codec.digest.DigestUtils; + +/** + * @author alex.sung created on 2018/7/23. + */ +public class ComplementAdviceManager { + + public static int count = 0; + + private static ComplementAdviceManager instance; + private SearchResult allModelList; + + public static ComplementAdviceManager getInstance() { + if (instance == null) { + synchronized (ComplementAdviceManager.class) { + if (instance == null) { + instance = new ComplementAdviceManager(); + } + } + } + return instance; + } + + /** + * 从接口中获取补全建议结果 + * @param searchText + * @return + */ + public synchronized SearchResult getAllSearchResult(String[] searchText) { + allModelList = new SearchResult(); + if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isNeedIntelligentCustomerService()) { + SearchResult searchResult = new SearchResult(); + for (int j = 0; j < searchText.length; j++) { + String result; + String token = DigestUtils.md5Hex(AlphaFineConstants.ALPHA_ROBOT_SEARCH_TOKEN + searchText[j]); + String url = AlphaFineConstants.COMPLEMENT_ADVICE_SEARCH_URL_PREFIX + "msg=" + searchText[j] + "&token=" + token; + HttpClient httpClient = new HttpClient(url); + httpClient.asGet(); + result = httpClient.getResponseText(); + AlphaFineHelper.checkCancel(); + try { + Object json = new JSONTokener(result).nextValue(); + if (json instanceof JSONArray) { + JSONArray jsonArray = new JSONArray(result); + for (int i = 0; i < jsonArray.length(); i++) { + AlphaFineHelper.checkCancel(); + JSONObject jsonObject = jsonArray.optJSONObject(i); + + String temp = jsonObject.optString("keywords"); + if (!StringUtils.isEmpty(temp)) { + RobotModel robotModel = new RobotModel(temp, null); + if (!AlphaFineHelper.getFilterResult().contains(robotModel) && !allModelList.contains(robotModel)) { + allModelList.add(robotModel); + } + } + } + } + } catch (JSONException e) { + FineLoggerFactory.getLogger().error("complement advice search error: " + e.getMessage()); + } + } + if (searchResult.isEmpty()) { + return allModelList; + } else { + allModelList.addAll(searchResult); + } + } + return allModelList; + } +} 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 59595229a3..cad89640e4 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 @@ -14,7 +14,6 @@ import com.fr.json.JSONArray; import com.fr.json.JSONException; import com.fr.json.JSONObject; import com.fr.log.FineLoggerFactory; -import com.fr.stable.StringUtils; /** * Created by XiaXiang on 2017/3/27. @@ -50,48 +49,53 @@ public class DocumentSearchManager implements AlphaFineSearchProvider { } @Override - public synchronized SearchResult getLessSearchResult(String searchText) { + public synchronized SearchResult getLessSearchResult(String[] searchText) { lessModelList = new SearchResult(); moreModelList = new SearchResult(); - if (StringUtils.isBlank(searchText)) { + if (searchText.length == 0) { lessModelList.add(new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Community_Help"))); return lessModelList; } if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isContainDocument()) { - String result; - String url = AlphaFineConstants.DOCUMENT_SEARCH_URL + searchText + "-1"; - HttpClient httpClient = new HttpClient(url); - httpClient.asGet(); - if (!httpClient.isServerAlive()) { - return getNoConnectList(); - } - result = httpClient.getResponseText(); - AlphaFineHelper.checkCancel(); - try { - JSONObject jsonObject = new JSONObject(result); - JSONArray jsonArray = jsonObject.optJSONArray("docdata"); - if (jsonArray != null) { - SearchResult searchResult = new SearchResult(); - for (int i = 0; i < jsonArray.length(); i++) { - AlphaFineHelper.checkCancel(); - DocumentModel cellModel = getModelFromCloud(jsonArray.optJSONObject(i)); - if (!AlphaFineHelper.getFilterResult().contains(cellModel)) { - searchResult.add(cellModel); + SearchResult searchResult = new SearchResult(); + for (int j = 0; j < searchText.length; j++) { + String result; + String url = AlphaFineConstants.DOCUMENT_SEARCH_URL + searchText[j] + "-1"; + HttpClient httpClient = new HttpClient(url); + httpClient.asGet(); + if (!httpClient.isServerAlive()) { + return getNoConnectList(); + } + result = httpClient.getResponseText(); + AlphaFineHelper.checkCancel(); + try { + JSONObject jsonObject = new JSONObject(result); + JSONArray jsonArray = jsonObject.optJSONArray("docdata"); + if (jsonArray != null) { + + for (int i = 0; i < jsonArray.length(); i++) { + AlphaFineHelper.checkCancel(); + DocumentModel cellModel = getModelFromCloud(jsonArray.optJSONObject(i)); + if (!AlphaFineHelper.getFilterResult().contains(cellModel)) { + searchResult.add(cellModel); + } } } - if (searchResult.isEmpty()) { - return lessModelList; - } else if (searchResult.size() < AlphaFineConstants.SHOW_SIZE + 1) { - lessModelList.add(0, new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Community_Help"))); - lessModelList.addAll(searchResult); - } else { - lessModelList.add(0, new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Community_Help"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_ShowAll"), true, CellType.DOCUMENT)); - lessModelList.addAll(searchResult.subList(0, AlphaFineConstants.SHOW_SIZE)); - moreModelList.addAll(searchResult.subList(AlphaFineConstants.SHOW_SIZE, searchResult.size())); - } + } catch (JSONException e) { + FineLoggerFactory.getLogger().error("document search error: " + e.getMessage()); } - } catch (JSONException e) { - FineLoggerFactory.getLogger().error("document search error: " + e.getMessage()); + } + lessModelList.clear(); + moreModelList.clear(); + if (searchResult.isEmpty()) { + return lessModelList; + } else if (searchResult.size() < AlphaFineConstants.SHOW_SIZE + 1) { + lessModelList.add(0, new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Community_Help"))); + lessModelList.addAll(searchResult); + } else { + lessModelList.add(0, new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Community_Help"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_ShowAll"), true, CellType.DOCUMENT)); + lessModelList.addAll(searchResult.subList(0, AlphaFineConstants.SHOW_SIZE)); + moreModelList.addAll(searchResult.subList(AlphaFineConstants.SHOW_SIZE, searchResult.size())); } } return lessModelList; diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/FileSearchManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/FileSearchManager.java index d728598919..107cbb8648 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/FileSearchManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/FileSearchManager.java @@ -33,7 +33,7 @@ public class FileSearchManager implements AlphaFineSearchProvider { private FileNode[] fileNodes = null; //停止搜索 - //隐藏的搜索功能,可根据特殊的字符标记判断搜索分类 +//隐藏的搜索功能,可根据特殊的字符标记判断搜索分类 private boolean isContainCpt = true; private boolean isContainFrm = true; @@ -62,20 +62,23 @@ public class FileSearchManager implements AlphaFineSearchProvider { return new FileModel(name, filePath, searchCount); } - public synchronized SearchResult getLessSearchResult(String searchText) { + public synchronized SearchResult getLessSearchResult(String[] searchText) { this.filterModelList = new SearchResult(); this.lessModelList = new SearchResult(); this.moreModelList = new SearchResult(); - this.searchText = dealWithSearchText(searchText); - if (StringUtils.isBlank(this.searchText) || ComparatorUtils.equals(this.searchText, DS_NAME)) { - lessModelList.add(new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Templates"))); - return lessModelList; + for (int j = 0; j < searchText.length; j++) { + this.searchText = dealWithSearchText(searchText[j]); + if (StringUtils.isBlank(this.searchText) || ComparatorUtils.equals(this.searchText, DS_NAME)) { + lessModelList.add(new MoreModel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Templates"))); + return lessModelList; + } + AlphaFineHelper.checkCancel(); + fileNodes = FRContext.getFileNodes().list(ProjectConstants.REPORTLETS_NAME, new FileExtension[]{FileExtension.CPT, FileExtension.FRM}, true); + isContainCpt = true; + isContainFrm = true; + doSearch(this.searchText); } - AlphaFineHelper.checkCancel(); - fileNodes = FRContext.getFileNodes().list(ProjectConstants.REPORTLETS_NAME, new FileExtension[]{FileExtension.CPT, FileExtension.FRM}, true); - isContainCpt = true; - isContainFrm = true; - doSearch(this.searchText); + if (filterModelList.isEmpty()) { return new SearchResult(); } else if (filterModelList.size() < AlphaFineConstants.SHOW_SIZE + 1) { diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/HotIssuesManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/HotIssuesManager.java new file mode 100644 index 0000000000..1ec5625462 --- /dev/null +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/HotIssuesManager.java @@ -0,0 +1,153 @@ +package com.fr.design.mainframe.alphafine.search.manager.impl; + +import com.fr.design.mainframe.alphafine.AlphaFineConstants; +import com.fr.design.mainframe.alphafine.AlphaFineHelper; +import com.fr.design.mainframe.alphafine.cell.model.MoreModel; +import com.fr.design.mainframe.alphafine.cell.model.RobotModel; +import com.fr.design.mainframe.alphafine.model.SearchResult; +import com.fr.general.Inter; +import com.fr.general.http.HttpClient; +import com.fr.json.JSONArray; +import com.fr.json.JSONException; +import com.fr.json.JSONObject; +import com.fr.log.FineLoggerFactory; +import com.fr.stable.StringUtils; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +/** + * Created by alex.sung on 2018/8/3. + */ +public class HotIssuesManager { + private static HotIssuesManager instance; + private static final int HOT_ITEM_NUM = 6; + private static final int HOT_SUB_ITEM_NUM = 4; + + public static HotIssuesManager getInstance() { + if (instance == null) { + synchronized (HotIssuesManager.class) { + if (instance == null) { + instance = new HotIssuesManager(); + } + } + } + return instance; + } + + String[][] data = new String[HOT_ITEM_NUM][]; + Map map = new HashMap<>(); + + /** + * 将子标题下的数据塞入modeList + * @param getStr + * @return + */ + public SearchResult getTitleSearchResult(String getStr) { + SearchResult modeList = new SearchResult(); + modeList.add(0, new MoreModel(com.fr.design.i18n.Toolkit.i18nText((getStr)))); + + List issueList = map.get(getStr); + for (int i = 0; i < issueList.size(); i++) { + RobotModel robotModel = new RobotModel(issueList.get(i), null); + robotModel.setHotItemModel(true); + modeList.add(robotModel); + } + return modeList; + } + + /** + * 从热门问题接口获取热门问题 + * @return + */ + public String[][] getHotIssues() { + String result; + HttpClient httpClient = new HttpClient(AlphaFineConstants.ALPHA_HOT_SEARCH); + httpClient.asGet(); + if (!httpClient.isServerAlive()) { + return null; + } + result = httpClient.getResponseText(); + AlphaFineHelper.checkCancel(); + try { + JSONArray jsonArray = new JSONArray(result); + for (int i = 0; i < HOT_ITEM_NUM; i++) { + AlphaFineHelper.checkCancel(); + JSONObject jsonObject = jsonArray.optJSONObject(i); + data[i] = getTitleStrings(jsonObject); + } + + } catch (JSONException e) { + FineLoggerFactory.getLogger().error("hotissues search error: " + e.getMessage()); + } + return data; + } + + /** + * 根据子标题获取该标题下数据 + * @param jsonObject + * @return + */ + private String[] getTitleStrings(JSONObject jsonObject) { + String[] temp = getSubTitleFromCloud(jsonObject.optJSONObject("data")); + String[] temp1 = new String[1]; + temp1[0] = jsonObject.optString("type"); + int strLen1 = temp.length; + int strLen2 = temp1.length; + + temp1 = Arrays.copyOf(temp1, strLen2 + strLen1); + System.arraycopy(temp, 0, temp1, strLen2, strLen1); + + getIssueStrings(jsonObject.optJSONObject("data")); + + return temp1; + } + + /** + * 获取子标题和子标题下的问题列表 + * @param data + * @return + */ + private String[] getIssueStrings(JSONObject data) { + try { + for (int j = 0; j < HOT_SUB_ITEM_NUM; j++) { + String temp = data.getString("item" + (j + 1)); + JSONArray jsonArray = data.getJSONArray("itemData" + (j + 1)); + List tempList = new ArrayList<>(); + for (int i = 0; i < jsonArray.length(); i++) { + tempList.add(jsonArray.optJSONObject(i).optString("text")); + } + map.put(temp, tempList); + } + + } catch (JSONException e) { + } + return null; + } + + /** + * 获取问题列表 + * @param data + * @return + */ + private String[] getSubTitleFromCloud(JSONObject data) { + ArrayList list = new ArrayList<>(); + for (int i = 0; i < HOT_SUB_ITEM_NUM; i++) { + String temp = null; + try { + temp = data.getString("item" + (i + 1)); + } catch (JSONException e) { + } + if (!StringUtils.isEmpty(temp)) { + list.add(temp); + } + } + String[] strings = new String[list.size()]; + list.toArray(strings); + return strings; + } +} diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/PluginSearchManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/PluginSearchManager.java index 975e943119..c59b93c02f 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/PluginSearchManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/PluginSearchManager.java @@ -17,7 +17,6 @@ import com.fr.json.JSONObject; import com.fr.log.FineLoggerFactory; import com.fr.plugin.basic.version.Version; import com.fr.plugin.basic.version.VersionIntervalFactory; -import com.fr.stable.StringUtils; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; @@ -95,51 +94,53 @@ public class PluginSearchManager implements AlphaFineSearchProvider { } @Override - public synchronized SearchResult getLessSearchResult(String searchText) { + public synchronized SearchResult getLessSearchResult(String[] searchText) { this.lessModelList = new SearchResult(); this.moreModelList = new SearchResult(); - if (StringUtils.isBlank(searchText)) { + if (searchText.length == 0) { lessModelList.add(new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Plugin_Addon"))); return lessModelList; } + SearchResult searchResult = new SearchResult(); if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isContainPlugin()) { - String result; - try { - String encodedKey = URLEncoder.encode(searchText, "UTF-8"); - String url = AlphaFineConstants.PLUGIN_SEARCH_URL + "?keyword=" + encodedKey; - HttpClient httpClient = new HttpClient(url); - httpClient.asGet(); - if (!httpClient.isServerAlive()) { - return getNoConnectList(); - } - result = httpClient.getResponseText(); - AlphaFineHelper.checkCancel(); - JSONObject jsonObject = new JSONObject(result); - JSONArray jsonArray = jsonObject.optJSONArray("result"); - if (jsonArray != null) { - SearchResult searchResult = new SearchResult(); - for (int i = 0; i < jsonArray.length(); i++) { - AlphaFineHelper.checkCancel(); - PluginModel cellModel = getPluginModel(jsonArray.optJSONObject(i), false); - if (cellModel != null && !AlphaFineHelper.getFilterResult().contains(cellModel)) { - searchResult.add(cellModel); - } + for (int j = 0; j < searchText.length; j++) { + String result; + try { + String encodedKey = URLEncoder.encode(searchText[j], "UTF-8"); + String url = AlphaFineConstants.PLUGIN_SEARCH_URL + "?keyword=" + encodedKey; + HttpClient httpClient = new HttpClient(url); + httpClient.asGet(); + if (!httpClient.isServerAlive()) { + return getNoConnectList(); } - if (searchResult.isEmpty()) { - return this.lessModelList; - } else if (searchResult.size() < AlphaFineConstants.SHOW_SIZE + 1) { - lessModelList.add(0, new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Plugin_Addon"))); - lessModelList.addAll(searchResult); - } else { - lessModelList.add(0, new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Plugin_Addon"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_ShowAll"), true, CellType.PLUGIN)); - lessModelList.addAll(searchResult.subList(0, AlphaFineConstants.SHOW_SIZE)); - moreModelList.addAll(searchResult.subList(AlphaFineConstants.SHOW_SIZE, searchResult.size())); + result = httpClient.getResponseText(); + AlphaFineHelper.checkCancel(); + JSONObject jsonObject = new JSONObject(result); + JSONArray jsonArray = jsonObject.optJSONArray("result"); + if (jsonArray != null) { + for (int i = 0; i < jsonArray.length(); i++) { + AlphaFineHelper.checkCancel(); + PluginModel cellModel = getPluginModel(jsonArray.optJSONObject(i), false); + if (cellModel != null && !AlphaFineHelper.getFilterResult().contains(cellModel)) { + searchResult.add(cellModel); + } + } } + } catch (JSONException e) { + FineLoggerFactory.getLogger().error("plugin search json error :" + e.getMessage()); + } catch (UnsupportedEncodingException e) { + FineLoggerFactory.getLogger().error("plugin search encode error :" + e.getMessage()); } - } catch (JSONException e) { - FineLoggerFactory.getLogger().error("plugin search json error :" + e.getMessage()); - } catch (UnsupportedEncodingException e) { - FineLoggerFactory.getLogger().error("plugin search encode error :" + e.getMessage()); + } + if (searchResult.isEmpty()) { + return this.lessModelList; + } else if (searchResult.size() < AlphaFineConstants.SHOW_SIZE + 1) { + lessModelList.add(0, new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Plugin_Addon"))); + lessModelList.addAll(searchResult); + } else { + lessModelList.add(0, new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Plugin_Addon"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_ShowAll"), true, CellType.PLUGIN)); + lessModelList.addAll(searchResult.subList(0, AlphaFineConstants.SHOW_SIZE)); + moreModelList.addAll(searchResult.subList(AlphaFineConstants.SHOW_SIZE, searchResult.size())); } } return this.lessModelList; diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecentSearchManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecentSearchManager.java index 481442faca..b9c8e69623 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecentSearchManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecentSearchManager.java @@ -72,9 +72,11 @@ public class RecentSearchManager implements AlphaFineSearchProvider { } @Override - public SearchResult getLessSearchResult(String searchText) { + public SearchResult getLessSearchResult(String[] searchText) { this.modelList = new SearchResult(); - recentModelList = getRecentModelList(searchText); + for (int j = 0; j < searchText.length; j++) { + recentModelList = getRecentModelList(searchText[j]); + } if (recentModelList != null && recentModelList.size() > 0) { modelList.add(new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Latest"))); if (recentModelList.size() > AlphaFineConstants.LATEST_SHOW_SIZE) { @@ -136,6 +138,9 @@ public class RecentSearchManager implements AlphaFineSearchProvider { initWriter(); Document doc = new Document(); doc.add(new StringField("searchKey", searchKey, Field.Store.YES)); + if(cellModel == null){ + System.out.println("null"); + } doc.add(new StringField("cellModel", cellModel.ModelToJson().toString(), Field.Store.YES)); doc.add(new LongField("time", System.currentTimeMillis(), Field.Store.YES)); writeDoc(doc); @@ -171,7 +176,7 @@ public class RecentSearchManager implements AlphaFineSearchProvider { initReader(); IndexSearcher searcher = new IndexSearcher(indexReader); - //构建排序字段 + //构建排序字段 SortField[] sortField = new SortField[1]; sortField[0] = new SortField("time", SortField.Type.LONG, true); Sort sortKey = new Sort(sortField); @@ -181,7 +186,7 @@ public class RecentSearchManager implements AlphaFineSearchProvider { TopFieldDocs docs = searcher.search(query, MAX_SIZE, sortKey); ScoreDoc[] scores = docs.scoreDocs; this.recentModelList = new SearchResult(); - //遍历结果 + //遍历结果 for (ScoreDoc scoreDoc : scores) { Document document = searcher.doc(scoreDoc.doc); AlphaCellModel model = CellModelHelper.getModelFromJson(new JSONObject(document.get("cellModel"))); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecommendSearchManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecommendSearchManager.java index 8a2873e4b4..d75f1552d2 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecommendSearchManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecommendSearchManager.java @@ -15,6 +15,7 @@ import com.fr.general.http.HttpClient; import com.fr.json.JSONArray; import com.fr.json.JSONException; import com.fr.json.JSONObject; +import com.fr.json.JSONTokener; import com.fr.log.FineLoggerFactory; import com.fr.stable.CodeUtils; import com.fr.stable.StringUtils; @@ -30,6 +31,9 @@ public class RecommendSearchManager implements AlphaFineSearchProvider { private SearchResult modelList; private SearchResult recommendModelList; + private SearchResult complementAdviceModelList; + private SearchResult moreModelList = new SearchResult(); + public static RecommendSearchManager getInstance() { if (instance == null) { synchronized (RecentSearchManager.class) { @@ -42,37 +46,45 @@ public class RecommendSearchManager implements AlphaFineSearchProvider { } @Override - public synchronized SearchResult getLessSearchResult(String searchText) { - searchText = searchText.replaceAll(StringUtils.BLANK, StringUtils.EMPTY); + public synchronized SearchResult getLessSearchResult(String[] searchText) { + this.modelList = new SearchResult(); this.recommendModelList = new SearchResult(); if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isContainRecommend()) { - String result; - HttpClient httpClient = new HttpClient(AlphaFineConstants.SEARCH_API + CodeUtils.cjkEncode(searchText)); - httpClient.asGet(); - if (!httpClient.isServerAlive()) { - return getNoConnectList(); - } - httpClient.setTimeout(3000); - result = httpClient.getResponseText(); - AlphaFineHelper.checkCancel(); - try { - JSONObject jsonObject = new JSONObject(result); - if (jsonObject.optString("status").equals("success")) { - JSONArray jsonArray = jsonObject.optJSONArray("result"); - if (jsonArray != null && jsonArray.length() > 0) { - for (int i = 0; i < jsonArray.length(); i++) { - AlphaFineHelper.checkCancel(); - AlphaCellModel alphaCellModel = CellModelHelper.getModelFromJson((JSONObject) jsonArray.get(i)); - if (alphaCellModel != null && !alreadyContain(alphaCellModel)) { - this.recommendModelList.add(alphaCellModel); + for (int j = 0; j < searchText.length; j++) { + String result; + searchText[j] = searchText[j].replaceAll(StringUtils.BLANK, StringUtils.EMPTY); + HttpClient httpClient = new HttpClient(AlphaFineConstants.SEARCH_API + CodeUtils.cjkEncode(searchText[j])); + httpClient.asGet(); + if (!httpClient.isServerAlive()) { + return getNoConnectList(); + } + httpClient.setTimeout(3000); + result = httpClient.getResponseText(); + AlphaFineHelper.checkCancel(); + try { + Object json = new JSONTokener(result).nextValue(); + if (json instanceof JSONObject) { + JSONObject jsonObject = new JSONObject(result); + if (jsonObject.optString("status").equals("success")) { + JSONArray jsonArray = jsonObject.optJSONArray("result"); + if (jsonArray != null && jsonArray.length() > 0) { + for (int i = 0; i < jsonArray.length(); i++) { + AlphaFineHelper.checkCancel(); + AlphaCellModel alphaCellModel = CellModelHelper.getModelFromJson((JSONObject) jsonArray.get(i)); + if (alphaCellModel != null && !alreadyContain(alphaCellModel)) { + + this.recommendModelList.add(alphaCellModel); + } + } } } } + } catch (JSONException e) { + FineLoggerFactory.getLogger().error("recommend search error! :" + e.getMessage()); } - } catch (JSONException e) { - FineLoggerFactory.getLogger().error("recommend search error! :" + e.getMessage()); } + Iterator modelIterator = recommendModelList.iterator(); while (modelIterator.hasNext()) { AlphaCellModel model = modelIterator.next(); @@ -80,9 +92,63 @@ public class RecommendSearchManager implements AlphaFineSearchProvider { modelIterator.remove(); } } + complementAdviceModelList = ComplementAdviceManager.getInstance().getAllSearchResult(searchText); + moreModelList.clear(); if (recommendModelList.size() > 0) { - modelList.add(new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Recommend"), false)); - modelList.addAll(recommendModelList); + if (complementAdviceModelList.size() == 0) { + if (recommendModelList.size() > AlphaFineConstants.SHOW_SIZE - 2) { + if (recommendModelList.size() > AlphaFineConstants.SHOW_SIZE) { + modelList.add(0, new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Recommend"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_ShowAll"), true, CellType.RECOMMEND)); + } else { + modelList.add(0, new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Recommend"), false)); + } + modelList.addAll(recommendModelList.subList(0, AlphaFineConstants.SHOW_SIZE - 2)); + moreModelList.addAll(recommendModelList.subList(AlphaFineConstants.SHOW_SIZE - 2, recommendModelList.size())); + } else { + modelList.add(0, new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Recommend"), false)); + modelList.addAll(recommendModelList); + } + } else { + if (recommendModelList.size() + complementAdviceModelList.size() > AlphaFineConstants.SHOW_SIZE) { + modelList.add(0, new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Recommend"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_ShowAll"), true, CellType.RECOMMEND)); + if (recommendModelList.size() > AlphaFineConstants.SHOW_SIZE - 2) { + modelList.addAll(recommendModelList.subList(0, AlphaFineConstants.SHOW_SIZE - 2)); + moreModelList.addAll(recommendModelList.subList(AlphaFineConstants.SHOW_SIZE - 2, recommendModelList.size())); + + if (complementAdviceModelList.size() >= 2) { + modelList.addAll(complementAdviceModelList.subList(0, 2)); + moreModelList.addAll(complementAdviceModelList.subList(2, complementAdviceModelList.size())); + } else { + modelList.addAll(complementAdviceModelList); + } + } else { + modelList.addAll(recommendModelList); + if (complementAdviceModelList.size() >= (AlphaFineConstants.SHOW_SIZE - recommendModelList.size())) { + modelList.addAll(complementAdviceModelList.subList(0, AlphaFineConstants.SHOW_SIZE - recommendModelList.size())); + moreModelList.addAll(complementAdviceModelList.subList(2, complementAdviceModelList.size())); + } else { + modelList.addAll(complementAdviceModelList); + } + } + } else { + modelList.add(0, new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Recommend"), false)); + modelList.addAll(recommendModelList); + modelList.addAll(complementAdviceModelList); + } + } + }else{ + if(complementAdviceModelList.size() > 0) { + if (complementAdviceModelList.size() > AlphaFineConstants.SHOW_SIZE) { + modelList.add(0, new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Recommend"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_ShowAll"), true, CellType.RECOMMEND)); + modelList.addAll(complementAdviceModelList.subList(0, AlphaFineConstants.SHOW_SIZE)); + moreModelList.addAll(complementAdviceModelList.subList(AlphaFineConstants.SHOW_SIZE, complementAdviceModelList.size())); + }else{ + modelList.add(0, new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Recommend"), false)); + modelList.addAll(complementAdviceModelList); + } + }else{ + return modelList; + } } } return modelList; @@ -105,9 +171,10 @@ public class RecommendSearchManager implements AlphaFineSearchProvider { return result; } + @Override public SearchResult getMoreSearchResult(String searchText) { - return new SearchResult(); + return moreModelList; } public List getRecommendModelList() { diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java new file mode 100644 index 0000000000..ff1d68b954 --- /dev/null +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java @@ -0,0 +1,81 @@ +package com.fr.design.mainframe.alphafine.search.manager.impl; + +import com.fr.stable.StringUtils; + +import com.fr.third.ibm.icu.text.BreakIterator; +import java.util.ArrayList; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Created by alex.sung on 2018/8/3. + */ +public class SegmentationManager { + private static SegmentationManager segmentationManager = null; + private static final int MAX_CHINESE_CHARACTERS_NUM = 4; + + public static SegmentationManager getInstance() { + if (segmentationManager == null) { + segmentationManager = new SegmentationManager(); + return segmentationManager; + } else { + return segmentationManager; + } + } + + /** + * 判断是否需要分词 + * + * @param searchText + * @return + */ + public boolean isNeedSegmentation(String searchText) { + int count = 0; + String reg = "[\\u4e00-\\u9fa5]"; + Pattern p = Pattern.compile(reg); + Matcher m = p.matcher(searchText); + while (m.find()) { + for (int i = 0; i <= m.groupCount(); i++) { + count = count + 1; + } + } + if (count >= MAX_CHINESE_CHARACTERS_NUM) { + return true; + } + return false; + } + + /** + * 对字符串进行分词 + * @param searchText + * @return + */ + public String[] startSegmentation(String searchText) { + String regEx = "[`~!@#$%^&*()+=|{}':;',\\[\\].<>/?~!@#¥%……&*()——+|{}【】';:”“’。,、?]"; + Pattern p = Pattern.compile(regEx); + Matcher m = p.matcher(searchText); + searchText = m.replaceAll("").trim().replaceAll(" ", ""); + if (searchText.length() == 0) { + return null; + } + if(!isNeedSegmentation(searchText)){ + return new String[]{searchText}; + } + List result = new ArrayList<>(); + BreakIterator itor = BreakIterator.getWordInstance(); + itor.setText(searchText); + int start = itor.first(); + for (int end = itor.next(); + end != BreakIterator.DONE; + start = end, end = itor.next()) { + String temp = searchText.substring(start, end); + if (!StringUtils.isEmpty(temp)) { + result.add(temp); + } + } + String[] strings = new String[result.size()]; + result.toArray(strings); + return strings; + } +} diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SimilarSearchManeger.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SimilarSearchManeger.java new file mode 100644 index 0000000000..2a09182a0a --- /dev/null +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SimilarSearchManeger.java @@ -0,0 +1,101 @@ +package com.fr.design.mainframe.alphafine.search.manager.impl; + +import com.fr.design.DesignerEnvManager; +import com.fr.design.mainframe.alphafine.AlphaFineConstants; +import com.fr.design.mainframe.alphafine.AlphaFineHelper; +import com.fr.design.mainframe.alphafine.CellType; +import com.fr.design.mainframe.alphafine.cell.model.MoreModel; +import com.fr.design.mainframe.alphafine.cell.model.RobotModel; +import com.fr.design.mainframe.alphafine.model.SearchResult; +import com.fr.design.mainframe.alphafine.search.manager.fun.AlphaFineSearchProvider; +import com.fr.general.http.HttpClient; +import com.fr.json.JSONArray; +import com.fr.json.JSONException; +import com.fr.json.JSONObject; +import com.fr.json.JSONTokener; +import com.fr.log.FineLoggerFactory; +import org.apache.commons.codec.digest.DigestUtils; + +/** + * Created by alex.sung on 2018/8/3. + */ +public class SimilarSearchManeger implements AlphaFineSearchProvider { + private static SimilarSearchManeger instance; + private SearchResult lessModelList; + private SearchResult moreModelList = new SearchResult(); + + public static SimilarSearchManeger getInstance() { + if (instance == null) { + synchronized (SimilarSearchManeger.class) { + if (instance == null) { + instance = new SimilarSearchManeger(); + } + } + } + return instance; + } + + @Override + public synchronized SearchResult getLessSearchResult(String[] searchText) { + lessModelList = new SearchResult(); + if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isNeedIntelligentCustomerService()) { + SearchResult allModelList = new SearchResult(); + for (int j = 0; j < searchText.length; j++) { + String result; + String token = DigestUtils.md5Hex(AlphaFineConstants.ALPHA_ROBOT_SEARCH_TOKEN + searchText[j]); + String url = AlphaFineConstants.SIMILAR_SEARCH_URL_PREFIX + "msg=" + searchText[j] + "&token=" + token; + HttpClient httpClient = new HttpClient(url); + httpClient.asGet(); + result = httpClient.getResponseText(); + AlphaFineHelper.checkCancel(); + try { + Object json = new JSONTokener(result).nextValue(); + if (json instanceof JSONArray) { + JSONArray jsonArray = new JSONArray(result); + if (jsonArray.length() != 0) { + for (int i = 0; i < jsonArray.length(); i++) { + JSONObject jsonObject = jsonArray.optJSONObject(i); + String title = jsonObject.optString("title"); + RobotModel robotModel = new RobotModel(title, null); + if (!AlphaFineHelper.getFilterResult().contains(robotModel) && !allModelList.contains(robotModel)) { + allModelList.add(robotModel); + } + } + } + } + } catch (JSONException e) { + FineLoggerFactory.getLogger().error("similar search error: " + e.getMessage()); + } + } + moreModelList.clear(); + if (allModelList.isEmpty()) { + return lessModelList; + } else if (allModelList.size() < AlphaFineConstants.SHOW_SIZE + 1) { + lessModelList.add(0, new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Relation_Item"))); + lessModelList.addAll(allModelList); + } else { + lessModelList.add(0, new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Relation_Item"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_ShowAll"), true, CellType.ROBOT)); + lessModelList.addAll(allModelList.subList(0, AlphaFineConstants.SHOW_SIZE)); + moreModelList.addAll(allModelList.subList(AlphaFineConstants.SHOW_SIZE, allModelList.size())); + } + } + return lessModelList; + } + + @Override + public SearchResult getMoreSearchResult(String searchText) { + return moreModelList; + } + + /** + * 根据json信息获取RobotModel + * + * @param object + * @return + */ + public static RobotModel getModelFromCloud(JSONObject object) { + String name = object.optString("title"); + String content = object.optString("content"); + return new RobotModel(name, content); + } +} diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine10.png b/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine10.png new file mode 100644 index 0000000000000000000000000000000000000000..2657e4d06d342c464cf364419df5befe77d05125 GIT binary patch literal 248 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GGLLkg|>2BR0px`P` z7sn8b(^n@4avfF>aEb5wzfCOf7Gp-ouw6fB0M3km|0-2 z@75O=Z=Y-3^HkjL*h{u$OUhOqT+eoTP5y&8oBBoD|K>F_AN-ZY#;*OFneDED+Sa@U u0yRdfZKc=lS$mg3*kJm%HNTE|*D!Lomz=VG@M@e^USJ z`};TEYqs_*+;Xx(>cq!xu?h}%1r|$YcinU*lhj#1Qo?UVD2U7OScZRAJiIs1G&QP+ z-{rt8W}E*a5)<#wGJ0!!)tcEV{LOR5_$S%rrzOkZdG5R6+g|SIqoAg+eb={NTx-rY zu6Od9y*+!&y0ia2Yi~$AB%pZt53d%*TV30H`b$>Wer!=F~a yC)r28YAUytWAFSq4v6KbLh*2~7ap=XeJI literal 0 HcmV?d00001 diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine8.png b/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine8.png new file mode 100644 index 0000000000000000000000000000000000000000..aae79cb065f47bb3a700dd4941308fc908ed2ba2 GIT binary patch literal 372 zcmV-)0gL{LP))>M&LGbJUgSRWwbNuBxpLIE24{PrSgpwnxcPqe<2`& zCR^|_U4tNLDFi=y*EUo_8o=m`8j}f@2(%3)&@MHiZRmk!PE=f&`Mt2LfDcIo@CG~p zCv8Im9P*Xm-Wl~MEmU&u?)fhHQ|Stjv5uk#o2J$Fke Su_s^v0000aY`K?H<*-4oO|s62CsZ(#WZ zb%Ah>dxE$ph_iEW&~DN$Br^Z{JR_wm=C?}M7$+#L#F$$0V%Or24O z(BZ|%!2zy;owoiebU3-WI~)O=QIofdsI8v@k10%CFuwe3V`6jw&ZxW%#5ovf1#ua; zzYXxMi&k;k3xu{F@m+zKo`r!nCN3jN`M_B3Ym6S-N^~p+egl6}6i>~8*4%JLy#Vhz zdd2ZsW!uH!E9w?kq>)Iqt z{jptzCSnDk@9+69AeUZ#CC|56pjkZw8(`~i_@% literal 0 HcmV?d00001 diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot1.png b/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot1.png new file mode 100644 index 0000000000000000000000000000000000000000..a46dba342094e7578ce898c3ce4685d13b3b9485 GIT binary patch literal 789 zcmV+w1M2*VP)Px%&q+iP*`1umLn;_OQjm!LAr2|^D0iul%?}UzP@ar8oBM=l|i?_ha zi_m))KA)5IvHYTEu=WC~SO?2bL)T3Kb5#N+jLArcFw_j+??c^j8ONaQq?W&rtv zZlIpq@b!x8-d_UYolsmQRq_-D-^g}JH*P%&t3;>&3G_WQQ2thBMkDiVQWcsitJ*G% zj7kH)WQ^+1z``{!D#^OyER@x|?}k1==Pjt&XLK#i3`3y?*^UP=F8QLO>?oL)ZL%f_ z9oi%bUIz+BrRR?Hoc$13l6*}5Sg10?P_Pz;+l=$^-|+UJ3#MW{lnNNlp_IhCr4EX&(OCrA#_9nI}r4d*P3(7$4EQ(=B zE2esnBYLd%t2xwrPY%Umxr`k42G>Rz-r-%-YOC2R z;BR=>Ej$^9w7Nc>g8K84tTEFVwJYmLiQW#iG4?(3_8@(4A%_egb*N{RHoa)0TjpI& z=|@MEu$4MG)W)*-oEICNG@rR1u6FL!Nf?;{O-7i_^}`|{@0LvllA1el$tfAxh=m+7 zojRL<|3GJEhH?R6wGZVIcn)=S%i8DAf3B|E{mAF*JOP#bl+N`Z6!Z%WOl9B?iksuC THVtpx00000NkvXXu0mjfpAUTu literal 0 HcmV?d00001 diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot1@2x.png b/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot1@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..7263c727370e274bac38adefa23fbfc40025b19d GIT binary patch literal 1743 zcmV;=1~B=FP)Px*iAh93RCodHTWe?>RTTbqlWd-C&8v-RQq$U|v7tsSh(wgAKcosGf{2R#5JdzZ zAf<{3_D2yPi1=0tRYXw{eEiVXA8OS4pnoKmq_(kbXp@-dCN}TQWBtzF47=Ugd2Ef$ z4Y>z)=kCmzJLi0J&bjBD*#Qh01PlTO0fT@+z#w1{SeXcfMD2K6OATVN7l2R;;_(Xu zgQEIAb?M&yfr)@n=x-v@ib!O4sHwF(lmKTY)<%iSf|F|T$~pj)1R;w2NK;r@jt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ijOC2UvzVv{+ND@qGrU^yARa=d}?Es0eJ^QKeJi(#stbf2me6}s>UjjBh z#S-OO4_;ob_7TM+mHz+>Va+KsK+~sG$soe7V?kMdql+4}99i0@dsxAHxTCaCq>>ks zo8XphE3Ux5oqa-D6H=K=PpFQ~GU+)x^@Jn_c~RBfsuv`D;=+Spc%7k+YnKOEV$Y8Q z$9J=(u}^gsr7zw6&SLdVtMN@V$9XH3yLPwe5?#~fPbL8*$*oB@tKs#Y2) zPHP_m8sBG-ZBFINJeGi6c?+=plO#Cf9h~nmx)$rOWkR9&;b!k!>Gaq~9u7+GaN@pG^O94cNu}0c0uZ=fR=HYi+Z6aF_`oYo36%&OthpKqKEV!2ZDCy~F#_vjk#U z-B#42X8}#}BgwYq1Li+q?^^oHxvc2TpBDt7bRu9@df=yUneU`U-`Io_ujJpvcc`aP9ASMZH(oi!$4FU!M lgMdN6AYc$M2&@zY{snY6{S_0-^5y^l002ovPDHLkV1k9DMnC`n literal 0 HcmV?d00001 diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot2.png b/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot2.png new file mode 100644 index 0000000000000000000000000000000000000000..fb5e7c60f150c2143f110d29c1ac1834ba98c4bd GIT binary patch literal 1051 zcmV+$1mydPP)Px&)k#D_R9FecSXpZnK@hI$*)wcR@CfEW;`s^6J9MWz&SqzaFg6Tb(^d7=m+I=S z*&sw5Yj4tlluM^GW$H?JkdZKD2i#&3husvOecz8aqCjK4PU~+`YjTPnHBQq?APV+J zq{%FfxXsx6b}xRdCq^(}6@)c6sjGRMKS`GQKv|j?wB+)H3;jUWX*n+#Ht+W&M*4Iz|HrDbBMX2jC98-1iCk5Bu z^xgFOE2eO|?ZRf1TQw{pO#m-oU2kLdfDq|J}?wUmnCy3eL(xst8+SBO@8e*5iUz z>=q$mvO+P9YZe5om=+<%c}HACbR6RP1j{vx5D~O$!5*(LSxq zx(XJDWhSOYNMvYTp{6XXtrtw%KO80aGVVW8jxszCRx3Zf zW!!~TYO$VKZqd0RzrKRDE6jC4yb`LJzB;cwN05j#U+uM0s!$JSex zfd9}~)nARX4OVAJe5STS{WYl|1Ls=Tg>qtiw!!KQAyjXy$}!3;uM2f$RPz^STc5Jo z49UhiPlg6x+4W(9N7X3|#%CL>Cgh;q;xzOzZFUu$ILkvIcKL-tiLj^ VIA81Y`Pcve002ovPDHLkV1n^|-dg|w literal 0 HcmV?d00001 diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot2@2x.png b/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot2@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..7c8d133c34d7ac3d0bc4d856d36cea2726e103b3 GIT binary patch literal 2035 zcmVPx+tw}^dRCod9TU~5aMHD_WcX!+E59KE+DneRJ3sMLH;*0uXcu*cl1ceH%L=@7P zsHiU{CcgQkiN>Hv5u?OH0WmQ#MiPx7F%b+zz))=Yi-{&^(6udXcei`zcy8;4+qpB- zdw1{tdXvr0IWuSOIp5CD`R?3hP@?MzMC<%f*cqL`F3ZLRmVl;+fVksMhQqkcVc53V zZ<#3Tt#5(7XV$QZQn<>BebcsM_&{t7_tmAaEn*}0bN>uyVl2)E$Lm=42Y>0B9 zA8F2L8ft|77dosRL4yv`zMudtJ!tpL9YJLP$QX{s*`*|BpTZ(|XW&6L;&yz+ajZ`b z!LC>mI~!@eVj8d#v)IS|Pg+mAZNn@V44@^4amU;tu~#*6Mr+yc_vE@T3qkhAl| zQ`ju~HCh9^f7ryvWqq#l<#jAITFc*-?djeNTaI9ptj|Xd6`)iCc3FxAG~UKv&BsZV zZTl8@jkucau5f~kvo$&3AsL~94bITZ(a%Q z3lET}1Q_%_dZvV`>9Pa(Qf)@O9?L)zm$GD4`*PMf&z{m2439J$4oW0xsl=Y&?cOyWnPh&LtlStCSSNN%D^0Gj6G@9rvg*TXJkTLM& z0Bo&Ra2(8un((1CY%}3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fDRAN9K2BITOsI=t7DX}g2yz_) ztHWC|bKTg3{G~k2%G+&|bp9%b0Z)wI-Sg6_dHFfCaw`GBD^_y^8@1_bcyG-RE0PQP zV;{F@26W3_+6T|Qf4NVoJE0j5H;>trZ(=S!Dq?=VEPp?H|AC=e>7v6GuMqDFl;~n( o;VVV)>afQ=`sz&_sQ=jYH+DPeSs|7+*8l(j07*qoM6N<$f)iv2<^TWy literal 0 HcmV?d00001 diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot3@2x.png b/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot3@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..761a362e918d5d8f5c609f8b7c57b2e0f9b2692f GIT binary patch literal 4069 zcmVPx^pGibPRCodHTMLX8)ft{MGxy%*rK?nV35x}k4UbANkr*3m)7r%NE-3HDXw$@) z_=;_#fWc}T6OG0;sm7#@fXgD3mQ-zNnzr;|HPu*g5qT)f!(BvF3hwL9VIdgHGGvy2eXBarcz~C{U;Cj}P4VOl3;d(EK#ye5$ zCE;LHn;t4wwjyq)1nF^uuz*ty@3~Rrd;7hi{=B!V=f0^xjy~G{hKjVCW!Xf#ehXsF2?7LqKlz+)zU9xAjmdTL4<4FDpO4g#R4oEr~_)lsk4LzVP zZ%bmZjhTnme?1PvWquf6rJ^`@vi!>>rDhR9>>F8{7FV2fiWp|WjzgaVOJUOEJO-t1 z@R92l4(aA)Onh9ojV6>uA|b zcbu=L@f;%rQd03%62H&M;XnqsZH@9GEHdk)L`KSqqaN^@hzWiF73b_B-)|Ux!^aZy zZ2e}gubl{`n~l^?WW;L(>_|e zDIdhwIiv?{Nvsf1DUp#@Iq~z;GZYb><;K*~VY%&4CE|oo>!>SylyeV9h2fVpjGKQw z$eE|LH?z6^iJ1rL_J{l5Z_l+Af2o3~`UE_ugt)NkmHMZ7=;by<`kSG; zZQOzzf_!edR*KURh_PFWXVWC2&`sVL?jnCTNi+ozAn=A|maq}qGX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_dxnm6 z4ZS&!bzNdW>rcpc69x9#*)?se_{Eb0bewSqHjW$~wmes*)J^7BBR%`?G_G>v=br(S zvRocE4pUhp-N~55GVu|8c?-<8uK5+Dmmu^yCm%U*XdGjHp-Q zpD~%7dcv1nVp(PG!)l5E(ZMyAjN52sOvp~gJHbb>4rsq-E6tqO>DNQMwC8P)3hp~z z?8o%;ys2>W_`kvmO^ zvoi6XQuIB>neBLLHg>ahM3+h{mKR=Pj5h>goq!A!CaE9%r%dyihJDUE6MvuggM>Ub z&R#hWBPM5k-H#b;{0T2~@+u$+_jNzzRLA$reh^O=V$@6^rZ$;IvK~QzHWypt>S1m4 zZ9BQ6LJ>2N{)xrGz`OJsKv%yBCRHU-NpO;YM0)~;1)LMioECU+<95V)KhC7h@A!KV z<;XJ2Q2Ojao-EL|eLCX7ja&3{^LXz@NTN)c6I%;0mM0#RaUlgvCM2IGcyI!4+z%%# zc=MR+U)C1u##m`{k4@OHWKmzpkVRZBIguL$+dGBvxUA?MvJsqsn^Y=vtqfq1C-{VU zL}K|x#eva57U{R`{~sH`5ZP7o$Ue}HnE+zKa>5O6(?I%i9q72S{sxU8Op)|VL101} z2IMBdvTW1?*dIKCK!Rn3Zv>Vwhrb4G8m!;6D2iuxX%X~X1VPQ zEH~_J&e3(U< zXNpK|ozZ1!Mke?$cEZ*$eB^_RZu?2bN}sy@K7)qk{T1{zhJThP51D2iF>%UzgB~Ym z8%f^OfSkqB$jYEhC5@+FqxwUApFjVY(f&F1J3;h;$E+a~pWKO(j3J|cLL85GlB^Z= z4&Oh#Bv$&Jpcb0u^!7`?{s$BIGt)rGO3u0+7xI`C98!c;f{)23e8cRSa)yB~4+H-P XklW#uJFVx400000NkvXXu0mjf1%UO? literal 0 HcmV?d00001 diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot4.png b/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot4.png new file mode 100644 index 0000000000000000000000000000000000000000..ddfd50c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sx4r2&uU_tffbfs1ezNI@^7^!$Bnxc*m~d^M}ZoO329`G&~xCt`0xg^mQOmRe&#F zmn&goS!0p`#phEn`8HA3P0iGq9AaiNP7hrzKmv*uAPbOyfIw_{kOfFUKp-YB^Jdsd z3v4Ed$$-qVlMaVGaQHwyBoYknB5YgmdXaFmtwBT}^|>V~23a3pe}2B|)mGRg8NM9()&EcuT}?O$ zi0nZ|?xd>?rzAi|?WB!>gMi2(hMlTijDmx9N)O0LIMM?$8jjR}WPpQ!$g3E3s&t{j zQ8LGiQZ|8F?2rx+70&IE2;jLTq=ZKbI!mcq&H)v1~qD zDNyOK%HB2mQwk3{eX1#wLzWE=B9a1--0%&jZt><&9JLhm+cr6K_Y#Oww(FOS7WiDzg9MnS!K;tjsu&2w< zxn$~CJPFU9$5^g;ZPWE?{~-mS$#)6BkBmjyNm>?I79hcsumD+r1Ox$@Lh531CAF@e2gv0mT(AOkY$y%?F0P94Z0rqg{*GmHgD z@Te?679arufmrN8HuxzR!@Ob*wg~~*z&2rC0>w4gVw(_<%WWS78^ns=%7jv8Q^q!d z>Ow#xLv7P;w__jsceaNNl=;Jr*?_j7O=z2dk0rJUlu6((V69|eAc`vL00000NkvXX Hu0mjf!%r0r literal 0 HcmV?d00001 diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot5.png b/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot5.png new file mode 100644 index 0000000000000000000000000000000000000000..23522960fe518b3950bcf0832d61ca5d9704aaf4 GIT binary patch literal 1525 zcmVPx)uSrBfR9Fe^R!wYGMHK$#-uqt5Pk}0hR0Rz!i~0v9qA{Tgi@HILZcrm-Av=xi z{7V$HCdMrgU9d4#S8OCG3oxdnRHMO&K_ZJb(G)BYgj(9BefPb0$8*lybML&@SEInP z)4sVgbIy0pcg~!ddx3?vkb#@afGPJs`ff6PWlvHqMFwVGYZjKIPHruYO|7mkZ)C)m zH^L(CE1eWvuux^hyDiA>(C3>|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u0mjf&QIaO literal 0 HcmV?d00001 diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot5@2x.png b/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot5@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..aca56d637f76f28f206242c47e50713d88af7fb9 GIT binary patch literal 3569 zcmVPx?t4TybRCodHT5GHwRTW+{bIvK{mX@^8mU3ID#Rs4iicl)ALKG0IF%d94B%sCz z{NslRiSZSy^20=lq6P)!mDmIl1bIpe1q4!|7(ob+wv=LdTH4-w+k4K;xW2XLo7r>j zIrp5~O9@=gZacFd>sxEDZ`OXEiu6*CfgS@r26_zi80az3W8j0yKmfPXn~weD@W7T8 zGCVjpjq6b>DpE-$&_5=hYCdpz%KGiB^WT1Z`X0syQ7sN?eH*KNQ_l>}erQbqa(2G8 z=}}1z5y&xl zYjdp=3ZKMbecRR*6=@94g|kTJe8vPxVZ@*eN+82FpDeUaG<@3FJ~zai!$@!xI4YVW z24xb0d@IaE!-Jd9MFXOO#1whVKTK$62|1EA(ea@lDI|c-yZOh}qRy9PwD@%s5w8(M zx76iQ#JJcYEtK=43T>=6=?RFhkN`Nyy-j%tx#2{)LI!hEF)vAVPYL^G8BfW;W(n#; zmZz?c`0?7`P525OaB)b;I1Furngubxk@rJNh%b!wEr&PgB@4)dt(e;>6`$F4q7Ia6MrJXgx`r_hLHsJYM_C5O{mzC5eNL*U z{nlF3!Plj+^1G6(yE~IAqr>^9NaduTNwDX>)=y9k+)U*bXYAn8z5)+rc)$-@h&UpG9Er&cbCaP7Rj(WZ&5Gm zXsZ>Tazz_@S452Evz4=uDRjOQ_)y1AZWI}mIGlWj(NOei@y1@fi=tK$ScMc!yca*Nehj})f*RbhbaTH^kUkGnHVEdeX z4zbQ9&;QNpy;f7svi~MNdEpMjhN>g2Odd1d!1{nbTQn?B?Ig>UTiI`i4?l5%)V_4H zRL{6Y!Wjpfn2$Gtz!xha!LMWaY>bC}vr)8^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`aDQY@95*Glr*T1nq}PHzv_+u;=dIZB4Nm(Di^QW8Wrf}&@! zKo76D{s^XjSg<<}X6rxQNi!vS^-#a-0kH4|?eRv;8JjvY*F@5`oQUzP~A= zhx&aSzdk5*F*ZJY9zkT4M)@}5vyYT$?g@DHcc}kRC zU*M-73?&SysAk>4bwZ%$AY6sWppv3RIzQWak zWLQ{cgwY8YMq)YGu|=KLe_F>cPrM1XdF1#!_@UGd1me50|1RR2emJ!FQKyTy%Yg{i zIqy+&PPsCiFJvgon)fe$)cYVf?Y^%g0Z)`|SXjPjb!53RQ4;~*{yvBiqhlP2P8$*4 zoP{<>u$^Vb4tL&cf4|}LjiPf*UDdyC($1nm$#4WfqL~P^6m>?*1jCn)8W=#?s39r# z#kJB=k*#7zNna}*phYrddCdgCH$N2e)fCo3BG$w6?<8;{1 zbN-;?E{YsEB+EtG#KeP}uog@^Gf1Mu5d$i`NU{0H(Sr8or~s*c9SNi)<}#mnUlw-W z%Xn}CZo=S_$JW&1S&PHrzV$&I#ppOvv$J&6k19thB>^h(%#p133*Ls6asf`jjgirN r^cd(d&|{#-K#zeQ13d;lfDHT}lCM4M{?W|V00000NkvXXu0mjf=ywKD literal 0 HcmV?d00001 diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot6.png b/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot6.png new file mode 100644 index 0000000000000000000000000000000000000000..66d6c9530b963c524cd2573220019efe27889f28 GIT binary patch literal 506 zcmVPx$v`IukR9FdPU>Ib85u1AyFa56-{K-(q`j>$Pn>?jrznK~Syk}=ui22-3^5wgn}5nzTDXT!8cjGckOPKbel1z4a=d5kGfNQ5R)w)qtULx30q zLyjyV>oMhN;-ITv85r_!Kpd4Mg=r~15t=v%WFg2=IY37}`-RVXOgXaC5T;R>A~%4J z0%1}B%|eJ2M_+*D)Z|NOllN6Ub42 zfV4aZh=&SZ{$yZyLt=G-Yy#F^hxv*B|B)5Ziha_85yO6x5;d(HhHUPrgOEc58+*`& z5JsW`x%xj4U~@gS#TbDA-At_6KH&b%707*qoM6N<$f;C0Va{vGU literal 0 HcmV?d00001 diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot6@2x.png b/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/alphafine_hot6@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..84ede5a553888a9c48b27d789a1cfe50efcee4eb GIT binary patch literal 828 zcmV-C1H=4@P)Px%_DMuRRCodHn@?*KQ53~b($=bAh4_D=f*ZSSsl=@=b*XjZM-Uf+A3}8D#t$Kg zBBJiZt%VBitQ!qB><*)O#Rc$?LKmw<+iIu4Yb#3x- zjO*2rwCB*&LQ*#?&WRn4ESU5ly=WIt4M?_?HtD#>mFYzdD7ItHev4G57d4>$CY)r= z0g=^pKn{oyAhJ8i0TBX3b_Y2iLV(Ebpm79r>lE;60a!djstfX^IpFOgaQ7UKwTKvr zgRY+dP96ZRHh4=C)0hEnp8@Wl=kddi7zvFOcnwGJD+S-z?vMFXhS z0X}VI+^d8X4WPdXaBr=8NYMZi?{r20DJnpNAYD72Z9R*>(E%z#`nZ`P3C1!T(`K2C z6U%nH^Eo?5YVX=j7NvuVI4t4FJkbLx!m@bpfCyCwYo zazKOtk=;R~1avH1Y>$1IIY_S2ya~5!p3DOW&1SL3Z&rG}f5&3!DDe1VypYTQz5WTj z_>ryfLb&-CDen_T(20@yQ=n?cvF1d=6(m?A*xF;{$Ev8}apd7}d7Vx}( zOv?Wk!)s-L1cpG$58U!uT*XGx56WLz{IK;(0ZH+)-JX62eup~|@7uhccOhn@8_ubI z@mPxp#q$-}w9OBxX2C6LG|9Pgx%k}3;3+D1(BM+WQ*l6KT^x`DA_R!+4st+*0Fm86 z4u}vSvO9AiY@6=lPvLM&KVz`KUc*vY8S90000 literal 0 HcmV?d00001 diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/selected10.png b/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/selected10.png new file mode 100644 index 0000000000000000000000000000000000000000..6242e61944773486295511a70c6dd23e7a602ca6 GIT binary patch literal 14855 zcmeI3eQXnD9LI0s6eh@U!x^WpmZ4K=@2+dR_UKCHI<_grxtF*>6mHk2+p+fU=-sw% zLL4u?#TgKSLO^0rOo#yn8Y7B`L-Zd|49P$war*~EFhCZA7#Kd+cJ0%y;}OH3Pm}h3 zd!Fz2_j~U1yzKtDH*4lsPRV*Oi=wD0)m5Hac+J+o6Yqk*1;aOZc$uVBHK`PJ|4jXx zQC(YjiJ}~ZVtu35=$*$2a?s5Cj(JIfX3V1gjfctbcCkW?;QYK-LNV5~ROMngoR zwUrvn^n!*)Z;hc`4grJBY&QvPvBOZ}G_y9R!(yFfurREhW}Gx@H8Cv5I5~zj#6CuM z7K~gWpP#Gs%#D?Uf0Y_rHBI4Yy0f#>+*xdvLoGDxbUJCqLR%~*s4%HrlE#Nkk~$-r zWHgTls6t3oG*OledS1R+Zr4hUM!it{6T7dV5-%jFF?Nt59p)99H8XTNlTV0yl=e^{ zGBlq+g8&EuNmHSZP3u!yWldIF<#9^JyT>gI=fvxc*G@a$U@&cIRjcTL2x3UnI@S6v z1<2ukrX4s1Qlw6F9#d3i6s;4Dv02R-_ge zooGaq@fF3D%Kte*cp@6 z4@ykU&CP;|b+R^I;2Eb-;*a3-dQtnB)E-%A*LO-RweJ>FBla<=p9_ibl;Z=4Mj!pH zmPnIkOsOhSg=@15S+j8EM$WN1ur#@Kv?Cx!&Lf2nsX*UtrN+_i7C*q^=acS<>{^Z& z^pngj=$irfTy#=vVpwr!%qITd35@1P?BmzyYz5NIwo)`zL^XaARrYJ0dH!-X@F}?N9Y4tPPT=xh=7BDb0vWKY61^Lmhlb0B*a@R%~<8sm-a5 z8Zit4jUEy1VO3w5tUcyQ?MQ2E8qbJy#Ej9&LjIjc<}%s}9~R(q3LSq?NuK8TX1L8k z;*M@}Vl*8og3`do1Q!+&Dj>K}8rYcN!XiQi1Q$vJ8xveuM5ut^LTO-Qf(wfX6%bq~ z4QxzsVG*GMf(xaAjR`I+B2++dp){~D!G%SH3J5Ng1~w+Ru!v9r!G+Sm#sn7@5h@_K zP#V~n;KCw81q2sL0~-@uSVX9R;6iC&V}c8d2o(@qC=F~(aA6Ul0)h*rfsF|+EFx4u zaG^A?F~NmJgbD~Qlm<2?xUh&&0l|gRz{Ug@77;2SxKJ9{nBc-9LIngDN&_1cTv$Y? zfZ#%DVB?$O%1XTY2PF8uUnhLAucOD_244y^2vxOSit2_h5%#R2sH->N^&CaDGZgj5 zVv6E6QdFM2Zqebn6qWH}wWq8;d}{Ua*=-GFxtW6(3)d^lUu*5lo;JC0``&4<=63A3 zGoKxl`#!rb_+9@qmns_*t9zCZW9Eh`QU9l7xJz^S&Q z=a%d|HsstjxO=2Qx#N?}x-VAz8ty&1^-TG)Z)a`Yz|j8T$3`Ch`Sg(W^UJv}&%AJD zPkvKQB{libwTXG`Eb;W)*RDQt^?dk^_utvJZj)b`-qKB-sa-f+w6S-%K-sbBuLnj3 zKgc-QTbUDlXu`6$rmpf2>~_4qe#*fsJ@+o?`HekO_Tga8yG!#<W98HjmH9 z+xv?Bhr=|`|de*c#EP%2EH%)-SQ7V>3DX& zvuEdid1%3ezLj~89_amL*T9!6XaBur)$>_%)^~00cYl1@yj0py*q8n35_Rg2Yxdn; uyyH)0YFnm!`J=OsFF9d-Y5VSx0;+6zQ?E4e({%k+&FYHzo?TBbUimMpTTYe$ literal 0 HcmV?d00001 diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/selected10@2x.png b/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/selected10@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..568b5428eee059393460730696e060a6618970b6 GIT binary patch literal 279 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?2=RS;(M3{v?36g=ta z;usQf`0ezEyv+&%Zt`u6FH~X=2EJ93byV9Z9rNEInZql~X5&*#?nN7W)nrBqevf~RCm4_LE}j#^V5Q|Qo@K|TE1Iqn*F1vd&2g+MeblKTmyWrbn7_<9Ws}JH?|OSM2)9 Z_IO`!h#=p+4M0yZc)I$ztaD0e0stFoX&L|k literal 0 HcmV?d00001 diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/selected8.png b/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/selected8.png new file mode 100644 index 0000000000000000000000000000000000000000..dd04302fc1c97c1f0a9efe308ec39e6ea45abd31 GIT binary patch literal 14941 zcmeI3eQXnD9LH}17MU5o5I5wt6hww}cei%ydbXY03T%OnvNyMgu-n~jJ818Y_DahF zV?Z!2N(e71;l+SL0t}S6XaqB<8YGfTF&T&wl@JWFh@g|GyabbuK=uaQb=osS?gpV8ha zWffDe6GXubv8q42)Kmw1TvbvzhE%}(BO&`w7fLLoL^}4V` zU24-8X$5t)PM5Ak_6oYZoO}aE8w+%1OAei9DabX=)a6oiK1o?f+GL<;hO#get&6_& z_H+?9W15g-zD@X<+qO0%rWzGiudlCka~3xhdvI%Bnyj@RQ!TH2@1S`H9IktTKe zs#YihSt0mjzn2qcEeDq}CE3-hVq<)A24vEDh8(*P6o;^BJrP@YDMV(-3a*tY@d~Ue zd#hyGZI7%nS3g2sNr|?q%)04LmJ=n7Yqph4G{t8;o=xMMi=pVF1k~D)#m5M&FLRUa57p&j#X;vvL8`#?4;TFTElEQj@g0|;u`uh?$UCKCl-B&~f$y>Ne`w+`Wj`xCu!Yqcb*_S|T>gl5R4oxhQzp%UCG2=@HE zJY$}fOl(ecxWu5~u62lD5Bs#0NrPP<_9S*BHP#JfggTfyPJw1Qg(aJNFn zZdV3Qb8Is_>WM4i|xGAY+URi3k>8Trdq}jBz0m!2*m6rh$wxE+isYfN{Yz zkTJ%EL<9>kE|>-~#<-A(U;)Mj(?G@;7ZMRHz_?%<$Qa{7B7y}N7fb^gV_Zl?umIzN zX&_^a3yBC8U|cW_WQ=hk5y1kC3#NgL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