@ -27,6 +27,16 @@ public class SendPortalMonitorUtil {
* /
public void monitorDelete ( String requestid , String userid ) {
String portal_todourl = Constants . portal_todourl ;
String bpm_app_workflowurl = Constants . bpm_app_workflowurl ;
String username = Constants . username ;
String passwd = Constants . passwd ;
String bpm_workflowurl = Constants . bpm_workflowurl ;
String center = Constants . center ;
String bpm_app_requesturl = Constants . bpm_app_requesturl ;
String zhjkbs = "weaver.interfaces.dito.monitor.SendPortalMonitorUtil.monitorDelete" ;
SendPortalErrorUtil sendPortalErrorUtil = new SendPortalErrorUtil ( ) ;
@ -42,10 +52,10 @@ public class SendPortalMonitorUtil {
try {
String processTime = DateUtil . getCurrentTime ( "yyyy-MM-dd HH:mm:ss" ) ;
String urlPc = "[newtab]" + Constants. bpm_workflowurl+ "/workflow/request/ViewRequestForwardSPA.jsp?requestid=" + requestid ;
String replace = Constants. bpm_app_workflowurl. replace ( "/bpm" , "" ) ;
String urlDing = replace + Constants. bpm_app_requesturl+ requestid ;
String urlApp = replace + Constants. bpm_app_requesturl+ requestid ;
String urlPc = "[newtab]" + bpm_workflowurl+ "/workflow/request/ViewRequestForwardSPA.jsp?requestid=" + requestid ;
String replace = bpm_app_workflowurl. replace ( "/bpm" , "" ) ;
String urlDing = replace + bpm_app_requesturl+ requestid ;
String urlApp = replace + bpm_app_requesturl+ requestid ;
if ( StringUtils . isNotEmpty ( mobileJumpUrl ) ) {
urlDing + = "&returnUrl=" + URLEncoder . encode ( mobileJumpUrl , "UTF-8" ) ;
@ -75,7 +85,7 @@ public class SendPortalMonitorUtil {
nodeName = Util . null2String ( rs . getString ( "nodeName" ) ) ;
}
requestObject . put ( "center" , Constants. center) ;
requestObject . put ( "center" , center) ;
requestObject . put ( "title" , requestname ) ;
requestObject . put ( "taskCode" , "weaver" + requestid ) ;
requestObject . put ( "nodeId" , nodeId ) ;
@ -91,9 +101,9 @@ public class SendPortalMonitorUtil {
requestObject . put ( "nodeName" , nodeName ) ;
requestObject . put ( "ticketType" , workflowname ) ;
String auth = Constants. username + ":" + Constants. passwd;
String auth = username + ":" + passwd;
bb . writeLog ( "monitorDelete---requestObject:" + requestObject . toJSONString ( ) ) ;
String msgdata = httpRequestUtil . doPostByAuth ( Constants. portal_todourl, requestObject . toJSONString ( ) , auth ) ;
String msgdata = httpRequestUtil . doPostByAuth ( portal_todourl, requestObject . toJSONString ( ) , auth ) ;
bb . writeLog ( "monitorDelete---msgdata:" + msgdata ) ;
Map < String , Object > map = new HashMap < > ( ) ;
if ( ! "" . equals ( msgdata ) ) {
@ -120,12 +130,22 @@ public class SendPortalMonitorUtil {
/ * * *
*
* 删 除 失 败 后 , 延 迟 second 秒 后 , 再 流 程 删 除
* @param requestid
* @param second
* /
public void againMonitorDelete ( String requestid , String userid , int second ) {
String zhjkbs = "weaver.interfaces.dito.monitor.SendPortalMonitorUtil.againMonitorDelete" ;
String portal_todourl = Constants . portal_todourl ;
String bpm_app_workflowurl = Constants . bpm_app_workflowurl ;
String username = Constants . username ;
String passwd = Constants . passwd ;
String bpm_workflowurl = Constants . bpm_workflowurl ;
String center = Constants . center ;
String bpm_app_requesturl = Constants . bpm_app_requesturl ;
try {
if ( second > 0 ) {
Thread . sleep ( second ) ;
@ -147,10 +167,10 @@ public class SendPortalMonitorUtil {
try {
String processTime = DateUtil . getCurrentTime ( "yyyy-MM-dd HH:mm:ss" ) ;
String urlPc = "[newtab]" + Constants. bpm_workflowurl+ "/workflow/request/ViewRequestForwardSPA.jsp?requestid=" + requestid ;
String replace = Constants. bpm_app_workflowurl. replace ( "/bpm" , "" ) ;
String urlDing = replace + Constants. bpm_app_requesturl+ requestid ;
String urlApp = replace + Constants. bpm_app_requesturl+ requestid ;
String urlPc = "[newtab]" + bpm_workflowurl+ "/workflow/request/ViewRequestForwardSPA.jsp?requestid=" + requestid ;
String replace = bpm_app_workflowurl. replace ( "/bpm" , "" ) ;
String urlDing = replace + bpm_app_requesturl+ requestid ;
String urlApp = replace + bpm_app_requesturl+ requestid ;
if ( StringUtils . isNotEmpty ( mobileJumpUrl ) ) {
urlDing + = "&returnUrl=" + URLEncoder . encode ( mobileJumpUrl , "UTF-8" ) ;
@ -179,7 +199,7 @@ public class SendPortalMonitorUtil {
nodeName = Util . null2String ( rs . getString ( "nodeName" ) ) ;
}
requestObject . put ( "center" , Constants. center) ;
requestObject . put ( "center" , center) ;
requestObject . put ( "title" , requestname ) ;
requestObject . put ( "taskCode" , "weaver" + requestid ) ;
requestObject . put ( "nodeId" , nodeId ) ;
@ -195,9 +215,9 @@ public class SendPortalMonitorUtil {
requestObject . put ( "nodeName" , nodeName ) ;
requestObject . put ( "ticketType" , workflowname ) ;
String auth = Constants. username + ":" + Constants. passwd;
String auth = username + ":" + passwd;
bb . writeLog ( "againMonitorDelete---requestObject:" + requestObject . toJSONString ( ) ) ;
String msgdata = httpRequestUtil . doPostByAuth ( Constants. portal_todourl, requestObject . toJSONString ( ) , auth ) ;
String msgdata = httpRequestUtil . doPostByAuth ( portal_todourl, requestObject . toJSONString ( ) , auth ) ;
bb . writeLog ( "againMonitorDelete-msgdata:" + msgdata ) ;
Map < String , Object > map = new HashMap < > ( ) ;
if ( ! "" . equals ( msgdata ) ) {
@ -222,7 +242,26 @@ public class SendPortalMonitorUtil {
* 流 程 强 制 归 档
* /
public void monitorArchived ( String requestid , String userid ) {
String zhjkbs = "weaver.interfaces.dito.monitor.SendPortalMonitorUtil.monitorArchived" ;
monitorArchivedByTodo ( requestid , userid ) ;
monitorArchivedByToRead ( requestid , userid ) ;
}
/ * * *
* 强 制 归 档 后 , 处 理 待 办 , 推 送 到 门 户 的 todo
* @param requestid
* /
public void monitorArchivedByTodo ( String requestid , String userid ) {
String portal_todourl = Constants . portal_todourl ;
String bpm_app_workflowurl = Constants . bpm_app_workflowurl ;
String username = Constants . username ;
String passwd = Constants . passwd ;
String bpm_workflowurl = Constants . bpm_workflowurl ;
String center = Constants . center ;
String bpm_app_requesturl = Constants . bpm_app_requesturl ;
String zhjkbs = "weaver.interfaces.dito.monitor.SendPortalMonitorUtil.monitorArchivedByTodo" ;
SendPortalErrorUtil sendPortalErrorUtil = new SendPortalErrorUtil ( ) ;
HttpRequestUtil httpRequestUtil = new HttpRequestUtil ( ) ;
@ -230,7 +269,7 @@ public class SendPortalMonitorUtil {
JSONObject requestObject = new JSONObject ( ) ;
RecordSet rs = new RecordSet ( ) ;
BaseBean bb = new BaseBean ( ) ;
bb . writeLog ( "SendPortalMonitorUtil--monitorArchived ") ;
bb . writeLog ( "SendPortalMonitorUtil--monitorArchived ByTodo ") ;
String terminal = "1" ;
String taskType = "0" ;
String actionType = "2" ;
@ -241,33 +280,33 @@ public class SendPortalMonitorUtil {
String scope = "HrmCustomFieldByInfoType" ;
String processTime = DateUtil . getCurrentTime ( "yyyy-MM-dd HH:mm:ss" ) ;
String urlPc = "[newtab]" + Constants. bpm_workflowurl+ "/workflow/request/ViewRequestForwardSPA.jsp?requestid=" + requestid ;
String replace = Constants. bpm_app_workflowurl. replace ( "/bpm" , "" ) ;
String urlDing = replace + Constants. bpm_app_requesturl+ requestid ;
String urlApp = replace + Constants. bpm_app_requesturl+ requestid ;
String urlPc = "[newtab]" + bpm_workflowurl+ "/workflow/request/ViewRequestForwardSPA.jsp?requestid=" + requestid ;
String replace = bpm_app_workflowurl. replace ( "/bpm" , "" ) ;
String urlDing = replace + bpm_app_requesturl+ requestid ;
String urlApp = replace + bpm_app_requesturl+ requestid ;
if ( StringUtils . isNotEmpty ( mobileJumpUrl ) ) {
urlDing + = "&returnUrl=" + URLEncoder . encode ( mobileJumpUrl , "UTF-8" ) ;
urlApp + = "&returnUrl=" + URLEncoder . encode ( mobileJumpUrl , "UTF-8" ) ;
}
bb . writeLog ( "monitorArchived -urlDing", urlDing ) ;
bb . writeLog ( "monitorArchived ByTodo -urlDing", urlDing ) ;
int count = 0 ;
String countSql = " 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 ','8','9 ','7','11')) \n" +
" and t2.islasttimes = 1\n" +
" and (t2.isprocessing = '' or t2.isprocessing is null)\n" +
" and t2.requestid = " + requestid ;
" 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" +
" and t2.requestid = " + requestid ;
bb . writeLog ( "monitorArchived --countSql:"+ countSql ) ;
bb . writeLog ( "monitorArchived ByTodo --countSql:"+ countSql ) ;
rs . executeQuery ( countSql ) ;
while ( rs . next ( ) ) {
count + + ;
}
bb . writeLog ( "monitorArchived --count:"+ count ) ;
bb . writeLog ( "monitorArchived ByTodo --count:"+ count ) ;
if ( count > 0 ) {
String requestname = "" ;
@ -281,7 +320,7 @@ public class SendPortalMonitorUtil {
" where (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n" +
" and t1.requestid = " + requestid ;
bb . writeLog ( "monitorArchived --sql2:"+ sql ) ;
bb . writeLog ( "monitorArchived ByTodo --sql2:"+ sql ) ;
rs . executeQuery ( sql ) ;
if ( rs . next ( ) ) {
@ -290,7 +329,7 @@ public class SendPortalMonitorUtil {
nodeId = Util . null2String ( rs . getString ( "nodeid" ) ) ;
nodeName = Util . null2String ( rs . getString ( "nodeName" ) ) ;
}
requestObject . put ( "center" , Constants. center) ;
requestObject . put ( "center" , center) ;
requestObject . put ( "title" , requestname ) ;
requestObject . put ( "taskCode" , "weaver" + requestid ) ;
requestObject . put ( "nodeId" , nodeId ) ;
@ -308,22 +347,23 @@ public class SendPortalMonitorUtil {
JSONArray taskObjectList = new JSONArray ( ) ;
sql = " select t2.userid,h1.loginid,h1.lastname,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" +
" 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" +
" and t2.requestid = " + requestid ;
sql = " select t2.userid,h1.loginid,h1.lastname,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" +
" 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 ;
rs . executeQuery ( sql ) ;
while ( rs . next ( ) ) {
//归档节点抄送
String creator = rs . getString ( "loginid" ) ;
String staffid = rs . getString ( "staffid" ) ;
bb . writeLog ( "monitorArchived:" + requestid + " creator:" + creator ) ;
if ( "sysadmin" . equals ( creator ) ) {
creator = "Admin" ;
@ -333,15 +373,15 @@ public class SendPortalMonitorUtil {
taskObject . put ( "objectAction" , "0" ) ;
taskObject . put ( "objectType" , "0" ) ;
taskObject . put ( "objectCode" , creator ) ;
taskObject . put ( "objectId" , rs. getString ( " staffid") ) ;
taskObject . put ( "objectId" , staffid) ;
taskObject . put ( "operatorCode" , creator ) ;
taskObjectList . add ( taskObject ) ;
}
requestObject . put ( "taskObjectList" , taskObjectList ) ;
String auth = Constants. username + ":" + Constants. passwd;
String auth = username + ":" + passwd;
bb . writeLog ( "monitorArchived---requestObject:" + requestObject . toJSONString ( ) ) ;
String msgdata = httpRequestUtil . doPostByAuth ( Constants. portal_todourl, requestObject . toJSONString ( ) , auth ) ;
String msgdata = httpRequestUtil . doPostByAuth ( portal_todourl, requestObject . toJSONString ( ) , auth ) ;
if ( ! "" . equals ( msgdata ) ) {
JSONObject msgObject = JSONObject . parseObject ( msgdata ) ;
@ -360,14 +400,165 @@ public class SendPortalMonitorUtil {
} catch ( Exception e ) {
e . printStackTrace ( ) ;
}
}
/ * * *
* 强 制 归 档 后 , 处 理 抄 送 人 员 , 推 送 到 门 户 的 toread
* @param requestid
* /
public void monitorArchivedByToRead ( String requestid , String userid ) {
String portal_todourl = Constants . portal_todourl ;
String bpm_app_workflowurl = Constants . bpm_app_workflowurl ;
String username = Constants . username ;
String passwd = Constants . passwd ;
String bpm_workflowurl = Constants . bpm_workflowurl ;
String center = Constants . center ;
String bpm_app_requesturl = Constants . bpm_app_requesturl ;
BaseBean bb = new BaseBean ( ) ;
bb . writeLog ( "sendOverTimeSubmitBytoRead" ) ;
RecordSet rs = new RecordSet ( ) ;
String zhjkbs = "weaver.interfaces.dito.overtime.SendPortalOverTimeSubmitUtil.sendOverTimeSubmitBytoRead" ;
SendPortalErrorUtil sendPortalErrorUtil = new SendPortalErrorUtil ( ) ;
HttpRequestUtil httpRequestUtil = new HttpRequestUtil ( ) ;
String mobileJumpUrl = PropBean . getUfPropValue ( "mobileJumpUrl" ) ;
JSONObject requestObject = new JSONObject ( ) ;
bb . writeLog ( "SendPortalOverTimeSubmitUtil--sendOverTimeSubmit" ) ;
String terminal = "1" ;
String taskType = "1" ;
String actionType = "2" ;
String objectAction = "0" ;
String objectType = "0" ;
try {
String cus_staff = PropBean . getUfPropValue ( "cus_staff" ) ;
String scopeid = "-1" ;
String scope = "HrmCustomFieldByInfoType" ;
String processTime = DateUtil . getCurrentTime ( "yyyy-MM-dd HH:mm:ss" ) ;
String urlPc = "[newtab]" + bpm_workflowurl + "/workflow/request/ViewRequestForwardSPA.jsp?requestid=" + requestid ;
String replace = bpm_app_workflowurl . replace ( "/bpm" , "" ) ;
String urlDing = replace + bpm_app_requesturl + requestid ;
String urlApp = replace + bpm_app_requesturl + requestid ;
if ( org . apache . commons . lang . StringUtils . isNotEmpty ( mobileJumpUrl ) ) {
urlDing + = "&returnUrl=" + URLEncoder . encode ( mobileJumpUrl , "UTF-8" ) ;
urlApp + = "&returnUrl=" + URLEncoder . encode ( mobileJumpUrl , "UTF-8" ) ;
}
bb . writeLog ( "monitorArchived-urlDing" , urlDing ) ;
String requestname = "" ;
String workflowname = "" ;
String nodeId = "" ;
String nodeName = "" ;
String 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 ;
bb . writeLog ( "monitorArchived--sql2:" + sql ) ;
rs . executeQuery ( sql ) ;
if ( rs . next ( ) ) {
requestname = Util . null2String ( rs . getString ( "requestname" ) ) ;
workflowname = Util . null2String ( rs . getString ( "workflowname" ) ) ;
nodeId = Util . null2String ( rs . getString ( "nodeid" ) ) ;
nodeName = Util . null2String ( rs . getString ( "nodeName" ) ) ;
}
requestObject . put ( "center" , center ) ;
requestObject . put ( "title" , requestname ) ;
requestObject . put ( "taskCode" , "weaver" + requestid ) ;
requestObject . put ( "nodeId" , nodeId ) ;
requestObject . put ( "taskType" , taskType ) ;
requestObject . put ( "actionType" , actionType ) ;
requestObject . put ( "createDate" , processTime ) ;
requestObject . put ( "messageTitle" , getShortMessageTitle ( requestname ) ) ;
requestObject . put ( "messageContent" , requestname ) ;
requestObject . put ( "terminal" , terminal ) ;
requestObject . put ( "urlPc" , urlPc ) ;
requestObject . put ( "urlApp" , urlApp ) ;
requestObject . put ( "urlDing" , urlDing ) ;
requestObject . put ( "nodeName" , nodeName ) ;
requestObject . put ( "ticketType" , workflowname ) ;
JSONArray taskObjectList = new JSONArray ( ) ;
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" +
" and t2.isremark in ('8','9')\n" +
" and t2.islasttimes = 1\n" +
" and (t2.isprocessing = '' or t2.isprocessing is null)\n" +
" and t2.requestid = " + requestid ;
rs . executeQuery ( sql ) ;
while ( rs . next ( ) ) {
//归档节点抄送
String creator = rs . getString ( "loginid" ) ;
String staffid = rs . getString ( "staffid" ) ;
bb . writeLog ( "monitorArchived:" + requestid + " creator:" + creator ) ;
if ( "sysadmin" . equals ( creator ) ) {
creator = "Admin" ;
}
JSONObject taskObject = new JSONObject ( ) ;
taskObject . put ( "objectAction" , objectAction ) ;
taskObject . put ( "objectType" , objectType ) ;
taskObject . put ( "objectCode" , creator ) ;
taskObject . put ( "objectId" , staffid ) ;
taskObject . put ( "operatorCode" , creator ) ;
taskObjectList . add ( taskObject ) ;
}
requestObject . put ( "taskObjectList" , taskObjectList ) ;
String auth = username + ":" + passwd ;
bb . writeLog ( "monitorArchived---requestObject:" + requestObject . toJSONString ( ) ) ;
String msgdata = httpRequestUtil . doPostByAuth ( portal_todourl , requestObject . toJSONString ( ) , auth ) ;
if ( ! "" . equals ( msgdata ) ) {
JSONObject msgObject = JSONObject . parseObject ( msgdata ) ;
if ( msgObject . containsKey ( "resultCode" ) ) {
String resultCode = msgObject . getString ( "resultCode" ) ;
if ( "0" . equals ( resultCode ) ) {
sendPortalErrorUtil . doRecordPortalErrorInfo4Phase2 ( requestid , nodeId , nodeName , userid , requestObject . toJSONString ( ) , resultCode , "" , zhjkbs ) ;
} else {
String resultmsg = msgObject . getString ( "resultMsg" ) ;
sendPortalErrorUtil . doRecordPortalErrorInfo4Phase2 ( requestid , nodeId , nodeName , userid , requestObject . toJSONString ( ) , resultCode , resultmsg , zhjkbs ) ;
}
}
}
} catch ( Exception e ) {
e . printStackTrace ( ) ;
}
}
/ * * *
* 流 程 强 制 收 回
* /
public void monitorPossessed ( String requestid , String userid ) {
String zhjkbs = "weaver.interfaces.dito.monitor.SendPortalMonitorUtil.monitorPossessed" ;
String portal_todourl = Constants . portal_todourl ;
String bpm_app_workflowurl = Constants . bpm_app_workflowurl ;
String username = Constants . username ;
String passwd = Constants . passwd ;
String bpm_workflowurl = Constants . bpm_workflowurl ;
String center = Constants . center ;
String bpm_app_requesturl = Constants . bpm_app_requesturl ;
String zhjkbs = "weaver.interfaces.dito.monitor.SendPortalMonitorUtil.monitorPossessed" ;
SendPortalErrorUtil sendPortalErrorUtil = new SendPortalErrorUtil ( ) ;
HttpRequestUtil httpRequestUtil = new HttpRequestUtil ( ) ;
String mobileJumpUrl = PropBean . getUfPropValue ( "mobileJumpUrl" ) ;
@ -385,10 +576,10 @@ public class SendPortalMonitorUtil {
String scope = "HrmCustomFieldByInfoType" ;
String processTime = DateUtil . getCurrentTime ( "yyyy-MM-dd HH:mm:ss" ) ;
String urlPc = "[newtab]" + Constants. bpm_workflowurl+ "/workflow/request/ViewRequestForwardSPA.jsp?requestid=" + requestid ;
String replace = Constants. bpm_app_workflowurl. replace ( "/bpm" , "" ) ;
String urlDing = replace + Constants. bpm_app_requesturl+ requestid ;
String urlApp = replace + Constants. bpm_app_requesturl+ requestid ;
String urlPc = "[newtab]" + bpm_workflowurl+ "/workflow/request/ViewRequestForwardSPA.jsp?requestid=" + requestid ;
String replace = bpm_app_workflowurl. replace ( "/bpm" , "" ) ;
String urlDing = replace + bpm_app_requesturl+ requestid ;
String urlApp = replace + bpm_app_requesturl+ requestid ;
if ( StringUtils . isNotEmpty ( mobileJumpUrl ) ) {
urlDing + = "&returnUrl=" + URLEncoder . encode ( mobileJumpUrl , "UTF-8" ) ;
@ -397,14 +588,14 @@ public class SendPortalMonitorUtil {
bb . writeLog ( "monitorArchived-urlDing" , urlDing ) ;
int count = 0 ;
String countSql = " 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','8','9','7','11')) \n" +
" and t2.islasttimes = 1\n" +
" and (t2.isprocessing = '' or t2.isprocessing is null)\n" +
" and t2.requestid = " + requestid ;
String countSql = " 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','8','9','7','11')) \n" +
" and t2.islasttimes = 1\n" +
" and (t2.isprocessing = '' or t2.isprocessing is null)\n" +
" and t2.requestid = " + requestid ;
bb . writeLog ( "monitorArchived--countSql:" + countSql ) ;
rs . executeQuery ( countSql ) ;
@ -418,12 +609,13 @@ public class SendPortalMonitorUtil {
String workflowname = "" ;
String nodeId = "" ;
String nodeName = "" ;
String 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 ;
" 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 ;
bb . writeLog ( "monitorArchived--sql2:" + sql ) ;
@ -436,7 +628,7 @@ public class SendPortalMonitorUtil {
}
requestObject . put ( "center" , Constants. center) ;
requestObject . put ( "center" , center) ;
requestObject . put ( "title" , requestname ) ;
requestObject . put ( "taskCode" , "weaver" + requestid ) ;
requestObject . put ( "nodeId" , nodeId ) ;
@ -470,6 +662,7 @@ public class SendPortalMonitorUtil {
while ( rs . next ( ) ) {
//归档节点抄送
String creator = rs . getString ( "loginid" ) ;
String staffid = rs . getString ( "staffid" ) ;
bb . writeLog ( "monitorArchived:" + requestid + " creator:" + creator ) ;
if ( "sysadmin" . equals ( creator ) ) {
creator = "Admin" ;
@ -479,15 +672,15 @@ public class SendPortalMonitorUtil {
taskObject . put ( "objectAction" , "0" ) ;
taskObject . put ( "objectType" , "0" ) ;
taskObject . put ( "objectCode" , creator ) ;
taskObject . put ( "objectId" , rs. getString ( " staffid") ) ;
taskObject . put ( "objectId" , staffid) ;
taskObject . put ( "operatorCode" , creator ) ;
taskObjectList . add ( taskObject ) ;
}
requestObject . put ( "taskObjectList" , taskObjectList ) ;
String auth = Constants. username + ":" + Constants. passwd;
String auth = username + ":" + passwd;
bb . writeLog ( "monitorArchived---requestObject:" + requestObject . toJSONString ( ) ) ;
String msgdata = httpRequestUtil . doPostByAuth ( Constants. portal_todourl, requestObject . toJSONString ( ) , auth ) ;
String msgdata = httpRequestUtil . doPostByAuth ( portal_todourl, requestObject . toJSONString ( ) , auth ) ;
if ( ! "" . equals ( msgdata ) ) {
JSONObject msgObject = JSONObject . parseObject ( msgdata ) ;
@ -514,6 +707,15 @@ public class SendPortalMonitorUtil {
* intervention
* /
public void monitorIntervention ( String requestid , String userid ) {
String portal_todourl = Constants . portal_todourl ;
String bpm_app_workflowurl = Constants . bpm_app_workflowurl ;
String username = Constants . username ;
String passwd = Constants . passwd ;
String bpm_workflowurl = Constants . bpm_workflowurl ;
String center = Constants . center ;
String bpm_app_requesturl = Constants . bpm_app_requesturl ;
String zhjkbs = "weaver.interfaces.dito.monitor.SendPortalMonitorUtil.monitorIntervention" ;
SendPortalErrorUtil sendPortalErrorUtil = new SendPortalErrorUtil ( ) ;
@ -533,10 +735,10 @@ public class SendPortalMonitorUtil {
String scope = "HrmCustomFieldByInfoType" ;
String processTime = DateUtil . getCurrentTime ( "yyyy-MM-dd HH:mm:ss" ) ;
String urlPc = "[newtab]" + Constants. bpm_workflowurl+ "/workflow/request/ViewRequestForwardSPA.jsp?requestid=" + requestid ;
String replace = Constants. bpm_app_workflowurl. replace ( "/bpm" , "" ) ;
String urlDing = replace + Constants. bpm_app_requesturl+ requestid ;
String urlApp = replace + Constants. bpm_app_requesturl+ requestid ;
String urlPc = "[newtab]" + bpm_workflowurl+ "/workflow/request/ViewRequestForwardSPA.jsp?requestid=" + requestid ;
String replace = bpm_app_workflowurl. replace ( "/bpm" , "" ) ;
String urlDing = replace + bpm_app_requesturl+ requestid ;
String urlApp = replace + bpm_app_requesturl+ requestid ;
if ( StringUtils . isNotEmpty ( mobileJumpUrl ) ) {
urlDing + = "&returnUrl=" + URLEncoder . encode ( mobileJumpUrl , "UTF-8" ) ;
@ -583,7 +785,7 @@ public class SendPortalMonitorUtil {
nodeName = Util . null2String ( rs . getString ( "nodeName" ) ) ;
}
requestObject . put ( "center" , Constants. center) ;
requestObject . put ( "center" , center) ;
requestObject . put ( "title" , requestname ) ;
requestObject . put ( "taskCode" , "weaver" + requestid ) ;
requestObject . put ( "nodeId" , nodeId ) ;
@ -631,9 +833,9 @@ public class SendPortalMonitorUtil {
}
requestObject . put ( "taskObjectList" , taskObjectList ) ;
String auth = Constants. username + ":" + Constants. passwd;
String auth = username + ":" + passwd;
bb . writeLog ( "monitorIntervention---requestObject:" + requestObject . toJSONString ( ) ) ;
String msgdata = httpRequestUtil . doPostByAuth ( Constants. portal_todourl, requestObject . toJSONString ( ) , auth ) ;
String msgdata = httpRequestUtil . doPostByAuth ( portal_todourl, requestObject . toJSONString ( ) , auth ) ;
if ( ! "" . equals ( msgdata ) ) {
JSONObject msgObject = JSONObject . parseObject ( msgdata ) ;