119 lines
5.0 KiB
XML
119 lines
5.0 KiB
XML
|
|
<?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.sercurityControl.proteam.dutyTask.mapper.VoiPhotoLibraryMapper">
|
||
|
|
<!--确认违章库照片-->
|
||
|
|
<update id="confirmVoiImg">
|
||
|
|
UPDATE t_vio_war SET war_type = #{warType}, is_su = #{isSu},user_id = #{userId},is_time = #{isTime}
|
||
|
|
WHERE id = #{id}
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<update id="insertConfirm">
|
||
|
|
INSERT INTO t_vio_war(is_su,pro_name,war_type,is_time,user_id)values(
|
||
|
|
#{isSu}, #{id},#{warType},#{isTime} , #{userId})
|
||
|
|
</update>
|
||
|
|
<delete id="deleteImage" parameterType="java.lang.String">
|
||
|
|
delete from t_ty_image where create_time=#{time}
|
||
|
|
</delete>
|
||
|
|
<delete id="deleteTicket">
|
||
|
|
delete from t_ticket_info where job_num=#{key}
|
||
|
|
</delete>
|
||
|
|
<!--获取违章数据-->
|
||
|
|
<select id="getWzList" resultType="com.sercurityControl.proteam.domain.ty.MqImageVo" >
|
||
|
|
select distinct
|
||
|
|
tti.id,tti.task_name taskName,tti.analyseId,tti.devCode,tti.algCode,tti.algName,tti.analyseTime,tti.rawImageName,
|
||
|
|
tti.rawImageUrl,tti.rawImageId,tti.osdImageName,tti.osdImageUrl,tti.osdImageId,tti.analyseDesc,td.puid,
|
||
|
|
tti.create_time,tti.analyseResults,cm.bidding_section_name proName,
|
||
|
|
jcmi.team_name teamName,tvw.is_su isSu, sd.`name` AS warTypeName
|
||
|
|
from t_ty_image tti
|
||
|
|
left join t_device td on td.t_code=tti.devCode and td.is_flag=0
|
||
|
|
left join jj_ball jbl on jbl.camera_no=tti.devCode
|
||
|
|
left join jj_class_meetting cm on cm.camera_id2=jbl.id and tti.create_time=cm.current_constr_date and cm.delete_flag=0
|
||
|
|
left join jj_class_metting_info jcmi on jcmi.class_id=cm.id
|
||
|
|
left join t_vio_war tvw on tvw.pro_name=tti.id
|
||
|
|
LEFT JOIN sys_dist sd ON tvw.war_type = sd.id AND sd.`code` = 'disType_child' AND sd.is_flag = '0'
|
||
|
|
where tti.del_flag=0
|
||
|
|
<if test="proName!=null and proName!=''">
|
||
|
|
AND (
|
||
|
|
cm.bidding_section_name like concat('%',#{proName},'%') or
|
||
|
|
tti.details like concat('%',#{proName},'%')
|
||
|
|
)
|
||
|
|
</if>
|
||
|
|
<if test="teamName!=null and teamName!=''">
|
||
|
|
AND INSTR(jcmi.team_name,#{teamName})
|
||
|
|
</if>
|
||
|
|
<if test="startTime!=null and startTime!='' and endTime!=null and endTime!=''">
|
||
|
|
AND tti.create_time BETWEEN #{startTime} AND #{endTime}
|
||
|
|
</if>
|
||
|
|
<if test="warType!=null and warType!=''">
|
||
|
|
AND tvw.war_type IN (
|
||
|
|
<foreach collection="warTypeList" item="item" separator=",">
|
||
|
|
#{item}
|
||
|
|
</foreach>
|
||
|
|
)
|
||
|
|
</if>
|
||
|
|
ORDER BY tti.analyseTime DESC
|
||
|
|
</select>
|
||
|
|
|
||
|
|
|
||
|
|
<select id="getVoiPhotoLibraryList"
|
||
|
|
resultType="com.sercurityControl.proteam.dutyTask.domain.VoiWarnEntity">
|
||
|
|
SELECT
|
||
|
|
tvw.id,
|
||
|
|
tvw.pro_name AS proName,
|
||
|
|
tvw.team_name AS teamName,
|
||
|
|
sd.`name` AS warTypeName,
|
||
|
|
tvw.war_type AS warType,
|
||
|
|
tvw.image_path AS imagePath,
|
||
|
|
tvw.is_su AS isSu,
|
||
|
|
tvw.war_time AS warTime
|
||
|
|
FROM t_vio_war tvw
|
||
|
|
LEFT JOIN sys_dist sd ON tvw.war_type = sd.id AND sd.`code` = 'disType_child' AND sd.is_flag = '0'
|
||
|
|
WHERE tvw.`status` = '0' AND tvw.is_su IN ('0','1')
|
||
|
|
<if test="proName!=null and proName!=''">
|
||
|
|
AND INSTR(tvw.pro_name,#{proName})
|
||
|
|
</if>
|
||
|
|
<if test="teamName!=null and teamName!=''">
|
||
|
|
AND INSTR(tvw.team_name,#{teamName})
|
||
|
|
</if>
|
||
|
|
<if test="startTime!=null and startTime!='' and endTime!=null and endTime!=''">
|
||
|
|
AND tvw.war_time BETWEEN #{startTime} AND #{endTime}
|
||
|
|
</if>
|
||
|
|
<if test="warType!=null and warType!=''">
|
||
|
|
AND tvw.war_type IN (
|
||
|
|
<foreach collection="warTypeList" item="item" separator=",">
|
||
|
|
#{item}
|
||
|
|
</foreach>
|
||
|
|
)
|
||
|
|
</if>
|
||
|
|
ORDER BY war_time DESC,is_su ASC
|
||
|
|
</select>
|
||
|
|
<select id="getVoiPhotoCount" resultType="java.lang.Integer">
|
||
|
|
SELECT
|
||
|
|
COUNT(*)
|
||
|
|
FROM t_vio_war tvw
|
||
|
|
LEFT JOIN sys_dist sd ON tvw.war_type = sd.id AND sd.`code` = 'disType_child' AND sd.is_flag = '0'
|
||
|
|
WHERE tvw.`status` = '0' AND tvw.is_su IN ('0','1')
|
||
|
|
<if test="proName!=null and proName!=''">
|
||
|
|
AND INSTR(tvw.pro_name,#{proName})
|
||
|
|
</if>
|
||
|
|
<if test="teamName!=null and teamName!=''">
|
||
|
|
AND INSTR(tvw.team_name,#{teamName})
|
||
|
|
</if>
|
||
|
|
<if test="startTime!=null and startTime!='' and endTime!=null and endTime!=''">
|
||
|
|
AND tvw.war_time BETWEEN #{startTime} AND #{endTime}
|
||
|
|
</if>
|
||
|
|
<if test="warType!=null and warType!=''">
|
||
|
|
AND tvw.war_type IN (
|
||
|
|
<foreach collection="warTypeList" item="item" separator=",">
|
||
|
|
#{item}
|
||
|
|
</foreach>
|
||
|
|
)
|
||
|
|
</if>
|
||
|
|
</select>
|
||
|
|
<select id="getIsConfirm" resultType="java.lang.Integer">
|
||
|
|
select count(1)
|
||
|
|
from t_vio_war tvw
|
||
|
|
where tvw.pro_name=#{id}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
</mapper>
|