提交代码

dev_xds
姜玉琦 2023-10-13 04:00:50 +08:00
parent d7e13004b2
commit 4fa4c19b62
5 changed files with 35 additions and 26 deletions

View File

@ -74,8 +74,7 @@ export default {
videoConfigList: [],
currentIndex: null,
request:
"http://192.168.25.2:7086/live/cameraid/{{videoDvrNumber}}${{passage}}/substream/2.m3u8",
tempResUrl:"",
"http://111.21.209.230:7086/live/cameraid/{{videoDvrNumber}}${{passage}}/substream/2.m3u8",
url0: "",
url1: "",
url2: "",
@ -111,10 +110,9 @@ export default {
this.showVideoView2 = true;
this.showVideoView3 = true;
this.videoDvrNumber = it.videoDvrNumber;
this.tempResUrl = this.request.replace("{{videoDvrNumber}}", it.videoDvrNumber);
this.initVideo(
it.videoDvrNumber,
tempResUrl
this.request.replace("{{videoDvrNumber}}", it.videoDvrNumber)
);
},
//
@ -141,35 +139,31 @@ export default {
});
},
handleOnError0(error) {
//this.showVideoView0 = false;
this.showVideoView0 = false;
console.log("error: ", error);
this.url0 = this.tempResUrl.replace("192.168.25.2","111.21.209.230").replace("{{passage}}", "0");
//this.updatePassageState(this.videoPassageList[0].id);
this.updatePassageState(this.videoPassageList[0].id);
},
handleOnError1(error) {
//this.showVideoView1 = false;
this.showVideoView1 = false;
console.log("error: ", error);
this.url1 = this.tempResUrl.replace("192.168.25.2","111.21.209.230").replace("{{passage}}", "1");
//this.updatePassageState(this.videoPassageList[1].id);
this.updatePassageState(this.videoPassageList[1].id);
},
handleOnError2(error) {
//this.showVideoView2 = false;
this.showVideoView2 = false;
console.log("error: ", error);
this.url2 = this.tempResUrl.replace("192.168.25.2","111.21.209.230").replace("{{passage}}", "2");
//this.updatePassageState(this.videoPassageList[2].id);
this.updatePassageState(this.videoPassageList[2].id);
},
handleOnError3(error) {
//this.showVideoView3 = false;
this.showVideoView3 = false;
console.log("error: ", error);
this.url3 = this.tempResUrl.replace("192.168.25.2","111.21.209.230").replace("{{passage}}", "3");
//this.updatePassageState(this.videoPassageList[3].id);
this.updatePassageState(this.videoPassageList[3].id);
},
updatePassageState(id) {
// let param = {
// id: id,
// videoDvrNumber: this.videoDvrNumber,
// passageState: "2",
// };
let param = {
id: id,
videoDvrNumber: this.videoDvrNumber,
passageState: "2",
};
//editPassageState(param);
},
},

View File

