南昌市物联网技防平台-后台
zengh
2021-05-28 1245bc982e2d9b2a831599e791391096de501e87
视频录制问题修改
2 files modified
33 ■■■■■ changed files
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/alarm/mapper/AlarmMapper.xml 23 ●●●●● patch | view | raw | blame | history
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/rvideo/controller/RvideoController.java 10 ●●●● patch | view | raw | blame | history
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/alarm/mapper/AlarmMapper.xml
@@ -601,23 +601,24 @@
        e.stype,
        e.oneId,
        e.twoId,
        e.deviceName,
        e.threeId,
        e.deptId,
        e.street as place,
        e.channelNumber
        FROM
            sys_alarm a
            LEFT JOIN sys_equipment e ON e.deviceNumber = a.deviceNumber
        sys_alarm a
        LEFT JOIN sys_equipment e ON e.deviceNumber = a.deviceNumber
        WHERE
            <if test="alarm.securityArr!=null and alarm.securityArr!=''">
                securityId = "" or securityId IS NULL
                AND securityArr LIKE concat('%',#{alarm.securityArr},'%')
            </if>
        <if test="alarm.securityArr!=null and alarm.securityArr!=''">
            securityId = "" or securityId IS NULL
            AND securityArr LIKE concat('%',#{alarm.securityArr},'%')
        </if>
            <if test="alarm.id!=null and alarm.id!=''">
                a.id = #{alarm.id}
            </if>
        <if test="alarm.id!=null and alarm.id!=''">
            a.id = #{alarm.id}
        </if>
    </select>
@@ -633,6 +634,7 @@
        e.oneId,
        e.twoId,
        e.threeId,
        e.deviceName,
        e.deptId,
        e.street as place,
        e.channelNumber
@@ -723,7 +725,8 @@
    <!--查询符合条件的数据并导出-->
    <select id="exportAlarm" resultType="org.springblade.common.entity.AlarmExcel">
        select
        a.id, "一键求助" as alarmType,a.alarmPeople,a.alarmTime,a.galarmPeople,a.sex,a.phoneNumber,a.place,a.content,a.waringType,a.bz,
        a.id, "一键求助" as
        alarmType,a.alarmPeople,a.alarmTime,a.galarmPeople,a.sex,a.phoneNumber,a.place,a.content,a.waringType,a.bz,
        a.deviceNumber,a.region,e.district,a.vaddress,a.aaddress,
        a.alarmId,a.LEVEL,e.jd,e.wd,a.jtype,a.rname,a.jjTime,e.province,e.city,
        e.serialNumber,e.oneContacts,e.ThreeContacts,e.twoContacts,e.onePhone,e.twoPhone,e.ThreePhone
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/rvideo/controller/RvideoController.java
@@ -227,8 +227,8 @@
        String UUID = DateUtil.time();
        UUIDs=UUID;
        uids=uid;
//        recordVideoThread.filePath = "D:\\software\\minio\\data\\jfpt\\void\\"+UUID + ".mp4";
        filePath = "D:\\video\\"+UUID + ".mp4";
        //filePath = "D:\\video\\"+UUID + ".mp4";
        filePath = "D:\\software\\minio\\data\\jfpt\\void\\"+UUID + ".mp4";
        timesSec = 0L;
        String newJson = StringEscapeUtils.unescapeHtml4(url);
        streamURL =newJson;// 最好设置结束时长 如直接停止程序会造成输出文件的损坏无法正常播放
@@ -300,6 +300,12 @@
                        }
                    }
                    System.out.println("录制完成,录制时长:" + timesSec + "秒");
                    String vaddress = null;
                    //返回路径
                    vaddress = "https://web.byisf.com/" + PRF_MINIO_URL + UUID + ".mp4";
                    //把路径通过警情id添加到警情信息
                    alarmService.updateVaddress(vaddress, uids, jid);
                }
            }