Commit 233d3822 authored by litengwei's avatar litengwei

bug修改

parent 4f8f69be
......@@ -137,4 +137,8 @@ public class Video extends BaseEntity {
@ApiModelProperty(value = "机构/部门名称")
@TableField(value = "biz_org_name", updateStrategy = FieldStrategy.IGNORED)
private String bizOrgName;
@ApiModelProperty(value = "视频格式")
@TableField(value = "video_type")
private String videoType;
}
......@@ -25,6 +25,8 @@ public class AlamVideoVO {
private String vedioFormat;
private String videoType;
/**
* 是否绑定设备
*/
......
......@@ -45,4 +45,7 @@ public class BuildingVideoVO {
@ApiModelProperty("视频转码")
private String vedioFormat;
@ApiModelProperty("视频类型")
private String videoType;
}
......@@ -770,7 +770,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
x.setLocation(x.getAddress());
}
}
x.setVedioFormat(vedioFormat);
x.setVedioFormat(x.getVideoType());
x.setUrl(videoService.getVideoUrl(x.getName(), x.getPresetPosition(), x.getUrl(), x.getCode()));
});
return pages;
......@@ -1032,7 +1032,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
x.setLocation(x.getAddress());
}
}
x.setVedioFormat(vedioFormat);
x.setVedioFormat(x.getVideoType());
x.setUrl(videoService.getVideoUrl(x.getName(), x.getPresetPosition(), x.getUrl(), x.getCode()));
});
return pages;
......
......@@ -139,7 +139,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
if (videoType.equals(type)) {
List<AlamVideoVO> video = videoMapper.getVideoBySpeId(Long.valueOf(equipId));
video.forEach(action -> {
action.setVedioFormat(vedioFormat);
action.setVedioFormat(action.getVideoType());
action.setUrl(videoService.getVideoUrl(action.getName(), action.getPresetPosition(), action.getUrl(), action.getCode()));
});
res.put("video", video);
......@@ -159,7 +159,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
}
videoBySpeId.forEach(action -> {
action.setVedioFormat(vedioFormat);
action.setVedioFormat(action.getVideoType());
action.setUrl(videoService.getVideoUrl(action.getName(), action.getPresetPosition(), action.getUrl(), action.getCode()));
});
res.put("data", specificAlarm);
......@@ -353,7 +353,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
// 设备关联的摄像头
List<AlamVideoVO> video = videoMapper.getVideoBySpeId(equipmentSpecificId);
video.forEach(action -> {
action.setVedioFormat(vedioFormat);
action.setVedioFormat(action.getVideoType());
action.setUrl(videoService.getVideoUrl(action.getName(), action.getPresetPosition(), action.getUrl(), action.getCode()));
});
res.put("video", video);
......
......@@ -341,7 +341,7 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
video.setName(x.getName());
video.setTokens(x.getToken());
video.setUrl(x.getUrl());
video.setVedioFormat(vedioFormat);
video.setVedioFormat(x.getVideoType());
video.setUrl(videoService.getVideoUrl(x.getName(), x.getPresetPosition(), x.getUrl(), x.getCode()));
video.setIp(x.getIp());
video.setPort(x.getPort());
......
......@@ -1065,7 +1065,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
if (!ObjectUtils.isEmpty(video)) {
video.setUrl(videoService.getVideoUrl(video.getName(), video.getPresetPosition(), video.getUrl(), video.getCode()));
video.setId(id);
video.setVedioFormat(vedioFormat);
video.setVedioFormat(video.getVideoType());
}
return video;
} else {
......
......@@ -58,7 +58,7 @@ public class SupervisionVideoServiceImpl extends ServiceImpl<SupervisionVideoMap
public List<AlamVideoVO> queryVideoList(String bizOrgCode) {
List<AlamVideoVO> list = supervisionVideoMapper.getVideoByCompany(bizOrgCode);
list.forEach(action -> {
action.setVedioFormat(vedioFormat);
action.setVedioFormat(action.getVideoType());
action.setUrl(videoService.getVideoUrl(action.getName(), action.getPresetPosition(), action.getUrl(), action.getCode()));
});
return list;
......
......@@ -741,4 +741,16 @@
</sql>
</changeSet>
<changeSet author="litengwei" id="20230303-12322-1">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="wl_video" columnName="video_type"/>
</not>
</preConditions>
<comment>新增属性字段 video_type</comment>
<sql>
alter table `wl_video` add column `video_type` varchar(100) DEFAULT 'flv' COMMENT '视频格式: 1.flv,2.rtsp,3.hls,4.other';
</sql>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
......@@ -168,6 +168,7 @@
`name`,
token,
`code`,
video_type as videoType,
preset_position
FROM wl_video wlv
LEFT JOIN wl_video_equipment_specific wlves ON wlv.id = wlves.video_id
......
......@@ -9,6 +9,7 @@
wv.name as name,
wv.url,
wv.code,
wv.video_type as videoType,
wv.preset_position as presetPosition
from wl_supervision_video wsv left join wl_video wv on wsv.camera_id = wv.id
where wsv.biz_org_code like concat(#{bizOrgCode},'%');
......
......@@ -99,6 +99,7 @@
v.name AS name,
v.token AS token,
v.url AS url,
v.video_type as videoType,
v.code AS code,
v.address,
v.preset_position as presetPosition
......@@ -175,6 +176,7 @@
vid.name as name,
vid.url,
vid.code,
vid.video_type as videoType,
vid.preset_position as presetPosition,
vid.name
from wl_video_equipment_specific as ves
......@@ -187,6 +189,7 @@
v.`code`,
v.url,
v.token,
v.video_type as videoType,
CONCAT_WS(' ', ws.full_name, v.address) AS address,
v.img,
v.preset_position as presetPosition,
......@@ -367,6 +370,7 @@
v.name AS name,
v.token AS token,
v.url AS url,
v.video_type AS videoType,
v.code AS code,
v.address,
v.preset_position as presetPosition
......@@ -418,6 +422,7 @@
v.id AS id,
v.name AS name,
v.token AS token,
v.video_type AS videoType,
v.url AS url,
v.code AS code,
v.address,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment