Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
89f92797fb
|
@ -4,6 +4,7 @@ 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 com.hisense.monitormanage.utils.LongLatUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
|
@ -207,25 +208,24 @@ public class Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据两个点查询范围内的摄像头
|
* 根据经纬度查询半径内所有的摄像头
|
||||||
* @param gpsX
|
* @param gpsX
|
||||||
* @param gpsX1
|
|
||||||
* @param gpsY
|
* @param gpsY
|
||||||
* @param gpsY1
|
* @param raidus
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping ("selectAllByGps")
|
@GetMapping ("selectAllByGps")
|
||||||
public Result selectAllByGps(String gpsX,String gpsX1,String gpsY,String gpsY1){
|
@ApiOperation("根据经纬度查询半径内所有的摄像头")
|
||||||
|
@ApiImplicitParams({
|
||||||
List<CameraChannelDto> gps = cameraChannelMapper.selectAllByGps(gpsX, gpsX1, gpsY, gpsY1);
|
@ApiImplicitParam(name = "gpsX", value = "经度", paramType = "query",required = true,dataType ="double"),
|
||||||
double gpsx = Double.parseDouble(gpsX);
|
@ApiImplicitParam(name = "gpsY", value = "纬度", paramType = "query",required = true,dataType ="double"),
|
||||||
double gpsx1 = Double.parseDouble(gpsX1);
|
@ApiImplicitParam(name = "raidus", value = "半径,米", paramType = "query",required = true,dataType ="Integer"),}
|
||||||
double gpsy = Double.parseDouble(gpsY);
|
)
|
||||||
double gpsy1 = Double.parseDouble(gpsY1);
|
public Result selectAllByGps(Double gpsX,Double gpsY,Integer raidus){
|
||||||
if (gpsx < gpsx1 || gpsy < gpsy1){
|
double[] around = LongLatUtil.getAround(gpsX, gpsY, raidus);
|
||||||
return Result.success(gps);
|
List<CameraChannel> c = cameraChannelMapper.selectAllByGps(around[0], around[2], around[1], around[3]);
|
||||||
}
|
Result success = Result.success(c);
|
||||||
return Result.error("请输入正确的精度范围");
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -279,6 +279,19 @@ public class Controller {
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param page
|
||||||
|
* @param pageSize
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("selectCamera")
|
||||||
|
public Result selectNLAll(Integer page,Integer pageSize){
|
||||||
|
List<CameraChannelNLDto> selectNLAll = cameraChannelMapper.selectNLAll(page,pageSize);
|
||||||
|
Result success = Result.success(selectNLAll);
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
//查询视频点播巡检结果,只取异常的
|
//查询视频点播巡检结果,只取异常的
|
||||||
// @RequestMapping("listChannelPlayStates")
|
// @RequestMapping("listChannelPlayStates")
|
||||||
// public Result listChannelPlayStates(
|
// public Result listChannelPlayStates(
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package com.hisense.monitormanage.controller;
|
package com.hisense.monitormanage.controller;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
|
||||||
|
@ -15,7 +14,7 @@ import java.net.URLConnection;
|
||||||
public class FordController {
|
public class FordController {
|
||||||
|
|
||||||
@GetMapping("components/**")
|
@GetMapping("components/**")
|
||||||
public void ford(HttpServletRequest request, HttpServletResponse response)throws Exception{
|
public void ford(HttpServletRequest request, HttpServletResponse response){
|
||||||
|
|
||||||
String imageDomain = "http://10.132.191.48:30080";
|
String imageDomain = "http://10.132.191.48:30080";
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.hisense.monitormanage.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CameraChannelNLDto {
|
||||||
|
|
||||||
|
private String labelCode;
|
||||||
|
|
||||||
|
private String labelName;
|
||||||
|
|
||||||
|
private String channelCode;
|
||||||
|
|
||||||
|
private String channelId;
|
||||||
|
|
||||||
|
private String channelName;
|
||||||
|
|
||||||
|
private String gpsX;
|
||||||
|
|
||||||
|
private String gpsY;
|
||||||
|
|
||||||
|
private Integer status;//1在线;0离线
|
||||||
|
|
||||||
|
private String nodeName;
|
||||||
|
|
||||||
|
private Integer checkStatus;//1正常;0异常
|
||||||
|
|
||||||
|
}
|
|
@ -3,6 +3,7 @@ package com.hisense.monitormanage.mapper;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.hisense.monitormanage.dto.CameraChannelDto;
|
import com.hisense.monitormanage.dto.CameraChannelDto;
|
||||||
import com.hisense.monitormanage.dto.CameraChannelDto1;
|
import com.hisense.monitormanage.dto.CameraChannelDto1;
|
||||||
|
import com.hisense.monitormanage.dto.CameraChannelNLDto;
|
||||||
import com.hisense.monitormanage.dto.ChannelLabelDto;
|
import com.hisense.monitormanage.dto.ChannelLabelDto;
|
||||||
import com.hisense.monitormanage.entity.CameraChannel;
|
import com.hisense.monitormanage.entity.CameraChannel;
|
||||||
import com.hisense.monitormanage.entity.Label;
|
import com.hisense.monitormanage.entity.Label;
|
||||||
|
@ -43,11 +44,14 @@ public interface CameraChannelMapper extends BaseMapper<CameraChannel> {
|
||||||
"ON a.label_code = b.label_code AND b.channel_code = c.channel_code where c.`status`!= 0) m where m.label_code in (${labelCode}) ")
|
"ON a.label_code = b.label_code AND b.channel_code = c.channel_code where c.`status`!= 0) m where m.label_code in (${labelCode}) ")
|
||||||
List<ChannelLabelDto> selectLabelAndChannel(@Param("labelCode") String labelCode);
|
List<ChannelLabelDto> selectLabelAndChannel(@Param("labelCode") String labelCode);
|
||||||
|
|
||||||
@Select("select cc.channel_code,cc.gps_x,cc.gps_y from t_camera_channel cc " +
|
@Select("select cc.* from t_camera_channel cc " +
|
||||||
"where (gps_x between #{gpsX} and #{gpsX1}) and (gps_y between #{gpsY} and #{gpsY1} )")
|
"where (gps_x between #{gpsX} and #{gpsX1}) and (gps_y between #{gpsY} and #{gpsY1} )")
|
||||||
List<CameraChannelDto> selectAllByGps(@Param("gpsX") String gpsX,
|
List<CameraChannel> selectAllByGps(@Param("gpsX") Double gpsX,
|
||||||
@Param("gpsX1") String gpsX1,
|
@Param("gpsX1") Double gpsX1,
|
||||||
@Param("gpsY") String gpsY,
|
@Param("gpsY") Double gpsY,
|
||||||
@Param("gpsY1") String gpsY1);
|
@Param("gpsY1") Double gpsY1);
|
||||||
|
|
||||||
|
|
||||||
|
List<CameraChannelNLDto> selectNLAll(@Param("page") Integer page,@Param("pageSize") Integer pageSize);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,4 +24,12 @@
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<select id="selectNLAll" resultType="com.hisense.monitormanage.dto.CameraChannelNLDto">
|
||||||
|
SELECT a.label_name,d.* from t_label a RIGHT JOIN (select b.label_code,c.* from t_camera_channel c
|
||||||
|
LEFT JOIN t_channel_mtm_label b on c.channel_code = b.channel_code) d
|
||||||
|
on d.label_code = a.label_code
|
||||||
|
<bind name="page" value="(page-1)*pageSize"/>
|
||||||
|
limit #{page},#{pageSize}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue