|
|
@ -243,7 +243,7 @@ public class DepositoryRecordController { |
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
userKey = (String) request.getSession().getAttribute("userKey"); |
|
|
} |
|
|
} |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
UserByPort userToken = AuthenticationTokenPool.getUserToken(token); |
|
|
List<Integer> params = (List<Integer>) map.get("params"); |
|
|
List<Integer> params = ObjectFormatUtil.objToList(map.get("params"), Integer.class); |
|
|
Integer integer = 0; |
|
|
Integer integer = 0; |
|
|
map.put("applicantId", userToken.getId()); |
|
|
map.put("applicantId", userToken.getId()); |
|
|
Map<String, Object> result = new HashMap<>(); |
|
|
Map<String, Object> result = new HashMap<>(); |
|
|
@ -468,7 +468,7 @@ public class DepositoryRecordController { |
|
|
// 如果是个人
|
|
|
// 如果是个人
|
|
|
|
|
|
|
|
|
// 获取管理员数据
|
|
|
// 获取管理员数据
|
|
|
UserByPort userByPort = PublicConfig.FindUserById(uid,finalUserKey,finalToken); |
|
|
UserByPort userByPort = PublicConfig.FindUserById(uid, finalUserKey, finalToken); |
|
|
// 获取用户的用工关系
|
|
|
// 获取用户的用工关系
|
|
|
int emptype = userByPort.getEmptype(); |
|
|
int emptype = userByPort.getEmptype(); |
|
|
if (emptype > 10) { |
|
|
if (emptype > 10) { |
|
|
@ -485,7 +485,7 @@ public class DepositoryRecordController { |
|
|
// 定义用于获取当前岗位下的人的参数map
|
|
|
// 定义用于获取当前岗位下的人的参数map
|
|
|
Map<String, Object> paramForGetUserByPost = new HashMap<>(); |
|
|
Map<String, Object> paramForGetUserByPost = new HashMap<>(); |
|
|
paramForGetUserByPost.put("position", uid); |
|
|
paramForGetUserByPost.put("position", uid); |
|
|
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost,finalUserKey,finalToken); |
|
|
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, finalUserKey, finalToken); |
|
|
for (UserByPort userByPort : userByPortList) { |
|
|
for (UserByPort userByPort : userByPortList) { |
|
|
int emptype = userByPort.getEmptype(); |
|
|
int emptype = userByPort.getEmptype(); |
|
|
if (emptype > 10) { |
|
|
if (emptype > 10) { |
|
|
@ -529,7 +529,7 @@ public class DepositoryRecordController { |
|
|
// 如果是个人
|
|
|
// 如果是个人
|
|
|
|
|
|
|
|
|
// 获取管理员数据
|
|
|
// 获取管理员数据
|
|
|
UserByPort userByPort = PublicConfig.FindUserById(uid,finalUserKey,finalToken); |
|
|
UserByPort userByPort = PublicConfig.FindUserById(uid, finalUserKey, finalToken); |
|
|
// 获取用户的用工关系
|
|
|
// 获取用户的用工关系
|
|
|
int emptype = userByPort.getEmptype(); |
|
|
int emptype = userByPort.getEmptype(); |
|
|
if (emptype > 10) { |
|
|
if (emptype > 10) { |
|
|
@ -546,7 +546,7 @@ public class DepositoryRecordController { |
|
|
// 定义用于获取当前岗位下的人的参数map
|
|
|
// 定义用于获取当前岗位下的人的参数map
|
|
|
Map<String, Object> paramForGetUserByPost = new HashMap<>(); |
|
|
Map<String, Object> paramForGetUserByPost = new HashMap<>(); |
|
|
paramForGetUserByPost.put("position", uid); |
|
|
paramForGetUserByPost.put("position", uid); |
|
|
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost,finalUserKey,finalToken); |
|
|
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, finalUserKey, finalToken); |
|
|
for (UserByPort userByPort : userByPortList) { |
|
|
for (UserByPort userByPort : userByPortList) { |
|
|
int emptype = userByPort.getEmptype(); |
|
|
int emptype = userByPort.getEmptype(); |
|
|
if (emptype > 10) { |
|
|
if (emptype > 10) { |
|
|
@ -889,6 +889,17 @@ public class DepositoryRecordController { |
|
|
map.remove("depositoryId"); |
|
|
map.remove("depositoryId"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
if (map.containsKey("applicantName")) { |
|
|
|
|
|
List<Long> applicantIdList = new ArrayList<>(); |
|
|
|
|
|
List<UserByPort> applicantName = userService.findUserByName(map.get("applicantName").toString()); |
|
|
|
|
|
for (UserByPort byPort : applicantName) { |
|
|
|
|
|
applicantIdList.add(byPort.getId()); |
|
|
|
|
|
} |
|
|
|
|
|
if (applicantIdList.size() > 0) { |
|
|
|
|
|
map.put("applicantIdList", applicantIdList); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (PublicConfig.roleAdminorgList.contains(maindeparment)) { |
|
|
if (PublicConfig.roleAdminorgList.contains(maindeparment)) { |
|
|
list = depositoryRecordService.findApplicationInRecordPByCondition(map, userToken, userKey, token); |
|
|
list = depositoryRecordService.findApplicationInRecordPByCondition(map, userToken, userKey, token); |
|
|
recordPCount = depositoryRecordService.findApplicationInRecordPCountByCondition(map); |
|
|
recordPCount = depositoryRecordService.findApplicationInRecordPCountByCondition(map); |
|
|
@ -1067,7 +1078,10 @@ public class DepositoryRecordController { |
|
|
for (UserByPort byPort : applicantName) { |
|
|
for (UserByPort byPort : applicantName) { |
|
|
applicantIdList.add(byPort.getId()); |
|
|
applicantIdList.add(byPort.getId()); |
|
|
} |
|
|
} |
|
|
map.put("applicantIdList",applicantIdList); |
|
|
if (applicantIdList.size() > 0) { |
|
|
|
|
|
map.put("applicantIdList", applicantIdList); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (PublicConfig.roleAdminorgList.contains(maindeparment)) { |
|
|
if (PublicConfig.roleAdminorgList.contains(maindeparment)) { |
|
|
@ -1115,7 +1129,7 @@ public class DepositoryRecordController { |
|
|
// List<Long> depositoryIds = ObjectFormatUtil.objToList(map.get("depositoryIds"),Long.class);
|
|
|
// List<Long> depositoryIds = ObjectFormatUtil.objToList(map.get("depositoryIds"),Long.class);
|
|
|
// List<String> placeCodes = ObjectFormatUtil.objToList(map.get("placeCodes"),String.class);
|
|
|
// List<String> placeCodes = ObjectFormatUtil.objToList(map.get("placeCodes"),String.class);
|
|
|
List<String> nowmids = redisPool.getRedisTemplateByDb(15).opsForList().range("mids" + userToken.getId(), 0, -1); |
|
|
List<String> nowmids = redisPool.getRedisTemplateByDb(15).opsForList().range("mids" + userToken.getId(), 0, -1); |
|
|
if(nowmids == null){ |
|
|
if (nowmids == null) { |
|
|
nowmids = new ArrayList<>(); |
|
|
nowmids = new ArrayList<>(); |
|
|
} |
|
|
} |
|
|
for (int i = 0; i < mids.size(); i++) { |
|
|
for (int i = 0; i < mids.size(); i++) { |
|
|
@ -1794,8 +1808,7 @@ public class DepositoryRecordController { |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
} |
|
|
} else if ("out".equals(type)) { |
|
|
else if ("out".equals(type)) { |
|
|
|
|
|
// 获取部门负责人
|
|
|
// 获取部门负责人
|
|
|
List<UserByPort> departmentHeadByUsers = userService.getDepartmentHeaderByIdForNoPack(userToken.getMaindeparment()); |
|
|
List<UserByPort> departmentHeadByUsers = userService.getDepartmentHeaderByIdForNoPack(userToken.getMaindeparment()); |
|
|
StringBuilder departmentHeadId = new StringBuilder(); |
|
|
StringBuilder departmentHeadId = new StringBuilder(); |
|
|
@ -1870,7 +1883,7 @@ public class DepositoryRecordController { |
|
|
// 获取要处理的类型
|
|
|
// 获取要处理的类型
|
|
|
String type = jsonParam.getString("type"); |
|
|
String type = jsonParam.getString("type"); |
|
|
Integer success = 0; |
|
|
Integer success = 0; |
|
|
JSONArray mids =jsonParam.getJSONArray("mids"); |
|
|
JSONArray mids = jsonParam.getJSONArray("mids"); |
|
|
JSONArray iids = jsonParam.getJSONArray("iids"); |
|
|
JSONArray iids = jsonParam.getJSONArray("iids"); |
|
|
JSONArray depositoryIds = jsonParam.getJSONArray("depositoryIds"); |
|
|
JSONArray depositoryIds = jsonParam.getJSONArray("depositoryIds"); |
|
|
JSONArray quantitys = jsonParam.getJSONArray("quantitys"); |
|
|
JSONArray quantitys = jsonParam.getJSONArray("quantitys"); |
|
|
@ -2164,7 +2177,7 @@ public class DepositoryRecordController { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if (flag) { |
|
|
if (flag) { |
|
|
String applyRemark = (String)applyRemarks.get(i); |
|
|
String applyRemark = (String) applyRemarks.get(i); |
|
|
Map<String, Object> outRecord = new HashMap<>(); |
|
|
Map<String, Object> outRecord = new HashMap<>(); |
|
|
outRecord.put("quantity", quantity); |
|
|
outRecord.put("quantity", quantity); |
|
|
outRecord.put("mid", mid); |
|
|
outRecord.put("mid", mid); |
|
|
|