Browse Source

修改出库申请为备品备件库时第一个节点改为设备员

lwx_dev
erdanergou 3 years ago
parent
commit
69cca8eef3
  1. 19
      src/main/java/com/dreamchaser/depository_manage/service/impl/QyWxOperationService.java

19
src/main/java/com/dreamchaser/depository_manage/service/impl/QyWxOperationService.java

@ -1777,7 +1777,7 @@ public class QyWxOperationService {
// 获取第一个节点成员uid // 获取第一个节点成员uid
List<String> userIdList = new ArrayList<>(); List<String> userIdList = new ArrayList<>();
if(flag == 11){ if (flag == 11) {
// 如果是办公用品库 // 如果是办公用品库
@ -1792,11 +1792,13 @@ public class QyWxOperationService {
} }
}else if(flag == 12){ } else if (flag == 12) {
// 如果是备品备件库 // 如果是备品备件库
// 获取申请用户所在部门的设备员 // 获取申请用户所在部门的设备员
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();

Loading…
Cancel
Save