Stringsql=" select * from (select id, lastname,loginid from hrmresource where status = 1 union all select id, lastname,loginid from hrmresourcemanager ) w where w.id = '"+userid+"'";
sql=" select t1.requestname,t1.currentnodeid as nodeid,d1.nodename,t3.workflowname,h2.lastname,h2.loginid "+
" from workflow_requestbase t1\n"+
" inner join workflow_base t3 on t1.workflowid = t3.id\n"+
" left join workflow_nodebase d1 on d1.id = t1.currentnodeid "+
" left join (select id,lastname,loginid from hrmresource where status = 1 union all select id,lastname,loginid from hrmresourcemanager ) h2 on h2.id = t1.creater \n"+
" where (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n"+
sql=" select t2.userid,h1.loginid,h1.email,c1."+cus_staff+" as staffid "+
" from workflow_requestbase t1\n"+
" inner join workflow_currentoperator t2 on t1.requestid = t2.requestid\n"+
" left join cus_fielddata c1 on c1.id = t2.userid and c1.scopeid= "+scopeid+" and c1.scope = '"+scope+"' "+
" left join (select id, lastname,loginid,email from hrmresource where STATUS = 1 union all select id,lastname,loginid,'' as email from hrmresourcemanager ) h1 on h1.id = t2.userid\n"+
" where (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n"+
" and ((t2.isremark = '0' and (t2.takisremark is null or t2.takisremark = 0)) or t2.isremark in ('1', '5', '7','11'))\n"+
" and t2.islasttimes = 1\n"+
" and (t2.isprocessing = '' or t2.isprocessing is null)\n"+
sql=" select t1.requestname,t1.currentnodeid as nodeid,d1.nodename,t3.workflowname,h2.lastname,h2.loginid "+
" from workflow_requestbase t1\n"+
" inner join workflow_base t3 on t1.workflowid = t3.id\n"+
" left join workflow_nodebase d1 on d1.id = t1.currentnodeid "+
" left join (select id,lastname,loginid from hrmresource where status = 1 union all select id,lastname,loginid from hrmresourcemanager ) h2 on h2.id = t1.creater \n"+
" where (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n"+
sql=" select t2.userid,h1.loginid,h1.email,c1."+cus_staff+" as staffid "+
" from workflow_requestbase t1\n"+
" inner join workflow_currentoperator t2 on t1.requestid = t2.requestid\n"+
" left join cus_fielddata c1 on c1.id = t2.userid and c1.scopeid= "+scopeid+" and c1.scope = '"+scope+"' "+
" left join (select id, lastname,loginid,email from hrmresource where STATUS = 1 union all select id,lastname,loginid,'' as email from hrmresourcemanager ) h1 on h1.id = t2.userid\n"+
" where (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n"+
" and ((t2.isremark = '0' and (t2.takisremark is null or t2.takisremark = 0)) or t2.isremark in ('1', '5', '7','11'))\n"+
" and t2.islasttimes = 1\n"+
" and (t2.isprocessing = '' or t2.isprocessing is null)\n"+
" and t2.requestid = "+requestid+" and t2.userid ="+userid;
" inner join workflow_currentoperator t2 on t1.requestid = t2.requestid\n"+
" left join cus_fielddata c1 on c1.id = t2.userid and c1.scopeid= "+scopeid+" and c1.scope = '"+scope+"' "+
" left join (select id, lastname,loginid,email from hrmresource where STATUS = 1 union all select id,lastname,loginid,'' as email from hrmresourcemanager ) h1 on h1.id = t2.userid\n"+
" left join workflow_nodebase d1 on d1.id = t2.nodeid "+
" where (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n"+
" and t1.currentnodetype <> 3"+
" and t2.isremark in ('2','9')\n"+
" and t2.preisremark in ('8','9')\n"+
" and t2.islasttimes = 1\n"+
" and (t2.isprocessing = '' or t2.isprocessing is null)\n"+
" and t2.requestid = "+requestid+" and t2.userid = "+doneMap.get("id");
rs.executeQuery(sql);
intnum=0;
//过滤非归档节点,抄送待阅流程
if(rs.next()){
num=rs.getInt("num");
}
//判断是否为转发节点
sql="SELECT c1."+PropBean.getUfPropValue("cus_staff")+" as staffid FROM workflow_currentoperator t1 left join cus_fielddata c1 on c1.id = t1.userid and c1.scopeid= "+scopeid+" and c1.scope = '"+scope+"' WHERE t1.preisremark=1 and t1.REQUESTID=? and t1.USERID=?";
" inner join workflow_currentoperator t2 on t1.requestid = t2.requestid\n"+
" left join cus_fielddata c1 on c1.id = t2.userid and c1.scopeid= "+scopeid+" and c1.scope = '"+scope+"' "+
" left join (select id, lastname,loginid,email from hrmresource where STATUS = 1 union all select id,lastname,loginid,'' as email from hrmresourcemanager ) h1 on h1.id = t2.userid\n"+
" left join workflow_nodebase d1 on d1.id = t2.nodeid "+
" where (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n"+
" and t1.currentnodetype <> 3"+
" and t2.isremark in ('2','9')\n"+
" and t2.preisremark in ('8','9')\n"+
" and t2.islasttimes = 1\n"+
" and (t2.isprocessing = '' or t2.isprocessing is null)\n"+
" and t2.requestid = "+requestid+" and t2.userid = "+userid;
rs.executeQuery(sql);
intnum=0;
//过滤非归档节点,抄送待阅流程
if(rs.next()){
num=rs.getInt("num");
}
//判断是否为转发节点
sql="SELECT c1."+PropBean.getUfPropValue("cus_staff")+" as staffid FROM workflow_currentoperator t1 left join cus_fielddata c1 on c1.id = t1.userid and c1.scopeid= "+scopeid+" and c1.scope = '"+scope+"' WHERE t1.preisremark=1 and t1.REQUESTID=? and t1.USERID=?";
sql=" select t1.requestname,t1.currentnodeid as nodeid,d1.nodename,t3.workflowname,h2.lastname,h2.loginid "+
" from workflow_requestbase t1\n"+
" inner join workflow_base t3 on t1.workflowid = t3.id\n"+
" left join workflow_nodebase d1 on d1.id = t1.currentnodeid "+
" left join (select id,lastname,loginid from hrmresource where status = 1 union all select id,lastname,loginid from hrmresourcemanager ) h2 on h2.id = t1.creater \n"+
" where (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n"+
sql=" select t2.userid,h1.loginid,h1.email,c1."+cus_staff+" as staffid "+
" from workflow_requestbase t1\n"+
" inner join workflow_currentoperator t2 on t1.requestid = t2.requestid\n"+
" left join cus_fielddata c1 on c1.id = t2.userid and c1.scopeid= "+scopeid+" and c1.scope = '"+scope+"' "+
" left join (select id, lastname,loginid,email from hrmresource where STATUS = 1 union all select id,lastname,loginid,'' as email from hrmresourcemanager ) h1 on h1.id = t2.userid\n"+
" where (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n"+
" and ((t2.isremark = '0' and (t2.takisremark is null or t2.takisremark = 0)) or t2.isremark in ('1', '5', '7','11'))\n"+
" and t2.islasttimes = 1\n"+
" and (t2.isprocessing = '' or t2.isprocessing is null)\n"+