From d0b261f701c86f55dd04365c620fb6f79cbe5c62 Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Thu, 20 Jun 2024 13:11:12 +0800
Subject: [PATCH] fix:盐城热力图接口修改提交

---
 screen-api/src/main/java/com/moral/api/controller/HeatMapController.java |   26 +++++++++++++++++---------
 1 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/screen-api/src/main/java/com/moral/api/controller/HeatMapController.java b/screen-api/src/main/java/com/moral/api/controller/HeatMapController.java
index 07de00c..b4a6da2 100644
--- a/screen-api/src/main/java/com/moral/api/controller/HeatMapController.java
+++ b/screen-api/src/main/java/com/moral/api/controller/HeatMapController.java
@@ -7,16 +7,14 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.ObjectUtils;
 import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-
+import java.util.List;
+import com.moral.api.pojo.dto.dataDisplay.HeatMapDTO;
 import com.moral.api.service.DataDisplayService;
+import com.moral.api.utils.HeatMapTimeUtils;
+import com.moral.api.vo.HeatMapVo;
 import com.moral.constant.ResultMessage;
 
 /**
@@ -39,11 +37,21 @@
 
      @GetMapping("query")
      @ApiOperation("���������������")
-     public ResultMessage  getHeatMap(@RequestParam @ApiParam(value = "code",name = "���������") String code,
+     public ResultMessage  getHeatMap(@RequestParam @ApiParam(value = "organizationId",name = "������id") Integer id,
                                       @RequestParam @ApiParam(value = "startTime",name = "������������") String startTime,
                                       @RequestParam @ApiParam(value = "type",name= "������������") String type,
-                                      @RequestParam @ApiParam(value = "form",name= "������������") String form){
-         ArrayList<Map<String, Object>> heatMapData = dataDisplayService.getHeatMapData(code, startTime, type, form);
+                                      @RequestParam @ApiParam(value = "form",name= "������������") String form,
+                                      @RequestParam @ApiParam(value = "monitorId",name= "������id") Integer monitorId){
+         List<HeatMapDTO> heatMapData = dataDisplayService.getHeatMapDataV2(id, startTime, type, form,monitorId);
          return ResultMessage.ok(ObjectUtils.isEmpty(heatMapData)?"0":heatMapData);
      }
+    @GetMapping("queryTime")
+    @ApiOperation("������������")
+    public ResultMessage  getHeatMap(@RequestParam @ApiParam(value = "startTime",name = "������������") String startTime,
+                                     @RequestParam @ApiParam(value = "endTime",name= "������������") String endTime,
+                                     @RequestParam @ApiParam(value = "type",name= "������������") String type){
+        List<HeatMapVo> heatMapVos = HeatMapTimeUtils.getTime(startTime, endTime, type);
+        return ResultMessage.ok(ObjectUtils.isEmpty(heatMapVos)?"0":heatMapVos);
+    }
+
 }

--
Gitblit v1.8.0