|
@@ -515,11 +515,13 @@
|
|
|
order by send_time desc
|
|
|
</select>
|
|
|
<select id="selectAppAll" resultMap="BaseResultMap">
|
|
|
- select id,task_no,send_time,address,order_type_id,current_task_name,create_by,update_by,task_desc,order_status
|
|
|
- from sc_work_order_manage
|
|
|
+ select distinct t1.id,task_no,send_time,address,order_type_id,current_task_name,t1.create_by,t1.update_by,task_desc,order_status
|
|
|
+ from sc_work_order_manage t1
|
|
|
+ left join sc_work_flow_log t2 ON t1.id=t2.flow_id and flow_type=2 and find_in_set(#{userId},handle_user_id) and left(flow_result,2)='拒单'
|
|
|
where (find_in_set(#{userId},current_users)
|
|
|
- or id in(select flow_id from sc_work_flow_log where flow_type=2 and find_in_set(#{userId},handle_user_id)))
|
|
|
+ or t1.id in(select flow_id from sc_work_flow_log where flow_type=2 and find_in_set(#{userId},handle_user_id)))
|
|
|
and tenant_id = #{tenantId}
|
|
|
+ and (t2.id is null or t1.order_user_id=t2.handle_user_id)
|
|
|
union
|
|
|
select id,plan_id,plan_date,task_area_name,task_type,current_task_name,create_by,update_by,task_content,plan_status
|
|
|
from sc_plan_manage
|