|
|
@ -1576,13 +1576,38 @@ public class DepositoryRecordController { |
|
|
StringBuilder sb = new StringBuilder(); |
|
|
StringBuilder sb = new StringBuilder(); |
|
|
for (RoleAndMaterialType mt : materialTypeIdForIn |
|
|
for (RoleAndMaterialType mt : materialTypeIdForIn |
|
|
) { |
|
|
) { |
|
|
// 获取管理员数据
|
|
|
// 获取权限类型
|
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(mt.getUid(), finalUserkey, finalUsertoken); |
|
|
int classes = mt.getClasses(); |
|
|
String workwechat = userByPort.getWorkwechat(); |
|
|
// 获取权限赋值的uid
|
|
|
if (workwechat == null || "".equals(workwechat)) { |
|
|
Integer uid = mt.getUid(); |
|
|
workwechat = userByPort.getWechat(); |
|
|
if (classes == 1) { |
|
|
|
|
|
// 如果是针对人
|
|
|
|
|
|
|
|
|
|
|
|
// 获取管理员数据
|
|
|
|
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(uid, finalUserkey, finalUsertoken); |
|
|
|
|
|
String workwechat = userByPort.getWorkwechat(); |
|
|
|
|
|
if (workwechat == null || "".equals(workwechat)) { |
|
|
|
|
|
workwechat = userByPort.getWechat(); |
|
|
|
|
|
} |
|
|
|
|
|
sb.append(workwechat).append(","); |
|
|
|
|
|
} else { |
|
|
|
|
|
// 如果是对岗位
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 定义用于获取当前岗位下的人的参数map
|
|
|
|
|
|
Map<String, Object> paramForGetUserByPost = new HashMap<>(); |
|
|
|
|
|
paramForGetUserByPost.put("position", uid); |
|
|
|
|
|
List<UserByPort> userByPortList = LinkInterfaceUtil.FindUserByMap(paramForGetUserByPost, finalUserkey, finalUsertoken); |
|
|
|
|
|
for (UserByPort userByPort : userByPortList) { |
|
|
|
|
|
String workwechat = userByPort.getWorkwechat(); |
|
|
|
|
|
if (workwechat == null || "".equals(workwechat)) { |
|
|
|
|
|
workwechat = userByPort.getWechat(); |
|
|
|
|
|
} |
|
|
|
|
|
sb.append(workwechat).append(","); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
sb.append(workwechat).append(","); |
|
|
|
|
|
} |
|
|
} |
|
|
JSONObject jsonObject = qyWxOperationService.sendApprovalTemplateIn(crypt, userToken, integerList, sb.toString(), finalUserkey, finalUsertoken); |
|
|
JSONObject jsonObject = qyWxOperationService.sendApprovalTemplateIn(crypt, userToken, integerList, sb.toString(), finalUserkey, finalUsertoken); |
|
|
String sp_no = jsonObject.getString("sp_no"); |
|
|
String sp_no = jsonObject.getString("sp_no"); |
|
|
@ -1607,13 +1632,36 @@ public class DepositoryRecordController { |
|
|
StringBuilder sb = new StringBuilder(); |
|
|
StringBuilder sb = new StringBuilder(); |
|
|
for (RoleAndDepository mt : materialTypeIdForIn |
|
|
for (RoleAndDepository mt : materialTypeIdForIn |
|
|
) { |
|
|
) { |
|
|
// 获取管理员数据
|
|
|
|
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(mt.getUserId(), finalUserkey, finalUsertoken); |
|
|
// 获取权限类型
|
|
|
String workwechat = userByPort.getWorkwechat(); |
|
|
int classes = mt.getClasses(); |
|
|
if (workwechat == null || "".equals(workwechat)) { |
|
|
Integer uid = mt.getUserId(); |
|
|
workwechat = userByPort.getWechat(); |
|
|
if (classes == 1) { |
|
|
|
|
|
// 如果是对人
|
|
|
|
|
|
|
|
|
|
|
|
// 获取管理员数据
|
|
|
|
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(uid, finalUserkey, finalUsertoken); |
|
|
|
|
|
String workwechat = userByPort.getWorkwechat(); |
|
|
|
|
|
if (workwechat == null || "".equals(workwechat)) { |
|
|
|
|
|
workwechat = userByPort.getWechat(); |
|
|
|
|
|
} |
|
|
|
|
|
sb.append(workwechat).append(","); |
|
|
|
|
|
} else { |
|
|
|
|
|
// 如果是岗位
|
|
|
|
|
|
|
|
|
|
|
|
// 定义用于获取当前岗位下的人的参数map
|
|
|
|
|
|
Map<String, Object> paramForGetUserByPost = new HashMap<>(); |
|
|
|
|
|
paramForGetUserByPost.put("position", uid); |
|
|
|
|
|
List<UserByPort> userByPortList = LinkInterfaceUtil.FindUserByMap(paramForGetUserByPost, finalUserkey, finalUsertoken); |
|
|
|
|
|
for (UserByPort userByPort : userByPortList) { |
|
|
|
|
|
String workwechat = userByPort.getWorkwechat(); |
|
|
|
|
|
if (workwechat == null || "".equals(workwechat)) { |
|
|
|
|
|
workwechat = userByPort.getWechat(); |
|
|
|
|
|
} |
|
|
|
|
|
sb.append(workwechat).append(","); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
sb.append(workwechat).append(","); |
|
|
|
|
|
} |
|
|
} |
|
|
JSONObject jsonObject = qyWxOperationService.sendApprovalTemplateIn(crypt, userToken, integerList, sb.toString(), finalUserkey, finalUsertoken); |
|
|
JSONObject jsonObject = qyWxOperationService.sendApprovalTemplateIn(crypt, userToken, integerList, sb.toString(), finalUserkey, finalUsertoken); |
|
|
String sp_no = jsonObject.getString("sp_no"); |
|
|
String sp_no = jsonObject.getString("sp_no"); |
|
|
@ -1819,13 +1867,32 @@ public class DepositoryRecordController { |
|
|
StringBuilder sb = new StringBuilder(); |
|
|
StringBuilder sb = new StringBuilder(); |
|
|
for (RoleAndMaterialType mt : materialTypeIdForIn |
|
|
for (RoleAndMaterialType mt : materialTypeIdForIn |
|
|
) { |
|
|
) { |
|
|
// 获取管理员数据
|
|
|
|
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(mt.getUid(), finalUserkey, finalUsertoken); |
|
|
int classes = mt.getClasses(); |
|
|
String workwechat = userByPort.getWorkwechat(); |
|
|
Integer uid = mt.getUid(); |
|
|
if (workwechat == null || "".equals(workwechat)) { |
|
|
if (classes == 1) { |
|
|
workwechat = userByPort.getWechat(); |
|
|
// 获取管理员数据
|
|
|
|
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(uid, finalUserkey, finalUsertoken); |
|
|
|
|
|
String workwechat = userByPort.getWorkwechat(); |
|
|
|
|
|
if (workwechat == null || "".equals(workwechat)) { |
|
|
|
|
|
workwechat = userByPort.getWechat(); |
|
|
|
|
|
} |
|
|
|
|
|
sb.append(workwechat).append(","); |
|
|
|
|
|
} else { |
|
|
|
|
|
// 定义用于获取当前岗位下的人的参数map
|
|
|
|
|
|
Map<String, Object> paramForGetUserByPost = new HashMap<>(); |
|
|
|
|
|
paramForGetUserByPost.put("position", uid); |
|
|
|
|
|
List<UserByPort> userByPortList = LinkInterfaceUtil.FindUserByMap(paramForGetUserByPost, finalUserkey, finalUsertoken); |
|
|
|
|
|
for (UserByPort userByPort : userByPortList) { |
|
|
|
|
|
String workwechat = userByPort.getWorkwechat(); |
|
|
|
|
|
if (workwechat == null || "".equals(workwechat)) { |
|
|
|
|
|
workwechat = userByPort.getWechat(); |
|
|
|
|
|
} |
|
|
|
|
|
sb.append(workwechat).append(","); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
sb.append(workwechat).append(","); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
JSONObject jsonObject = qyWxOperationService.sendApprovalTemplateIn(crypt, userToken, integerList, sb.toString(), finalUserkey, finalUsertoken); |
|
|
JSONObject jsonObject = qyWxOperationService.sendApprovalTemplateIn(crypt, userToken, integerList, sb.toString(), finalUserkey, finalUsertoken); |
|
|
String sp_no = jsonObject.getString("sp_no"); |
|
|
String sp_no = jsonObject.getString("sp_no"); |
|
|
@ -1850,13 +1917,32 @@ public class DepositoryRecordController { |
|
|
StringBuilder sb = new StringBuilder(); |
|
|
StringBuilder sb = new StringBuilder(); |
|
|
for (RoleAndDepository mt : materialTypeIdForIn |
|
|
for (RoleAndDepository mt : materialTypeIdForIn |
|
|
) { |
|
|
) { |
|
|
// 获取管理员数据
|
|
|
|
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(mt.getUserId(), finalUserkey, finalUsertoken); |
|
|
int classes = mt.getClasses(); |
|
|
String workwechat = userByPort.getWorkwechat(); |
|
|
Integer uid = mt.getUserId(); |
|
|
if (workwechat == null || "".equals(workwechat)) { |
|
|
if (classes == 1) { |
|
|
workwechat = userByPort.getWechat(); |
|
|
// 获取管理员数据
|
|
|
|
|
|
UserByPort userByPort = LinkInterfaceUtil.FindUserById(uid, finalUserkey, finalUsertoken); |
|
|
|
|
|
String workwechat = userByPort.getWorkwechat(); |
|
|
|
|
|
if (workwechat == null || "".equals(workwechat)) { |
|
|
|
|
|
workwechat = userByPort.getWechat(); |
|
|
|
|
|
} |
|
|
|
|
|
sb.append(workwechat).append(","); |
|
|
|
|
|
} else { |
|
|
|
|
|
// 定义用于获取当前岗位下的人的参数map
|
|
|
|
|
|
Map<String, Object> paramForGetUserByPost = new HashMap<>(); |
|
|
|
|
|
paramForGetUserByPost.put("position", uid); |
|
|
|
|
|
List<UserByPort> userByPortList = LinkInterfaceUtil.FindUserByMap(paramForGetUserByPost, finalUserkey, finalUsertoken); |
|
|
|
|
|
for (UserByPort userByPort : userByPortList) { |
|
|
|
|
|
String workwechat = userByPort.getWorkwechat(); |
|
|
|
|
|
if (workwechat == null || "".equals(workwechat)) { |
|
|
|
|
|
workwechat = userByPort.getWechat(); |
|
|
|
|
|
} |
|
|
|
|
|
sb.append(workwechat).append(","); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
sb.append(workwechat).append(","); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
JSONObject jsonObject = qyWxOperationService.sendApprovalTemplateIn(crypt, userToken, integerList, sb.toString(), finalUserkey, finalUsertoken); |
|
|
JSONObject jsonObject = qyWxOperationService.sendApprovalTemplateIn(crypt, userToken, integerList, sb.toString(), finalUserkey, finalUsertoken); |
|
|
String sp_no = jsonObject.getString("sp_no"); |
|
|
String sp_no = jsonObject.getString("sp_no"); |
|
|
|