17,086
社区成员
发帖
与我相关
我的任务
分享
select a.*,b.*,to_char(a.launch_time,'yyyy-MM-dd hh24:mi:ss') l_time,e.ename,ed.dictname,d.pathname servicecatalogname,
b.applicant,b.applicant_com,t.customerorganname,(select tmp.uname from (select row_number()
over(partition by m.instance_id order by m.task_log_id) gid,m.user_name uname,m.processinstid from bpm_rtm_log_task m where
m.process_id= 'cn.net.sinodata.sdbomc.itsm.workflow.genericservice.genericservice') tmp
where tmp.gid=2 and a.processinstid = tmp.processinstid)
from bpm_rtm_process_instance a,
bpm_biz_itsm_genericservice b,
itsm_dict_servicecatalog d,
itsm_dict_gs_emergency e,
eos_dict_entry ed,
(select t.customeruserid,
t.customerid,
t.customerusername,
t.customeruserorgan,
t.customeruserphone2,
t.customerusermail,
t.customerusermsn,
t.customeruserqq,
t.createname,
t.createtime,
t.lastupdatename,
t.lastupdatetime,
t.helpdeskapplyrole,
t.headername,
t.headerid,
b.customerorganname
from itsm_dict_customer_user t, itsm_dict_customer_organ b
where t.customeruserorgan = b.customerorganid(+)) t
where a.processinstid = b.processinstid_
and ed.dicttypeid = 'BPM_CFG_INST_STATUS'
and a.instance_status = ed.dictid(+)
and b.servicecatalog = d.id(+)
and b.urgency_degree = e.id(+)
and b.applicant_id = t.customeruserid(+)
and b.applicant_com_id = t.customerid(+)
and b.data_type_ = 'new'
order by a.launch_time desc
SELECT A.*,
B.*,
TO_CHAR(A.LAUNCH_TIME, 'yyyy-MM-dd hh24:mi:ss') L_TIME,
E.ENAME,
ED.DICTNAME,
D.PATHNAME SERVICECATALOGNAME,
B.APPLICANT,
B.APPLICANT_COM,
T.CUSTOMERORGANNAME,
F.UNAME
FROM BPM_RTM_PROCESS_INSTANCE A,
BPM_BIZ_ITSM_GENERICSERVICE B,
ITSM_DICT_SERVICECATALOG D,
ITSM_DICT_GS_EMERGENCY E,
EOS_DICT_ENTRY ED,
(SELECT TMP.UNAME,TMP.PROCESSINSTID
FROM (SELECT ROW_NUMBER() OVER(PARTITION BY M.INSTANCE_ID ORDER BY M.TASK_LOG_ID) GID,
M.USER_NAME UNAME,
M.PROCESSINSTID
FROM BPM_RTM_LOG_TASK M
WHERE M.PROCESS_ID =
'cn.net.sinodata.sdbomc.itsm.workflow.genericservice.genericservice') TMP
WHERE TMP.GID = 2) F,
(SELECT T.CUSTOMERUSERID,
T.CUSTOMERID,
T.CUSTOMERUSERNAME,
T.CUSTOMERUSERORGAN,
T.CUSTOMERUSERPHONE2,
T.CUSTOMERUSERMAIL,
T.CUSTOMERUSERMSN,
T.CUSTOMERUSERQQ,
T.CREATENAME,
T.CREATETIME,
T.LASTUPDATENAME,
T.LASTUPDATETIME,
T.HELPDESKAPPLYROLE,
T.HEADERNAME,
T.HEADERID,
B.CUSTOMERORGANNAME
FROM ITSM_DICT_CUSTOMER_USER T, ITSM_DICT_CUSTOMER_ORGAN B
WHERE T.CUSTOMERUSERORGAN = B.CUSTOMERORGANID(+)) T
WHERE A.PROCESSINSTID = B.PROCESSINSTID_
AND A.PROCESSINSTID = F.PROCESSINSTID
AND ED.DICTTYPEID = 'BPM_CFG_INST_STATUS'
AND A.INSTANCE_STATUS = ED.DICTID(+)
AND B.SERVICECATALOG = D.ID(+)
AND B.URGENCY_DEGREE = E.ID(+)
AND B.APPLICANT_ID = T.CUSTOMERUSERID(+)
AND B.APPLICANT_COM_ID = T.CUSTOMERID(+)
AND B.DATA_TYPE_ = 'new'
ORDER BY A.LAUNCH_TIME DESC