From fdbef2a3293e536be6b119e4e1e67cc8cc9842f0 Mon Sep 17 00:00:00 2001 From: jinpengyong <jpy123456> Date: Fri, 08 Apr 2022 08:55:29 +0800 Subject: [PATCH] 空气质量排名报告 --- screen-job/src/main/java/com/moral/api/task/InformationTask.java | 6 ++++-- 1 files changed, 4 insertions(+), 2 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..cab0ba1 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(); @@ -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