diff --git a/src/main/java/com/hisense/monitormanage/controller/Controller.java b/src/main/java/com/hisense/monitormanage/controller/Controller.java index d77d86f..931651e 100644 --- a/src/main/java/com/hisense/monitormanage/controller/Controller.java +++ b/src/main/java/com/hisense/monitormanage/controller/Controller.java @@ -14,6 +14,8 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import java.time.Clock; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -86,50 +88,6 @@ public class Controller { return "startScenic finish"; } - //根据用户已输入的文字请求输入建议信息 - //text:用户输入的文字信息,必填 - //maxSuggestions:最大建议数量,0~10,默认2 - @RequestMapping("suggest") - public Result suggest( - @RequestParam(value ="text") String text, - @RequestParam(value = "maxSuggestions",required = false,defaultValue = "2") Integer maxSuggestions - ){ - Map map = new HashMap<>(); - map.put("text",text); - map.put("maxSuggestions",maxSuggestions); - return monitorService.suggest(map); - } - - //根据用户已输入的文字请求匹配的地址信息 - //singleLine:用户输入的文字性地名地址信息,必填 - //maxSuggestions:最大建议数量,0~10,默认2 - //magicKey:地名地址唯一ID,Suggest操作返回的JSON数组中包含的magicKey - //outSR:坐标系信息,包含"wkid"属性,是表示空间参考的ID,示例:{ "wkid":4490 } - @RequestMapping("geocode") - public Result geocode( - @RequestParam(value="singleLine") String singleLine, - @RequestParam(value = "maxSuggestions",required = false,defaultValue = "2") Integer maxSuggestions, - @RequestParam(value = "magicKey",required = false,defaultValue = "") String magicKey, - @RequestParam(value = "outSR",required = false,defaultValue = "") String outSR - ){ - Map map = new HashMap<>(); - map.put("SingleLine",singleLine); - map.put("maxSuggestions",maxSuggestions); - map.put("magicKey",magicKey); - map.put("outSR",outSR); - return monitorService.geocode(map); - } - - //根据用户已输入的坐标请求附近的地址信息 - //location:坐标,必填,请注意编码,示例:{"x":120.40632244540544,"y":36.08136665300961,"spatialReference":{"wkid":4490,"latestWkid":4490}} - @RequestMapping("reverseGeocode") - public Result reverseGeocode( - @RequestParam(value="location") String location - ){ - Map map = new HashMap<>(); - map.put("location",location); - return monitorService.reverseGeocode(map); - } /** * 查询摄像头 @@ -182,4 +140,84 @@ public class Controller { return success; } + + //查询视频点播巡检结果,只取异常的 + @RequestMapping("listChannelPlayStates") + public Result listChannelPlayStates( + @RequestParam(value="page",required = false,defaultValue = "1") Integer page, + @RequestParam(value="pageSize",required = false,defaultValue = "20") String pageSize + ){ + Map condition = new HashMap<>(); + LocalDateTime localDateTime = LocalDateTime.now(Clock.systemUTC()); + + LocalDateTime startTime = localDateTime.minusDays(7); + condition.put("checkStatus",0); + condition.put("startTime",startTime.toString()); + condition.put("endTime",localDateTime.toString()); + + Map map = new HashMap<>(); + map.put("condition",condition); + map.put("page",page); + map.put("pageSize",pageSize); + monitorService.listChannelPlayStates(map); + return null; + } + + //道路统计数据与排名 + @RequestMapping("roadData") + public List roadData( + @RequestParam(value="groupId") String groupId, + @RequestParam(value="timeType") String timeType, + @RequestParam(value="dt") String dt + ){ + Map map = new HashMap<>(); + map.put("groupId",groupId); + map.put("timeType",timeType); + map.put("dt",dt); + return monitorService.roadData(map); + } + //启迪中台 + //登录 + @RequestMapping("qidiToken") + public String qidiToken(){ + return monitorService.qidiToken(); + } + + //渣土车轨迹数据 + @RequestMapping("resCatalogApplyZTYS") + public List resCatalogApply(){ + return monitorService.resCatalogApplyZTYS(); + } + + //环卫车轨迹数据 + @RequestMapping("resCatalogApplyHJWS") + public List resCatalogApplyHJWS(){ + return monitorService.resCatalogApplyHJWS(); + } + + //工地信息 + @RequestMapping("resCatalogApplyGDYS") + public List resCatalogApplyGDYS(){ + return monitorService.resCatalogApplyGDYS(); + } + + //环卫车辆数据1,基础 + @RequestMapping("resCatalogApplyHJWSBase") + public List resCatalogApplyHJWSBase(){ + return monitorService.resCatalogApplyHJWSBase(); + } + //环卫车辆数据1,作业 + @RequestMapping("resCatalogApplyHJWSZY") + public List resCatalogApplyHJWSZY(){ + return monitorService.resCatalogApplyHJWSZY(); + } + + //环卫道路明细数据 + @RequestMapping("resCatalogApplyHJWSRoad") + public List resCatalogApplyHJWSRoad(){ + return monitorService.resCatalogApplyHJWSRoad(); + } + + + } diff --git a/src/main/java/com/hisense/monitormanage/mapper/CameraChannelMapper.java b/src/main/java/com/hisense/monitormanage/mapper/CameraChannelMapper.java index bf392d9..dd45f33 100644 --- a/src/main/java/com/hisense/monitormanage/mapper/CameraChannelMapper.java +++ b/src/main/java/com/hisense/monitormanage/mapper/CameraChannelMapper.java @@ -7,6 +7,7 @@ import com.hisense.monitormanage.entity.CameraChannel; import com.hisense.monitormanage.entity.Label; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.Update; import java.util.List; @@ -21,6 +22,8 @@ public interface CameraChannelMapper extends BaseMapper { @Select("select * from (select a.*,c.* from t_channel_mtm_label b JOIN t_label a JOIN t_camera_channel c " + "ON a.label_code = b.label_code AND b.channel_code = c.channel_code ) m where m.label_code = #{labelCode} ") List selectLabel(@Param("labelCode") String labelCode); + //@Update("update t_camera_channel set state = list") + void updateState(@Param("list") List list); @Select("select * from t_label") List