|
|
@ -1797,6 +1797,8 @@ public class QyWxOperationService { |
|
|
|
|
|
|
|
|
// 获取申请用户所在部门的设备员
|
|
|
// 获取申请用户所在部门的设备员
|
|
|
List<UserByPort> userByPortList = PublicConfig.findUserByAdminorgAndPosition(applicantUser.getMaindeparment(), "设备员", userKey, token); |
|
|
List<UserByPort> userByPortList = PublicConfig.findUserByAdminorgAndPosition(applicantUser.getMaindeparment(), "设备员", userKey, token); |
|
|
|
|
|
if (userByPortList != null && userByPortList.size() > 0) { |
|
|
|
|
|
// 如果有设备员
|
|
|
for (UserByPort userByPort : userByPortList) { |
|
|
for (UserByPort userByPort : userByPortList) { |
|
|
String other_workwechat = userByPort.getWorkwechat(); |
|
|
String other_workwechat = userByPort.getWorkwechat(); |
|
|
if (other_workwechat == null || "".equals(other_workwechat)) { |
|
|
if (other_workwechat == null || "".equals(other_workwechat)) { |
|
|
@ -1804,9 +1806,20 @@ public class QyWxOperationService { |
|
|
} |
|
|
} |
|
|
userIdList.add(other_workwechat); |
|
|
userIdList.add(other_workwechat); |
|
|
} |
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
// 如果没有
|
|
|
|
|
|
List<UserByPort> departmentHeadForUserToken = PublicConfig.findDepartmentHeadByUser(applicantUser.getMaindeparment(), userKey, token); |
|
|
|
|
|
for (UserByPort departmentHead : departmentHeadForUserToken |
|
|
|
|
|
) { |
|
|
|
|
|
String departmentHeadWorkwechat = departmentHead.getWorkwechat(); |
|
|
|
|
|
if (departmentHeadWorkwechat == null || "".equals(departmentHeadWorkwechat)) { |
|
|
|
|
|
departmentHeadWorkwechat = departmentHead.getWechat(); |
|
|
|
|
|
} |
|
|
|
|
|
userIdList.add(departmentHeadWorkwechat); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 用于设置第一个节点流程
|
|
|
// 用于设置第一个节点流程
|
|
|
Approval_template_approver approval_template_approver_departMentHeader = new Approval_template_approver(); |
|
|
Approval_template_approver approval_template_approver_departMentHeader = new Approval_template_approver(); |
|
|
|