diff --git a/ruoyi-ui/src/views/video/videoList/index.vue b/ruoyi-ui/src/views/video/videoList/index.vue index 1f46cc84..ebcdb379 100644 --- a/ruoyi-ui/src/views/video/videoList/index.vue +++ b/ruoyi-ui/src/views/video/videoList/index.vue @@ -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); }, }, diff --git a/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/VideoAiBoxController.java b/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/VideoAiBoxController.java index 4c21328f..05458147 100644 --- a/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/VideoAiBoxController.java +++ b/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/VideoAiBoxController.java @@ -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 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)); diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/video/domain/DevAiProjectData.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/video/domain/DevAiProjectData.java index d6c3cc73..891d06ba 100644 --- a/yanzhu-jh/src/main/java/com/yanzhu/jh/video/domain/DevAiProjectData.java +++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/video/domain/DevAiProjectData.java @@ -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) diff --git a/yanzhu-jh/src/main/resources/mapper/video/DevAiProjectDataMapper.xml b/yanzhu-jh/src/main/resources/mapper/video/DevAiProjectDataMapper.xml index be63d756..fdfa3efc 100644 --- a/yanzhu-jh/src/main/resources/mapper/video/DevAiProjectDataMapper.xml +++ b/yanzhu-jh/src/main/resources/mapper/video/DevAiProjectDataMapper.xml @@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -41,9 +42,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - 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 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" and a.project_id = #{projectId} and p.dept_id = #{deptId} and dacp.is_importance = #{importance} + and FIND_IN_SET(#{passageType},dacp.passage_type) > 0 order by a.project_id asc,b.id asc - limit 3 limit 6