|
|
@@ -748,13 +748,20 @@ select
|
|
|
</if>
|
|
|
</update>
|
|
|
<update id="updateTaskExamineName">
|
|
|
- update new_order_change n left join (select a.order_no
|
|
|
+ update new_order_change n left join (select c.id
|
|
|
from t_order_new a left join t_order_task b on a.order_no =b.order_no
|
|
|
left join new_order_change c on a.order_no =c.order_no
|
|
|
where (b.consultant_id in (#{aid},#{taskReceiverId}) or b.manager_id in (#{aid},#{taskReceiverId}))
|
|
|
- and c.process_state in (#{type}) group by a.order_no)x on n.order_no =x.order_no
|
|
|
- left join (select a.order_no ,group_concat(b.name)name from order_examine a left join admin b on a.aid=b.id
|
|
|
- where a.type=0 group by a.order_no ) a on n.order_no =a.order_no
|
|
|
+ and c.process_state in (#{type}) group by c.id)x on n.id =x.id
|
|
|
+ left join (select a.order_no ,group_concat(DISTINCT b.name)name from order_examine a left join admin b on a.aid=b.id
|
|
|
+ where 1=1
|
|
|
+ <if test="type==2">
|
|
|
+ and a.type=0
|
|
|
+ </if>
|
|
|
+ <if test="type==3">
|
|
|
+ and a.type=1
|
|
|
+ </if>
|
|
|
+ group by a.order_no ) a on n.order_no =a.order_no
|
|
|
set n.examine_name =a.name
|
|
|
where n.process_state =#{type}
|
|
|
</update>
|