SQL示例:
select distinct a.requestid,a.id,a.sqr,b.requestname,a.sqsj,a.lcbh,a.gdh,c.userid,a.kbfzje,a.cbfzje,a.bfzje,(select stuff((select distinct ','+convert(varchar, e.projectcodename)
from formtable_main_31_dt1 e where 1=1 and e.mainid= d.mainid for xml path('')), 1, 1, '') as projectcodename from formtable_main_31_dt1 d where d.mainid=a.id group by d.mainid) as projectcodenames,(select stuff((select distinct ','+convert(varchar, e.shortname)
from formtable_main_31_dt1 e where 1=1 and e.mainid= d.mainid for xml path('')), 1, 1, '') as productname from formtable_main_31_dt1 d where d.mainid=a.id group by d.mainid) as productnames from formtable_main_31 a,workflow_requestbase b,workflow_currentoperator c
where a.requestid=b.requestid and c.requestid=a.requestId and b.currentnodetype!=3 and c.userid in(112,159,120) and c.isremark=0;
这只是针对单个流程的待办事宜列表,要支持多流程待办事宜列表请自行扩充,userid后面的in括号里为具体审批人的ID。
虚拟表单配置截图: