|
@@ -88,10 +88,10 @@
|
|
|
SELECT
|
|
|
<include refid="workProjectNotifyColumns"/>
|
|
|
,a.wap_begin_date AS "wapCreateDate"
|
|
|
- ,(select user.id from work_activity_process wap left join sys_user user on wap.create_by = user.id where wap.count != 0 and (case when a.process_instance_id is null then wap.process_instance_id = (select waps.process_instance_id
|
|
|
+ ,(select user.id from work_activity_process wap left join sys_user user on wap.create_by = user.id where wap.count != 0 and (case when a.process_instance_id is null then wap.process_instance_id in (select waps.process_instance_id
|
|
|
FROM work_project_notify waps
|
|
|
WHERE waps.notify_id = a.notify_id and waps.process_instance_id is not null order by waps.notify_id desc
|
|
|
- LIMIT 1) else wap.process_instance_id = a.process_instance_id end) and wap.is_approval = '0' order by wap.count asc limit 1) as 'initiator'
|
|
|
+ ) else wap.process_instance_id = a.process_instance_id end) and wap.is_approval = '0' order by wap.create_date asc, wap.count asc limit 1) as 'initiator'
|
|
|
/*,(select p.user_id from work_activity_process wap
|
|
|
left join work_activity_process_user p on wap.process_instance_id = p.process_id and p.count = wap.count
|
|
|
left join sys_user u on u.id = p.user_id
|