待办objectId取staffId

feature-LeeD-20221025
李栋 2 years ago
parent ac0bc41207
commit 0d116b4d3b

@ -1,5 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4"> <module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="JRebel" name="JRebel">
<configuration>
<option name="ideModuleStorage">
<map>
<entry key="com.zeroturnaround.jrebel.FormatVersion" value="7.0.0" />
<entry key="jrebelEnabled" value="false" />
</map>
</option>
<option name="version" value="7" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true"> <component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output /> <exclude-output />
<content url="file://$MODULE_DIR$"> <content url="file://$MODULE_DIR$">

@ -7,6 +7,7 @@ import weaver.conn.RecordSet;
import weaver.general.BaseBean; import weaver.general.BaseBean;
import weaver.general.Util; import weaver.general.Util;
import weaver.hrm.User; import weaver.hrm.User;
import weaver.interfaces.dito.comInfo.PropBean;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.util.regex.Matcher; import java.util.regex.Matcher;
@ -16,6 +17,8 @@ public class SendPortalTodoUtil {
//public static String EMAIL_REGEX_DEFAULT = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$"; //public static String EMAIL_REGEX_DEFAULT = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$";
public static String EMAIL_REGEX_DEFAULT = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$"; public static String EMAIL_REGEX_DEFAULT = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$";
//cus_fielddata存储的staffid字段名
private String staffIdFieldByCus = PropBean.getUfPropValue("staffIdFieldByCus");
/*** /***
* *
* @param requestId * @param requestId
@ -47,11 +50,12 @@ public class SendPortalTodoUtil {
try { try {
int userid = user.getUID(); int userid = user.getUID();
String sql =" select t1.workflowid,t1.requestname,t1.requestmark,t1.creater,t2.nodeid,t1.createdate,t1.createtime,h1.lastname,h1.loginid,\n" + String sql =" select t1.workflowid,t1.requestname,t1.requestmark,t1.creater,t2.nodeid,t1.createdate,t1.createtime,h1.lastname,h1.loginid,\n" +
" t1.requestid as taskcode,d1.nodename,h1.email\n" + " t1.requestid as taskcode,d1.nodename,h1.email,c1."+staffIdFieldByCus+" as staffid"+
" from workflow_requestbase t1\n" + " from workflow_requestbase t1\n" +
" inner join workflow_currentoperator t2 on t1.requestid = t2.requestid\n" + " inner join workflow_currentoperator t2 on t1.requestid = t2.requestid\n" +
" inner join workflow_base t3 on t1.workflowid = t3.id\n" + " inner join workflow_base t3 on t1.workflowid = t3.id\n" +
" left join workflow_nodebase d1 on d1.id = t1.currentnodeid "+ " 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 (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" +
" where t2.userid in ("+userid+") \n" + " where t2.userid in ("+userid+") \n" +
" and (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n" + " and (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n" +
@ -64,6 +68,7 @@ public class SendPortalTodoUtil {
bb.writeLog("sendTodoDataByCreater-sql:"+sql); bb.writeLog("sendTodoDataByCreater-sql:"+sql);
rs.executeQuery(sql); rs.executeQuery(sql);
if (rs.next()){ if (rs.next()){
objectId = rs.getString("staffid");
String workflowid = Util.null2String(rs.getString("workflowid")) ; String workflowid = Util.null2String(rs.getString("workflowid")) ;
String workflowname = getWorkflowname(workflowid); String workflowname = getWorkflowname(workflowid);
String title = Util.null2String(rs.getString("requestname")) ; String title = Util.null2String(rs.getString("requestname")) ;
@ -202,10 +207,11 @@ public class SendPortalTodoUtil {
try { try {
JSONArray taskObjectList = new JSONArray(); JSONArray taskObjectList = new JSONArray();
String sql =" select t1.workflowid,t1.requestname,t1.requestmark,t1.creater,t1.createdate,t1.createtime,h1.lastname,h1.loginid,\n" + String sql =" select t1.workflowid,t1.requestname,t1.requestmark,t1.creater,t1.createdate,t1.createtime,h1.lastname,h1.loginid,\n" +
" t1.requestid as taskCode,t1.currentnodeid as nodeid,d1.nodename\n" + " t1.requestid as taskCode,t1.currentnodeid as nodeid,d1.nodename,c1."+staffIdFieldByCus+" as staffid"+
" from workflow_requestbase t1\n" + " from workflow_requestbase t1\n" +
" inner join workflow_base t3 on t1.workflowid = t3.id\n" + " inner join workflow_base t3 on t1.workflowid = t3.id\n" +
" left join workflow_nodebase d1 on d1.id = t1.currentnodeid "+ " 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" + " 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" + " where (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n" +
" and t1.requestid = "+requestid ; " and t1.requestid = "+requestid ;
@ -213,6 +219,7 @@ public class SendPortalTodoUtil {
bb.writeLog("sendTodoDataByNode--sql:"+sql); bb.writeLog("sendTodoDataByNode--sql:"+sql);
rs.executeQuery(sql); rs.executeQuery(sql);
if (rs.next()){ if (rs.next()){
objectId = rs.getString("staffid");
String workflowid = Util.null2String(rs.getString("workflowid")) ; String workflowid = Util.null2String(rs.getString("workflowid")) ;
String workflowname = getWorkflowname(workflowid); String workflowname = getWorkflowname(workflowid);
String title = Util.null2String(rs.getString("requestname")) ; String title = Util.null2String(rs.getString("requestname")) ;
@ -371,6 +378,7 @@ public class SendPortalTodoUtil {
" from workflow_requestbase t1\n" + " from workflow_requestbase t1\n" +
" inner join workflow_base t3 on t1.workflowid = t3.id\n" + " inner join workflow_base t3 on t1.workflowid = t3.id\n" +
" left join workflow_nodebase d1 on d1.id = t1.currentnodeid "+ " 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" + " 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" + " where (t1.deleted <> 1 or t1.deleted is null or t1.deleted = '')\n" +
" and t1.requestid = "+requestid ; " and t1.requestid = "+requestid ;
@ -385,6 +393,7 @@ public class SendPortalTodoUtil {
rs.executeQuery(sql); rs.executeQuery(sql);
if (rs.next()){ if (rs.next()){
objectId = rs.getString("staffid");
String workflowid = Util.null2String(rs.getString("workflowid")) ; String workflowid = Util.null2String(rs.getString("workflowid")) ;
String workflowname = getWorkflowname(workflowid); String workflowname = getWorkflowname(workflowid);
String title = Util.null2String(rs.getString("requestname")) ; String title = Util.null2String(rs.getString("requestname")) ;

Loading…
Cancel
Save