From 5e94332935da62448c17f89a807acf46a5ae3e75 Mon Sep 17 00:00:00 2001
From: Van333 <van666666@foxmail.com>
Date: 星期四, 15 十二月 2022 10:08:22 +0800
Subject: [PATCH] 本地诺瓦调整
---
ximon-admin/src/main/java/com/sandu/ximon/admin/newnova/led/NewNovaLedService.java | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/ximon-admin/src/main/java/com/sandu/ximon/admin/newnova/led/NewNovaLedService.java b/ximon-admin/src/main/java/com/sandu/ximon/admin/newnova/led/NewNovaLedService.java
index f0ce6f0..7bdfb6c 100644
--- a/ximon-admin/src/main/java/com/sandu/ximon/admin/newnova/led/NewNovaLedService.java
+++ b/ximon-admin/src/main/java/com/sandu/ximon/admin/newnova/led/NewNovaLedService.java
@@ -7,7 +7,6 @@
import com.sandu.common.object.BaseConditionVO;
import com.sandu.common.service.impl.BaseServiceImpl;
import com.sandu.common.util.SpringContextHolder;
-import com.sandu.ximon.admin.manager.iot.frame.inner.report.A5AtmosphereHeartbeatReportInnerFrame;
import com.sandu.ximon.admin.newnova.conf.ProgramPathConfig;
import com.sandu.ximon.admin.newnova.param.NewNovaLedParam;
import com.sandu.ximon.admin.newnova.param.ProgramPrarm;
@@ -18,13 +17,14 @@
import com.sandu.ximon.admin.newnova.vo.StatusVO;
import com.sandu.ximon.admin.newnova.vo.TrasfromStatusVO;
import com.sandu.ximon.admin.security.SecurityUtils;
-import com.sandu.ximon.admin.service.AirDataService;
import com.sandu.ximon.admin.service.PoleBindingService;
import com.sandu.ximon.admin.service.PoleService;
+import com.sandu.ximon.dao.bo.AirDataNongGengBo;
import com.sandu.ximon.dao.bo.NewNovaGroupListBo;
import com.sandu.ximon.dao.domain.NewNovaLed;
import com.sandu.ximon.dao.domain.Pole;
import com.sandu.ximon.dao.domain.PoleBinding;
+import com.sandu.ximon.dao.mapper.AirDataNongGengMapper;
import com.sandu.ximon.dao.mapper.NewNovaLedMapper;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
@@ -198,13 +198,13 @@
if (nova == null) {
throw new BusinessException("鏈粦瀹氳鐡﹁澶�");
}
- PoleBinding air = poleBindingService.getOne(Wrappers.lambdaQuery(PoleBinding.class).eq(PoleBinding::getPoleId, nova.getPoleId()).eq(PoleBinding::getDeviceType, 3));
+ PoleBinding air = poleBindingService.getOne(Wrappers.lambdaQuery(PoleBinding.class).eq(PoleBinding::getPoleId, nova.getPoleId()).eq(PoleBinding::getDeviceType, 11));
if (air == null) {
throw new BusinessException("鏈粦瀹氬ぇ姘旇澶�");
}
//鑾峰彇澶ф皵鐩戞祴鏁版嵁
- A5AtmosphereHeartbeatReportInnerFrame.HeartBeatDataPackage data = SpringContextHolder.getBean(AirDataService.class).getDataByPoleid(nova.getPoleId());
+ AirDataNongGengBo data = SpringContextHolder.getBean(AirDataNongGengMapper.class).historyData(air.getDeviceCode()).get(0);
//瑙f瀽澶ф皵鏁版嵁
Map pageInfo = parseData(data, duration, fontSize);
@@ -248,7 +248,7 @@
* @return
*/
- private Map parseData(A5AtmosphereHeartbeatReportInnerFrame.HeartBeatDataPackage data, Long duration, Long fontSize) {
+ private Map parseData(AirDataNongGengBo data, Long duration, Long fontSize) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z+8:00'");
Date end = new Date();
end.setTime(end.getTime() + duration);
@@ -302,42 +302,42 @@
" {\n" +
" \"segs\": [\n" +
" {\n" +
- " \"content\": \"娓╁害锛�" + (data == null || data.getTemperature() == null ? " - " : data.getTemperature()) + "掳\"" + "\n" +
+ " \"content\": \"娓╁害锛�" + (data == null || data.getAirTemperature() == null ? " - " : data.getAirTemperature()) + "\"" + "\n" +
" }\n" +
" ]\n" +
" },\n" +
" {\n" +
" \"segs\": [\n" +
" {\n" +
- " \"content\": \"婀垮害锛�" + (data == null || data.getHumidity() == null ? " - " : data.getHumidity()) + "%\"" + "\n" +
+ " \"content\": \"婀垮害锛�" + (data == null || data.getAirHumidity() == null ? " - " : data.getAirHumidity()) + "\"" + "\n" +
" }\n" +
" ]\n" +
" },\n" +
" {\n" +
" \"segs\": [\n" +
" {\n" +
- " \"content\": \"pm25锛�" + (data == null || data.getPm25() == null ? " - " : data.getPm25()) + "渭g/m鲁\"" + "\n" +
+ " \"content\": \"pm25锛�" + (data == null || data.getPm2point5() == null ? " - " : data.getPm2point5()) + "\"" + "\n" +
" }\n" +
" ]\n" +
" },\n" +
" {\n" +
" \"segs\": [\n" +
" {\n" +
- " \"content\": \"pm10锛�" + (data == null || data.getPm10() == null ? " - " : data.getPm10()) + "渭g/m鲁\"" + "\n" +
+ " \"content\": \"pm10锛�" + (data == null || data.getPm10() == null ? " - " : data.getPm10()) + "\"" + "\n" +
" }\n" +
" ]\n" +
" },\n" +
" {\n" +
" \"segs\": [\n" +
" {\n" +
- " \"content\": \"鐢查啗锛�" + (data == null || data.getEch2o() == null ? " - " : data.getEch2o()) + "渭g/m鲁\"" + "\n" +
+ " \"content\": \"鍏夌収锛�" + (data == null || data.getIllumination() == null ? " - " : data.getIllumination()) + "\"" + "\n" +
" }\n" +
" ]\n" +
" },\n" +
" {\n" +
" \"segs\": [\n" +
" {\n" +
- " \"content\": \"CO2锛�" + (data == null || data.getCo2() == null ? " - " : data.getCo2()) + "ppm\"" + "\n" +
+ " \"content\": \"鍣煶锛�" + (data == null || data.getNoise() == null ? " - " : data.getNoise()) + "\"" + "\n" +
" }\n" +
" ]\n" +
" }\n" +
--
Gitblit v1.9.3