|
@@ -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,
|