|
|
|
@ -1777,7 +1777,7 @@ public class QyWxOperationService { |
|
|
|
|
|
|
|
// 获取第一个节点成员uid
|
|
|
|
List<String> userIdList = new ArrayList<>(); |
|
|
|
if(flag == 11){ |
|
|
|
if (flag == 11) { |
|
|
|
// 如果是办公用品库
|
|
|
|
|
|
|
|
|
|
|
|
@ -1792,22 +1792,35 @@ public class QyWxOperationService { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}else if(flag == 12){ |
|
|
|
} else if (flag == 12) { |
|
|
|
// 如果是备品备件库
|
|
|
|
|
|
|
|
// 获取申请用户所在部门的设备员
|
|
|
|
List<UserByPort> userByPortList = PublicConfig.findUserByAdminorgAndPosition(applicantUser.getMaindeparment(), "设备员", userKey, token); |
|
|
|
for (UserByPort userByPort : userByPortList) { |
|
|
|
String other_workwechat = userByPort.getWorkwechat(); |
|
|
|
if (other_workwechat == null || "".equals(other_workwechat)) { |
|
|
|
other_workwechat = userByPort.getWechat(); |
|
|
|
if (userByPortList != null && userByPortList.size() > 0) { |
|
|
|
// 如果有设备员
|
|
|
|
for (UserByPort userByPort : userByPortList) { |
|
|
|
String other_workwechat = userByPort.getWorkwechat(); |
|
|
|
if (other_workwechat == null || "".equals(other_workwechat)) { |
|
|
|
other_workwechat = userByPort.getWechat(); |
|
|
|
} |
|
|
|
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); |
|
|
|
} |
|
|
|
userIdList.add(other_workwechat); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 用于设置第一个节点流程
|
|
|
|
Approval_template_approver approval_template_approver_departMentHeader = new Approval_template_approver(); |
|
|
|
approval_template_approver_departMentHeader.setAttr(1); |
|
|
|
|