<?xml version="1.0" encoding="UTF-8" ?>
|
<!DOCTYPE mapper
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="com.ard.work.device.camera.mapper.ArdCameraMapper">
|
|
<resultMap type="ArdCamera" id="ArdCameraResult">
|
<result property="id" column="id"/>
|
<result property="name" column="name"/>
|
<result property="ip" column="ip"/>
|
<result property="port" column="port"/>
|
<result property="rtspPort" column="rtsp_port"/>
|
<result property="username" column="username"/>
|
<result property="password" column="password"/>
|
<result property="type" column="type"/>
|
<result property="factory" column="factory"/>
|
<result property="chanNum" column="chan_num"/>
|
<result property="startChan" column="start_chan"/>
|
<result property="longitude" column="longitude"/>
|
<result property="latitude" column="latitude"/>
|
<result property="altitude" column="altitude"/>
|
<result property="userId" column="user_id"/>
|
<result property="deptId" column="dept_id"/>
|
<result property="baseYaw" column="base_yaw"/>
|
<result property="camHeading" column="cam_heading"/>
|
<result property="camPitch" column="cam_pitch"/>
|
<result property="camRoll" column="cam_roll"/>
|
<result property="camNear" column="cam_near"/>
|
<result property="camFar" column="cam_far"/>
|
<result property="camAspectratio" column="cam_aspectratio"/>
|
<result property="camDepth" column="cam_depth"/>
|
<result property="camFov" column="cam_fov"/>
|
<result property="loginId" column="login_id"/>
|
<result property="operatorId" column="operator_id"/>
|
<result property="operatorName" column="operator_name"/>
|
<result property="operatorExpired" column="operator_expired"/>
|
<result property="camMaxVisibleDistance" column="cam_max_visible_distance"/>
|
<result property="camAlarmGuideEnable" column="cam_alarm_guide_enable"/>
|
<result property="state" column="state"/>
|
<result property="towerId" column="tower_id"/>
|
<result property="createBy" column="create_by" />
|
<result property="createTime" column="create_time" />
|
<result property="updateBy" column="update_by" />
|
<result property="updateTime" column="update_time" />
|
<collection property="channelList" ofType="com.ard.work.api.domian.ArdChannel"
|
javaType="List" column="id" autoMapping="true" select="selectChannelList">
|
</collection>
|
<collection property="hepuNodes" ofType="com.ard.work.api.domian.ArdCameraHepu"
|
javaType="List" column="id" autoMapping="true" select="selectHepuNodesList">
|
</collection>
|
</resultMap>
|
<resultMap type="ArdChannel" id="ArdChannelResult">
|
<result property="id" column="id"/>
|
<result property="name" column="name"/>
|
<result property="chanNo" column="chan_no"/>
|
<result property="videoCode" column="video_code"/>
|
<result property="deviceId" column="device_id"/>
|
<!-- 关联 ArdVtdu 对象 -->
|
<association property="ardVtdu" javaType="com.ard.vtdu.api.domian.ArdVtdu" column="{deviceId=device_id,chanNo=chan_no}" select="selectVtduByDeviceIdAndChanNo">
|
</association>
|
</resultMap>
|
<resultMap type="com.ard.vtdu.api.domian.ArdVtdu" id="ArdVtduResult">
|
<result property="name" column="name"/>
|
<result property="rtspSource" column="rtsp_source"/>
|
<result property="isCode" column="is_code"/>
|
<result property="isRecord" column="is_record"/>
|
<result property="mode" column="mode"/>
|
<result property="rtspUrl" column="rtsp_url"/>
|
<result property="rtmpUrl" column="rtmp_url"/>
|
<result property="webrtcUrl" column="webrtc_url"/>
|
<result property="cameraId" column="camera_id"/>
|
<result property="createBy" column="create_by"/>
|
<result property="createTime" column="create_time"/>
|
<result property="updateBy" column="update_by"/>
|
<result property="updateTime" column="update_time"/>
|
</resultMap>
|
<select id="selectVtduByDeviceIdAndChanNo" resultMap="ArdVtduResult">
|
select * from ard_vtdu where name = CONCAT(#{deviceId}, '_', #{chanNo})
|
</select>
|
<select id="selectChannelList" parameterType="String" resultMap="ArdChannelResult">
|
select *
|
from ard_channel
|
where device_id = #{id}
|
order by chan_no asc
|
</select>
|
<resultMap type="ArdCameraHepu" id="ArdCameraHepuResult">
|
<result property="id" column="id" />
|
<result property="cameraId" column="camera_id" />
|
<result property="nodeType" column="node_type" />
|
<result property="sortOrder" column="sort_order" />
|
<result property="ip" column="ip" />
|
<result property="port" column="port" />
|
<result property="rtspPort" column="rtsp_port" />
|
<result property="username" column="username" />
|
<result property="password" column="password" />
|
<result property="loginId" column="login_id" />
|
<result property="serialHandle" column="serial_handle" />
|
<result property="status" column="status" />
|
<result property="createBy" column="create_by" />
|
<result property="createTime" column="create_time" />
|
<result property="updateBy" column="update_by" />
|
<result property="updateTime" column="update_time" />
|
</resultMap>
|
<select id="selectHepuNodesList" parameterType="String" resultMap="ArdCameraHepuResult">
|
select * from ard_camera_hepu where camera_id = #{cameraId} order by sort_order asc
|
</select>
|
<sql id="selectArdCameraVo">
|
select c.id,
|
c.name,
|
c.ip,
|
c.port,
|
c.rtsp_port,
|
c.username,
|
c.password,
|
c.type,
|
c.factory,
|
c.chan_num,
|
c.start_chan,
|
c.longitude,
|
c.latitude,
|
c.altitude,
|
c.user_id,
|
c.dept_id,
|
c.login_id,
|
c.base_yaw,
|
c.cam_heading,
|
c.cam_pitch,
|
c.cam_roll,
|
c.cam_near,
|
c.cam_far,
|
c.cam_aspectratio,
|
c.cam_depth,
|
c.cam_fov,
|
c.operator_id,
|
c.operator_name,
|
c.operator_expired,
|
c.cam_max_visible_distance,
|
c.cam_alarm_guide_enable,
|
c.state,
|
c.tower_id,
|
c.create_by,
|
c.create_time,
|
c.update_by,
|
c.update_time
|
from ard_camera c
|
left join sys_dept d on d.dept_id = c.dept_id
|
left join sys_user u on u.user_id = c.user_id
|
</sql>
|
|
<select id="selectArdCameraList" parameterType="ArdCamera" resultMap="ArdCameraResult">
|
<include refid="selectArdCameraVo"/>
|
<where>
|
<if test="id != null and id != ''">and c.id = #{id}</if>
|
<if test="name != null and name != ''">and c.name like concat('%', #{name}, '%')</if>
|
<if test="ip != null and ip != ''">and c.ip = #{ip}</if>
|
<if test="port != null ">and c.port = #{port}</if>
|
<if test="rtspPort != null ">and c.rtsp_port = #{rtspPort}</if>
|
<if test="username != null and username != ''">and c.username like '%'||#{username}||'%'</if>
|
<if test="password != null and password != ''">and c.password = #{password}</if>
|
<if test="type != null and type != ''">and c.type = #{type}</if>
|
<if test="factory != null and factory != ''">and c.factory = #{factory}</if>
|
<if test="chanNum != null ">and c.chan_num = #{chanNum}</if>
|
<if test="startChan != null ">and c.start_chan = #{startChan}</if>
|
<if test="longitude != null ">and c.longitude = #{longitude}</if>
|
<if test="latitude != null ">and c.latitude = #{latitude}</if>
|
<if test="altitude != null ">and c.altitude = #{altitude}</if>
|
<if test="baseYaw != null ">and c.base_yaw = #{baseYaw}</if>
|
<if test="camHeading != null ">and c.cam_heading = #{camHeading}</if>
|
<if test="camPitch != null ">and c.cam_pitch = #{camPitch}</if>
|
<if test="camRoll != null ">and c.cam_roll = #{camRoll}</if>
|
<if test="camNear != null ">and c.cam_near = #{camNear}</if>
|
<if test="camFar != null ">and c.cam_far = #{camFar}</if>
|
<if test="camAspectratio != null ">and c.cam_aspectratio = #{camAspectratio}</if>
|
<if test="camDepth != null ">and c.cam_depth = #{camDepth}</if>
|
<if test="camFov != null ">and c.cam_fov = #{camFov}</if>
|
<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="towerId != null ">and c.tower_id = #{towerId}</if>
|
<if test="state != null ">and c.state = #{state}</if>
|
<if test="deptId != null and deptId != 0">
|
and (d.dept_id = #{deptId} OR d.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE
|
find_in_set(#{deptId}, ancestors) ))
|
</if>
|
<!-- 数据范围过滤 -->
|
${params.dataScope}
|
</where>
|
order by c.name
|
</select>
|
|
<select id="selectArdCameraById" parameterType="String" resultMap="ArdCameraResult">
|
<include refid="selectArdCameraVo"/>
|
where id = #{id}
|
</select>
|
<select id="selectArdCameraByName" parameterType="String" resultMap="ArdCameraResult">
|
<include refid="selectArdCameraVo"/>
|
where name = #{name}
|
</select>
|
<insert id="insertArdCamera" parameterType="ArdCamera">
|
insert into ard_camera
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">id,</if>
|
<if test="name != null">name,</if>
|
<if test="ip != null">ip,</if>
|
<if test="port != null">port,</if>
|
<if test="rtspPort != null ">rtsp_port,</if>
|
<if test="username != null">username,</if>
|
<if test="password != null">password,</if>
|
<if test="type != null">type,</if>
|
<if test="factory != null">factory,</if>
|
<if test="towerId != null">tower_id,</if>
|
<if test="chanNum != null">chan_num,</if>
|
<if test="startChan != null">start_chan,</if>
|
<if test="longitude != null">longitude,</if>
|
<if test="latitude != null">latitude,</if>
|
<if test="altitude != null">altitude,</if>
|
<if test="baseYaw != null">base_yaw,</if>
|
<if test="camHeading != null">cam_heading,</if>
|
<if test="camPitch != null">cam_pitch,</if>
|
<if test="camRoll != null">cam_roll,</if>
|
<if test="camNear != null">cam_near,</if>
|
<if test="camFar != null">cam_far,</if>
|
<if test="camAspectratio != null">cam_aspectratio,</if>
|
<if test="camDepth != null">cam_depth,</if>
|
<if test="camFov != null">cam_fov,</if>
|
<if test="camMaxVisibleDistance != null ">cam_max_visible_distance,</if>
|
<if test="camAlarmGuideEnable != null">cam_alarm_guide_enable,</if>
|
<if test="loginId != null">login_id,</if>
|
<if test="deptId != null">dept_id,</if>
|
<if test="userId != null">user_id,</if>
|
<if test="createBy != null">create_by,</if>
|
<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>
|
<if test="name != null">#{name},</if>
|
<if test="ip != null">#{ip},</if>
|
<if test="port != null">#{port},</if>
|
<if test="rtspPort != null ">#{rtspPort},</if>
|
<if test="username != null">#{username},</if>
|
<if test="password != null">#{password},</if>
|
<if test="type != null">#{type},</if>
|
<if test="factory != null">#{factory},</if>
|
<if test="towerId != null">#{towerId},</if>
|
<if test="chanNum != null">#{chanNum},</if>
|
<if test="startChan != null">#{startChan},</if>
|
<if test="longitude != null">#{longitude},</if>
|
<if test="latitude != null">#{latitude},</if>
|
<if test="altitude != null">#{altitude},</if>
|
<if test="baseYaw != null">#{baseYaw},</if>
|
<if test="camHeading != null">#{camHeading},</if>
|
<if test="camPitch != null">#{camPitch},</if>
|
<if test="camRoll != null">#{camRoll},</if>
|
<if test="camNear != null">#{camNear},</if>
|
<if test="camFar != null">#{camFar},</if>
|
<if test="camAspectratio != null">#{camAspectratio},</if>
|
<if test="camDepth != null">#{camDepth},</if>
|
<if test="camFov != null">#{camFov},</if>
|
<if test="camMaxVisibleDistance != null ">#{camMaxVisibleDistance},</if>
|
<if test="camAlarmGuideEnable != null">#{camAlarmGuideEnable},</if>
|
<if test="loginId != null">#{loginId},</if>
|
<if test="deptId != null">#{deptId},</if>
|
<if test="userId != null">#{userId},</if>
|
<if test="createBy != null">#{createBy},</if>
|
<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>
|
|
<update id="updateArdCamera" parameterType="ArdCamera">
|
update ard_camera
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="name != null">name = #{name},</if>
|
<if test="ip != null">ip = #{ip},</if>
|
<if test="port != null">port = #{port},</if>
|
<if test="rtspPort != null ">rtsp_port= #{rtspPort},</if>
|
<if test="username != null">username = #{username},</if>
|
<if test="password != null">password = #{password},</if>
|
<if test="type != null">type = #{type},</if>
|
<if test="factory != null">factory = #{factory},</if>
|
<if test="towerId != null">tower_id = #{towerId},</if>
|
<if test="chanNum != null">chan_num = #{chanNum},</if>
|
<if test="startChan != null">start_chan = #{startChan},</if>
|
<if test="longitude != null">longitude = #{longitude},</if>
|
<if test="latitude != null">latitude = #{latitude},</if>
|
<if test="altitude != null">altitude = #{altitude},</if>
|
<if test="baseYaw != null">base_yaw = #{baseYaw},</if>
|
<if test="camHeading != null">cam_heading = #{camHeading},</if>
|
<if test="camPitch != null">cam_pitch = #{camPitch},</if>
|
<if test="camRoll != null">cam_roll = #{camRoll},</if>
|
<if test="camNear != null">cam_near = #{camNear},</if>
|
<if test="camFar != null">cam_far = #{camFar},</if>
|
<if test="camAspectratio != null">cam_aspectratio = #{camAspectratio},</if>
|
<if test="camDepth != null">cam_depth = #{camDepth},</if>
|
<if test="camFov != null">cam_fov = #{camFov},</if>
|
<if test="camMaxVisibleDistance != null ">cam_max_visible_distance = #{camMaxVisibleDistance},</if>
|
<if test="camAlarmGuideEnable != null">cam_alarm_guide_enable = #{camAlarmGuideEnable},</if>
|
<if test="loginId != null">login_id = #{loginId},</if>
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
<if test="userId != null">user_id = #{userId},</if>
|
<if test="createBy != null">create_by = #{createBy},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="operatorId != null">operator_id = #{operatorId},</if>
|
<if test="operatorName != null">operator_name = #{operatorName},</if>
|
<if test="operatorExpired != null">operator_expired = #{operatorExpired},</if>
|
<if test="state != null">state = #{state},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteArdCameraById" parameterType="String">
|
delete
|
from ard_camera
|
where id = #{id}
|
</delete>
|
|
<delete id="deleteArdCameraByIds" parameterType="String">
|
delete from ard_camera where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
|
<select id="findOptions" parameterType="String" resultMap="ArdCameraResult">
|
<include refid="selectArdCameraVo"/>
|
<where>
|
<if test="id != null and id != ''">and c.id = #{id}</if>
|
<if test="name != null and name != ''">and c.name like '%'||#{name}||'%'</if>
|
</where>
|
</select>
|
<select id="selectArdCameraByDeptId" parameterType="Long" resultMap="ArdCameraResult">
|
select *
|
from ard_camera
|
where dept_id = #{deptId}
|
</select>
|
<select id="checkCameraIpAndPortUnique" resultMap="ArdCameraResult">
|
select *
|
from ard_camera
|
where ip = #{ip}
|
and port = #{port} limit 1
|
</select>
|
<update id="resetCameraLoginId">
|
update ard_camera set login_id = -1
|
</update>
|
|
<select id="getCameraByRadar" parameterType="String" resultMap="ArdCameraResult">
|
select a.* from ard_camera a ,ard_radar b ,ard_tower c
|
where a.tower_id = b.tower_id and c.id = a.tower_id and a.type = '1' and b.id=#{radarId} limit 1
|
</select>
|
|
<!--<select id="selectArdCameraAllInfoById" parameterType="java.lang.String" resultType="java.util.Map">
|
select ac.id,ac.`name`,ac.ip,ac.`port`,ac.rtsp_port as rtspPort,
|
ac.username,ac.`password`,ac.longitude,ac.latitude,ac.altitude,
|
ac.type,ac.factory,ac.state,sd.dept_name as deptName,
|
sdd.dict_label as dictLabel from ard_camera ac
|
inner join sys_dept sd on ac.dept_id = sd.dept_id
|
inner join sys_dict_data sdd on ac.type = sdd.dict_value
|
where id = #{id} and sdd.dict_type = 'camera_type'
|
</select>-->
|
|
<select id="selectArdCameraAllInfoById" parameterType="java.lang.String" resultType="java.util.Map">
|
select ac.id,ac.`name`,ac.ip,ac.`port`,ac.rtsp_port as rtspPort,
|
ac.username,ac.`password`,ac.longitude,ac.latitude,ac.altitude,
|
ac.type,ac.factory,ifnull(ac.start_chan, '') as startChan,
|
ifnull(ac.chan_num, '') as chanNum,ifnull(ac.user_id, '') as userId,
|
ifnull(ac.login_id, '') as loginId,ifnull(ac.base_yaw, '') as baseYaw,
|
ifnull(ac.cam_fov, '') as camFov,ifnull(ac.cam_heading, '') as camHeading,
|
ifnull(ac.cam_pitch, '') as camPitch,ifnull(ac.cam_roll, '') as camRoll,
|
ifnull(ac.cam_near, '') as camNear,ifnull(ac.cam_far, '') as camFar,
|
ifnull(ac.cam_aspectratio, '') as camAspectratio,
|
ifnull(ac.cam_depth, '') as camDepth,ifnull(ac.tower_id, '') as towerId,
|
ifnull(ac.create_by, '') as createBy,ifnull(ac.create_time, '') as createTime,
|
ifnull(ac.update_by, '') as updateBy,ifnull(ac.update_time, '') as updateTime,
|
ifnull(ac.operator_id, '') as operatorId,ifnull(ac.operator_name, '') as operatorName,
|
ifnull(ac.operator_expired, '') as operatorExpired,
|
ifnull(ac.cam_max_visible_distance, '') as camMaxVisibleDistance,
|
ifnull(ac.cam_alarm_guide_enable, '') as camAlarmGuideEnable,
|
ac.state,sd.dept_name as deptName,
|
sdd.dict_label as dictLabel from ard_camera ac
|
inner join sys_dept sd on ac.dept_id = sd.dept_id
|
inner join sys_dict_data sdd on ac.type COLLATE utf8mb4_general_ci = sdd.dict_value COLLATE utf8mb4_general_ci
|
where id = #{id} and sdd.dict_type = 'camera_type'
|
</select>
|
|
<!--<select id="selectArdCameraAllInfoByUserId" parameterType="java.lang.Long" resultType="java.util.Map">
|
select ac.id,ac.`name`,ac.ip,ac.`port`,ac.rtsp_port as rtspPort,
|
ac.username,ac.`password`,ac.longitude,ac.latitude,ac.altitude,
|
ac.type,ac.factory,ac.state,sd.dept_name as deptName,
|
sdd.dict_label as dictLabel from ard_camera ac
|
inner join sys_dept sd on ac.dept_id = sd.dept_id
|
inner join sys_dict_data sdd on ac.type = sdd.dict_value
|
where ac.dept_id in (with recursive rsd as (
|
select * from sys_dept sd where sd.dept_id = (select su.dept_id from sys_user su where su.user_id = #{userId})
|
union
|
select csd.* from sys_dept csd inner join rsd on rsd.dept_id = csd.parent_id)
|
select rsd.dept_id from rsd)
|
and sdd.dict_type = 'camera_type'
|
union
|
select ac.id,ac.`name`,ac.ip,ac.`port`,ac.rtsp_port as rtspPort,
|
ac.username,ac.`password`,ac.longitude,ac.latitude,ac.altitude,
|
ac.type,ac.factory,ac.state,sd.dept_name as deptName,
|
sdd.dict_label as dictLabel from ard_camera ac
|
inner join sys_dept sd on ac.dept_id = sd.dept_id
|
inner join sys_dict_data sdd on ac.type = sdd.dict_value
|
where ac.dept_id in (select srd.dept_id from sys_user_role sur
|
inner join sys_role_dept srd on sur.role_id = srd.role_id
|
where sur.user_id = #{userId})
|
and sdd.dict_type = 'camera_type'
|
|
</select>-->
|
|
<select id="selectArdCameraAllInfoByUserId" parameterType="java.lang.Long" resultType="java.util.Map">
|
select ac.id,ac.`name`,ac.ip,ac.`port`,ac.rtsp_port as rtspPort,
|
ac.username,ac.`password`,ac.longitude,ac.latitude,ac.altitude,
|
ac.type,ac.factory,ifnull(ac.start_chan, '') as startChan,
|
ifnull(ac.chan_num, '') as chanNum,ifnull(ac.user_id, '') as userId,
|
ifnull(ac.login_id, '') as loginId,ifnull(ac.base_yaw, '') as baseYaw,
|
ifnull(ac.cam_fov, '') as camFov,ifnull(ac.cam_heading, '') as camHeading,
|
ifnull(ac.cam_pitch, '') as camPitch,ifnull(ac.cam_roll, '') as camRoll,
|
ifnull(ac.cam_near, '') as camNear,ifnull(ac.cam_far, '') as camFar,
|
ifnull(ac.cam_aspectratio, '') as camAspectratio,
|
ifnull(ac.cam_depth, '') as camDepth,ifnull(ac.tower_id, '') as towerId,
|
ifnull(ac.create_by, '') as createBy,ifnull(ac.create_time, '') as createTime,
|
ifnull(ac.update_by, '') as updateBy,ifnull(ac.update_time, '') as updateTime,
|
ifnull(ac.operator_id, '') as operatorId,ifnull(ac.operator_name, '') as operatorName,
|
ifnull(ac.operator_expired, '') as operatorExpired,
|
ifnull(ac.cam_max_visible_distance, '') as camMaxVisibleDistance,
|
ifnull(ac.cam_alarm_guide_enable, '') as camAlarmGuideEnable,
|
ac.state,sd.dept_name as deptName,
|
sdd.dict_label as dictLabel from ard_camera ac
|
inner join sys_dept sd on ac.dept_id COLLATE utf8mb4_general_ci = sd.dept_id COLLATE utf8mb4_general_ci
|
inner join sys_dict_data sdd on ac.type COLLATE utf8mb4_general_ci = sdd.dict_value COLLATE utf8mb4_general_ci
|
where ac.dept_id in (with recursive rsd as (
|
select * from sys_dept sd where sd.dept_id = (select su.dept_id from sys_user su where su.user_id = #{userId})
|
union
|
select csd.* from sys_dept csd inner join rsd on rsd.dept_id = csd.parent_id)
|
select rsd.dept_id from rsd)
|
and sdd.dict_type = 'camera_type'
|
union
|
select ac.id,ac.`name`,ac.ip,ac.`port`,ac.rtsp_port as rtspPort,
|
ac.username,ac.`password`,ac.longitude,ac.latitude,ac.altitude,
|
ac.type,ac.factory,ifnull(ac.start_chan, '') as startChan,
|
ifnull(ac.chan_num, '') as chanNum,ifnull(ac.user_id, '') as userId,
|
ifnull(ac.login_id, '') as loginId,ifnull(ac.base_yaw, '') as baseYaw,
|
ifnull(ac.cam_fov, '') as camFov,ifnull(ac.cam_heading, '') as camHeading,
|
ifnull(ac.cam_pitch, '') as camPitch,ifnull(ac.cam_roll, '') as camRoll,
|
ifnull(ac.cam_near, '') as camNear,ifnull(ac.cam_far, '') as camFar,
|
ifnull(ac.cam_aspectratio, '') as camAspectratio,
|
ifnull(ac.cam_depth, '') as camDepth,ifnull(ac.tower_id, '') as towerId,
|
ifnull(ac.create_by, '') as createBy,ifnull(ac.create_time, '') as createTime,
|
ifnull(ac.update_by, '') as updateBy,ifnull(ac.update_time, '') as updateTime,
|
ifnull(ac.operator_id, '') as operatorId,ifnull(ac.operator_name, '') as operatorName,
|
ifnull(ac.operator_expired, '') as operatorExpired,
|
ifnull(ac.cam_max_visible_distance, '') as camMaxVisibleDistance,
|
ifnull(ac.cam_alarm_guide_enable, '') as camAlarmGuideEnable,
|
ac.state,sd.dept_name as deptName,
|
sdd.dict_label as dictLabel from ard_camera ac
|
inner join sys_dept sd on ac.dept_id COLLATE utf8mb4_general_ci = sd.dept_id COLLATE utf8mb4_general_ci
|
inner join sys_dict_data sdd on ac.type COLLATE utf8mb4_general_ci = sdd.dict_value COLLATE utf8mb4_general_ci
|
where ac.dept_id in (select srd.dept_id from sys_user_role sur
|
inner join sys_role_dept srd on sur.role_id = srd.role_id
|
where sur.user_id = #{userId})
|
and sdd.dict_type = 'camera_type'
|
</select>
|
</mapper>
|