兴安优化提交
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
<resultMap type="VisExitOutVo" id="VisitorResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="reason" column="reason"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="exitPermitNo" column="exit_permit_no"/>
|
||||
@@ -57,6 +58,7 @@
|
||||
<result property="id" column="id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="userName" column="userName"/>
|
||||
<result property="reason" column="reason"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="exitPermitNo" column="exit_permit_no"/>
|
||||
<result property="visitingUnit" column="visiting_unit"/>
|
||||
@@ -89,6 +91,7 @@
|
||||
select distinct
|
||||
e.id,
|
||||
e.user_id,
|
||||
e.reason,
|
||||
e.name,
|
||||
e.phone,
|
||||
e.`exit_permit_no`,
|
||||
@@ -118,6 +121,7 @@
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="name != null and name != ''"> `name` = #{name},</if>
|
||||
<if test="reason != null and reason != ''"> `reason` = #{reason},</if>
|
||||
<if test="phone != null and phone != ''"> `phone` = #{phone},</if>
|
||||
<if test="exitPermitNo != null and exitPermitNo != ''"> `exit_permit_no` = #{exitPermitNo},</if>
|
||||
<if test="peopleId != null and peopleId != ''"> `people_id` = #{peopleId},</if>
|
||||
@@ -136,6 +140,15 @@
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateVisitorReviewProcessById">
|
||||
update vis_visitor_review_process
|
||||
set state = #{state}
|
||||
<if test="rejectReason != null and rejectReason != ''">
|
||||
,reject_reason = #{rejectReason}
|
||||
</if>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="selectList" resultType="com.dcsoft.system.visitor.domain.VisExitOutVo">
|
||||
<include refid="selectVisExitOutVo"/>
|
||||
<where>
|
||||
@@ -148,6 +161,7 @@
|
||||
<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>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectVisExitOutById" resultType="com.dcsoft.system.visitor.domain.VisExitOutVo">
|
||||
@@ -270,12 +284,30 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectVisitorReviewProcessOne"
|
||||
resultType="com.dcsoft.system.visitor.domain.VisitorReviewProcessVo">
|
||||
select
|
||||
id,
|
||||
visitor_id visitorId,
|
||||
reviewer,
|
||||
state,
|
||||
type,
|
||||
created_time createdTime,
|
||||
exit_id exitId
|
||||
from vis_visitor_review_process
|
||||
where exit_id = #{exitId}
|
||||
and reviewer = #{reviewer}
|
||||
and state = '2'
|
||||
order by created_time asc
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertVisExitOut" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into vis_exit_out
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="reason != null and reason != ''">reason,</if>
|
||||
<if test="name != null and name != ''">`name`,</if>
|
||||
<if test="phone != null and phone != ''">`phone`,</if>
|
||||
<if test="exitPermitNo != null and exitPermitNo != ''">`exit_permit_no`,</if>
|
||||
@@ -295,6 +327,7 @@
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="reason != null and reason != ''">#{reason},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="phone != null and phone != ''">#{phone},</if>
|
||||
<if test="exitPermitNo != null and exitPermitNo != ''">#{exitPermitNo},</if>
|
||||
@@ -373,4 +406,12 @@
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<insert id="saveVisitorReviewProcessList">
|
||||
insert into vis_visitor_review_process (id, exit_id, reviewer, state)
|
||||
VALUES
|
||||
<foreach collection="list" item="i" index="index" separator=",">
|
||||
(REPLACE(uuid(), '-', ''), #{i.id}, #{i.reviewer}, #{i.state})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user