From a30cc74a46477c1820c6114cbda7f4e11b3aaf0d Mon Sep 17 00:00:00 2001
From: jpy <812110275@qq.com>
Date: Sun, 28 May 2023 16:10:24 +0800
Subject: [PATCH] 风场sql
---
screen-api/src/main/java/com/moral/api/service/impl/HistoryHourlyServiceImpl.java | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/screen-api/src/main/java/com/moral/api/service/impl/HistoryHourlyServiceImpl.java b/screen-api/src/main/java/com/moral/api/service/impl/HistoryHourlyServiceImpl.java
index 054382b..deeb591 100644
--- a/screen-api/src/main/java/com/moral/api/service/impl/HistoryHourlyServiceImpl.java
+++ b/screen-api/src/main/java/com/moral/api/service/impl/HistoryHourlyServiceImpl.java
@@ -481,6 +481,9 @@
boundary_point_one.add(Double.parseDouble(boundary_point_one_array[1]));
boundary_pointList.add(boundary_point_one);
}
+ if (boundary_pointList.size()>0){
+ boundary_pointList.add(boundary_pointList.get(0));
+ }
bound.add(boundary_pointList);
resultMap.put("bound", bound);
List centerPoint = new ArrayList();
@@ -652,6 +655,9 @@
boundary_point_one.add(Double.parseDouble(boundary_point_one_array[1]));
boundary_pointList.add(boundary_point_one);
}
+ if (boundary_pointList.size()>0){
+ boundary_pointList.add(boundary_pointList.get(0));
+ }
bound.add(boundary_pointList);
List centerPoint = new ArrayList();
centerPoint.add(servicesScope.getCenterLongitude());
@@ -773,6 +779,17 @@
}
@Override
+ public List<HistoryHourly> getHourlyDataByMacs(List<String> macs, String time) {
+ QueryWrapper<HistoryHourly> queryWrapper = new QueryWrapper<>();
+ queryWrapper.select("mac","time", "value")
+ .likeRight("time", time)
+ .in("mac", macs);
+ Date date = DateUtils.getDate(time, DateUtils.yyyy_MM_dd_EN);
+ List<String> tableNames = MybatisPLUSUtils.getTableNamesByWrapper(date, date, SeparateTableType.MONTH);
+ return multiTableQuery(queryWrapper, tableNames);
+ }
+
+ @Override
public Double calculatedValue(List<HistoryHourly> list, String sensorCode, String type, Double lower, Double upper) {
Supplier<Stream<HistoryHourly>> supplier = list::stream;
DoubleStream doubleStream = supplier.get()
--
Gitblit v1.8.0