|
admin 发表于:2017/8/17 16:08:52
楼主
|
- SELECT
- pen.APPLICATIONID,
- pen.DOCID,
- pen.INITIATOR,
- pen.INITIATORID,
- pen.INITIATOR_DEPT_ID,
- pen.INITIATOR_DEPT,
- pen.DOMAINID,
- pen.FORMID,
- pen.FLOWID,
- pen.FLOWNAME,
- pen.STATELABEL,
- pen.AUDITORNAMES,
- pen.AUDITORLIST,
- pen.SUMMARY SUBJECT,
- pen.FIRSTPROCESSTIME,
- pen.LASTPROCESSTIME,
- LASTFLOWOPERATION,
- actor.REMINDER_TIMES,
- actor.ISREAD
- FROM
- OBPM_APP.T_FLOW_INTERVENTION pen
- INNER JOIN OBPM_APP.T_ACTORRT actor ON pen.DOCID = actor.DOC_ID
- WHERE
- pen. STATUS = 'pending'
- AND actor.ACTORID = '11e6-7d7a-be4da33d-81d3-8565da61a6cf'
- AND pen.DOMAINID = '11e1-81e2-37f74759-9124-47aada6b7467'
- AND pen.APPLICATIONID = '11e6-7d7f-af2b5560-81d3-8565da61a6cf'
- UNION ALL
- SELECT
- pen.APPLICATIONID,
- pen.DOCID,
- pen.INITIATOR,
- pen.INITIATORID,
- pen.INITIATOR_DEPT_ID,
- pen.INITIATOR_DEPT,
- pen.DOMAINID,
- pen.FORMID,
- pen.FLOWID,
- pen.FLOWNAME,
- pen.STATELABEL,
- pen.AUDITORNAMES,
- pen.AUDITORLIST,
- pen.SUMMARY SUBJECT,
- pen.FIRSTPROCESSTIME,
- pen.LASTPROCESSTIME,
- LASTFLOWOPERATION,
- actor.REMINDER_TIMES,
- actor.ISREAD
- FROM
- OBPM_APP.T_FLOW_INTERVENTION pen
- INNER JOIN OBPM_APP.T_ACTORRT actor ON pen.DOCID = actor.DOC_ID
- WHERE
- pen. STATUS = 'pending'
- AND pen.DOMAINID = '11e1-81e2-37f74759-9124-47aada6b7467'
- AND pen.APPLICATIONID = '11e6-7d7f-af2b5560-81d3-8565da61a6cf'
- AND (
- (actor.ACTORID) IN (
- SELECT
- OWNER
- FROM
- OBPM_APP.T_FLOW_PROXY tf
- WHERE
- tf.STATE = 1
- AND tf.AGENTS LIKE '%11e6-7d7a-be4da33d-81d3-8565da61a6cf%'
- )
- )
- --待办sql
- --DOMAINID 企业号id,t_domain的ID
- --APPLICATIONID 软件id t_application的ID
- --ACTORID 用户id t_user 的ID
|