预警信息管理
This commit is contained in:
parent
4ce62ca257
commit
fae49c5315
|
|
@ -0,0 +1,183 @@
|
||||||
|
<?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.dkl.large.mapper.DklMonitoringCameraMapper">
|
||||||
|
|
||||||
|
<resultMap type="DklMonitoringCamera" id="DklMonitoringCameraResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="name" column="name" />
|
||||||
|
<result property="types" column="types" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="delFlag" column="del_flag" />
|
||||||
|
<result property="deptId" column="dept_id" />
|
||||||
|
<result property="channelNumber" column="channel_number" />
|
||||||
|
<result property="filePath" column="file_path" />
|
||||||
|
<result property="standby" column="standby" />
|
||||||
|
<result property="standby1" column="standby1" />
|
||||||
|
<result property="standby2" column="standby2" />
|
||||||
|
<result property="pointsId" column="points_id" />
|
||||||
|
<result property="lng" column="lng" />
|
||||||
|
<result property="lat" column="lat" />
|
||||||
|
<result property="address" column="address" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectDklMonitoringCameraVo">
|
||||||
|
select dmc.id, dmc.name, dmc.types, dmc.create_by, dmc.create_time, dmc.update_by, dmc.update_time, dmc.del_flag, dmc.dept_id, dmc.channel_number,
|
||||||
|
dmc.file_path, dmc.standby, dmc.standby1, dmc.standby2, dmc.points_id, dmc.lng, dmc.lat, dmc.address ,dmp.point_name AS pointName ,sdd.dict_label AS typesName from dkl_monitoring_camera AS dmc
|
||||||
|
left join sys_dept d on dmc.dept_id = d.dept_id
|
||||||
|
left join dkl_monitoring_points dmp on dmp.id = dmc.points_id
|
||||||
|
left join sys_dict_data sdd on sdd.dict_value = dmc.types and sdd.dict_type ='monitoring_type'
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectDklMonitoringCameraList" parameterType="DklMonitoringCamera" resultMap="DklMonitoringCameraResult">
|
||||||
|
<include refid="selectDklMonitoringCameraVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="name != null and name != ''"> and dmc.name like concat('%', #{name}, '%')</if>
|
||||||
|
<if test="types != null and types != ''"> and dmc.types = #{types}</if>
|
||||||
|
<if test="deptId != null "> and dmc.dept_id = #{deptId}</if>
|
||||||
|
<if test="channelNumber != null and channelNumber != ''"> and dmc.channel_number = #{channelNumber}</if>
|
||||||
|
<if test="filePath != null and filePath != ''"> and dmc.file_path = #{filePath}</if>
|
||||||
|
<if test="standby != null and standby != ''"> and dmc.standby = #{standby}</if>
|
||||||
|
<if test="standby1 != null and standby1 != ''"> and dmc.standby1 = #{standby1}</if>
|
||||||
|
<if test="standby2 != null and standby2 != ''"> and dmc.standby2 = #{standby2}</if>
|
||||||
|
<if test="pointsId != null "> and dmc.points_id = #{pointsId}</if>
|
||||||
|
<if test="lng != null and lng != ''"> and dmc.lng = #{lng}</if>
|
||||||
|
<if test="lat != null and lat != ''"> and dmc.lat = #{lat}</if>
|
||||||
|
<if test="address != null and address != ''"> and dmc.address = #{address}</if>
|
||||||
|
<if test="delFlag != null and delFlag != ''"> and dmc.del_flag = #{delFlag}</if>
|
||||||
|
<if test="startTime != null and endTime != null ">
|
||||||
|
AND dmc.create_time BETWEEN #{startTime} and #{endTime}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
<!-- 数据范围过滤 -->
|
||||||
|
${params.dataScope}
|
||||||
|
order by dmc.create_time desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectDklMonitoringCameraById" parameterType="Long" resultMap="DklMonitoringCameraResult">
|
||||||
|
<include refid="selectDklMonitoringCameraVo"/>
|
||||||
|
where dmc.id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectDklMonitoringCameraByPath" parameterType="String" resultMap="DklMonitoringCameraResult">
|
||||||
|
<include refid="selectDklMonitoringCameraVo"/>
|
||||||
|
where dmc.file_path = #{path}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertDklMonitoringCamera" parameterType="DklMonitoringCamera">
|
||||||
|
insert into dkl_monitoring_camera
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null">name,</if>
|
||||||
|
<if test="types != null">types,</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="delFlag != null">del_flag,</if>
|
||||||
|
<if test="deptId != null">dept_id,</if>
|
||||||
|
<if test="channelNumber != null">channel_number,</if>
|
||||||
|
<if test="filePath != null">file_path,</if>
|
||||||
|
<if test="standby != null">standby,</if>
|
||||||
|
<if test="standby1 != null">standby1,</if>
|
||||||
|
<if test="standby2 != null">standby2,</if>
|
||||||
|
<if test="pointsId != null">points_id,</if>
|
||||||
|
<if test="lng != null">lng,</if>
|
||||||
|
<if test="lat != null">lat,</if>
|
||||||
|
<if test="address != null">address,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null">#{name},</if>
|
||||||
|
<if test="types != null">#{types},</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="delFlag != null">#{delFlag},</if>
|
||||||
|
<if test="deptId != null">#{deptId},</if>
|
||||||
|
<if test="channelNumber != null">#{channelNumber},</if>
|
||||||
|
<if test="filePath != null">#{filePath},</if>
|
||||||
|
<if test="standby != null">#{standby},</if>
|
||||||
|
<if test="standby1 != null">#{standby1},</if>
|
||||||
|
<if test="standby2 != null">#{standby2},</if>
|
||||||
|
<if test="pointsId != null">#{pointsId},</if>
|
||||||
|
<if test="lng != null">#{lng},</if>
|
||||||
|
<if test="lat != null">#{lat},</if>
|
||||||
|
<if test="address != null">#{address},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateDklMonitoringCamera" parameterType="DklMonitoringCamera">
|
||||||
|
update dkl_monitoring_camera
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="name != null">name = #{name},</if>
|
||||||
|
<if test="types != null">types = #{types},</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="delFlag != null">del_flag = #{delFlag},</if>
|
||||||
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||||
|
<if test="channelNumber != null">channel_number = #{channelNumber},</if>
|
||||||
|
<if test="filePath != null">file_path = #{filePath},</if>
|
||||||
|
<if test="standby != null">standby = #{standby},</if>
|
||||||
|
<if test="standby1 != null">standby1 = #{standby1},</if>
|
||||||
|
<if test="standby2 != null">standby2 = #{standby2},</if>
|
||||||
|
<if test="pointsId != null">points_id = #{pointsId},</if>
|
||||||
|
<if test="lng != null">lng = #{lng},</if>
|
||||||
|
<if test="lat != null">lat = #{lat},</if>
|
||||||
|
<if test="address != null">address = #{address},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteDklMonitoringCameraById" parameterType="int">
|
||||||
|
update dkl_monitoring_camera set del_flag = 2 where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteDklMonitoringCameraByIds" parameterType="int">
|
||||||
|
update dkl_monitoring_camera set del_flag = 2 where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="getDklMonitoringCameraCount" parameterType="string">
|
||||||
|
SELECT COUNT(*) FROM dkl_monitoring_camera WHERE del_flag = '0'
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getDeptOfWws" resultType="deptWwsVo">
|
||||||
|
SELECT
|
||||||
|
sd.dept_id as deptid,
|
||||||
|
sd.dept_name as deptname
|
||||||
|
FROM
|
||||||
|
dkl_monitoring_camera AS dmc
|
||||||
|
LEFT JOIN sys_dept AS sd ON sd.dept_id = dmc.dept_id
|
||||||
|
WHERE
|
||||||
|
dmc.del_flag = '0'
|
||||||
|
GROUP BY
|
||||||
|
sd.dept_id,
|
||||||
|
sd.dept_name
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getDeptOfWwsUrl" parameterType="deptWwsVo" resultType="deptWwsVo">
|
||||||
|
SELECT
|
||||||
|
sd.dept_id as deptid,
|
||||||
|
sd.dept_name as deptname,
|
||||||
|
dmc.file_path as code,
|
||||||
|
dmc. name as name
|
||||||
|
FROM
|
||||||
|
dkl_monitoring_camera AS dmc
|
||||||
|
LEFT JOIN sys_dept AS sd ON sd.dept_id = dmc.dept_id
|
||||||
|
WHERE
|
||||||
|
dmc.del_flag = '0'
|
||||||
|
<if test="deptid != null">
|
||||||
|
and dmc.dept_id = #{deptid}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue