From 73caf5a7072976021f43a764ed2ad73404f4d040 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期四, 02 一月 2025 13:42:15 +0800
Subject: [PATCH] mongo索引、运行监控报表调整

---
 ycl-server/src/main/java/com/ycl/handler/CustomCellWriteHandler.java |  102 +++++++++++++++++++++++++-------------------------
 1 files changed, 51 insertions(+), 51 deletions(-)

diff --git a/ycl-server/src/main/java/com/ycl/handler/CustomCellWriteHandler.java b/ycl-server/src/main/java/com/ycl/handler/CustomCellWriteHandler.java
index f928385..9a50226 100644
--- a/ycl-server/src/main/java/com/ycl/handler/CustomCellWriteHandler.java
+++ b/ycl-server/src/main/java/com/ycl/handler/CustomCellWriteHandler.java
@@ -182,56 +182,56 @@
     }
 
 
-    public static void main(String[] args) {
-        EasyExcel.write("test.xlsx", CalculateRule.class)
-                // 鑷�傚簲鍒楀
-                .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy())
-                // 涓嬫媺妗�
-                .registerWriteHandler(new CustomSheetWriteHandler(Arrays.asList("鎵f寚瀹氬垎鏁�", "鍒嗘暟涔樹互鏁伴噺", "闄や互鏁伴噺鍚庝箻浠ュ垎鏁�")))
-                .registerWriteHandler(new CustomCellWriteHandler())
-                // 鏍囨敞
-                .registerWriteHandler(new CommentWriteHandler())
-                .sheet("鍚堝悓瀵煎叆妯℃澘")
-                .doWrite(getExcelData());
-    }
-
-    private static List<CalculateRule> getExcelData() {
-        ArrayList<CalculateRule> list = new ArrayList<>();
-
-        setTemplateRule(list,1,"璁惧骞冲潎鍦ㄧ嚎鐜�","鈮�98%",null,98D,RuleDeductCategoryEnum.DEDUCT_POINTS,0.00);
-        setTemplateRule(list,null,"璁惧骞冲潎鍦ㄧ嚎鐜�","95%鈮よ澶囧钩鍧囧湪绾跨巼锛�98%",97D,95D,RuleDeductCategoryEnum.DEDUCT_POINTS,5.00);
-        setTemplateRule(list,null,"璁惧骞冲潎鍦ㄧ嚎鐜�","90%鈮よ澶囧钩鍧囧湪绾跨巼锛�95%",94D,90D,RuleDeductCategoryEnum.DEDUCT_POINTS,10.00);
-        setTemplateRule(list,null,"璁惧骞冲潎鍦ㄧ嚎鐜�","锛�90%",89D,null,RuleDeductCategoryEnum.DEDUCT_POINTS,20.00);
-
-        setTemplateRule(list,2,"鍓嶇鎰熺煡婧愭不鐞嗗伐浣�","鏃堕挓鍚屾锛堣秴杩嚶�3绉掍负涓嶅悎鏍硷級",null,null,RuleDeductCategoryEnum.MULTIPLY_POINTS_BY_QUANTITY,0.1);
-        setTemplateRule(list,null,"鍓嶇鎰熺煡婧愭不鐞嗗伐浣�","OSD鏍囪瘑",null,null,RuleDeductCategoryEnum.MULTIPLY_POINTS_BY_QUANTITY,0.1);
-        setTemplateRule(list,null,"鍓嶇鎰熺煡婧愭不鐞嗗伐浣�","涓�鏈轰竴妗�",null,null,RuleDeductCategoryEnum.MULTIPLY_POINTS_BY_QUANTITY,0.1);
-
-        setTemplateRule(list,3,"瀵逛簬鍓嶇鐐逛綅寮傚父鎯呭喌鐨勫鐞�","闀滃ご鏁呴殰鎴栨薄鏌撴垨鏍戞灊閬尅鎴栨灙鏈鸿瑙掑亸绉绘甯歌搴︽垨琛ュ厜鐏簲浜湭浜�,24灏忔椂鍚庢湭淇鐨�",null,24D,RuleDeductCategoryEnum.MULTIPLY_POINTS_BY_QUANTITY,0.5);
-        setTemplateRule(list,null,"瀵逛簬鍓嶇鐐逛綅寮傚父鎯呭喌鐨勫鐞�","闀滃ご鏁呴殰鎴栨薄鏌撴垨鏍戞灊閬尅鎴栨灙鏈鸿瑙掑亸绉绘甯歌搴︽垨琛ュ厜鐏簲浜湭浜�,48灏忔椂鍚庢湭淇鐨�",null,48D,RuleDeductCategoryEnum.MULTIPLY_POINTS_BY_QUANTITY,1.0);
-
-        setTemplateRule(list,4,"纭繚褰曞儚瀹屾暣涓嶅畾鏈熷鎵�鏈夌偣浣嶅綍鍍忓畬鏁存�ф娊鏌�","姣忚矾瑙嗛绱涓㈠け10鍒嗛挓浠ュ唴",10D,null,RuleDeductCategoryEnum.MULTIPLY_POINTS_BY_QUANTITY,0.2);
-        setTemplateRule(list,null,"纭繚褰曞儚瀹屾暣涓嶅畾鏈熷鎵�鏈夌偣浣嶅綍鍍忓畬鏁存�ф娊鏌�","涓㈠け10-60 鍒嗛挓",10D,60D,RuleDeductCategoryEnum.MULTIPLY_POINTS_BY_QUANTITY,0.5);
-        setTemplateRule(list,null,"纭繚褰曞儚瀹屾暣涓嶅畾鏈熷鎵�鏈夌偣浣嶅綍鍍忓畬鏁存�ф娊鏌�","涓㈠け1 灏忔椂-4 灏忔椂锛堝惈锛�",60D,240D,RuleDeductCategoryEnum.MULTIPLY_POINTS_BY_QUANTITY,1.0);
-        setTemplateRule(list,null,"纭繚褰曞儚瀹屾暣涓嶅畾鏈熷鎵�鏈夌偣浣嶅綍鍍忓畬鏁存�ф娊鏌�","涓㈠け4 灏忔椂-12 灏忔椂锛堝惈锛�",240D,720D,RuleDeductCategoryEnum.MULTIPLY_POINTS_BY_QUANTITY,1.5);
-        setTemplateRule(list,null,"纭繚褰曞儚瀹屾暣涓嶅畾鏈熷鎵�鏈夌偣浣嶅綍鍍忓畬鏁存�ф娊鏌�","涓㈠け12 灏忔椂浠ヤ笂",null,720D,RuleDeductCategoryEnum.MULTIPLY_POINTS_BY_QUANTITY,2.0);
-
-        setTemplateRule(list,5,"纭繚鍥剧墖瀹屾暣涓嶅畾鏈熷鎵�鏈変汉鑴歌溅杈嗕互鍙婃櫤鑳藉墠绔姄鎷嶇殑鍥剧墖瀹屾暣鎬ф娊鏌�","鍙戠幇鍚庡彴瀛樺偍涓嶈兘璋冨彇鍓嶇璁惧鍥剧墖",null,null,RuleDeductCategoryEnum.MULTIPLY_POINTS_BY_QUANTITY,2.0);
-
-
-        return list;
-    }
-
-    private static void setTemplateRule(ArrayList<CalculateRule> list,Integer id,String ruleName,String condition,Double max,Double min,RuleDeductCategoryEnum deductCategoryEnum,Double calcFraction) {
-        CalculateRule calculateRule = new CalculateRule();
-        calculateRule.setId(id);
-        calculateRule.setRuleName(ruleName);
-        calculateRule.setRuleCondition(condition);
-        calculateRule.setMax(max);
-        calculateRule.setMin(min);
-        calculateRule.setDeductCategory(deductCategoryEnum);
-        calculateRule.setCalcFraction(calcFraction);
-        list.add(calculateRule);
-    }
+//    public static void main(String[] args) {
+//        EasyExcel.write("test.xlsx", CalculateRule.class)
+//                // 鑷�傚簲鍒楀
+//                .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy())
+//                // 涓嬫媺妗�
+//                .registerWriteHandler(new CustomSheetWriteHandler(Arrays.asList("鎵f寚瀹氬垎鏁�", "鍒嗘暟涔樹互鏁伴噺", "闄や互鏁伴噺鍚庝箻浠ュ垎鏁�")))
+//                .registerWriteHandler(new CustomCellWriteHandler())
+//                // 鏍囨敞
+//                .registerWriteHandler(new CommentWriteHandler())
+//                .sheet("鍚堝悓瀵煎叆妯℃澘")
+//                .doWrite(getExcelData());
+//    }
+//
+//    private static List<CalculateRule> getExcelData() {
+//        ArrayList<CalculateRule> list = new ArrayList<>();
+//
+//        setTemplateRule(list,1,"璁惧骞冲潎鍦ㄧ嚎鐜�","鈮�98%",null,98D,RuleDeductCategoryEnum.DEDUCT_POINTS,0.00);
+//        setTemplateRule(list,null,"璁惧骞冲潎鍦ㄧ嚎鐜�","95%鈮よ澶囧钩鍧囧湪绾跨巼锛�98%",97D,95D,RuleDeductCategoryEnum.DEDUCT_POINTS,5.00);
+//        setTemplateRule(list,null,"璁惧骞冲潎鍦ㄧ嚎鐜�","90%鈮よ澶囧钩鍧囧湪绾跨巼锛�95%",94D,90D,RuleDeductCategoryEnum.DEDUCT_POINTS,10.00);
+//        setTemplateRule(list,null,"璁惧骞冲潎鍦ㄧ嚎鐜�","锛�90%",89D,null,RuleDeductCategoryEnum.DEDUCT_POINTS,20.00);
+//
+//        setTemplateRule(list,2,"鍓嶇鎰熺煡婧愭不鐞嗗伐浣�","鏃堕挓鍚屾锛堣秴杩嚶�3绉掍负涓嶅悎鏍硷級",null,null,RuleDeductCategoryEnum.MULTIPLY_POINTS_BY_QUANTITY,0.1);
+//        setTemplateRule(list,null,"鍓嶇鎰熺煡婧愭不鐞嗗伐浣�","OSD鏍囪瘑",null,null,RuleDeductCategoryEnum.MULTIPLY_POINTS_BY_QUANTITY,0.1);
+//        setTemplateRule(list,null,"鍓嶇鎰熺煡婧愭不鐞嗗伐浣�","涓�鏈轰竴妗�",null,null,RuleDeductCategoryEnum.MULTIPLY_POINTS_BY_QUANTITY,0.1);
+//
+//        setTemplateRule(list,3,"瀵逛簬鍓嶇鐐逛綅寮傚父鎯呭喌鐨勫鐞�","闀滃ご鏁呴殰鎴栨薄鏌撴垨鏍戞灊閬尅鎴栨灙鏈鸿瑙掑亸绉绘甯歌搴︽垨琛ュ厜鐏簲浜湭浜�,24灏忔椂鍚庢湭淇鐨�",null,24D,RuleDeductCategoryEnum.MULTIPLY_POINTS_BY_QUANTITY,0.5);
+//        setTemplateRule(list,null,"瀵逛簬鍓嶇鐐逛綅寮傚父鎯呭喌鐨勫鐞�","闀滃ご鏁呴殰鎴栨薄鏌撴垨鏍戞灊閬尅鎴栨灙鏈鸿瑙掑亸绉绘甯歌搴︽垨琛ュ厜鐏簲浜湭浜�,48灏忔椂鍚庢湭淇鐨�",null,48D,RuleDeductCategoryEnum.MULTIPLY_POINTS_BY_QUANTITY,1.0);
+//
+//        setTemplateRule(list,4,"纭繚褰曞儚瀹屾暣涓嶅畾鏈熷鎵�鏈夌偣浣嶅綍鍍忓畬鏁存�ф娊鏌�","姣忚矾瑙嗛绱涓㈠け10鍒嗛挓浠ュ唴",10D,null,RuleDeductCategoryEnum.MULTIPLY_POINTS_BY_QUANTITY,0.2);
+//        setTemplateRule(list,null,"纭繚褰曞儚瀹屾暣涓嶅畾鏈熷鎵�鏈夌偣浣嶅綍鍍忓畬鏁存�ф娊鏌�","涓㈠け10-60 鍒嗛挓",10D,60D,RuleDeductCategoryEnum.MULTIPLY_POINTS_BY_QUANTITY,0.5);
+//        setTemplateRule(list,null,"纭繚褰曞儚瀹屾暣涓嶅畾鏈熷鎵�鏈夌偣浣嶅綍鍍忓畬鏁存�ф娊鏌�","涓㈠け1 灏忔椂-4 灏忔椂锛堝惈锛�",60D,240D,RuleDeductCategoryEnum.MULTIPLY_POINTS_BY_QUANTITY,1.0);
+//        setTemplateRule(list,null,"纭繚褰曞儚瀹屾暣涓嶅畾鏈熷鎵�鏈夌偣浣嶅綍鍍忓畬鏁存�ф娊鏌�","涓㈠け4 灏忔椂-12 灏忔椂锛堝惈锛�",240D,720D,RuleDeductCategoryEnum.MULTIPLY_POINTS_BY_QUANTITY,1.5);
+//        setTemplateRule(list,null,"纭繚褰曞儚瀹屾暣涓嶅畾鏈熷鎵�鏈夌偣浣嶅綍鍍忓畬鏁存�ф娊鏌�","涓㈠け12 灏忔椂浠ヤ笂",null,720D,RuleDeductCategoryEnum.MULTIPLY_POINTS_BY_QUANTITY,2.0);
+//
+//        setTemplateRule(list,5,"纭繚鍥剧墖瀹屾暣涓嶅畾鏈熷鎵�鏈変汉鑴歌溅杈嗕互鍙婃櫤鑳藉墠绔姄鎷嶇殑鍥剧墖瀹屾暣鎬ф娊鏌�","鍙戠幇鍚庡彴瀛樺偍涓嶈兘璋冨彇鍓嶇璁惧鍥剧墖",null,null,RuleDeductCategoryEnum.MULTIPLY_POINTS_BY_QUANTITY,2.0);
+//
+//
+//        return list;
+//    }
+//
+//    private static void setTemplateRule(ArrayList<CalculateRule> list,Integer id,String ruleName,String condition,Double max,Double min,RuleDeductCategoryEnum deductCategoryEnum,Double calcFraction) {
+//        CalculateRule calculateRule = new CalculateRule();
+//        calculateRule.setId(id);
+//        calculateRule.setRuleName(ruleName);
+//        calculateRule.setRuleCondition(condition);
+//        calculateRule.setMax(max);
+//        calculateRule.setMin(min);
+//        calculateRule.setDeductCategory(deductCategoryEnum);
+//        calculateRule.setCalcFraction(calcFraction);
+//        list.add(calculateRule);
+//    }
 
 }

--
Gitblit v1.8.0