|
|
本帖最后由 bess 于 2013-1-10 10:25 编辑
Q:我们在视图的设计模式里面,如果勾选了“审批人”。这个视图不是就可以显示某个人可以处理的文档。怎么在DQL里面实现这个功能。
A:我的工作只能看到自己参与的工作,跟视图设计模式勾选审批人的效果是一样的。我的工作实现sql:
SELECT * FROM ( SELECT * FROM (select distinct doc.id DOCID,doc.formid FORMID,fs.flowid FLOWID,rhis.flowname FLOWNAME,doc.statelabel STATELABEL,pen.summary SUBJECT,doc.AUDITORNAMES,doc.AUDITORLIST,doc.APPLICATIONID,doc.DOMAINID from OBPMAPP.T_DOCUMENT doc,OBPMAPP.T_ACTORHIS ahis,OBPMAPP.T_RELATIONHIS rhis,OBPMAPP.T_FLOW_INTERVENTION pen,OBPMAPP.T_FLOWSTATERT fs,OBPMAPP.T_NODERT node,OBPMAPP.T_ACTORRT actor where doc.id=rhis.docid and rhis.id = ahis.nodehis_id and doc.id = pen.id and doc.id =fs.docid and fs.id =node.flowstatert_id and node.id = actor.nodert_id and doc.issubdoc is null and doc.parent is null and doc.state is not null and doc.statelabel is not null and (actor.actorid in ('11de-c13a-0cf76f8b-a3db-1bc87eaaad4c') or ahis.actorid in ('11de-c13a-0cf76f8b-a3db-1bc87eaaad4c')) order by doc.formid,fs.flowid) table_0 WHERE table_0.DOMAINID ='11de-c138-782d2f26-9a62-8bacb70a86e1' ) AS TB LIMIT 0,10
其中DOMAINID:域ID ;APPLICATIONID:应用标识;FORMID:表单ID
摘自cmzzhz的提问 原帖子链接:
http://www.teemlink.com/bbs/view ... 26amp%3Btypeid%3D35 |
|