瀏覽代碼

修改注释
修改全程曲线的获取间隔

dongjh 1 年之前
父節點
當前提交
4ebc14cfa9

+ 3 - 0
jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml

@@ -130,6 +130,7 @@ spring:
         connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
       datasource:
         master:
+          # 打包时修改该配置
           url: jdbc:mysql://152.136.206.27:3306/guAn_rl?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
 #          url: jdbc:mysql://127.0.0.1:3306/guAn_rl?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
           username: itdm-boot
@@ -144,6 +145,7 @@ spring:
   #redis 配置
   redis:
     database: 0
+    # 打包时修改该配置
 #    host: 127.0.0.1
     host: 152.136.206.27
     port: 6379
@@ -228,6 +230,7 @@ jeecg:
     logRetentionDays: 30
   #分布式锁配置
   redisson:
+    # 打包时修改该配置
     address: 152.136.206.27:6379
 #    address: 127.0.0.1:6379
     password:

+ 9 - 16
module-guan/src/main/java/org/jeecg/modules/webaccess/service/WebAccessService.java

@@ -700,21 +700,14 @@ public class WebAccessService {
                     // 2 获取 全程曲线 参数
                     if (param.getParamName().equals("辐射强度值-全程") || param.getParamName().equals("湿度实值-全程") ||
                             param.getParamName().equals("温度实值-全程")) {
-                        // 2.1 每笔数据之间隔时间
-                        if (qcIntervals == null) {
-                            qcIntervals = param.getIntervals() == 0 || param.getIntervals() == null ? 1 : param.getIntervals();
-                        }
-
-                        // 2.2 计算每笔数据之间隔时间(设x = 参数定义的间隔时间,y = 间隔天数,计算公式:x + x * y)
-                        if (qcIntervals == null) {
-                            qcIntervals = param.getIntervals() == 0 || param.getIntervals() == null ? 1 : param.getIntervals();
-                            LocalDate startLocalDate = startTime.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
-                            LocalDate endLocalDate = now.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
-                            Long day = ChronoUnit.DAYS.between(startLocalDate, endLocalDate);
-                            qcIntervals = qcIntervals + qcIntervals * (Integer.parseInt(day.toString()));
-                        }
-
-                        // 2.3 获取记录条数
+                        // 2.1 计算每笔数据之间隔时间(设x = 参数定义的间隔时间,y = 间隔天数,计算公式:x + x * y)
+                        qcIntervals = param.getIntervals() == 0 || param.getIntervals() == null ? 1 : param.getIntervals();
+                        LocalDate startLocalDate = startTime.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
+                        LocalDate endLocalDate = now.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
+                        Long day = ChronoUnit.DAYS.between(startLocalDate, endLocalDate);
+                        qcIntervals = qcIntervals + qcIntervals * (Integer.parseInt(day.toString()));
+
+                        // 2.2 获取记录条数
                         if (qcRecord == null) {
                             qcRecord = Integer.parseInt((ChronoUnit.MINUTES.between(
                                     LocalDateTime.parse(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(startTime).replace(" ", "T")),
@@ -722,7 +715,7 @@ public class WebAccessService {
                                 ) / qcIntervals) + "");
                         }
 
-                        // 2.4 组合参数
+                        // 2.3 组合参数
                         jo = generateDataLogObject(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(startTime),
                                 param.getIntervaltype() == null || "".equals(param.getIntervaltype()) ? "M" : param.getIntervaltype(),
                                 qcIntervals,