From 85fc9222817d21d309eaa5dae127d235c309d1e9 Mon Sep 17 00:00:00 2001 From: jinpengyong <jpy123456> Date: Thu, 20 Oct 2022 11:01:04 +0800 Subject: [PATCH] 修改浑南区同比数据 --- 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