|  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | 
|---|
|  |  |  | 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(); | 
|---|
|  |  |  | 
|---|
|  |  |  | 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); | 
|---|