PS:vp的二次开发马上启动,面对一大堆的自定义表单需要数据库取数据,而目前Oracle的复杂查询水平完全无法满足,所以,特针对性加强自己SQL复杂查询能力!(周末再总结一下上周的就jQuery学习!)
流程实例ID(flowInsId):554 流程配置ID(flowid):550 表单类型(method):getFormType 实体ID(objectid):588 实体类型(objecttype):1 步骤实例ID(stepInsId):634 (stepid)步骤配置ID:504
项目code: 20140714588 流程CODE:123-1
重要表:
org_userinfo用户信息表
pj_baseinfo项目基本信息表
cfg_wfs_info配置流程信息表
obj_wf_info:流程信息表,具体【工作项】区分(不同项目对应不同工作流信息),------据具体流程查相关工作项
关联:WFID(obj_wfs_info为obj_wf_info的具体实例化步骤信息)
obj_wfs_info:具体流程信息, -----查流程具体步骤的相关内容
obj_wfs_user:流程每步骤的处理人信息表
workprocess工作项类型表(配置业务实体(or工作项)时,“其他--类别” 中配置的类型)
先从当前登录用户取当前数据(session):
UserInfo ouser=(UserInfo)session.getAttribute(SessionConstant.USERINFO);
String flowInsId = request.getParameter("flowInsId);
String flowid = request.getParameter("flowid");
String method = request.getParameter("method");
String objectid = requestParameter("objectid");
String objecttype = requestParameter("objecttype");
String stepInsId = requestParameter("stepInsId");
String stepid = requestParameter("stepid");
pj_baseinfo 项目基本信息表
查项目编号:select projectcode from pj_baseinfo where projectid=objectid;
cfg_wf_info:配置工作流信息表
查流程编号:select flowcode from cfg_wf_info where flowid=flowid;
cfg_wfs_info:具体某工作流中某步骤信息表
select stepcode from cfg_wfs_info where flowid=flowid and stepid=stepid;
//前stepid为数据库表中的stepid列 后stepid为前面String定义的获取了当前登录值的(赋值查询)
workprocess:工作项类型(objectid=1时表示项目)
据工作项类型及分类id查分类名:select classname from workprocess where objectid = 1 and classid = (select .......);
查分类id(classid):select projectstatusid from pj_baseinfo where projectid=" ";
总:据实体id查实体类型名: (实体id从当前登录信息中获取来)
String projectype=dbm.executeQueryString("select classname from workprocess where objectid = 1 and classid = (select projectstatusid from pj_baseinfo where projectid=objectid)");
org_userinfo:组织_用户信息表
select username,emplyeecode from org_userinfo where userid= (select userid from pj_projectaccess where projectid=588 and RoleID=4);
oracle中查看表之间的关系图:
在PLSQL developer中建立一个Diagram Window(图表窗口),将所有表拖进其中即可
(类似与sqlsever中的表间关系图)