|
@@ -33,7 +33,6 @@
|
|
|
base_camera_management a join base_railway_management r
|
|
|
on a.railway_code=r.railway_code
|
|
|
LEFT JOIN base_device_dynamic_management AS man ON a.camera_code = man.camera_code
|
|
|
- LEFT JOIN msg_alarm AS msg ON a.camera_code = msg.camera_code
|
|
|
<where>
|
|
|
<if test="railwayCode != null and railwayCode != ''">
|
|
|
and a.railway_code=#{railwayCode}
|
|
@@ -87,7 +86,7 @@
|
|
|
</if>
|
|
|
</where>
|
|
|
ORDER BY
|
|
|
- CONVERT (r.railway_name USING gbk),a.install_mile,msg.is_lock,man.is_disable
|
|
|
+ CONVERT (r.railway_name USING gbk),a.install_mile
|
|
|
</select>
|
|
|
|
|
|
<select id="countCamera" parameterType="com.ozs.service.entity.vo.MsgAlarmVo" resultType="java.lang.Integer">
|
|
@@ -228,4 +227,90 @@
|
|
|
GROUP BY m.camera_code
|
|
|
ORDER BY cameraCount DESC
|
|
|
</select>
|
|
|
+ <select id="cameraManagementList" resultType="com.ozs.service.entity.BaseCameraManagement" parameterType="com.ozs.service.entity.vo.BaseCameraManagementVo">
|
|
|
+ SELECT
|
|
|
+ a.id AS id,
|
|
|
+ a.camera_code AS cameraCode,
|
|
|
+ a.railway_code AS railwayCode,
|
|
|
+ a.channel AS channel,
|
|
|
+ a.dept_id AS deptId,
|
|
|
+ a.line_dir AS lineDir,
|
|
|
+ a.install_mile AS installMile,
|
|
|
+ a.begin_mile AS beginMile,
|
|
|
+ a.end_mile AS endMile,
|
|
|
+ a.install_longitude AS installLongitude,
|
|
|
+ a.install_latitude AS installLatitude,
|
|
|
+ a.card_num AS cardNum,
|
|
|
+ a.start_recording AS startRecording,
|
|
|
+ a.task_id AS taskId,
|
|
|
+ a.create_time AS createTime,
|
|
|
+ a.remark AS remark,
|
|
|
+ a.version_id AS versionId,
|
|
|
+ a.version_num AS versionNum,
|
|
|
+ a.version_name AS versionName,
|
|
|
+ a.last_version_num AS lastVersionNum,
|
|
|
+ a.measure_point_name AS measurePointName,
|
|
|
+ a.camera_sn AS cameraSn,
|
|
|
+ r.railway_type AS railwayType,
|
|
|
+ man.is_disable AS isDisable
|
|
|
+ FROM
|
|
|
+ base_camera_management a join base_railway_management r
|
|
|
+ on a.railway_code=r.railway_code
|
|
|
+ LEFT JOIN base_device_dynamic_management AS man ON a.camera_code = man.camera_code
|
|
|
+ LEFT JOIN msg_alarm AS msg ON a.camera_code = msg.camera_code
|
|
|
+ <where>
|
|
|
+ <if test="railwayCode != null and railwayCode != ''">
|
|
|
+ and a.railway_code=#{railwayCode}
|
|
|
+ </if>
|
|
|
+ <if test="isDisable != null and isDisable != 0">
|
|
|
+ and man.is_disable=#{isDisable}
|
|
|
+ </if>
|
|
|
+ <if test="cameraCode != null and cameraCode != ''">
|
|
|
+ and a.camera_code like concat('%', #{cameraCode}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="lineDir != null and lineDir != 0">
|
|
|
+ and a.line_dir =#{lineDir}
|
|
|
+ </if>
|
|
|
+ <if test="deptId != null and deptId != 0">
|
|
|
+ and a.dept_id =#{deptId}
|
|
|
+ </if>
|
|
|
+ <if test="beginMile != null and beginMile != 0">
|
|
|
+ and a.install_mile >=#{beginMile}
|
|
|
+ </if>
|
|
|
+ <if test="endMile != null and endMile != 0">
|
|
|
+ and a.install_mile <=#{endMile}
|
|
|
+ </if>
|
|
|
+ <if test="installMile != null and installMile != 0">
|
|
|
+ and a.install_mile =#{installMile}
|
|
|
+ </if>
|
|
|
+ <if test="railwayType != null and railwayType != 0">
|
|
|
+ and r.railway_type =#{railwayType}
|
|
|
+ </if>
|
|
|
+ <if test="ids != null and ids.size>0">
|
|
|
+ and a.id in
|
|
|
+ <foreach item="items" collection="ids" separator="," open="(" close=")" index="">
|
|
|
+ #{items}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="!dsFlay">
|
|
|
+ and
|
|
|
+ <trim prefix="(" prefixOverrides="or" suffix=")">
|
|
|
+ <if test="dsUserId != null and dsUserId != ''">
|
|
|
+ or a.create_by=#{dsUserId}
|
|
|
+ </if>
|
|
|
+ <if test="dsDeptId != null and dsDeptId != 0">
|
|
|
+ or a.dept_id=#{dsDeptId}
|
|
|
+ </if>
|
|
|
+ <if test="dsDeptIds != null">
|
|
|
+ or a.dept_id in
|
|
|
+ <foreach item="item" collection="dsDeptIds" separator="," open="(" close=")" index="">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ ORDER BY
|
|
|
+ a.install_longitude,msg.is_lock desc,man.is_disable desc
|
|
|
+ </select>
|
|
|
</mapper>
|