This commit is contained in:
wuweida 2022-05-17 13:40:02 +08:00
parent 034a99ba94
commit 0f9588aa4c
1 changed files with 71 additions and 44 deletions

View File

@ -5,7 +5,12 @@ import com.hisense.monitormanage.dto.*;
import com.hisense.monitormanage.entity.*; import com.hisense.monitormanage.entity.*;
import com.hisense.monitormanage.mapper.*; import com.hisense.monitormanage.mapper.*;
import com.hisense.monitormanage.service.*; import com.hisense.monitormanage.service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@ -15,6 +20,7 @@ import java.util.Map;
@RestController @RestController
@RequestMapping("api/project") @RequestMapping("api/project")
@Api(tags="通用")
public class Controller { public class Controller {
@Autowired @Autowired
@ -259,27 +265,7 @@ public class Controller {
return success; return success;
} }
/**
* 订阅任务下发接口
* @return
*/
@RequestMapping("subscribe")
public JSONObject subscribe(){
return monitorService.subscribe();
}
/**
* 事件模板分页查询接口
* @return
*/
@RequestMapping("tamplate")
public JSONObject tamplate(){
return monitorService.template();
}
//查询视频点播巡检结果只取异常的 //查询视频点播巡检结果只取异常的
// @RequestMapping("listChannelPlayStates") // @RequestMapping("listChannelPlayStates")
// public Result listChannelPlayStates( // public Result listChannelPlayStates(
@ -290,55 +276,64 @@ public class Controller {
// } // }
//道路统计数据与排名 //道路统计数据与排名
@RequestMapping("roadData") @GetMapping("roadData")
@ApiOperation("道路统计数据与排名根据后台dt调用接口")
public List<Map> roadData(){ public List<Map> roadData(){
return monitorService.roadData(); return monitorService.roadData();
} }
//启迪中台 //启迪中台
//登录 //登录
@RequestMapping("qidiToken") @GetMapping("qidiToken")
@ApiOperation("启迪数据中台登录获取token")
public String qidiToken(){ public String qidiToken(){
return monitorService.qidiToken(); return monitorService.qidiToken();
} }
//渣土车轨迹数据 //渣土车轨迹数据
@RequestMapping("resCatalogApplyZTYS") @GetMapping("resCatalogApplyZTYS")
@ApiOperation("获取渣土车轨迹数据,根据后台UPLOADTIME调用接口")
public List<Map> resCatalogApply(){ public List<Map> resCatalogApply(){
return monitorService.resCatalogApplyZTYS(); return monitorService.resCatalogApplyZTYS();
} }
//环卫车轨迹数据 //环卫车轨迹数据
@RequestMapping("resCatalogApplyHJWS") @GetMapping("resCatalogApplyHJWS")
@ApiOperation("环卫车轨迹数据根据后台updatetime调用接口")
public List<Map> resCatalogApplyHJWS(){ public List<Map> resCatalogApplyHJWS(){
return monitorService.resCatalogApplyHJWS(); return monitorService.resCatalogApplyHJWS();
} }
//工地信息 //工地信息
@RequestMapping("resCatalogApplyGDYS") @GetMapping("resCatalogApplyGDYS")
@ApiOperation("获取工地信息-表中获取")
public List<Map> resCatalogApplyGDYS(){ public List<Map> resCatalogApplyGDYS(){
return monitorService.resCatalogApplyGDYS(); return monitorService.resCatalogApplyGDYS();
} }
//环卫车辆数据1基础 //环卫车辆数据1基础
@RequestMapping("resCatalogApplyHJWSBase") @GetMapping("resCatalogApplyHJWSBase")
@ApiOperation("环卫车辆数据1,基础--根据后台updatetime调用接口")
public List<Map> resCatalogApplyHJWSBase(){ public List<Map> resCatalogApplyHJWSBase(){
return monitorService.resCatalogApplyHJWSBase(); return monitorService.resCatalogApplyHJWSBase();
} }
//环卫车辆数据1作业 //环卫车辆数据1作业
@RequestMapping("resCatalogApplyHJWSZY") @GetMapping("resCatalogApplyHJWSZY")
@ApiOperation("环卫车辆数据1作业--根据后台ZYRQ调用接口")
public List<Map> resCatalogApplyHJWSZY(){ public List<Map> resCatalogApplyHJWSZY(){
return monitorService.resCatalogApplyHJWSZY(); return monitorService.resCatalogApplyHJWSZY();
} }
//环卫道路明细数据 //环卫道路明细数据
@RequestMapping("resCatalogApplyHJWSRoad") @GetMapping("resCatalogApplyHJWSRoad")
@ApiOperation("环卫道路明细数据,根据后台updatetime调用接口")
public List<Map> resCatalogApplyHJWSRoad(){ public List<Map> resCatalogApplyHJWSRoad(){
return monitorService.resCatalogApplyHJWSRoad(); return monitorService.resCatalogApplyHJWSRoad();
} }
//获取渣土车轨迹并保存到t_trail_sediment //获取渣土车轨迹并保存到t_trail_sediment
@RequestMapping(value = "saveResCatalogApplyZTYS") @GetMapping(value = "saveResCatalogApplyZTYS")
@ApiOperation("取渣土车轨迹并保存到t_trail_sediment根据后台UPLOADTIME调用接口")
public Result resCatalogApplyZTYS(){ public Result resCatalogApplyZTYS(){
boolean result = sedimentTrailService.batchSaveSedimentTrail(); boolean result = sedimentTrailService.batchSaveSedimentTrail();
@ -350,7 +345,15 @@ public class Controller {
} }
//根据输入的经纬度和查询的半径时间查询范围内的渣土车轨迹信息 //根据输入的经纬度和查询的半径时间查询范围内的渣土车轨迹信息
@RequestMapping(value = "listSedimentTrailByPoints") @GetMapping(value = "listSedimentTrailByPoints")
@ApiOperation("渣土车轨迹信息,根据经纬度和半径从表中查询")
@ApiImplicitParams({
@ApiImplicitParam(name = "longitude", value = "经度", paramType = "query",required = true,dataType ="double"),
@ApiImplicitParam(name = "latitude", value = "纬度", paramType = "query",required = true,dataType ="double"),
@ApiImplicitParam(name = "raidus", value = "半径,米", paramType = "query",required = true,dataType ="Integer"),
@ApiImplicitParam(name = "start", value = "开始时间2021-08-03 10:17:23", paramType = "query",required = true,dataType ="string"),
@ApiImplicitParam(name = "end", value = "结束时间2021-08-03 12:17:23", paramType = "query",required = true,dataType ="string")
})
public Result listSedimentTrailByPoints( public Result listSedimentTrailByPoints(
@RequestParam(value="longitude") double longitude, @RequestParam(value="longitude") double longitude,
@RequestParam(value="latitude") double latitude, @RequestParam(value="latitude") double latitude,
@ -358,27 +361,29 @@ public class Controller {
@RequestParam(value="start") String start, @RequestParam(value="start") String start,
@RequestParam(value = "end") String end @RequestParam(value = "end") String end
){ ){
System.out.println("listSedimentTrailByPoints......");
Map<String,List<SedimentTrail>> map = sedimentTrailService.listSedimentTrailByPoints(longitude,latitude,raidus,start,end); Map<String,List<SedimentTrail>> map = sedimentTrailService.listSedimentTrailByPoints(longitude,latitude,raidus,start,end);
return Result.success(map); return Result.success(map);
} }
@RequestMapping("passengerFlow")
//测试获取最新的客流列表从接口获取 //测试获取最新的客流列表从接口获取
@GetMapping("passengerFlow")
@ApiOperation("获取最新的客流列表,测试接口,调用接口获取")
public List<Map> passengerFlow(){ public List<Map> passengerFlow(){
List<Map> list = passengerFlowService.passengerFlow(); List<Map> list = passengerFlowService.passengerFlow();
return list; return list;
} }
//获取最新的实时客流列表从表获取 //获取最新的实时客流列表从表获取
@RequestMapping("listPassengerFlow") @GetMapping("listPassengerFlow")
@ApiOperation("获取最新的实时客流列表,从表获取,热力图")
public List<PassengerFlow> listPassengerFlow(){ public List<PassengerFlow> listPassengerFlow(){
List<PassengerFlow> list = passengerFlowService.listPassengerFlow(); List<PassengerFlow> list = passengerFlowService.listPassengerFlow();
return list; return list;
} }
//获取实时客流并保存到表t_passenger_flow //获取实时客流并保存到表t_passenger_flow
@RequestMapping("savePassengerFlow") @GetMapping("savePassengerFlow")
@ApiOperation("获取实时客流并保存到表t_passenger_flow,调用接口")
public Result savePassengerFlow(){ public Result savePassengerFlow(){
List<Map> list = passengerFlowService.passengerFlow(); List<Map> list = passengerFlowService.passengerFlow();
boolean result = passengerFlowService.savePassengerFlow(list); boolean result = passengerFlowService.savePassengerFlow(list);
@ -389,8 +394,15 @@ public class Controller {
} }
} }
//根据输入的经纬度和查询的半径和hourId查询游客总数 //根据输入的经纬度和查询的半径和timeId查询游客总数
@RequestMapping("getPassengerNum") @GetMapping("getPassengerNum")
@ApiOperation("查询游客总数根据经纬度和半径米、timeId从表中查询")
@ApiImplicitParams({
@ApiImplicitParam(name = "longitude", value = "经度", paramType = "query",required = true,dataType ="double"),
@ApiImplicitParam(name = "latitude", value = "纬度", paramType = "query",required = true,dataType ="double"),
@ApiImplicitParam(name = "raidus", value = "半径,米", paramType = "query",required = true,dataType ="Integer"),
@ApiImplicitParam(name = "timeId", value = "时间点202205101600", paramType = "query",required = true,dataType ="string"),
})
public Result getPassengerNum( public Result getPassengerNum(
@RequestParam(value="longitude") double longitude, @RequestParam(value="longitude") double longitude,
@RequestParam(value="latitude") double latitude, @RequestParam(value="latitude") double latitude,
@ -401,7 +413,8 @@ public class Controller {
} }
//查询并保存环卫车轨迹到表t_trail_sanitation //查询并保存环卫车轨迹到表t_trail_sanitation
@RequestMapping("saveTrailSanitation") @GetMapping("saveTrailSanitation")
@ApiOperation("保存环卫车轨迹到表t_trail_sanitation,根据后台updatetime调用接口")
public Result saveTrailSanitation(){ public Result saveTrailSanitation(){
boolean result = trailSanitationService.saveTrailSanitation(); boolean result = trailSanitationService.saveTrailSanitation();
if(result){ if(result){
@ -412,7 +425,15 @@ public class Controller {
} }
//根据输入的经纬度和查询的半径时间查询范围内的环卫车轨迹信息 //根据输入的经纬度和查询的半径时间查询范围内的环卫车轨迹信息
@RequestMapping(value = "listTrailSanitationByPoints") @GetMapping(value = "listTrailSanitationByPoints")
@ApiOperation("查询范围内环卫车轨迹信息,根据经纬度、半径米,时间从表中查询")
@ApiImplicitParams({
@ApiImplicitParam(name = "longitude", value = "经度", paramType = "query",required = true,dataType ="double"),
@ApiImplicitParam(name = "latitude", value = "纬度", paramType = "query",required = true,dataType ="double"),
@ApiImplicitParam(name = "raidus", value = "半径,米", paramType = "query",required = true,dataType ="Integer"),
@ApiImplicitParam(name = "start", value = "开始时间2021-03-17 00:00:00", paramType = "query",required = true,dataType ="string"),
@ApiImplicitParam(name = "end", value = "结束时间2021-03-22 00:00:00", paramType = "query",required = true,dataType ="string"),
})
public Result listTrailSanitationByPoints( public Result listTrailSanitationByPoints(
@RequestParam(value="longitude") double longitude, @RequestParam(value="longitude") double longitude,
@RequestParam(value="latitude") double latitude, @RequestParam(value="latitude") double latitude,
@ -420,23 +441,29 @@ public class Controller {
@RequestParam(value="start") String start, @RequestParam(value="start") String start,
@RequestParam(value = "end") String end @RequestParam(value = "end") String end
){ ){
// System.out.println("listTrailSanitationByPoints......");
List<TrailSanitation> list = trailSanitationService.listSedimentTrailByPoints(longitude,latitude,raidus,start,end); List<TrailSanitation> list = trailSanitationService.listSedimentTrailByPoints(longitude,latitude,raidus,start,end);
return Result.success(list); return Result.success(list);
} }
//查询道路污染数据 //查询道路污染数据
@RequestMapping(value="listRoadData")
//输入参考2022-05-10 00:00:00只能查询当前日期前一天及以前的 //输入参考2022-05-10 00:00:00只能查询当前日期前一天及以前的
@GetMapping(value="listRoadData")
@ApiOperation("查询道路污染数据,根据dt从表中查询参考输入-2022-05-10 00:00:00只能查询当前日期前一天及以前的")
@ApiImplicitParam(name="dt",value = "时间",paramType = "query",required = true,dataType = "string")
public Result listRoadData(@RequestParam(value="dt") String dt){ public Result listRoadData(@RequestParam(value="dt") String dt){
List<RoadData> list = roadDataService.listRoadData(dt); List<RoadData> list = roadDataService.listRoadData(dt);
return Result.success(list); return Result.success(list);
} }
//查询工地信息根据经纬度和半径查询 //查询工地信息根据经纬度和半径查询
@RequestMapping(value = "listBuildingSiteByPoints") @GetMapping(value = "listBuildingSiteByPoints")
@ApiOperation("查询工地信息,根据经纬度和半径从表中查询")
@ApiImplicitParams({
@ApiImplicitParam(name="longitude",value = "经度",paramType = "query",required = true,dataType = "double"),
@ApiImplicitParam(name="longitude",value = "经度",paramType = "query",required = true,dataType = "double")
})
public Result listBuildingSiteByPoints(double longitude,double latitude,Integer raidus){ public Result listBuildingSiteByPoints(double longitude,double latitude,Integer raidus){
List<BuildingSite> list = new ArrayList<>(); List<BuildingSite> list = new ArrayList<>();
list = buildingSitrService.listBuildingSiteByPoints(longitude,latitude,raidus); list = buildingSitrService.listBuildingSiteByPoints(longitude,latitude,raidus);
return Result.success(list); return Result.success(list);
} }