From 0476c982d3dd4748ce0267856425c28fcb143b6f Mon Sep 17 00:00:00 2001 From: cjl <909710561@qq.com> Date: Thu, 28 Mar 2024 16:13:02 +0800 Subject: [PATCH] fix:补充提交 --- screen-api/src/main/java/com/moral/api/controller/HeatMapController.java | 23 +++++++++++++++-------- 1 files changed, 15 insertions(+), 8 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..7ca6485 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,20 @@ @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); + List<HeatMapDTO> heatMapData = dataDisplayService.getHeatMapDataV2(id, startTime, type, form); 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