@ -52,7 +52,7 @@ public class VideoAiBoxController extends BaseController {
*
*/
@GetMapping(value = "/getVideoPassage")
public AjaxResult getVideoPassage(String deptId, String projectId, String importance)
public AjaxResult getVideoPassage(String deptId, String projectId, String passageType, String importance)
{
Map<String, Object> map = new HashMap<>();
if(deptId!=null && !"0".equals(deptId)){
@ -61,7 +61,10 @@ public class VideoAiBoxController extends BaseController {
if(projectId!=null && !"0".equals(projectId)){
map.put("projectId",projectId);
}
if(projectId!=null && !"".equals(importance)){
if(passageType!=null && !"".equals(passageType)){
map.put("passageType",passageType);
}
if(importance!=null && !"".equals(importance)){
map.put("importance",importance);
}
return success(surProjectVideoConfigService.selectSurProjectVideoConfigByParams(map));

View File

@ -125,6 +125,8 @@ public class DevAiProjectData extends BaseEntity
@Excel(name = "ValueType 为 1 时代表明火检测ValueType 为 2 时,代表烟雾检测;")
private String valueType;
private String alarmTypeName;
/** 告警短视频的地址 */
@Excel(name = "告警短视频的地址")
private String alarmVideourl;
@ -428,6 +430,14 @@ public class DevAiProjectData extends BaseEntity
return isDel;
}
public String getAlarmTypeName() {
return alarmTypeName;
}
public void setAlarmTypeName(String alarmTypeName) {
this.alarmTypeName = alarmTypeName;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

View File

@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="channelId" column="channel_id" />
<result property="channelName" column="channel_name" />
<result property="alarmType" column="alarm_type" />
<result property="alarmTypeName" column="alarm_type_name" />
<result property="alarmId" column="alarm_id" />
<result property="reportRate" column="report_rate" />
<result property="timestamp" column="timestamp" />
@ -41,9 +42,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectDevAiProjectDataVo">
select dapd.id, dapd.project_id, sp.projectName, dapd.dept_id, sd.dept_name as deptName, dapd.device_id, dapd.device_name, dapd.device_addr0, dapd.device_addr1, dapd.serial_number, dapd.ipc_serial_num, dapd.ipc_addr, dapd.image_url, dapd.channel_id, dapd.channel_name, dapd.alarm_type, dapd.alarm_id, dapd.report_rate, dapd.timestamp, dapd.left_top_x, dapd.left_top_y, dapd.right_btm_x, dapd.right_btm_y, dapd.person_num, dapd.in_num, dapd.out_num, dapd.plate_no, dapd.value_type, dapd.alarm_videoURL, dapd.alarm_video_name, dapd.compare_result, dapd.create_time, dapd.is_del from dev_ai_project_data dapd
select dapd.id, dapd.project_id, sp.projectName, dapd.dept_id, sd.dept_name as deptName, dapd.device_id, dapd.device_name, dapd.device_addr0, dapd.device_addr1, dapd.serial_number, dapd.ipc_serial_num, dapd.ipc_addr, dapd.image_url, dapd.channel_id, dapd.channel_name, dapd.alarm_type, sdd.dict_label as alarm_type_name, dapd.alarm_id, dapd.report_rate, dapd.timestamp, dapd.left_top_x, dapd.left_top_y, dapd.right_btm_x, dapd.right_btm_y, dapd.person_num, dapd.in_num, dapd.out_num, dapd.plate_no, dapd.value_type, dapd.alarm_videoURL, dapd.alarm_video_name, dapd.compare_result, dapd.create_time, dapd.is_del from dev_ai_project_data dapd
left join sur_project sp on sp.id=dapd.project_id
left join sys_dept sd on sd.dept_id=dapd.dept_id
left join sys_dict_data sdd on sdd.dict_type='aibox_alarm_type' and sdd.dict_value=dapd.alarm_type
</sql>
<select id="selectDevAiProjectDataList" parameterType="DevAiProjectData" resultMap="DevAiProjectDataResult">

View File

@ -95,7 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectSurProjectVideoConfigByParams" parameterType="map" resultMap="SurProjectVideoConfigSurProjectVideoPassageResult">
select a.id, a.project_id, a.video_name, a.video_only_type, a.video_dvr_number, a.video_dvr_security, a.video_passage_count, a.passage_pass_count, a.video_sort, a.signal_type, a.signal_state, a.signal_code, a.is_del, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, p.projectName,
b.id as sub_id, b.video_id as sub_video_id, b.video_dvr_number as sub_video_dvr_number, b.passage_name as sub_passage_name, b.passage_value as sub_passage_value, b.passage_state as sub_passage_state
b.id as sub_id, b.video_id as sub_video_id, b.video_dvr_number as sub_video_dvr_number, dacp.channel_name as sub_passage_name, b.passage_value as sub_passage_value, b.passage_state as sub_passage_state
from sur_project_video_config a
left join sur_project_video_passage b on b.video_id = a.id
left join sur_project p on a.project_id=p.id
@ -104,8 +104,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="projectId != null "> and a.project_id = #{projectId}</if>
<if test="deptId != null "> and p.dept_id = #{deptId}</if>
<if test='importance == "Y" '> and dacp.is_importance = #{importance}</if>
<if test="passageType != null "> and FIND_IN_SET(#{passageType},dacp.passage_type) > 0</if>
order by a.project_id asc,b.id asc
<if test='importance != "Y" '> limit 3</if>
<if test='importance != "Y" '> limit 6</if>
</select>