" t1.requestid as taskCode,t1.currentnodeid as nodeid,d1.nodename\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" +
" and t1.requestid = " + requestid;
bb.writeLog("sendTodoDataByNode--sql:" + sql);
rs.executeQuery(sql);
if (rs.next()) {
String title = Util.null2String(rs.getString("requestname"));
" inner join workflow_currentoperator t2 on t1.requestid = t2.requestid\n" +
" left join (select id, lastname,loginid from hrmresource where status = 1 union all select id,lastname,loginid 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', '8', '9', '7', '11'))\n" +
" and t2.islasttimes = 1\n" +
" and (t2.isprocessing = '' or t2.isprocessing is null)\n" +
" t1.requestid as taskCode,t1.currentnodeid as nodeid,d1.nodename\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" +
" and t1.requestid = " + requestid;
bb.writeLog("sendTodoDataByNode--sql:" + sql);
if (count > 0) {
JSONArray taskObjectList = new JSONArray();
String actionType = "1";
String objectAction = "1";
String objectType = "0";
rs.executeQuery(sql);
if (rs.next()) {
String title = Util.null2String(rs.getString("requestname"));
" inner join workflow_currentoperator t2 on t1.requestid = t2.requestid\n" +
" 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', '8', '9', '7', '11'))\n" +
" and t2.islasttimes = 1\n" +
" and (t2.isprocessing = '' or t2.isprocessing is null)\n" +
" t1.requestid as taskCode,t1.currentnodeid as nodeid,d1.nodename\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" +
" and t1.requestid = " + requestid;
bb.writeLog("sendTodoDataByReject--sql:" + sql);
rs.executeQuery(sql);
if (rs.next()) {
String title = Util.null2String(rs.getString("requestname"));
" inner join workflow_currentoperator t2 on t1.requestid = t2.requestid\n" +
" 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', '8', '9', '7', '11'))\n" +
" and t2.islasttimes = 1\n" +
" and (t2.isprocessing = '' or t2.isprocessing is null)\n" +
// " t1.requestid as taskCode,t1.currentnodeid as nodeid,d1.nodename\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" +
// " and t1.requestid = " + requestid;
//
// bb.writeLog("sendTodoDataByNode--sql:" + sql);
// rs.executeQuery(sql);
// if (rs.next()) {
//
// String title = Util.null2String(rs.getString("requestname"));
// " left join (select id, lastname,loginid from hrmresource where status = 1 union all select id,lastname,loginid 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', '8', '9', '7', '11'))\n" +
// " and t2.islasttimes = 1\n" +
// " and (t2.isprocessing = '' or t2.isprocessing is null)\n" +
// " t1.requestid as taskCode,t1.currentnodeid as nodeid,d1.nodename\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" +
// " and t1.requestid = " + requestid;
// bb.writeLog("sendTodoDataByNode--sql:" + sql);
//
// if (count > 0) {
//
// JSONArray taskObjectList = new JSONArray();
// String actionType = "1";
// String objectAction = "1";
// String objectType = "0";
//
// rs.executeQuery(sql);
// if (rs.next()) {
// String title = Util.null2String(rs.getString("requestname"));
// " 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', '8', '9', '7', '11'))\n" +
// " and t2.islasttimes = 1\n" +
// " and (t2.isprocessing = '' or t2.isprocessing is null)\n" +
// " t1.requestid as taskCode,t1.currentnodeid as nodeid,d1.nodename\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" +
// " 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', '8', '9', '7', '11'))\n" +
// " and t2.islasttimes = 1\n" +
// " and (t2.isprocessing = '' or t2.isprocessing is null)\n" +
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+"'";
" 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"+
" and t1.requestid = "+requestid;
@ -79,23 +90,25 @@ public class SendPortalToReadUtil {
sql=" select t2.userid,h1.loginid,h1.email,t2.isremark,t1.requestid,t2.nodeid,d1.nodename,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"+
" left join workflow_nodebase d1 on d1.id = t2.nodeid "+
" where (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n"+
@ -111,6 +124,7 @@ public class SendPortalToReadUtil {
@ -215,10 +235,17 @@ public class SendPortalToReadUtil {
StringobjectType="0";
Stringterminal="1";
StringtaskType="1";
StringobjectId="";
try{
intu_userid=user.getUID();
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 = '"+u_userid+"'";
sql=" select t2.userid,h1.loginid,h1.email,t2.isremark,t1.requestid,t2.nodeid,d1.nodename,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"+
" left join workflow_nodebase d1 on d1.id = t2.nodeid "+
" where (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n"+
@ -299,6 +335,8 @@ public class SendPortalToReadUtil {
" t1.requestid as taskcode,d1.nodename,h1.email,c1."+staffIdFieldByCus+" as staffid"+
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"+
" 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 = t1.creater\n" +
" 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"+
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+"'";
" t1.requestid as taskCode,t1.currentnodeid as nodeid,d1.nodename,c1."+staffIdFieldByCus+" as staffid"+
" 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 cus_fielddata c1 on c1.ID=t1.creater"+
" 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"+
" and t1.requestid = "+requestid;
Stringrequestname="";
StringnodeId="";
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"+
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"+
" left join workflow_nodebase d1 on d1.id = t2.nodeid "+
" 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"+
@ -279,15 +293,17 @@ 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+"'";
" inner join workflow_currentoperator t2 on t1.requestid = t2.requestid\n"+
" left join (select id, lastname,loginid from hrmresource where status = 1 union all select id,lastname,loginid 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.nodeid = "+noideid;
StringcountSql=" select t2.userid\n"+
" from workflow_requestbase t1\n"+
" inner join workflow_currentoperator t2 on t1.requestid = t2.requestid\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"+
" t1.requestid as taskCode,t1.currentnodeid as nodeid,d1.nodename\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 cus_fielddata c1 on c1.ID=t1.creater"+
" 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"+
" and t1.requestid = "+requestid;
bb.writeLog("sendTodoDataByNode--sql:"+sql);
Stringrequestname="";
if(count>0){
@ -390,52 +413,62 @@ public class SendPortalTodoUtil {
StringactionType="1";
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"+
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','8','9','11'))\n"+
" and t2.islasttimes = 1\n"+
" and (t2.isprocessing = '' or t2.isprocessing is null)\n"+
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+"'";
" t1.requestid as taskCode,t1.currentnodeid as nodeid,d1.nodename\n"+
Stringworkflowname="";
Stringrequestname="";
StringnodeId="";
StringnodeName="";
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 "+
" 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"+
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"+
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+"'";
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);
" inner join workflow_currentoperator t2 on t1.requestid = t2.requestid\n"+
" 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"+
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+"'";
// 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);
// " 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" +