摄像头截图优化
This commit is contained in:
parent
22ed4014a6
commit
01ecbf0a1d
|
@ -37,8 +37,8 @@ public interface CameraChannelMapper extends BaseMapper<CameraChannel> {
|
||||||
List<CameraChannel> selectByChannelName(String channelName);
|
List<CameraChannel> selectByChannelName(String channelName);
|
||||||
|
|
||||||
@Select("select * from (select a.label_code,a.label_name,c.channel_code,c.channel_name from t_channel_mtm_label b JOIN t_label a JOIN t_camera_channel c " +
|
@Select("select * from (select a.label_code,a.label_name,c.channel_code,c.channel_name 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 where c.`status`!= 0) m where m.label_code = #{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},#{labelCode1}) ")
|
||||||
List<ChannelLabelDto> selectLabelAndChannel(@Param("labelCode") String labelCode);
|
List<ChannelLabelDto> selectLabelAndChannel(@Param("labelCode") String labelCode,@Param("labelCode1") String labelCode1);
|
||||||
|
|
||||||
@Select("select cc.channel_code,cc.gps_x,cc.gps_y from t_camera_channel cc " +
|
@Select("select cc.channel_code,cc.gps_x,cc.gps_y 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} )")
|
||||||
|
|
|
@ -211,7 +211,7 @@ public class MonitorService {
|
||||||
|
|
||||||
log.info("[monitor-capture]: start capture");
|
log.info("[monitor-capture]: start capture");
|
||||||
|
|
||||||
List<ChannelLabelDto> labels = cameraChannelMapper.selectLabelAndChannel("1009");
|
List<ChannelLabelDto> labels = cameraChannelMapper.selectLabelAndChannel("1009","1008");
|
||||||
labels.forEach(label -> {
|
labels.forEach(label -> {
|
||||||
String channelCode = label.getChannelCode();
|
String channelCode = label.getChannelCode();
|
||||||
try {
|
try {
|
||||||
|
@ -224,12 +224,12 @@ public class MonitorService {
|
||||||
ChannelPicture picture = new ChannelPicture();
|
ChannelPicture picture = new ChannelPicture();
|
||||||
picture.setChannelCode(channelCode);
|
picture.setChannelCode(channelCode);
|
||||||
picture.setPicUrl(picUrl);
|
picture.setPicUrl(picUrl);
|
||||||
picture.setInsertTime(new Date());
|
/*picture.setInsertTime(new Date());
|
||||||
channelPictureMapper.insert(picture);
|
channelPictureMapper.insert(picture);*/
|
||||||
/*QueryWrapper<ChannelPicture> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<ChannelPicture> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("channel_code",channelCode);
|
queryWrapper.eq("channel_code",channelCode);
|
||||||
picture.setInsertTime(new Date());
|
picture.setInsertTime(new Date());
|
||||||
channelPictureMapper.update(picture,queryWrapper);*/
|
channelPictureMapper.update(picture,queryWrapper);
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
|
||||||
log.info( "[monitor-capture] " +channelCode + " 截图图片失败 " + e.getMessage());
|
log.info( "[monitor-capture] " +channelCode + " 截图图片失败 " + e.getMessage());
|
||||||
|
@ -249,7 +249,7 @@ public class MonitorService {
|
||||||
|
|
||||||
log.info("[monitor-capture]: start capture");
|
log.info("[monitor-capture]: start capture");
|
||||||
|
|
||||||
List<ChannelLabelDto> labels = cameraChannelMapper.selectLabelAndChannel("1004");
|
List<ChannelLabelDto> labels = cameraChannelMapper.selectLabelAndChannel("1004","1006");
|
||||||
labels.forEach(label -> {
|
labels.forEach(label -> {
|
||||||
String channelCode = label.getChannelCode();
|
String channelCode = label.getChannelCode();
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue