Select U.cnname+ ', ' from F_splitstr (' 1828,1055333,1,1035681,752,494,22549,219,23860,478,23453,677,718,782,2358 ', ' ,‘)
Join T_bd_user U on U.ID=F1
For XML PATH (")
Select Rolename,executorname,
Case is temp. Cnname= ' Then '
When temp. Cnname<> ' Then
Left (temp. Cnname,len (temp. Cnname)-1) End as Cnname,executedate,actionname,status,remark from (select R.name rolename,u.cnname executorname,
(select U.cnname+ ', ' from F_splitstr (Receiverid, ', ')
Join T_bd_user U on U.ID=F1
For XML PATH (")) as Cnname,
A.executedate,
Case ActionId ' presentation '
When the "approval" End ActionName,
Case Approvelogstatusid If 1 then ' delivered '
When 2 Then ' released ' End Status,
Remark
From
T_fi_wf_approvelog A
Join T_is_facilitylpptemplate LPP on LPP. Workflowinstanceid=a.instanceid
Join T_bd_role R on R.id=a.roleid
Join T_bd_user U on U.id=a.executorid
Join T_sys_enum_templatestatus T on T.id=a.approvelogstatusid
where lpp.id=61) Temp
String ID converted to String name