|
@@ -0,0 +1,474 @@
|
|
|
+package com.ruoyi.web.controller.system;
|
|
|
+
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.ruoyi.common.annotation.Log;
|
|
|
+import com.ruoyi.common.config.RuoYiConfig;
|
|
|
+import com.ruoyi.common.core.controller.BaseController;
|
|
|
+import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
+import com.ruoyi.common.core.domain.entity.SysDept;
|
|
|
+import com.ruoyi.common.core.domain.entity.SysDictData;
|
|
|
+import com.ruoyi.common.core.domain.entity.SysUser;
|
|
|
+import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
+import com.ruoyi.common.core.redis.RedisCache;
|
|
|
+import com.ruoyi.common.enums.BusinessType;
|
|
|
+import com.ruoyi.common.utils.DateUtils;
|
|
|
+import com.ruoyi.common.utils.JSUtils;
|
|
|
+import com.ruoyi.common.utils.OtherApiUtils;
|
|
|
+import com.ruoyi.common.utils.SecurityUtils;
|
|
|
+import com.ruoyi.common.utils.file.ImageUtils;
|
|
|
+import com.ruoyi.framework.web.service.PermissionService;
|
|
|
+import com.ruoyi.quartz.task.RyTask;
|
|
|
+import com.ruoyi.system.domain.*;
|
|
|
+import com.ruoyi.system.service.*;
|
|
|
+import org.apache.poi.ss.formula.functions.T;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.util.*;
|
|
|
+import java.util.concurrent.TimeUnit;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 工单任务Controller
|
|
|
+ *
|
|
|
+ * @author ruoyi
|
|
|
+ * @date 2022-05-25
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/system/screen")
|
|
|
+public class BigScreenController extends BaseController
|
|
|
+{
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITblTaskService tblTaskService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITblTaskLogService tblTaskLogService;
|
|
|
+
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITableDetectionService tableDetectionService;
|
|
|
+ @Autowired
|
|
|
+ private ITblDetectionLogService tblDetectionLogService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITblMaintainService tblMaintainService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITblMaintainLogService tblMaintainLogService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ISysUserService userService;
|
|
|
+ @Autowired
|
|
|
+ private RedisCache redisCache;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ISysDictDataService sysDictDataService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ISysDeptService deptService;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private OtherApiUtils otherApiUtils;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ @GetMapping("/weatherdata")
|
|
|
+ public Object getweatherdata(){
|
|
|
+ Object w = Getweather();
|
|
|
+ return AjaxResult.success(w);
|
|
|
+ }
|
|
|
+ @GetMapping("/renyuandata")
|
|
|
+ public Object getrenyuandata(){
|
|
|
+
|
|
|
+
|
|
|
+ //当前时间
|
|
|
+ String currentyearstart = DateUtils.parseDateToStr(DateUtils.YYYY,new Date())+"-01-01";
|
|
|
+ String currentyearend = DateUtils.parseDateToStr(DateUtils.YYYY,DateUtils.addYears(new Date(),1))+"-01-01";
|
|
|
+ String currentdaystart = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,new Date());
|
|
|
+ String currentdayend = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,DateUtils.addDays(new Date(),1));
|
|
|
+
|
|
|
+ //当天
|
|
|
+ TblTaskLog selectTaskLog = new TblTaskLog();
|
|
|
+ Map<String,Object> temp = new HashMap<>();
|
|
|
+ temp.put("beginTime",currentdaystart);
|
|
|
+ temp.put("endTime",currentdayend);
|
|
|
+ selectTaskLog.setParams(temp);
|
|
|
+ List<TblTaskLog> taskLogs = tblTaskLogService.selectTblTaskLogList(selectTaskLog);
|
|
|
+ List<TblTask> res = new ArrayList<>();
|
|
|
+ for (TblTaskLog tasklog:taskLogs
|
|
|
+ ) {
|
|
|
+ if(tasklog.getTaskStatus().longValue()==1L||tasklog.getTaskStatus().longValue()==2L) continue;
|
|
|
+ TblTask t = tblTaskService.selectTblTaskByTaskId(tasklog.getTaskId());
|
|
|
+ //获取人员信息
|
|
|
+ Map<String,Object> p = new HashMap<>();
|
|
|
+ if(tasklog.getCreateBy()!=null && tasklog.getCreateBy().contains("$")){
|
|
|
+ String cu = tasklog.getCreateBy();
|
|
|
+ String uname = cu.split("\\$")[0];
|
|
|
+ String uid = cu.split("\\$")[1];
|
|
|
+ SysUser u = userService.selectUserById(Long.parseLong(uid));
|
|
|
+ if(u!=null){
|
|
|
+ p.put("deptname",u.getDept().getDeptName());
|
|
|
+ p.put("username",u.getNickName());
|
|
|
+ }else{
|
|
|
+ p.put("deptname","-");
|
|
|
+ p.put("username",uname);
|
|
|
+ }
|
|
|
+
|
|
|
+ }else{
|
|
|
+ p.put("username",tasklog.getCreateBy()==null?"-":tasklog.getCreateBy());
|
|
|
+ p.put("deptname","-");
|
|
|
+ }
|
|
|
+ t.setParams(p);
|
|
|
+ res.add(t);
|
|
|
+ }
|
|
|
+ return AjaxResult.success(res);
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/yanghuyeardata")
|
|
|
+ public Object getyanghuyeardata(){
|
|
|
+ //当前时间
|
|
|
+ String currentyearstart = DateUtils.parseDateToStr(DateUtils.YYYY,new Date())+"-01-01";
|
|
|
+ String currentyearend = DateUtils.parseDateToStr(DateUtils.YYYY,DateUtils.addYears(new Date(),1))+"-01-01";
|
|
|
+ String currentdaystart = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,new Date());
|
|
|
+ String currentdayend = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,DateUtils.addDays(new Date(),1));
|
|
|
+
|
|
|
+ //养护
|
|
|
+ Map<String,Object> temp = new HashMap<>();
|
|
|
+ TblMaintain selectMaintain = new TblMaintain();
|
|
|
+ temp = new HashMap<>();
|
|
|
+ temp.put("beginTime",currentyearstart);
|
|
|
+ temp.put("endTime",currentyearend);
|
|
|
+ selectMaintain.setParams(temp);
|
|
|
+ List<TblMaintain> tblMaintains = tblMaintainService.selectTblMaintainList(selectMaintain);
|
|
|
+
|
|
|
+
|
|
|
+ //检测
|
|
|
+ temp = new HashMap<>();
|
|
|
+ TableDetection selectTableDetection = new TableDetection();
|
|
|
+ temp = new HashMap<>();
|
|
|
+ temp.put("beginTime",currentyearstart);
|
|
|
+ temp.put("endTime",currentyearend);
|
|
|
+ selectTableDetection.setParams(temp);
|
|
|
+ List<TableDetection> tableDetections = tableDetectionService.selectTableDetectionList(selectTableDetection);
|
|
|
+
|
|
|
+ SysDictData sysDictData = new SysDictData();
|
|
|
+ sysDictData.setDictType("maintain_type");
|
|
|
+ Map<Long,String> typemap=new HashMap<>();
|
|
|
+ List<SysDictData> list1 = sysDictDataService.selectDictDataList(sysDictData);
|
|
|
+ for (SysDictData d:list1
|
|
|
+ ) {
|
|
|
+ typemap.put(Long.parseLong(d.getDictValue()),d.getDictLabel());
|
|
|
+ }
|
|
|
+
|
|
|
+ SysDictData sysDictData1 = new SysDictData();
|
|
|
+ sysDictData1.setDictType("detection_type");
|
|
|
+ Map<Long,String> typemap1=new HashMap<>();
|
|
|
+ List<SysDictData> list2 = sysDictDataService.selectDictDataList(sysDictData1);
|
|
|
+ for (SysDictData d:list2
|
|
|
+ ) {
|
|
|
+ if(d.getDictValue().equals("2")||d.getDictValue().equals("3")||d.getDictValue().equals("5"))
|
|
|
+ typemap1.put(Long.parseLong(d.getDictValue()),d.getDictLabel());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ Map<String,List<Object>> res = new HashMap<>();
|
|
|
+ for (TblMaintain tblmain:tblMaintains
|
|
|
+ ) {
|
|
|
+ String typename = typemap.get(tblmain.getMaintainType());
|
|
|
+ if(typename!=null){
|
|
|
+ List<Object> maintains = res.get(typename);
|
|
|
+ if(maintains!=null){
|
|
|
+ maintains.add(tblmain);
|
|
|
+ }else{
|
|
|
+ maintains = new ArrayList<>();
|
|
|
+ maintains.add(tblmain);
|
|
|
+ }
|
|
|
+ res.put(typename,maintains);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+// Map<String,List<TblMaintain>> res = new HashMap<>();
|
|
|
+ for (TableDetection tblmain:tableDetections
|
|
|
+ ) {
|
|
|
+ String typename = typemap1.get(tblmain.getDetectionType());
|
|
|
+ if(typename!=null){
|
|
|
+ List<Object> maintains = res.get(typename);
|
|
|
+ if(maintains!=null){
|
|
|
+ maintains.add(tblmain);
|
|
|
+ }else{
|
|
|
+ maintains = new ArrayList<>();
|
|
|
+ maintains.add(tblmain);
|
|
|
+ }
|
|
|
+ res.put(typename,maintains);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for(String c :typemap.values()){
|
|
|
+ if(res.get(c)==null){
|
|
|
+ res.put(c,new ArrayList<>());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for(String c :typemap1.values()){
|
|
|
+ if(res.get(c)==null){
|
|
|
+ res.put(c,new ArrayList<>());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return AjaxResult.success(res);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @GetMapping("/tongjidata")
|
|
|
+ public Object gettongjidata(){
|
|
|
+
|
|
|
+
|
|
|
+ //当前时间
|
|
|
+ String currentyearstart = DateUtils.parseDateToStr(DateUtils.YYYY,new Date())+"-01-01";
|
|
|
+ String currentyearend = DateUtils.parseDateToStr(DateUtils.YYYY,DateUtils.addYears(new Date(),1))+"-01-01";
|
|
|
+ String currentdaystart = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,new Date());
|
|
|
+ String currentdayend = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,DateUtils.addDays(new Date(),1));
|
|
|
+
|
|
|
+ Map<String,Object> res = new HashMap<>();
|
|
|
+
|
|
|
+ //养护
|
|
|
+ Map<String,Object> temp = new HashMap<>();
|
|
|
+ TblMaintain selectMaintain = new TblMaintain();
|
|
|
+ temp = new HashMap<>();
|
|
|
+ temp.put("beginTime",currentyearstart);
|
|
|
+ temp.put("endTime",currentyearend);
|
|
|
+ selectMaintain.setParams(temp);
|
|
|
+ List<TblMaintain> tblMaintains = tblMaintainService.selectTblMaintainList(selectMaintain);
|
|
|
+ res.put("maintain",tblMaintains);
|
|
|
+
|
|
|
+ //检测
|
|
|
+ temp = new HashMap<>();
|
|
|
+ TableDetection selectTableDetection = new TableDetection();
|
|
|
+ temp = new HashMap<>();
|
|
|
+ temp.put("beginTime",currentyearstart);
|
|
|
+ temp.put("endTime",currentyearend);
|
|
|
+ selectTableDetection.setParams(temp);
|
|
|
+ List<TableDetection> tableDetections = tableDetectionService.selectTableDetectionList(selectTableDetection);
|
|
|
+ res.put("detection",tableDetections);
|
|
|
+
|
|
|
+
|
|
|
+ //任务
|
|
|
+ //工单
|
|
|
+ TblTask selectTask = new TblTask();
|
|
|
+ temp = new HashMap<>();
|
|
|
+ temp.put("beginTime",currentyearstart);
|
|
|
+ temp.put("endTime",currentyearend);
|
|
|
+ selectTask.setParams(temp);
|
|
|
+ List<TblTask> tasks = tblTaskService.selectTblTaskList(selectTask);
|
|
|
+ res.put("task",tasks);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ {
|
|
|
+
|
|
|
+ SysDictData sysDictData = new SysDictData();
|
|
|
+ sysDictData.setDictType("task_type");
|
|
|
+ List<SysDictData> list1 = sysDictDataService.selectDictDataList(sysDictData);
|
|
|
+ Map<Long,String> typemap = new HashMap<>();
|
|
|
+ for (SysDictData d:list1
|
|
|
+ ) {
|
|
|
+ typemap.put(Long.parseLong(d.getDictValue()),d.getDictLabel());
|
|
|
+ }
|
|
|
+
|
|
|
+ sysDictData = new SysDictData();
|
|
|
+ sysDictData.setDictType("sys_area");
|
|
|
+ list1 = sysDictDataService.selectDictDataList(sysDictData);
|
|
|
+ Map<String,String> areamap = new HashMap<>();
|
|
|
+ for (SysDictData d:list1
|
|
|
+ ) {
|
|
|
+ areamap.put(d.getDictValue(),d.getDictLabel());
|
|
|
+ }
|
|
|
+
|
|
|
+ sysDictData = new SysDictData();
|
|
|
+ sysDictData.setDictType("task_event_type");
|
|
|
+ list1 = sysDictDataService.selectDictDataList(sysDictData);
|
|
|
+ Map<String,String> taskeventtype = new HashMap<>();
|
|
|
+ for (SysDictData d:list1
|
|
|
+ ) {
|
|
|
+ taskeventtype.put(d.getDictValue(),d.getDictLabel());
|
|
|
+ }
|
|
|
+
|
|
|
+ List<SysUser> users = userService.selectUserList(new SysUser());
|
|
|
+ Map<Long,SysUser> usermap = new HashMap<>();
|
|
|
+ for (SysUser d:users
|
|
|
+ ) {
|
|
|
+ usermap.put(d.getUserId(),d);
|
|
|
+ }
|
|
|
+
|
|
|
+ List<SysDept> depts = deptService.selectDeptList(new SysDept());
|
|
|
+ Map<Long,SysDept> deptmap = new HashMap<>();
|
|
|
+ for (SysDept d:depts
|
|
|
+ ) {
|
|
|
+ deptmap.put(d.getDeptId(),d);
|
|
|
+ }
|
|
|
+ for (TblTask task:tasks
|
|
|
+ ) {
|
|
|
+ Map<Long,TblTaskLog> logs = new HashMap<>();
|
|
|
+ for (TblTaskLog l:task.getTblTaskLogList()
|
|
|
+ ) {
|
|
|
+ if(logs.get(l.getTaskStatus())!=null){
|
|
|
+ TblTaskLog log = logs.get(l.getTaskStatus());
|
|
|
+ if(log.getCreateTime().getTime()<l.getCreateTime().getTime()) {
|
|
|
+ logs.put(l.getTaskStatus(), l);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ logs.put(l.getTaskStatus(),l);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<TblTaskLog> loglist = new ArrayList<>();
|
|
|
+ loglist.addAll(logs.values());
|
|
|
+ task.setTblTaskLogList(loglist);
|
|
|
+
|
|
|
+ Map<Long,TblTaskLog> logmap = new HashMap<>();
|
|
|
+ for (TblTaskLog d:task.getTblTaskLogList()
|
|
|
+ ) {
|
|
|
+ logmap.put(d.getTaskStatus(),d);
|
|
|
+ }
|
|
|
+
|
|
|
+ String commjs = "function run(){"+ "var allusers="+JSON.toJSONString(users)+";";
|
|
|
+ commjs+="var alldept = "+JSON.toJSONString(depts)+";";
|
|
|
+ commjs+="var taskinfo = "+JSON.toJSONString(task)+";";
|
|
|
+
|
|
|
+
|
|
|
+ String deptn = "";
|
|
|
+ if(task.getTaskDeptRange()!=null) {
|
|
|
+ for (SysDept d : depts
|
|
|
+ ) {
|
|
|
+ for (String i : task.getTaskDeptRange().split(",")
|
|
|
+ ) {
|
|
|
+ if ((d.getDeptId().toString()).equals(i)) {
|
|
|
+ deptn += d.getDeptName() + ",";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ deptn = deptn.substring(0,deptn.length()-1);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ String runjs = commjs+"return JSON.parse(\n" +
|
|
|
+ " taskinfo.tblTaskLogList.filter(\n" +
|
|
|
+ " function(ii) { return ii.taskStatus === 3}\n" +
|
|
|
+ " )[0].logDes\n" +
|
|
|
+ " ).gzldata[0].value1 }";
|
|
|
+ Object xchs = JSUtils.runjs(runjs);
|
|
|
+
|
|
|
+ runjs = commjs+"return JSON.parse(\n" +
|
|
|
+ " taskinfo.tblTaskLogList.filter(\n" +
|
|
|
+ " function(ii) { return ii.taskStatus === 3}\n" +
|
|
|
+ " )[0].logDes\n" +
|
|
|
+ " ).czff }";
|
|
|
+ Object czff = JSUtils.runjs(runjs);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ String datap = "<table class='maptable'><tr><td>事件分类:</td><td>"+(task.getTaskType()==null?"-": typemap.get(task.getTaskType())) + "</td></tr>";
|
|
|
+ datap+="<tr><td>区域:</td><td>"+areamap.get(task.getTaskArea())+ "</td></tr>";
|
|
|
+ datap+="<tr><td>班组:</td><td>"+deptn+ "</td></tr>";
|
|
|
+ datap+="<tr><td>日期:</td><td>"+(task.getTaskTime()==null?"-": DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",task.getTaskTime()) )+ "</td></tr>";
|
|
|
+ datap+="<tr><td>工单号:</td><td>"+(task.getTaskCode()==null?"-": task.getTaskCode())+ "</td></tr>";
|
|
|
+ datap+="<tr><td>事件地址:</td><td>"+(task.getTaskAddr()==null?"-": task.getTaskAddr())+ "</td></tr>";
|
|
|
+ datap+="<tr><td>事件内容:</td><td>"+(task.getTaskContent()==null?"-": task.getTaskContent())+ "</td></tr>";
|
|
|
+ datap+="<tr><td>事件类型:</td><td>"+(task.getTaskEventType()==null?"-": taskeventtype.get(task.getTaskEventType()+""))+ "</td></tr>";
|
|
|
+ datap+="<tr><td>现场核实:</td><td>"+(xchs==null?"-": xchs.toString() )+ "</td></tr>";
|
|
|
+ datap+="<tr><td>处理方法:</td><td>"+(czff==null?"-": czff.toString() )+ "</td></tr></table>";;
|
|
|
+
|
|
|
+ Map<String,Object> tt = new HashMap<>();
|
|
|
+ tt.put("data",datap);
|
|
|
+ task.setParams(tt);
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ return AjaxResult.success(res);
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/data")
|
|
|
+ public Object getdata(TblTask tblTask)
|
|
|
+ {
|
|
|
+ Map<String,Object> data = new HashMap<>();
|
|
|
+// 5.1 在线单元/组,统计今日人员动态数量;
|
|
|
+// 5.2 统计今日新增热线工单数量;
|
|
|
+// 5.3 今日养护设施km (只查主管养护)
|
|
|
+// 5.4 今日核查设备km (检测)
|
|
|
+//
|
|
|
+
|
|
|
+
|
|
|
+ //当前时间
|
|
|
+ String currentyearstart = DateUtils.parseDateToStr(DateUtils.YYYY,new Date())+"-01-01";
|
|
|
+ String currentyearend = DateUtils.parseDateToStr(DateUtils.YYYY,DateUtils.addYears(new Date(),1))+"-01-01";
|
|
|
+ String currentdaystart = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,new Date());
|
|
|
+ String currentdayend = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,DateUtils.addDays(new Date(),1));
|
|
|
+
|
|
|
+ //当天
|
|
|
+ TblTaskLog selectTaskLog = new TblTaskLog();
|
|
|
+ Map<String,Object> temp = new HashMap<>();
|
|
|
+ temp.put("beginTime",currentdaystart);
|
|
|
+ temp.put("endTime",currentdayend);
|
|
|
+ selectTaskLog.setParams(temp);
|
|
|
+ List<TblTaskLog> taskLogs = tblTaskLogService.selectTblTaskLogList(selectTaskLog);
|
|
|
+ data.put("tasklog",taskLogs);
|
|
|
+
|
|
|
+ //年度
|
|
|
+ //工单
|
|
|
+ TblTask selectTask = new TblTask();
|
|
|
+ temp = new HashMap<>();
|
|
|
+ temp.put("beginTime",currentdaystart);
|
|
|
+ temp.put("endTime",currentdayend);
|
|
|
+ selectTask.setParams(temp);
|
|
|
+ List<TblTask> tasks = tblTaskService.selectTblTaskList(selectTask);
|
|
|
+ data.put("tasks",tasks);
|
|
|
+
|
|
|
+
|
|
|
+ //养护
|
|
|
+
|
|
|
+ TblMaintainLog maintainLog = new TblMaintainLog();
|
|
|
+ temp = new HashMap<>();
|
|
|
+ temp.put("datetime",currentdaystart);
|
|
|
+ maintainLog.setParams(temp);
|
|
|
+ List<TblMaintainLog> tblMaintainLogs = tblMaintainLogService.selectTblMaintainLogToday(maintainLog);
|
|
|
+ data.put("maintain",tblMaintainLogs);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //检测
|
|
|
+ TblDetectionLog detectionLog = new TblDetectionLog();
|
|
|
+ temp = new HashMap<>();
|
|
|
+ temp.put("datetime",currentdaystart);
|
|
|
+ detectionLog.setParams(temp);
|
|
|
+ List<TblDetectionLog> detectionLogs = tblDetectionLogService.selectTblDetectionLogToday(detectionLog);
|
|
|
+ data.put("detection",detectionLogs);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ return AjaxResult.success(data);
|
|
|
+ }
|
|
|
+
|
|
|
+ private Object Getweather(){
|
|
|
+ Object w = redisCache.getCacheObject("weather");
|
|
|
+ if(w==null){
|
|
|
+ Object res = otherApiUtils.getweather();
|
|
|
+ DateUtils.addDays(new Date(),1).getTime();
|
|
|
+ long time = DateUtils.dateTime(DateUtils.YYYY_MM_DD,DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,DateUtils.addDays(new Date(),1))).getTime()- (new Date()).getTime();
|
|
|
+ redisCache.setCacheObject("weather",res,(int)(time/1000),TimeUnit.SECONDS);
|
|
|
+ w = res;
|
|
|
+ }
|
|
|
+ return w;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|