From 3d665d84b1a4ffd6749ca9354247838ce0622f4b Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Tue, 13 Dec 2022 13:47:53 +0800
Subject: [PATCH] 修改sql语句问题
---
screen-job/src/main/java/com/moral/api/task/InformationTask.java | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/screen-job/src/main/java/com/moral/api/task/InformationTask.java b/screen-job/src/main/java/com/moral/api/task/InformationTask.java
index e9d5b56..62d9d0a 100644
--- a/screen-job/src/main/java/com/moral/api/task/InformationTask.java
+++ b/screen-job/src/main/java/com/moral/api/task/InformationTask.java
@@ -6,6 +6,7 @@
import com.moral.api.entity.*;
import com.moral.api.service.*;
import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -45,7 +46,8 @@
private InformationService informationService;
@XxlJob("informationInsert")
- public ReturnT informationInsert(String params){
+ public ReturnT informationInsert(){
+ String params = XxlJobHelper.getJobParam();
Map organizationIdMap = JSON.parseObject(params);
List<Integer> orgIdList = (List<Integer>) organizationIdMap.get("orgId");
Calendar nowCalendar = Calendar.getInstance();
@@ -84,7 +86,7 @@
HistoryAqi beforeHistoryAqi = new HistoryAqi();
beforeHistoryAqi = historyAqiService.getHistoryApiByTimeAndGuid(guid,beforeTime);
if (!ObjectUtils.isEmpty(beforeHistoryAqi)){
- String value = beforeHistoryAqi.getValue();
+ String value = beforeHistoryAqi.getJson();
if (!ObjectUtils.isEmpty(value)){
JSONObject jsonObject = new JSONObject();
jsonObject = JSONObject.parseObject(value);
@@ -102,7 +104,7 @@
HistoryAqi nowHistoryAqi = new HistoryAqi();
nowHistoryAqi = historyAqiService.getHistoryApiByTimeAndGuid(guid,nowTime);
if (!ObjectUtils.isEmpty(nowHistoryAqi)){
- String value = nowHistoryAqi.getValue();
+ String value = nowHistoryAqi.getJson();
if (!ObjectUtils.isEmpty(value)){
JSONObject jsonObject = JSONObject.parseObject(value);
if (!ObjectUtils.isEmpty(jsonObject.get("pm2_5"))){
@@ -157,7 +159,7 @@
TVOCListNow.add(Double.parseDouble(jsonObject.get("a99054").toString()));
}
List<HistoryHourly> historyHourliesBefore = new ArrayList<>();
- historyHourliesBefore = historyHourlyService.getValueByMacAndTime("p5dnd7a0392252", df1.parse(beforeTime), df1.parse(df.format(beforeCalendar.getTime()) + ":00:01"));
+ historyHourliesBefore = historyHourlyService.getValueByMacAndTime(mac, df1.parse(beforeTime), df1.parse(df.format(beforeCalendar.getTime()) + ":00:01"));
if (!ObjectUtils.isEmpty(historyHourliesBefore) && historyHourliesBefore.size()>0){
String value = historyHourliesBefore.get(0).getValue();
JSONObject jsonObject = JSONObject.parseObject(value);
--
Gitblit v1.8.0