兴安出门证申请开发
This commit is contained in:
@@ -73,6 +73,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="filePath != null and filePath != ''"> and spr.file_path = #{filePath}</if>
|
||||
<if test="showTime != null "> and spr.show_time = #{showTime}</if>
|
||||
<if test="showDate != null "> and DATE_FORMAT(spr.show_date, '%Y-%m-%d') = DATE_FORMAT(#{showDate}, '%Y-%m-%d')</if>
|
||||
<if test="showDateState != null"> and spr.show_date <![CDATA[ >= ]]> #{showDateState}</if>
|
||||
<if test="showDateEnd != null"> and spr.show_date <![CDATA[ <= ]]> #{showDateEnd}</if>
|
||||
<if test="aliveType != null and aliveType != ''"> and spr.alive_type = #{aliveType}</if>
|
||||
<if test="recScore != null and recScore != ''"> and spr.rec_score = #{recScore}</if>
|
||||
<if test="deviceNo != null and deviceNo != ''"> and spr.device_no = #{deviceNo}</if>
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="vehicle" column="vehicle"/>
|
||||
<result property="currentNode" column="current_node"/>
|
||||
<result property="isExistBack" column="is_exist_back"/>
|
||||
<!-- <association property="examine" column="id" javaType="VisStuffInfoVo" resultMap="StuffResult"/>-->
|
||||
</resultMap>
|
||||
|
||||
@@ -52,6 +53,38 @@
|
||||
<result property="sort" column="sort"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="VisStuffInfoExportVo" id="StuffInfoExportResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="userName" column="userName"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="exitPermitNo" column="exit_permit_no"/>
|
||||
<result property="visitingUnit" column="visiting_unit"/>
|
||||
<result property="visTime" column="vis_time"/>
|
||||
<result property="carNo" column="car_no"/>
|
||||
<result property="exitId" column="exit_id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="purpose" column="purpose"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="model" column="model"/>
|
||||
<result property="unit" column="unit"/>
|
||||
<result property="number" column="number"/>
|
||||
<result property="imgUrls" column="img_urls"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="isBack" column="is_back"/>
|
||||
<result property="backTime" column="back_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="backName" column="back_name"/>
|
||||
<result property="backPurpose" column="back_purpose"/>
|
||||
<result property="backType" column="back_type"/>
|
||||
<result property="backModel" column="back_model"/>
|
||||
<result property="backUnit" column="back_unit"/>
|
||||
<result property="backNumber" column="back_number"/>
|
||||
<result property="backImgUrls" column="back_img_urls"/>
|
||||
<result property="backRemark" column="back_remark"/>
|
||||
<result property="examineState" column="examine_state"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectVisExitOutVo">
|
||||
select distinct
|
||||
e.id,
|
||||
@@ -72,7 +105,11 @@
|
||||
e.update_by,
|
||||
e.update_time,
|
||||
e.vehicle,
|
||||
e.current_node
|
||||
e.current_node,
|
||||
e.is_exist_back,
|
||||
(select p.name from sys_people p where p.id = e.reviewer1) as reviewerName1,
|
||||
(select p.name from sys_people p where p.id = e.reviewer2) as reviewerName2,
|
||||
(select p.name from sys_people p where p.id = e.reviewer3) as reviewerName3
|
||||
from vis_exit_out e
|
||||
</sql>
|
||||
|
||||
@@ -93,6 +130,7 @@
|
||||
<if test="reviewer3 != null">reviewer3 = #{reviewer3},</if>
|
||||
<if test="examineState != null and examineState != ''">examine_state = #{examineState},</if>
|
||||
<if test="currentNode != null">current_node = #{currentNode},</if>
|
||||
<if test="isExistBack != null">is_exist_back = #{isExistBack},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
@@ -103,13 +141,16 @@
|
||||
<where>
|
||||
<if test="id != null">and e.id = #{id}</if>
|
||||
<if test="name != null and name != ''">and e.`name` like concat('%', #{name}, '%')</if>
|
||||
<if test="createBy != null ">and e.create_by = #{createBy}</if>
|
||||
<if test="userId != null ">and e.user_id = #{userId}</if>
|
||||
<if test="examineState != null and examineState != 3">and e.examine_state = #{examineState}</if>
|
||||
<if test="visTimeStart != null">and e.vis_time <![CDATA[ >= ]]> #{visTimeStart}</if>
|
||||
<if test="visTimeEnd != null">and e.vis_time <![CDATA[ <= ]]> #{visTimeEnd}</if>
|
||||
<if test="exitPermitNo != null and exitPermitNo != ''">and e.exitPermit_no = #{exitPermitNo}</if>
|
||||
<if test="examineState != null and examineState != '' and examineState != 3">and e.examine_state = #{examineState}</if>
|
||||
<if test="isExistBack != null">and e.is_exist_back = #{isExistBack}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectVisStuffById" resultType="com.dcsoft.system.visitor.domain.VisExitOutVo">
|
||||
<select id="selectVisExitOutById" resultType="com.dcsoft.system.visitor.domain.VisExitOutVo">
|
||||
<include refid="selectVisExitOutVo"/>
|
||||
where e.id = #{id}
|
||||
</select>
|
||||
@@ -173,7 +214,7 @@
|
||||
<where>
|
||||
<if test="exitId != null">and exit_id = #{exitId}</if>
|
||||
<if test="name != null and name != ''">and `name` like concat('%', #{name}, '%')</if>
|
||||
<if test="createBy != null ">and e.create_by = #{createBy}</if>
|
||||
<if test="createBy != null ">and create_by = #{createBy}</if>
|
||||
<if test="exitIds != null and exitIds.size() > 0">
|
||||
exit_id in
|
||||
<foreach item="id" collection="exitIds" open="(" separator="," close=")">
|
||||
@@ -183,6 +224,53 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectVisitorList" resultMap="StuffInfoExportResult">
|
||||
SELECT
|
||||
s.`exit_id`,
|
||||
s.`name`,
|
||||
s.`purpose`,
|
||||
s.`type`,
|
||||
s.`model`,
|
||||
s.`unit`,
|
||||
s.`number`,
|
||||
s.`img_urls`,
|
||||
s.`remark`,
|
||||
s.`is_back`,
|
||||
s.`back_time`,
|
||||
s.`back_name`,
|
||||
s.`back_purpose`,
|
||||
s.`back_type`,
|
||||
s.`back_model`,
|
||||
s.`back_unit`,
|
||||
s.`back_number`,
|
||||
s.`back_img_urls`,
|
||||
s.`back_remark`,
|
||||
e.name username,
|
||||
e.phone,
|
||||
e.visiting_unit,
|
||||
e.vis_time,
|
||||
e.exit_permit_no,
|
||||
e.examine_state
|
||||
FROM
|
||||
`vis_exit_out` e
|
||||
LEFT JOIN vis_stuff_info s ON e.id = s.exit_id
|
||||
<where>
|
||||
<if test="id != null">and e.id = #{id}</if>
|
||||
<if test="name != null and name != ''">and e.`name` like concat('%', #{name}, '%')</if>
|
||||
<if test="visTimeStart != null">and e.vis_time <![CDATA[ >= ]]> #{visTimeStart}</if>
|
||||
<if test="visTimeEnd != null">and e.vis_time <![CDATA[ <= ]]> #{visTimeEnd}</if>
|
||||
<if test="exitPermitNo != null and exitPermitNo != ''">and e.exitPermit_no = #{exitPermitNo}</if>
|
||||
<if test="examineState != null and examineState != '' and examineState != 3">and e.examine_state = #{examineState}</if>
|
||||
<if test="isExistBack != null">and e.is_exist_back = #{isExistBack}</if>
|
||||
<if test="ids != null and ids.size() > 0">
|
||||
or e.id in
|
||||
<foreach item="id" collection="ids" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertVisExitOut" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into vis_exit_out
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
@@ -202,6 +290,7 @@
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="vehicle != null">vehicle,</if>
|
||||
<if test="currentNode != null">current_node,</if>
|
||||
<if test="isExistBack != null">is_exist_back,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id},</if>
|
||||
@@ -220,6 +309,7 @@
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="vehicle != null">#{vehicle},</if>
|
||||
<if test="currentNode != null">#{currentNode},</if>
|
||||
<if test="isExistBack != null">#{isExistBack},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="saveVisitorReviewProcess">
|
||||
|
||||
@@ -28,6 +28,14 @@
|
||||
from vis_exit_out_record r
|
||||
</sql>
|
||||
|
||||
<delete id="delete">
|
||||
delete from vis_exit_out_record
|
||||
where id in
|
||||
<foreach item="id" collection="list" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectList" resultType="com.dcsoft.system.visitor.domain.VisExitOutRecordVo">
|
||||
select distinct
|
||||
r.id,
|
||||
@@ -37,14 +45,24 @@
|
||||
r.create_time,
|
||||
r.update_by,
|
||||
r.update_time,
|
||||
p.name,
|
||||
ifnull(u.nick_name, u.user_name) userName,
|
||||
e.name applyName,
|
||||
e.exit_permit_no,
|
||||
e.vis_time
|
||||
from vis_exit_out_record r
|
||||
left join sys_people p on r.user_id = p.id
|
||||
left join vis_exit_out e on r.exit_id = e.id
|
||||
left join sys_user u on r.user_id = u.user_id
|
||||
<where>
|
||||
<if test="id != null">and r.id = #{id}</if>
|
||||
<if test="name != null and name != ''">and r.`name` like concat('%', #{name}, '%')</if>
|
||||
<if test="userName != null and userName != ''">and (u.user_name like concat('%', #{userName}, '%') or u.nick_name like concat('%', #{userName}, '%'))</if>
|
||||
<if test="createBy != null ">and r.create_by = #{createBy}</if>
|
||||
<if test="userId != null ">and r.user_id = #{userId}</if>
|
||||
<if test="visTimeStart != null">and e.vis_time <![CDATA[ >= ]]> #{visTimeStart}</if>
|
||||
<if test="visTimeEnd != null">and e.vis_time <![CDATA[ <= ]]> #{visTimeEnd}</if>
|
||||
<if test="createTimeStr != null">and r.create_time <![CDATA[ >= ]]> #{createTimeStr}</if>
|
||||
<if test="createTimeEnd != null">and r.create_time <![CDATA[ <= ]]> #{createTimeEnd}</if>
|
||||
<if test="exitPermitNo != null and exitPermitNo != ''">and e.exitPermit_no = #{exitPermitNo}</if>
|
||||
<if test="applyName != null and applyName != ''">and e.`name` like concat('%', #{applyName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -58,14 +76,12 @@
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="exitId != null">`exit_id`,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="exitId != null">#{exitId},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
</trim>
|
||||
|
||||
Reference in New Issue
Block a user