| | |
| | | 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; |
| | | |
| | | /** |
| | |
| | | |
| | | @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); |
| | | } |
| | | |
| | | } |