Przeglądaj źródła

作者:张哲
时间:2023/04/04
类型:优化
描述:里程碑(3) 业务系统名称修改

zizg 1 rok temu
rodzic
commit
eba980df93

+ 2 - 2
src/main/java/com/redxun/knowledge/analysis/entity/consts/ComanyColumnsConst.java

@@ -20,12 +20,12 @@ public class ComanyColumnsConst {
         List<CompanyColumns> list = new ArrayList<>();
         list.add(new CompanyColumns("公司名称","company",""));
         list.add(new CompanyColumns("访问总量","total","total"));
-        list.add(new CompanyColumns("知识管理系统","zs","zs"));
+        list.add(new CompanyColumns("知识管理平台","zs","zs"));
         list.add(new CompanyColumns("eip系统","eip","eip"));
         list.add(new CompanyColumns("dcc系统","dcc","dcc"));
         list.add(new CompanyColumns("工作管理系统","gz","gz"));
         list.add(new CompanyColumns("平展系统","pz","pz"));
-        list.add(new CompanyColumns("盘系统","wp","wp"));
+        list.add(new CompanyColumns("盘系统","wp","wp"));
         return list;
     }
 }

+ 2 - 2
src/main/java/com/redxun/knowledge/analysis/entity/consts/PlatformConst.java

@@ -16,11 +16,11 @@ public class PlatformConst {
 
     public static List<String> platformList(){
         List<String> list = new ArrayList<>();
-        list.add("知识管理系统");
+        list.add("知识管理平台");
         list.add("平展系统");
         list.add("工作管理系统");
         list.add("eip系统");
-        list.add("盘系统");
+        list.add("盘系统");
         list.add("dcc系统");
         return list;
     }

+ 0 - 30
src/main/java/com/redxun/knowledge/analysis/service/AnalysisCommonServiceImpl.java

@@ -98,36 +98,6 @@ public class AnalysisCommonServiceImpl {
                 DateUtils.format(DateUtils.getLastOfYear(year)));
         //统计每月各个系统的搜索访问量
         List<LablesVo> lablesVoList = new ArrayList<>();
-        for (int i = 1; i <= 12; i++) {
-            LablesVo lablesVo = new LablesVo();
-            List<Map<String, Object>> values = new ArrayList<>();
-            lablesVo.setName(i + "月");
-            //查询出全部的业务系统名称
-            List<String> platformList = PlatformConst.platformList();
-            //获取每月的第一天和最后一天
-            String firstOfMonth = DateUtils.getFirstOfMonth(year, i, 15);
-            String lastOfMonth = DateUtils.getLastOfMonth(year, i, 15);
-            Integer sumByMonth = pvLogMapper.selectSearchVisitHistogramByMonth(firstOfMonth, lastOfMonth, null);
-            //根据月份查询各个业务系统访问量
-            platformList.forEach(e -> {
-                Map<String, Object> map = new HashMap<>();
-                Integer count = pvLogMapper.selectSearchVisitHistogramByMonth(firstOfMonth, lastOfMonth, e);
-                map.put("legend", e);
-                map.put("value", count);
-                if (sumByMonth == 0) {
-                    map.put("percentage", 0.0000);
-                } else {
-                    double sum = count / (sumByMonth.doubleValue());
-                    BigDecimal bd = new BigDecimal(sum);
-                    double f1 = bd.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
-                    map.put("percentage", f1);
-                }
-                values.add(map);
-            });
-            lablesVo.setValues(values);
-            lablesVoList.add(lablesVo);
-        }
-        //返回值
         searchVisitHistogramVo.setTotal(yearTotal);
         searchVisitHistogramVo.setLables(lablesVoList);
         return searchVisitHistogramVo;

+ 1 - 1
src/main/java/com/redxun/knowledge/utils/DateUtils.java

@@ -45,7 +45,7 @@ public class DateUtils {
      */
     public static Date getFirstOfYear(int year){
         LocalDateTime nowYear = LocalDateTime.now();
-        nowYear = nowYear.minus(1, ChronoUnit.YEARS);
+        nowYear = nowYear.minus(1, ChronoUnit.YEARS).plus(1, ChronoUnit.MONTHS);
         Date date = Date.from(nowYear.atZone(ZoneId.systemDefault()).toInstant());
         return date;
 

+ 4 - 4
src/main/resources/mapper/knowledge/analysis/AnalysisSearchMapper.xml

@@ -56,7 +56,7 @@
         (select COMPANY_ID as companyId, count(*) eip
         from KM_PV_LOG
         <where>
-            PLATFORM = 'EIP系统'
+            PLATFORM = 'eip系统'
             <if test="firstDay != null and lastDay != null">
                 and TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') &gt;= #{firstDay}
                 and TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') &lt;= #{lastDay}
@@ -68,7 +68,7 @@
         (select COMPANY_ID as companyId, count(*) wp
         from KM_PV_LOG
         <where>
-            PLATFORM = '盘系统'
+            PLATFORM = '盘系统'
             <if test="firstDay != null and lastDay != null">
                 and TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') &gt;= #{firstDay}
                 and TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') &lt;= #{lastDay}
@@ -80,7 +80,7 @@
         (select COMPANY_ID as companyId, count(*) zs
         from KM_PV_LOG
         <where>
-            PLATFORM = '知识管理系统'
+            PLATFORM = '知识管理平台'
             <if test="firstDay != null and lastDay != null">
                 and TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') &gt;= #{firstDay}
                 and TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') &lt;= #{lastDay}
@@ -92,7 +92,7 @@
         (select COMPANY_ID as companyId, count(*) dcc
         from KM_PV_LOG
         <where>
-            PLATFORM = 'DCC管理系统'
+            PLATFORM = 'dcc系统'
             <if test="firstDay != null and lastDay != null">
                 and TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') &gt;= #{firstDay}
                 and TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') &lt;= #{lastDay}