" t1.requestid as taskCode,t1.currentnodeid as nodeid,d1.nodename\n"+
Stringrequestname="";
Stringworkflowname="";
StringnodeName="";
sql=" select t1.requestname,t3.workflowname\n"+
" 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 ) h1 on h1.id = t1.creater\n"+
" where (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n"+
String sql = " select * from (select id, lastname,loginid from hrmresource where status = 1 union all select id, lastname,loginid from hrmresourcemanager ) w where w.id = '" + u_userid + "'";
// String sql = " select * from (select id, lastname,loginid from hrmresource where status = 1 union all select id, lastname,loginid from hrmresourcemanager ) w where w.id = '" + u_userid + "'";
// " inner join workflow_base t3 on t1.workflowid = t3.id\n" +
// " left join workflow_nodebase d1 on d1.id = t1.currentnodeid "+
// " where (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n" +
// " and t1.requestid = "+requestid ;
Stringsql=" select t1.requestname,t1.currentnodeid as nodeid,d1.nodename,t3.workflowname,h2.lastname "+
" 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"+
" and t1.requestid = "+requestid;
@ -92,6 +99,7 @@ public class SendPortalToReadUtil {
@ -243,15 +252,15 @@ public class SendPortalToReadUtil {
try{
int u_userid = user.getUID();
Stringlastname=user.getLastname();
String workcode = "";
String sql = " select * from (select id, lastname,loginid from hrmresource where status = 1 union all select id, lastname,loginid from hrmresourcemanager ) w where w.id = '" + u_userid + "'";
// String sql = " select * from (select id, lastname,loginid from hrmresource where status = 1 union all select id, lastname,loginid from hrmresourcemanager ) w where w.id = '" + u_userid + "'";
// " inner join workflow_base t3 on t1.workflowid = t3.id\n" +
// " where (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n" +
// " and t1.requestid = " + requestid;
Stringsql=" select t1.requestname,t1.currentnodeid as nodeid,d1.nodename,t3.workflowname,h2.lastname "+
" 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"+
Stringsql=" select t1.requestname,h1.loginid,d1.nodename,h1.email,c1."+cus_staff+" as staffid,t3.workflowname "+
" from workflow_requestbase t1\n"+
" inner join workflow_currentoperator t2 on t1.requestid = t2.requestid\n"+
" inner join workflow_base t3 on t1.workflowid = t3.id\n"+
" left join workflow_nodebase d1 on d1.id = t1.currentnodeid "+
" left join cus_fielddata c1 on c1.id = t2.userid and scopeid= "+scopeid+" and 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 t2.userid in ("+userid+") \n"+
" and (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','8','9','11'))\n"+
" and (ifnull(t1.currentstatus, -1) = -1 or (ifnull(t1.currentstatus, -1) = 0 and t1.creater in ("+userid+"))) \n"+
" and t2.islasttimes = 1 \n"+
" and (t2.isprocessing = '' or t2.isprocessing is null) \n"+
" and t2.requestid = "+requestid;
Stringsql=" select t1.requestname,h1.loginid,d1.nodename,h1.email,c1."+cus_staff+" as staffid,t3.workflowname,h2.lastname,t2.userid "+
" from workflow_requestbase t1\n"+
" inner join workflow_currentoperator t2 on t1.requestid = t2.requestid\n"+
" inner join workflow_base t3 on t1.workflowid = t3.id\n"+
" left join workflow_nodebase d1 on d1.id = t1.currentnodeid "+
" left join cus_fielddata c1 on c1.id = t2.userid and scopeid= "+scopeid+" and 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 (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 t2.userid in ("+userid+") \n"+
" and (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','8','9','11'))\n"+
" and (ifnull(t1.currentstatus, -1) = -1 or (ifnull(t1.currentstatus, -1) = 0 and t1.creater in ("+userid+"))) \n"+
" and t2.islasttimes = 1 \n"+
" and (t2.isprocessing = '' or t2.isprocessing is null) \n"+
" and t2.requestid = "+requestid;
bb.writeLog("sendTodoDataByCreater-sql:"+sql);
rs.executeQuery(sql);
@ -81,9 +86,11 @@ public class SendPortalTodoUtil {
@ -210,14 +224,15 @@ public class SendPortalTodoUtil {
StringobjectType="0";
try{
intuserid=user.getUID();
Stringlastname=user.getLastname();
Stringworkcode="";
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+"'";
// String sql = " select * from (select id, lastname,loginid from hrmresource where status = 1 union all select id, lastname,loginid from hrmresourcemanager ) w where w.id = '" + userid + "'";
@ -227,12 +242,13 @@ public class SendPortalTodoUtil {
StringnodeName="";
Stringworkflowname="";
sql=" select t1.requestname,t1.currentnodeid as nodeid,d1.nodename,t3.workflowname"+
" 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 "+
" where (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n"+
" and t1.requestid = "+requestid;
Stringsql=" select t1.requestname,t1.currentnodeid as nodeid,d1.nodename,t3.workflowname,h2.lastname"+
" 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"+
" and t1.requestid = "+requestid;
bb.writeLog("sendTodoDataByNode--sql:"+sql);
rs.executeQuery(sql);
@ -241,6 +257,7 @@ public class SendPortalTodoUtil {
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+"'";
// String sql = " select * from (select id, lastname,loginid from hrmresource where status = 1 union all select id, lastname,loginid from hrmresourcemanager ) w where w.id = '" + userid + "'";
@ -414,17 +444,22 @@ public class SendPortalTodoUtil {
StringobjectAction="1";
StringobjectType="0";
StringobjectId="";
StringnodeId="";
StringnodeName="";
Stringworkflowname="";
sql =" select t1.requestname,t1.currentnodeid as nodeid,d1.nodename,t3.workflowname\n" +
" 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 "+
" where (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n" +
" and t1.requestid = "+requestid ;
// sql =" select t1.requestname,t1.currentnodeid as nodeid,d1.nodename,t3.workflowname\n" +
// " 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 "+
// " where (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n" +
// " and t1.requestid = "+requestid ;
Stringsql=" select t1.requestname,t1.currentnodeid as nodeid,d1.nodename,t3.workflowname,h2.lastname "+
" 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"+
" and t1.requestid = "+requestid;
bb.writeLog("sendTodoDataByNode--sql:"+sql);
@ -434,6 +469,7 @@ public class SendPortalTodoUtil {
@ -487,14 +530,21 @@ public class SendPortalTodoUtil {
JSONArraytaskObjectList=newJSONArray();
Stringworkflowname="";
StringnodeId="";
StringnodeName="";
sql=" select t1.requestname,t1.currentnodeid as nodeid,d1.nodename,t3.workflowname\n"+
// sql =" select t1.requestname,t1.currentnodeid as nodeid,d1.nodename,t3.workflowname\n" +
// " 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 "+
// " where (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n" +
// " and t1.requestid = "+requestid ;
Stringsql=" select t1.requestname,t1.currentnodeid as nodeid,d1.nodename,t3.workflowname,h2.lastname "+
" 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"+
" and t1.requestid = "+requestid;
@ -506,6 +556,7 @@ public class SendPortalTodoUtil {
@ -639,14 +698,14 @@ public class SendPortalTodoUtil {
Stringscope="HrmCustomFieldByInfoType";
try{
int userid = user.getUID();
// int userid = user.getUID();
Stringlastname=user.getLastname();
String workcode = "";
String sql = " select * from (select id, lastname,loginid from hrmresource where status = 1 union all select id, lastname,loginid from hrmresourcemanager ) w where w.id = '" + userid + "'";
// String sql = " select * from (select id, lastname,loginid from hrmresource where status = 1 union all select id, lastname,loginid from hrmresourcemanager ) w where w.id = '" + userid + "'";
@ -657,14 +716,24 @@ public class SendPortalTodoUtil {
Stringrequestname="";
StringnodeId="";
StringnodeName="";
Stringuserids="";
// sql =" select t1.requestname,t1.currentnodeid as nodeid,d1.nodename,t3.workflowname\n" +
// " 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 "+
// " where (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n" +
// " and t1.requestid = "+requestid ;
sql=" select t1.requestname,t1.currentnodeid as nodeid,d1.nodename,t3.workflowname\n"+
String sql =" select t1.requestname,t1.currentnodeid as nodeid,d1.nodename,t3.workflowname,h2.lastname "+
" 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"+
" and t1.requestid = "+requestid;
bb.writeLog("sendTodoDataByReject--sql:"+sql);
rs.executeQuery(sql);
if(rs.next()){
@ -672,6 +741,7 @@ public class SendPortalTodoUtil {
Stringsql=" select * from (select id, lastname,loginid from hrmresource where status = 1 union all select id, lastname,loginid from hrmresourcemanager ) w where w.id = '"+u_userid+"'";
@ -82,26 +80,32 @@ public class SendPortalWithRawRunnable implements Runnable{
Stringrequestname="";
Stringworkflowname="";
StringnodeId="";
StringnodeName="";
sql=" select t1.requestname,t1.currentnodeid as nodeid,d1.nodename,t3.workflowname\n"+
Stringlastname="";
// sql =" select t1.requestname,t1.currentnodeid as nodeid,d1.nodename,t3.workflowname\n" +
// " 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 "+
// " where (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n" +
// " and t1.requestid = "+requestid ;
sql=" select t1.requestname,t1.currentnodeid as nodeid,d1.nodename,t3.workflowname,h2.lastname "+
" 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"+
rs.executeQuery("select * from workflow_currentoperator where requestid = ? and userid = ? and isremark = '2' and preisremark in ('0','2','7') and nodeid = ? order by id desc",requestid,user.getUID(),recallnodeid);
Stringcurrentid="";
rs.executeQuery(" select id from workflow_currentoperator where requestid = ? and userid = ? and isremark = '2' and preisremark in ('0','2','7') and nodeid = ? order by id desc",requestid,u_userid,recallnodeid);
" inner join workflow_currentoperator t2 on t1.requestid = t2.requestid\n"+
" left join workflow_nodebase d1 on d1.id = t2.nodeid "+
" 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 t1.requestid = ? "+
" and t2.nodeid in ("+withdrawNodes+") "+
" and t2.nodeid != ? "+
" and t2.userid != ? "+
" and t2.receivedate >= ? "+
" and t2.receivetime >= ? "+
" and t2.operatetype = 4 ";
" and ((t2.isremark = 8 and t2.preisremark = 8) or ( t2.isremark = 9 and t2.preisremark = 9 ))"+
sql=" select t1.requestname,t1.currentnodeid as nodeid,d1.nodename,t3.workflowname\n"+
Stringlastname="";
// sql =" select t1.requestname,t1.currentnodeid as nodeid,d1.nodename,t3.workflowname\n" +
// " 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 "+
// " where (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n" +
// " and t1.requestid = "+requestid ;
sql=" select t1.requestname,t1.currentnodeid as nodeid,d1.nodename,t3.workflowname,h2.lastname "+
" 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"+