兴安优化审批
This commit is contained in:
@@ -146,7 +146,11 @@
|
||||
<if test="rejectReason != null and rejectReason != ''">
|
||||
,reject_reason = #{rejectReason}
|
||||
</if>
|
||||
where id = #{id}
|
||||
<if test="approveData != null and approveData != ''">
|
||||
,approve_data = #{approveData}
|
||||
</if>
|
||||
where exit_id = #{exitId}
|
||||
and approve_node = #{approveNode}
|
||||
</update>
|
||||
|
||||
<update id="updateStaffState">
|
||||
@@ -207,7 +211,7 @@
|
||||
from vis_visitor_review_process vvrp
|
||||
left join sys_people sp on vvrp.reviewer = sp.id and sp.del_flag = '0'
|
||||
where exit_id = #{id}
|
||||
order by ifnull(createdTime, 'zzz')
|
||||
order by approve_node asc,ifnull(createdTime, 'zzz')
|
||||
</select>
|
||||
|
||||
<select id="queryReviewProcessNew" resultType="com.dcsoft.system.visitor.domain.VisitorReviewProcessVo">
|
||||
@@ -217,9 +221,10 @@
|
||||
reject_reason,
|
||||
updated_time updatedTime
|
||||
from vis_visitor_review_process
|
||||
where exit_id = #{id}
|
||||
and reviewer = #{reviewer}
|
||||
order by updated_time desc
|
||||
where exit_id = #{exitId}
|
||||
and approve_data = #{approveData}
|
||||
order by approve_node desc
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectStuffList" resultMap="StuffResult">
|
||||
@@ -350,6 +355,23 @@
|
||||
e.id
|
||||
</select>
|
||||
|
||||
<select id="queryReviewProcess" resultType="com.dcsoft.system.visitor.domain.VisitorReviewProcessVo">
|
||||
select
|
||||
reviewer,
|
||||
state,
|
||||
reject_reason
|
||||
from vis_visitor_review_process
|
||||
where exit_id = #{exitId}
|
||||
<if test="reviewer != null and reviewer != ''">
|
||||
and reviewer = #{reviewer}
|
||||
</if>
|
||||
<if test="approveData != null and approveData != ''">
|
||||
and approve_data = #{approveData}
|
||||
</if>
|
||||
order by approve_node desc
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<insert id="insertVisExitOut" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into vis_exit_out
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
@@ -455,10 +477,10 @@
|
||||
</insert>
|
||||
|
||||
<insert id="saveVisitorReviewProcessList">
|
||||
insert into vis_visitor_review_process (id, exit_id, reviewer, state)
|
||||
insert into vis_visitor_review_process (id, exit_id, reviewer, state, approve_node, approve_data)
|
||||
VALUES
|
||||
<foreach collection="list" item="i" index="index" separator=",">
|
||||
(REPLACE(uuid(), '-', ''), #{i.id}, #{i.reviewer}, #{i.state})
|
||||
(REPLACE(uuid(), '-', ''), #{i.id}, #{i.reviewer}, #{i.state}, #{i.approveNode}, #{i.approveData})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
@@ -380,10 +380,10 @@
|
||||
</if>)
|
||||
</insert>
|
||||
<insert id="saveVisitorReviewProcessList">
|
||||
insert into vis_visitor_review_process (id, visitor_id, reviewer, state, reject_reason, approve_node)
|
||||
insert into vis_visitor_review_process (id, visitor_id, reviewer, state, reject_reason, approve_node, approve_data)
|
||||
VALUES
|
||||
<foreach collection="list" item="i" index="index" separator=",">
|
||||
(REPLACE(uuid(), '-', ''), #{i.id}, #{i.reviewer}, #{i.state}, #{i.rejectReason}, #{i.approveNode})
|
||||
(REPLACE(uuid(), '-', ''), #{i.id}, #{i.reviewer}, #{i.state}, #{i.rejectReason}, #{i.approveNode}, #{i.approveData})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
@@ -527,9 +527,12 @@
|
||||
<update id="updateVisitorReviewProcess">
|
||||
update vis_visitor_review_process
|
||||
set state = #{state}
|
||||
<if test="rejectReason != null and rejectReason != ''">
|
||||
,reject_reason = #{rejectReason}
|
||||
</if>
|
||||
<if test="rejectReason != null and rejectReason != ''">
|
||||
,reject_reason = #{rejectReason}
|
||||
</if>
|
||||
<if test="approveData != null and approveData != ''">
|
||||
,approve_data = #{approveData}
|
||||
</if>
|
||||
where visitor_id = #{id}
|
||||
<if test="reviewer != null and reviewer != ''">
|
||||
and reviewer = #{reviewer}
|
||||
@@ -888,19 +891,19 @@
|
||||
order by vvar.created_time desc
|
||||
limit 1
|
||||
</select>
|
||||
<select id="queryReviewProcess" resultType="com.dcsoft.system.visitor.domain.Visitor">
|
||||
<select id="queryReviewProcess" resultType="com.dcsoft.system.visitor.domain.VisitorReviewProcessVo">
|
||||
select
|
||||
reviewer,
|
||||
state,
|
||||
reject_reason
|
||||
reviewer,
|
||||
state,
|
||||
reject_reason
|
||||
from vis_visitor_review_process
|
||||
where visitor_id = #{id}
|
||||
<if test="position != null and position != ''">
|
||||
and type = #{position}
|
||||
</if>
|
||||
where visitor_id = #{visitorId}
|
||||
<if test="reviewer != null and reviewer != ''">
|
||||
and reviewer = #{reviewer}
|
||||
</if>
|
||||
<if test="approveData != null and approveData != ''">
|
||||
and approve_data = #{approveData}
|
||||
</if>
|
||||
order by approve_node desc
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user