zhangnaisong
2024-04-28 95345122239a82f6d10c2e5558cd5cc1644f474b
ard-work/src/main/resources/mapper/device/ArdCamerasMapper.xml
@@ -104,6 +104,7 @@
                WHERE cast(#{deptId} as varchar) = any(string_to_array(ancestors,',')) ))
            </if>
            <if test="towerId != null ">and c.tower_id = #{towerId}</if>
            <if test="state != null ">and c.state = #{state}</if>
            <!-- 数据范围过滤 -->
            ${params.dataScope}
        </where>
@@ -140,6 +141,7 @@
            <if test="camMaxVisibleDistance != null ">and c.cam_max_visible_distance = #{camMaxVisibleDistance}</if>
            <if test="camAlarmGuideEnable != null ">and c.cam_alarm_guide_enable = #{camAlarmGuideEnable}</if>
            <if test="loginId != null ">and c.login_id = #{loginId}</if>
            <if test="state != null ">and c.state = #{state}</if>
        </where>
    </select>
    <select id="selectArdCamerasById" parameterType="String" resultMap="ArdCamerasResult">
@@ -181,6 +183,7 @@
            <if test="createTime != null">create_time,</if>
            <if test="updateBy != null">update_by,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="state != null">state,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id},</if>
@@ -214,6 +217,7 @@
            <if test="createTime != null">#{createTime},</if>
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="state != null">#{state},</if>
        </trim>
    </insert>
@@ -345,7 +349,7 @@
                  ac.gdtype,ac.state,sdd.dict_label as "dictLabel",sdd0.dict_label as factory,
                  case sdd0.dict_label
                      when '海康' then concat('rtsp://',ac.username,':',ac.password,'@',ac.ip,':',ac.rtsp_port,'/h264/ch1/main/av_stream')
                      when '大华' then concat('rtsp://',ac.username,':',ac.password,'@',ac.ip,':',ac.rtsp_port,'/cam/realmonitor?channel=1&amp;subtype=1')
                      when '大华' then concat('rtsp://',ac.username,':',ac.password,'@',ac.ip,':',ac.rtsp_port,'/cam/realmonitor?channel=1&amp;subtype=0')
                      end as rtsp
           from  ard_cameras ac
                    inner join sys_dict_data sdd on ac.gdtype = sdd.dict_value
@@ -363,7 +367,7 @@
                  ac.gdtype,ac.state,sdd.dict_label as "dictLabel",sdd0.dict_label as factory,
                  case sdd0.dict_label
                      when '海康' then concat('rtsp://',ac.username,':',ac.password,'@',ac.ip,':',ac.rtsp_port,'/h264/ch1/main/av_stream')
                      when '大华' then concat('rtsp://',ac.username,':',ac.password,'@',ac.ip,':',ac.rtsp_port,'/cam/realmonitor?channel=1&amp;subtype=1')
                      when '大华' then concat('rtsp://',ac.username,':',ac.password,'@',ac.ip,':',ac.rtsp_port,'/cam/realmonitor?channel=1&amp;subtype=0')
                      end as rtsp from sys_user_role sur
                                           inner join sys_role_dept srd on sur.role_id = srd.role_id
                                           inner join ard_cameras ac on srd.dept_id = ac.dept_id