diff --git a/src/main/java/com/hisense/monitormanage/controller/Controller.java b/src/main/java/com/hisense/monitormanage/controller/Controller.java index 2284827..f791fc9 100644 --- a/src/main/java/com/hisense/monitormanage/controller/Controller.java +++ b/src/main/java/com/hisense/monitormanage/controller/Controller.java @@ -211,18 +211,18 @@ public class Controller { * 根据经纬度查询半径内所有的摄像头 * @param gpsX * @param gpsY - * @param raidus + * @param radius * @return */ @GetMapping ("selectAllByGps") @ApiOperation("根据经纬度查询半径内所有的摄像头") @ApiImplicitParams({ - @ApiImplicitParam(name = "gpsX", value = "经度", paramType = "query",required = true,dataType ="double"), - @ApiImplicitParam(name = "gpsY", value = "纬度", paramType = "query",required = true,dataType ="double"), - @ApiImplicitParam(name = "raidus", value = "半径,米", paramType = "query",required = true,dataType ="Integer"),} + @ApiImplicitParam(name = "gpsX", value = "经度",required = true,dataType ="Double"), + @ApiImplicitParam(name = "gpsY", value = "纬度",required = true,dataType ="Double"), + @ApiImplicitParam(name = "radius", value = "半径,米",required = true,dataType ="Integer"),} ) - public Result selectAllByGps(Double gpsX,Double gpsY,Integer raidus){ - double[] around = LongLatUtil.getAround(gpsX, gpsY, raidus); + public Result selectAllByGps(Double gpsX,Double gpsY,Integer radius){ + double[] around = LongLatUtil.getAround(gpsX, gpsY, radius); List c = cameraChannelMapper.selectAllByGps(around[0], around[2], around[1], around[3]); Result success = Result.success(c); return success; @@ -376,18 +376,18 @@ public class Controller { @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 = "radius", 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( @RequestParam(value="longitude") double longitude, @RequestParam(value="latitude") double latitude, - @RequestParam(value="raidus") Integer raidus, + @RequestParam(value="radius") Integer radius, @RequestParam(value="start") String start, @RequestParam(value = "end") String end ){ - Map> map = sedimentTrailService.listSedimentTrailByPoints(longitude,latitude,raidus,start,end); + Map> map = sedimentTrailService.listSedimentTrailByPoints(longitude,latitude,radius,start,end); return Result.success(map); } @@ -427,16 +427,16 @@ public class Controller { @ApiImplicitParams({ @ApiImplicitParam(name = "longitude", value = "经度", paramType = "query",required = false,dataType ="double"), @ApiImplicitParam(name = "latitude", value = "纬度", paramType = "query",required = false,dataType ="double"), - @ApiImplicitParam(name = "raidus", value = "半径,米", paramType = "query",required = false,dataType ="Integer"), + @ApiImplicitParam(name = "radius", value = "半径,米", paramType = "query",required = false,dataType ="Integer"), @ApiImplicitParam(name = "timeId", value = "时间点,202205101600", paramType = "query",required = true,dataType ="string"), }) public Result getPassengerNum( @RequestParam(value="longitude",required = false,defaultValue = "0.00") double longitude, @RequestParam(value="latitude",required = false,defaultValue = "0.00") double latitude, - @RequestParam(value="raidus",required = false,defaultValue = "0") Integer raidus, + @RequestParam(value="radius",required = false,defaultValue = "0") Integer radius, @RequestParam(value="timeId",required = true) String timeId ){ - return Result.success(passengerFlowService.passengerNums(longitude,latitude,raidus,timeId)); + return Result.success(passengerFlowService.passengerNums(longitude,latitude,radius,timeId)); } //查询并保存环卫车轨迹到表t_trail_sanitation @@ -457,18 +457,18 @@ public class Controller { @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 = "radius", 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( @RequestParam(value="longitude") double longitude, @RequestParam(value="latitude") double latitude, - @RequestParam(value="raidus") Integer raidus, + @RequestParam(value="radius") Integer radius, @RequestParam(value="start") String start, @RequestParam(value = "end") String end ){ - List list = trailSanitationService.listSedimentTrailByPoints(longitude,latitude,raidus,start,end); + List list = trailSanitationService.listSedimentTrailByPoints(longitude,latitude,radius,start,end); return Result.success(list); } @@ -489,9 +489,9 @@ public class Controller { @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 radius){ List list = new ArrayList<>(); - list = buildingSitrService.listBuildingSiteByPoints(longitude,latitude,raidus); + list = buildingSitrService.listBuildingSiteByPoints(longitude,latitude,radius); return Result.success(list); } } diff --git a/src/main/java/com/hisense/monitormanage/controller/FordController.java b/src/main/java/com/hisense/monitormanage/controller/FordController.java index 201e8fc..7a8e243 100644 --- a/src/main/java/com/hisense/monitormanage/controller/FordController.java +++ b/src/main/java/com/hisense/monitormanage/controller/FordController.java @@ -1,5 +1,7 @@ package com.hisense.monitormanage.controller; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; @@ -11,9 +13,11 @@ import java.net.URL; import java.net.URLConnection; @Controller +@Api(tags = "转发") public class FordController { @GetMapping("components/**") + @ApiOperation("前端访问图片请求转发") public void ford(HttpServletRequest request, HttpServletResponse response){ String imageDomain = "http://10.132.191.48:30080"; diff --git a/src/main/java/com/hisense/monitormanage/service/BuildingSiteService.java b/src/main/java/com/hisense/monitormanage/service/BuildingSiteService.java index 563fae3..1bd6e1a 100644 --- a/src/main/java/com/hisense/monitormanage/service/BuildingSiteService.java +++ b/src/main/java/com/hisense/monitormanage/service/BuildingSiteService.java @@ -24,10 +24,10 @@ public class BuildingSiteService { @Autowired private BuildingSiteMapper buildingSiteMapper; - public List listBuildingSiteByPoints(double longitude,double latitude,Integer raidus){ + public List listBuildingSiteByPoints(double longitude,double latitude,Integer radius){ List list = new ArrayList<>(); try{ - double[] points = LongLatUtil.getAround(longitude,latitude,raidus); + double[] points = LongLatUtil.getAround(longitude,latitude,radius); QueryWrapper wrapper = new QueryWrapper(); wrapper.between("jd",points[0],points[2]).between("wd",points[1],points[3]); list = buildingSiteMapper.selectList(wrapper); diff --git a/src/main/java/com/hisense/monitormanage/service/PassengerFlowService.java b/src/main/java/com/hisense/monitormanage/service/PassengerFlowService.java index 7780429..610e834 100644 --- a/src/main/java/com/hisense/monitormanage/service/PassengerFlowService.java +++ b/src/main/java/com/hisense/monitormanage/service/PassengerFlowService.java @@ -185,12 +185,12 @@ public class PassengerFlowService { } //根据半径,一个经纬度和timeId查询游客总数 - public JSONObject passengerNums(double longitude, double latitude, Integer raidus,String timeId){ + public JSONObject passengerNums(double longitude, double latitude, Integer radius,String timeId){ QueryWrapper wrapper = new QueryWrapper<>(); if(Double.doubleToLongBits(longitude) == Double.doubleToLongBits(0.00) || Double.doubleToLongBits(latitude) == Double.doubleToLongBits(0.00)){ wrapper.eq("time_id",timeId); }else{ - double[] points = LongLatUtil.getAround(longitude,latitude,raidus); + double[] points = LongLatUtil.getAround(longitude,latitude,radius); wrapper.eq("time_id",timeId).between("longitude",points[0],points[2]).between("latitude",points[1],points[3]); } diff --git a/src/main/java/com/hisense/monitormanage/service/SedimentTrailService.java b/src/main/java/com/hisense/monitormanage/service/SedimentTrailService.java index 8cc3432..9f63a00 100644 --- a/src/main/java/com/hisense/monitormanage/service/SedimentTrailService.java +++ b/src/main/java/com/hisense/monitormanage/service/SedimentTrailService.java @@ -52,11 +52,11 @@ public class SedimentTrailService { /** * 根据输入的经纬度和查询的半径(米)查询范围内的渣土车轨迹信息 - * @param longitude(经度) latitude(纬度) raidus(米) start(时间) end(时间) + * @param longitude(经度) latitude(纬度) radius(米) start(时间) end(时间) * */ - public Map> listSedimentTrailByPoints(double longitude, double latitude, Integer raidus,String start,String end){ - double[] points = LongLatUtil.getAround(longitude,latitude,raidus); + public Map> listSedimentTrailByPoints(double longitude, double latitude, Integer radius,String start,String end){ + double[] points = LongLatUtil.getAround(longitude,latitude,radius); QueryWrapper wrapper = new QueryWrapper<>(); wrapper.between("update_time",start,end).between("longitude",points[0],points[2]).between("latitude",points[1],points[3]) .orderByAsc("sim_card_num","record_time"); diff --git a/src/main/java/com/hisense/monitormanage/service/TrailSanitationService.java b/src/main/java/com/hisense/monitormanage/service/TrailSanitationService.java index b1b7657..113663d 100644 --- a/src/main/java/com/hisense/monitormanage/service/TrailSanitationService.java +++ b/src/main/java/com/hisense/monitormanage/service/TrailSanitationService.java @@ -39,8 +39,8 @@ public class TrailSanitationService { * @param longitude(经度) latitude(纬度) raidus(米) start(时间) end(时间) * */ - public List listSedimentTrailByPoints(double longitude, double latitude, Integer raidus, String start, String end){ - double[] points = LongLatUtil.getAround(longitude,latitude,raidus); + public List listSedimentTrailByPoints(double longitude, double latitude, Integer radius, String start, String end){ + double[] points = LongLatUtil.getAround(longitude,latitude,radius); QueryWrapper wrapper = new QueryWrapper<>(); wrapper.between("fssj",start,end).between("jd",points[0],points[2]).between("wd",points[1],points[3]); return trailSanitationMapper.selectList(wrapper);