|
|
@@ -813,12 +813,17 @@ select
|
|
|
</select>
|
|
|
<select id="selectProcess" resultType="java.lang.Integer">
|
|
|
select t0.id from (select x.id
|
|
|
- from (select a.id
|
|
|
- from new_order_change a left join t_order_task c on a.order_no =c.order_no
|
|
|
- where a.process_state= #{type}
|
|
|
- and c.consultant_id = #{aid} group by a.id)x
|
|
|
- left join new_order_change z on x.id=z.id
|
|
|
- left join order_examine y on z.order_no=y.order_no
|
|
|
- where y.`type` =0 group by x.id)t0
|
|
|
+ from (select a.id from new_order_change a left join t_order_task c on a.order_no =c.order_no
|
|
|
+ where a.process_state= #{type}
|
|
|
+ <if test="type==3">
|
|
|
+ and c.consultant_id = #{aid}
|
|
|
+ </if>
|
|
|
+ <if test="type==4">
|
|
|
+ and c.manager_id = #{aid}
|
|
|
+ </if>
|
|
|
+ group by a.id)x
|
|
|
+ left join new_order_change z on x.id=z.id
|
|
|
+ left join order_examine y on z.order_no=y.order_no
|
|
|
+ where y.`type` =0 group by x.id)t0
|
|
|
</select>
|
|
|
</mapper>
|