package com.zoniot.ccrc.controller; import com.alibaba.fastjson.JSON; import com.zoniot.ccrc.commom.model.AjaxMessage; import com.zoniot.ccrc.commom.model.ResultStatus; import com.zoniot.ccrc.dto.MapStatisticalDto; import com.zoniot.ccrc.service.StatAndAnalysisService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.text.ParseException; import java.util.ArrayList; import java.util.List; /** * @author wilian.peng */ @Api(tags = "物联云实时监测") @RestController @RequestMapping("/monitor/") public class RealTimeMonitorController { @Autowired StatAndAnalysisService statAndAnalysisService; /** * 地图统计查询 * * @throws ParseException */ @GetMapping("/mapStatistical/") @ApiOperation(value = "实时监控地图统计查询") public AjaxMessage> mapStatistical( @ApiParam(value = "系统id", required = false) @RequestParam(required = false) Integer sysId, @ApiParam(value = "类型 1:省 2:市 3:区 4:小区 ", required = false, defaultValue = "0") @RequestParam(required = false, defaultValue = "0") Integer type, @ApiParam(value = "northEast坐标", required = false) @RequestParam(required = false) String northEast, @ApiParam(value = "southWest坐标", required = false) @RequestParam(required = false) String southWest, @ApiParam(value = "省", required = false) @RequestParam(required = false) Integer province, @ApiParam(value = "市", required = false) @RequestParam(required = false) Integer city, @ApiParam(value = "区", required = false) @RequestParam(required = false) Integer region, @ApiParam(value = "小区", required = false) @RequestParam(required = false) Integer community ) { AjaxMessage> returnMsg = new AjaxMessage>(); List list = statAndAnalysisService.realTimeMapStatistical(sysId, type, northEast, southWest, province, city, region, community); returnMsg.setMsg(ResultStatus.OK, list); return returnMsg; } }