cjl
2023-08-21 e7bf42e89698df36cb05ae4ba01fa38cc7016d81
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);