Commit 233d3822 authored by litengwei's avatar litengwei

bug修改

parent 4f8f69be
...@@ -137,4 +137,8 @@ public class Video extends BaseEntity { ...@@ -137,4 +137,8 @@ public class Video extends BaseEntity {
@ApiModelProperty(value = "机构/部门名称") @ApiModelProperty(value = "机构/部门名称")
@TableField(value = "biz_org_name", updateStrategy = FieldStrategy.IGNORED) @TableField(value = "biz_org_name", updateStrategy = FieldStrategy.IGNORED)
private String bizOrgName; private String bizOrgName;
@ApiModelProperty(value = "视频格式")
@TableField(value = "video_type")
private String videoType;
} }
...@@ -25,6 +25,8 @@ public class AlamVideoVO { ...@@ -25,6 +25,8 @@ public class AlamVideoVO {
private String vedioFormat; private String vedioFormat;
private String videoType;
/** /**
* 是否绑定设备 * 是否绑定设备
*/ */
......
...@@ -45,4 +45,7 @@ public class BuildingVideoVO { ...@@ -45,4 +45,7 @@ public class BuildingVideoVO {
@ApiModelProperty("视频转码") @ApiModelProperty("视频转码")
private String vedioFormat; private String vedioFormat;
@ApiModelProperty("视频类型")
private String videoType;
} }
...@@ -770,7 +770,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -770,7 +770,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
x.setLocation(x.getAddress()); x.setLocation(x.getAddress());
} }
} }
x.setVedioFormat(vedioFormat); x.setVedioFormat(x.getVideoType());
x.setUrl(videoService.getVideoUrl(x.getName(), x.getPresetPosition(), x.getUrl(), x.getCode())); x.setUrl(videoService.getVideoUrl(x.getName(), x.getPresetPosition(), x.getUrl(), x.getCode()));
}); });
return pages; return pages;
...@@ -1032,7 +1032,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -1032,7 +1032,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
x.setLocation(x.getAddress()); x.setLocation(x.getAddress());
} }
} }
x.setVedioFormat(vedioFormat); x.setVedioFormat(x.getVideoType());
x.setUrl(videoService.getVideoUrl(x.getName(), x.getPresetPosition(), x.getUrl(), x.getCode())); x.setUrl(videoService.getVideoUrl(x.getName(), x.getPresetPosition(), x.getUrl(), x.getCode()));
}); });
return pages; return pages;
......
...@@ -139,7 +139,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ ...@@ -139,7 +139,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
if (videoType.equals(type)) { if (videoType.equals(type)) {
List<AlamVideoVO> video = videoMapper.getVideoBySpeId(Long.valueOf(equipId)); List<AlamVideoVO> video = videoMapper.getVideoBySpeId(Long.valueOf(equipId));
video.forEach(action -> { video.forEach(action -> {
action.setVedioFormat(vedioFormat); action.setVedioFormat(action.getVideoType());
action.setUrl(videoService.getVideoUrl(action.getName(), action.getPresetPosition(), action.getUrl(), action.getCode())); action.setUrl(videoService.getVideoUrl(action.getName(), action.getPresetPosition(), action.getUrl(), action.getCode()));
}); });
res.put("video", video); res.put("video", video);
...@@ -159,7 +159,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ ...@@ -159,7 +159,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
} }
videoBySpeId.forEach(action -> { videoBySpeId.forEach(action -> {
action.setVedioFormat(vedioFormat); action.setVedioFormat(action.getVideoType());
action.setUrl(videoService.getVideoUrl(action.getName(), action.getPresetPosition(), action.getUrl(), action.getCode())); action.setUrl(videoService.getVideoUrl(action.getName(), action.getPresetPosition(), action.getUrl(), action.getCode()));
}); });
res.put("data", specificAlarm); res.put("data", specificAlarm);
...@@ -353,7 +353,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ ...@@ -353,7 +353,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
// 设备关联的摄像头 // 设备关联的摄像头
List<AlamVideoVO> video = videoMapper.getVideoBySpeId(equipmentSpecificId); List<AlamVideoVO> video = videoMapper.getVideoBySpeId(equipmentSpecificId);
video.forEach(action -> { video.forEach(action -> {
action.setVedioFormat(vedioFormat); action.setVedioFormat(action.getVideoType());
action.setUrl(videoService.getVideoUrl(action.getName(), action.getPresetPosition(), action.getUrl(), action.getCode())); action.setUrl(videoService.getVideoUrl(action.getName(), action.getPresetPosition(), action.getUrl(), action.getCode()));
}); });
res.put("video", video); res.put("video", video);
......
...@@ -341,7 +341,7 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec ...@@ -341,7 +341,7 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
video.setName(x.getName()); video.setName(x.getName());
video.setTokens(x.getToken()); video.setTokens(x.getToken());
video.setUrl(x.getUrl()); video.setUrl(x.getUrl());
video.setVedioFormat(vedioFormat); video.setVedioFormat(x.getVideoType());
video.setUrl(videoService.getVideoUrl(x.getName(), x.getPresetPosition(), x.getUrl(), x.getCode())); video.setUrl(videoService.getVideoUrl(x.getName(), x.getPresetPosition(), x.getUrl(), x.getCode()));
video.setIp(x.getIp()); video.setIp(x.getIp());
video.setPort(x.getPort()); video.setPort(x.getPort());
......
...@@ -1065,7 +1065,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -1065,7 +1065,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
if (!ObjectUtils.isEmpty(video)) { if (!ObjectUtils.isEmpty(video)) {
video.setUrl(videoService.getVideoUrl(video.getName(), video.getPresetPosition(), video.getUrl(), video.getCode())); video.setUrl(videoService.getVideoUrl(video.getName(), video.getPresetPosition(), video.getUrl(), video.getCode()));
video.setId(id); video.setId(id);
video.setVedioFormat(vedioFormat); video.setVedioFormat(video.getVideoType());
} }
return video; return video;
} else { } else {
......
...@@ -58,7 +58,7 @@ public class SupervisionVideoServiceImpl extends ServiceImpl<SupervisionVideoMap ...@@ -58,7 +58,7 @@ public class SupervisionVideoServiceImpl extends ServiceImpl<SupervisionVideoMap
public List<AlamVideoVO> queryVideoList(String bizOrgCode) { public List<AlamVideoVO> queryVideoList(String bizOrgCode) {
List<AlamVideoVO> list = supervisionVideoMapper.getVideoByCompany(bizOrgCode); List<AlamVideoVO> list = supervisionVideoMapper.getVideoByCompany(bizOrgCode);
list.forEach(action -> { list.forEach(action -> {
action.setVedioFormat(vedioFormat); action.setVedioFormat(action.getVideoType());
action.setUrl(videoService.getVideoUrl(action.getName(), action.getPresetPosition(), action.getUrl(), action.getCode())); action.setUrl(videoService.getVideoUrl(action.getName(), action.getPresetPosition(), action.getUrl(), action.getCode()));
}); });
return list; return list;
......
...@@ -741,4 +741,16 @@ ...@@ -741,4 +741,16 @@
</sql> </sql>
</changeSet> </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> </databaseChangeLog>
\ No newline at end of file
...@@ -168,6 +168,7 @@ ...@@ -168,6 +168,7 @@
`name`, `name`,
token, token,
`code`, `code`,
video_type as videoType,
preset_position preset_position
FROM wl_video wlv FROM wl_video wlv
LEFT JOIN wl_video_equipment_specific wlves ON wlv.id = wlves.video_id LEFT JOIN wl_video_equipment_specific wlves ON wlv.id = wlves.video_id
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
wv.name as name, wv.name as name,
wv.url, wv.url,
wv.code, wv.code,
wv.video_type as videoType,
wv.preset_position as presetPosition wv.preset_position as presetPosition
from wl_supervision_video wsv left join wl_video wv on wsv.camera_id = wv.id from wl_supervision_video wsv left join wl_video wv on wsv.camera_id = wv.id
where wsv.biz_org_code like concat(#{bizOrgCode},'%'); where wsv.biz_org_code like concat(#{bizOrgCode},'%');
......
...@@ -99,6 +99,7 @@ ...@@ -99,6 +99,7 @@
v.name AS name, v.name AS name,
v.token AS token, v.token AS token,
v.url AS url, v.url AS url,
v.video_type as videoType,
v.code AS code, v.code AS code,
v.address, v.address,
v.preset_position as presetPosition v.preset_position as presetPosition
...@@ -175,6 +176,7 @@ ...@@ -175,6 +176,7 @@
vid.name as name, vid.name as name,
vid.url, vid.url,
vid.code, vid.code,
vid.video_type as videoType,
vid.preset_position as presetPosition, vid.preset_position as presetPosition,
vid.name vid.name
from wl_video_equipment_specific as ves from wl_video_equipment_specific as ves
...@@ -187,6 +189,7 @@ ...@@ -187,6 +189,7 @@
v.`code`, v.`code`,
v.url, v.url,
v.token, v.token,
v.video_type as videoType,
CONCAT_WS(' ', ws.full_name, v.address) AS address, CONCAT_WS(' ', ws.full_name, v.address) AS address,
v.img, v.img,
v.preset_position as presetPosition, v.preset_position as presetPosition,
...@@ -367,6 +370,7 @@ ...@@ -367,6 +370,7 @@
v.name AS name, v.name AS name,
v.token AS token, v.token AS token,
v.url AS url, v.url AS url,
v.video_type AS videoType,
v.code AS code, v.code AS code,
v.address, v.address,
v.preset_position as presetPosition v.preset_position as presetPosition
...@@ -418,6 +422,7 @@ ...@@ -418,6 +422,7 @@
v.id AS id, v.id AS id,
v.name AS name, v.name AS name,
v.token AS token, v.token AS token,
v.video_type AS videoType,
v.url AS url, v.url AS url,
v.code AS code, v.code AS code,
v.address, 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