Browse Source

修改人员筛选离职与否

lwx_dev
erdanergou 2 years ago
parent
commit
7176bede55
  1. 4
      src/main/java/com/dreamchaser/depository_manage/controller/CompanyController.java
  2. 68
      src/main/java/com/dreamchaser/depository_manage/controller/DepositoryController.java
  3. 24
      src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java
  4. 32
      src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java
  5. 17
      src/main/java/com/dreamchaser/depository_manage/service/impl/QyWxOperationService.java
  6. 8
      src/main/java/com/dreamchaser/depository_manage/service/impl/SplitUnitServiceImpl.java

4
src/main/java/com/dreamchaser/depository_manage/controller/CompanyController.java

@ -259,6 +259,10 @@ public class CompanyController {
Integer success = 0; Integer success = 0;
if (map.containsKey("depositoryId")) { if (map.containsKey("depositoryId")) {
for (UserByPort userByPort : userByPortList) { for (UserByPort userByPort : userByPortList) {
int emptype = userByPort.getEmptype();
if(emptype > 10){
continue;
}
Map<String, Object> param = new HashMap<>(); Map<String, Object> param = new HashMap<>();
param.put("userId", userByPort.getId()); param.put("userId", userByPort.getId());
param.put("depositoryId", map.get("depositoryId")); param.put("depositoryId", map.get("depositoryId"));

68
src/main/java/com/dreamchaser/depository_manage/controller/DepositoryController.java

@ -149,7 +149,7 @@ public class DepositoryController {
HandlesOtherFunctionalThreadPool.execute(() -> RealDeleteSonDepository(id.toString(), finalUserKey, finalToken)); HandlesOtherFunctionalThreadPool.execute(() -> RealDeleteSonDepository(id.toString(), finalUserKey, finalToken));
return CrudUtil.deleteHandle(depositoryService.deleteDepositoryRecordById(id), 1); return CrudUtil.deleteHandle(depositoryService.deleteDepositoryRecordById(id), 1);
} else if (map.containsKey("ids")) { } else if (map.containsKey("ids")) {
List<Integer> ids = ObjectFormatUtil.objToList(map.get("ids"),Integer.class); List<Integer> ids = ObjectFormatUtil.objToList(map.get("ids"), Integer.class);
for (Integer integer : ids) { for (Integer integer : ids) {
String id = integer.toString(); String id = integer.toString();
HandlesOtherFunctionalThreadPool.execute(() -> RealDeleteSonDepository(id, finalUserKey, finalToken)); HandlesOtherFunctionalThreadPool.execute(() -> RealDeleteSonDepository(id, finalUserKey, finalToken));
@ -239,7 +239,7 @@ public class DepositoryController {
return CrudUtil.deleteHandle(depositoryService.changeStateToDeletedById(id), 1); return CrudUtil.deleteHandle(depositoryService.changeStateToDeletedById(id), 1);
} else if (map.containsKey("ids")) { } else if (map.containsKey("ids")) {
List<Integer> ids = ObjectFormatUtil.objToList(map.get("ids"),Integer.class); List<Integer> ids = ObjectFormatUtil.objToList(map.get("ids"), Integer.class);
for (Integer integer : ids) { for (Integer integer : ids) {
String id = integer.toString(); String id = integer.toString();
HandlesOtherFunctionalThreadPool.execute(() -> UpdateSonState(id, 3, true, finalUserKey, finalToken)); HandlesOtherFunctionalThreadPool.execute(() -> UpdateSonState(id, 3, true, finalUserKey, finalToken));
@ -332,8 +332,8 @@ public class DepositoryController {
// 获取本月及之前月份各种类别入/出库总量 // 获取本月及之前月份各种类别入/出库总量
List<MaterialType> materialTypeAll = materialTypeService.findMaterialTypeNoParent(); List<MaterialType> materialTypeAll = materialTypeService.findMaterialTypeNoParent();
Map<String, Object> previousMonth = DateUtil.getPreviousMonth(); Map<String, Object> previousMonth = DateUtil.getPreviousMonth();
List<Object> months = ObjectFormatUtil.objToList(previousMonth.get("months"),Object.class); List<Object> months = ObjectFormatUtil.objToList(previousMonth.get("months"), Object.class);
List<Object> sourceList = ObjectFormatUtil.objToList(previousMonth.get("sourceList"),Object.class); List<Object> sourceList = ObjectFormatUtil.objToList(previousMonth.get("sourceList"), Object.class);
for (int num = 0; num < months.size() - 1; num++) { for (int num = 0; num < months.size() - 1; num++) {
for (MaterialType materialType : materialTypeAll) { for (MaterialType materialType : materialTypeAll) {
Map<String, Object> parm = new HashMap<>(); Map<String, Object> parm = new HashMap<>();
@ -583,7 +583,7 @@ public class DepositoryController {
e.printStackTrace(); e.printStackTrace();
} }
if (sunburstChartData == null || sunburstChartData.size() == 0) { if (sunburstChartData == null || sunburstChartData.size() == 0) {
sunburstChartData = ObjectFormatUtil.objToList(((Map<String, Object>) result).get("sunburstChartDataForInventory"),Object.class); sunburstChartData = ObjectFormatUtil.objToList(((Map<String, Object>) result).get("sunburstChartDataForInventory"), Object.class);
} }
if (lineChartData == null || lineChartData.size() == 0) { if (lineChartData == null || lineChartData.size() == 0) {
lineChartData = (Map<Object, Object>) ((Map<String, Object>) result).get("inventoryLineChartData"); lineChartData = (Map<Object, Object>) ((Map<String, Object>) result).get("inventoryLineChartData");
@ -715,9 +715,9 @@ public class DepositoryController {
// 获取本月之前的月份 // 获取本月之前的月份
Map<String, Object> previousMonth = DateUtil.getPreviousMonth(); Map<String, Object> previousMonth = DateUtil.getPreviousMonth();
// 获取月份的时间戳 // 获取月份的时间戳
List<Object> months = ObjectFormatUtil.objToList(previousMonth.get("months"),Object.class); List<Object> months = ObjectFormatUtil.objToList(previousMonth.get("months"), Object.class);
// 获取月份名称 // 获取月份名称
List<Object> sourceList = ObjectFormatUtil.objToList(previousMonth.get("sourceList"),Object.class); List<Object> sourceList = ObjectFormatUtil.objToList(previousMonth.get("sourceList"), Object.class);
// 结果集 // 结果集
List<Future<Object>> futureList = new ArrayList<Future<Object>>(); List<Future<Object>> futureList = new ArrayList<Future<Object>>();
int threadSize = months.size(); int threadSize = months.size();
@ -756,9 +756,9 @@ public class DepositoryController {
public List<Object> getInventorySunburstData(UserByPort userByPort) { public List<Object> getInventorySunburstData(UserByPort userByPort) {
Map<String, Object> previousMonth = DateUtil.getPreviousMonth(); Map<String, Object> previousMonth = DateUtil.getPreviousMonth();
// 获取所有月份 // 获取所有月份
List<Object> months = ObjectFormatUtil.objToList(previousMonth.get("months"),Object.class); List<Object> months = ObjectFormatUtil.objToList(previousMonth.get("months"), Object.class);
// 获取月份名称 // 获取月份名称
List<Object> sourceList = ObjectFormatUtil.objToList((List<Object>) previousMonth.get("sourceList"),Object.class); List<Object> sourceList = ObjectFormatUtil.objToList((List<Object>) previousMonth.get("sourceList"), Object.class);
Calendar instance = Calendar.getInstance(); Calendar instance = Calendar.getInstance();
instance.add(Calendar.MONTH, 1); instance.add(Calendar.MONTH, 1);
instance.set(Calendar.DATE, 1); instance.set(Calendar.DATE, 1);
@ -806,9 +806,9 @@ public class DepositoryController {
try { try {
obj = completionService.take().get(); obj = completionService.take().get();
Map<String, Object> objectMap = ObjectFormatUtil.objToMap(obj,String.class,Object.class); Map<String, Object> objectMap = ObjectFormatUtil.objToMap(obj, String.class, Object.class);
Integer id = ObjectFormatUtil.toInteger((objectMap).get("id")); Integer id = ObjectFormatUtil.toInteger((objectMap).get("id"));
List<InventoryByMTAndDepository> inventoryByMtAndD = ObjectFormatUtil.objToList(objectMap.get("inventoryByMtAndD"),InventoryByMTAndDepository.class); List<InventoryByMTAndDepository> inventoryByMtAndD = ObjectFormatUtil.objToList(objectMap.get("inventoryByMtAndD"), InventoryByMTAndDepository.class);
value += ObjectFormatUtil.toDouble(objectMap.get("value")); value += ObjectFormatUtil.toDouble(objectMap.get("value"));
inventoryForMTAndDepository.put(id, inventoryByMtAndD); inventoryForMTAndDepository.put(id, inventoryByMtAndD);
(objectMap).remove("id"); (objectMap).remove("id");
@ -994,19 +994,43 @@ public class DepositoryController {
token = (String) request.getSession().getAttribute("userToken"); token = (String) request.getSession().getAttribute("userToken");
userKey = (String) request.getSession().getAttribute("userKey"); userKey = (String) request.getSession().getAttribute("userKey");
} }
UserByPort userToken = AuthenticationTokenPool.getUserToken(token);
List<Integer> userIdByDid = roleService.findUserIdByDid(did); // 用于查询对应的管理员权限
List<UserByPortP> list = new ArrayList<>(); Map<String, Object> paramForUserManager = new HashMap<>();
for (Integer integer : userIdByDid) { paramForUserManager.put("depositoryId", did);
UserByPort userByPort = PublicConfig.FindUserById(integer, userKey, token); List<UserByPort> list = new ArrayList<>();
// 获取用户的用工关系 ;
int emptype = userByPort.getEmptype(); List<RoleAndDepository> roleAndDepositoryByCondition = roleService.findRoleAndDepositoryByCondition(paramForUserManager);
if(emptype > 10){ for (RoleAndDepository roleAndDepository : roleAndDepositoryByCondition) {
continue; int classes = roleAndDepository.getClasses();
Integer userId = roleAndDepository.getUserId();
if (classes == 1) {
// 如果是对人设置的权限
UserByPort userByPort = PublicConfig.FindUserById(userId, userKey, token);
// 获取用户的用工关系
int emptype = userByPort.getEmptype();
if (emptype > 10) {
continue;
}
list.add(userByPort);
} else {
// 如果是对岗位
// 定义用于获取当前岗位下的人的参数map
Map<String, Object> paramForGetUserByPost = new HashMap<>();
paramForGetUserByPost.put("position", userId);
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, userKey, token);
for (UserByPort userByPort : userByPortList) {
// 获取用户的用工关系
int emptype = userByPort.getEmptype();
if (emptype > 10) {
continue;
}
list.add(userByPort);
}
} }
UserByPortP user = new UserByPortP(userByPort);
list.add(user);
} }
int size = list.size(); int size = list.size();
return new RestResponse(list, size, 200); return new RestResponse(list, size, 200);
} }

24
src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java

@ -480,6 +480,10 @@ public class DepositoryRecordController {
paramForGetUserByPost.put("position", uid); paramForGetUserByPost.put("position", uid);
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, null, null); List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, null, null);
for (UserByPort userByPort : userByPortList) { for (UserByPort userByPort : userByPortList) {
int emptype = userByPort.getEmptype();
if(emptype > 10){
continue;
}
String workwechat = userByPort.getWorkwechat(); String workwechat = userByPort.getWorkwechat();
if (workwechat == null || "".equals(workwechat)) { if (workwechat == null || "".equals(workwechat)) {
workwechat = userByPort.getWechat(); workwechat = userByPort.getWechat();
@ -537,6 +541,10 @@ public class DepositoryRecordController {
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();
if(emptype > 10){
continue;
}
String workwechat = userByPort.getWorkwechat(); String workwechat = userByPort.getWorkwechat();
if (workwechat == null || "".equals(workwechat)) { if (workwechat == null || "".equals(workwechat)) {
workwechat = userByPort.getWechat(); workwechat = userByPort.getWechat();
@ -1766,6 +1774,10 @@ public class DepositoryRecordController {
paramForGetUserByPost.put("position", uid); paramForGetUserByPost.put("position", uid);
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, finalUserkey, finalUsertoken); List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, finalUserkey, finalUsertoken);
for (UserByPort userByPort : userByPortList) { for (UserByPort userByPort : userByPortList) {
int emptype = userByPort.getEmptype();
if(emptype > 10){
continue;
}
String workwechat = userByPort.getWorkwechat(); String workwechat = userByPort.getWorkwechat();
if (workwechat == null || "".equals(workwechat)) { if (workwechat == null || "".equals(workwechat)) {
workwechat = userByPort.getWechat(); workwechat = userByPort.getWechat();
@ -1826,6 +1838,10 @@ public class DepositoryRecordController {
paramForGetUserByPost.put("position", uid); paramForGetUserByPost.put("position", uid);
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, finalUserkey, finalUsertoken); List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, finalUserkey, finalUsertoken);
for (UserByPort userByPort : userByPortList) { for (UserByPort userByPort : userByPortList) {
int emptype = userByPort.getEmptype();
if(emptype > 10){
continue;
}
String workwechat = userByPort.getWorkwechat(); String workwechat = userByPort.getWorkwechat();
if (workwechat == null || "".equals(workwechat)) { if (workwechat == null || "".equals(workwechat)) {
workwechat = userByPort.getWechat(); workwechat = userByPort.getWechat();
@ -2057,6 +2073,10 @@ public class DepositoryRecordController {
paramForGetUserByPost.put("position", uid); paramForGetUserByPost.put("position", uid);
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, finalUserkey, finalUsertoken); List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, finalUserkey, finalUsertoken);
for (UserByPort userByPort : userByPortList) { for (UserByPort userByPort : userByPortList) {
int emptype = userByPort.getEmptype();
if(emptype > 10){
continue;
}
String workwechat = userByPort.getWorkwechat(); String workwechat = userByPort.getWorkwechat();
if (workwechat == null || "".equals(workwechat)) { if (workwechat == null || "".equals(workwechat)) {
workwechat = userByPort.getWechat(); workwechat = userByPort.getWechat();
@ -2112,6 +2132,10 @@ public class DepositoryRecordController {
paramForGetUserByPost.put("position", uid); paramForGetUserByPost.put("position", uid);
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, finalUserkey, finalUsertoken); List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, finalUserkey, finalUsertoken);
for (UserByPort userByPort : userByPortList) { for (UserByPort userByPort : userByPortList) {
int emptype = userByPort.getEmptype();
if(emptype > 10){
continue;
}
String workwechat = userByPort.getWorkwechat(); String workwechat = userByPort.getWorkwechat();
if (workwechat == null || "".equals(workwechat)) { if (workwechat == null || "".equals(workwechat)) {
workwechat = userByPort.getWechat(); workwechat = userByPort.getWechat();

32
src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java

@ -750,6 +750,10 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
paramForGetUserByPost.put("position", roleAndDepository.getUserId()); paramForGetUserByPost.put("position", roleAndDepository.getUserId());
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, null, null); List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, null, null);
for (UserByPort userByPort : userByPortList) { for (UserByPort userByPort : userByPortList) {
int emptype = userByPort.getEmptype();
if(emptype > 10){
continue;
}
approverId.append(userByPort.getId()).append(","); approverId.append(userByPort.getId()).append(",");
} }
} }
@ -785,6 +789,10 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
paramForGetUserByPost.put("position", uid); paramForGetUserByPost.put("position", uid);
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, null, null); List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, null, null);
for (UserByPort userByPort : userByPortList) { for (UserByPort userByPort : userByPortList) {
int emptype = userByPort.getEmptype();
if(emptype > 10){
continue;
}
approverId.append(userByPort.getId()).append(","); approverId.append(userByPort.getId()).append(",");
} }
} }
@ -2513,6 +2521,10 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
// 获取当前岗位对应的人员 // 获取当前岗位对应的人员
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, userKey, token); List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, userKey, token);
for (UserByPort userByPort1 : userByPortList) { for (UserByPort userByPort1 : userByPortList) {
int emptype = userByPort1.getEmptype();
if(emptype > 10){
continue;
}
Integer userId1 = userByPort1.getId(); Integer userId1 = userByPort1.getId();
// 修改redis中用户的数据 // 修改redis中用户的数据
updateRedisDataForUserManager(userId1, minRecordKey); updateRedisDataForUserManager(userId1, minRecordKey);
@ -2587,6 +2599,10 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
paramForGetUserByPost.put("position", roleAndDepository.getUserId()); paramForGetUserByPost.put("position", roleAndDepository.getUserId());
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, userKey, token); List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, userKey, token);
for (UserByPort userByPort1 : userByPortList) { for (UserByPort userByPort1 : userByPortList) {
int emptype = userByPort1.getEmptype();
if(emptype > 10){
continue;
}
Integer userId1 = userByPort1.getId(); Integer userId1 = userByPort1.getId();
// 修改redis中用户的数据 // 修改redis中用户的数据
updateRedisDataForUserManager(userId1, minRecordKey); updateRedisDataForUserManager(userId1, minRecordKey);
@ -3588,6 +3604,10 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
paramForGetUserByPost.put("position", roleAndMaterialType.getUid()); paramForGetUserByPost.put("position", roleAndMaterialType.getUid());
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, userKey, token); List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, userKey, token);
for (UserByPort userByPort : userByPortList) { for (UserByPort userByPort : userByPortList) {
int emptype = userByPort.getEmptype();
if(emptype > 10){
continue;
}
Integer userId = userByPort.getId(); Integer userId = userByPort.getId();
// 修改redis中用户的数据 // 修改redis中用户的数据
updateRedisDataForUserManager(userId, minRecordKey); updateRedisDataForUserManager(userId, minRecordKey);
@ -3671,6 +3691,10 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
paramForGetUserByPost.put("position", roleAndDepository.getUserId()); paramForGetUserByPost.put("position", roleAndDepository.getUserId());
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, userKey, token); List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, userKey, token);
for (UserByPort userByPort : userByPortList) { for (UserByPort userByPort : userByPortList) {
int emptype = userByPort.getEmptype();
if(emptype > 10){
continue;
}
Integer userId = userByPort.getId(); Integer userId = userByPort.getId();
// 修改redis中用户的数据 // 修改redis中用户的数据
updateRedisDataForUserManager(userId, minRecordKey); updateRedisDataForUserManager(userId, minRecordKey);
@ -4091,6 +4115,10 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
paramForGetUserByPost.put("position", roleAndMaterialType.getUid()); paramForGetUserByPost.put("position", roleAndMaterialType.getUid());
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, userKey, token); List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, userKey, token);
for (UserByPort userByPort1 : userByPortList) { for (UserByPort userByPort1 : userByPortList) {
int emptype = userByPort1.getEmptype();
if(emptype > 10){
continue;
}
Integer userId = userByPort1.getId(); Integer userId = userByPort1.getId();
// 修改redis中用户的数据 // 修改redis中用户的数据
updateRedisDataForUserManager(userId, minRecordKey); updateRedisDataForUserManager(userId, minRecordKey);
@ -4173,6 +4201,10 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
paramForGetUserByPost.put("position", roleAndDepository.getUserId()); paramForGetUserByPost.put("position", roleAndDepository.getUserId());
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, userKey, token); List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, userKey, token);
for (UserByPort userByPort1 : userByPortList) { for (UserByPort userByPort1 : userByPortList) {
int emptype = userByPort1.getEmptype();
if(emptype > 10){
continue;
}
Integer userId = userByPort1.getId(); Integer userId = userByPort1.getId();
// 修改redis中用户的数据 // 修改redis中用户的数据
updateRedisDataForUserManager(userId, minRecordKey); updateRedisDataForUserManager(userId, minRecordKey);

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

@ -1974,6 +1974,10 @@ public class QyWxOperationService {
paramForGetUserByPost.put("position", userId); paramForGetUserByPost.put("position", userId);
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, userKey, token); List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, userKey, token);
for (UserByPort userByPort : userByPortList) { for (UserByPort userByPort : userByPortList) {
int emptype = userByPort.getEmptype();
if(emptype > 10){
continue;
}
// 获取企业微信id或微信id // 获取企业微信id或微信id
String userByPortWorkwechat = userByPort.getWorkwechat(); String userByPortWorkwechat = userByPort.getWorkwechat();
if (userByPortWorkwechat == null || "".equals(userByPortWorkwechat)) { if (userByPortWorkwechat == null || "".equals(userByPortWorkwechat)) {
@ -2029,7 +2033,10 @@ public class QyWxOperationService {
paramForGetUserByPost.put("position", userId); paramForGetUserByPost.put("position", userId);
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, userKey, token); List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, userKey, token);
for (UserByPort userByPort : userByPortList) { for (UserByPort userByPort : userByPortList) {
int emptype = userByPort.getEmptype();
if(emptype > 10){
continue;
}
// 获取企业微信id或微信id // 获取企业微信id或微信id
String userByPortWorkwechat = userByPort.getWorkwechat(); String userByPortWorkwechat = userByPort.getWorkwechat();
if (userByPortWorkwechat == null || "".equals(userByPortWorkwechat)) { if (userByPortWorkwechat == null || "".equals(userByPortWorkwechat)) {
@ -2494,6 +2501,10 @@ public class QyWxOperationService {
paramForGetUserByPost.put("position", roleAndMaterialType.getUid()); paramForGetUserByPost.put("position", roleAndMaterialType.getUid());
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, userKey, token); List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, userKey, token);
for (UserByPort userByPort : userByPortList) { for (UserByPort userByPort : userByPortList) {
int emptype = userByPort.getEmptype();
if(emptype > 10){
continue;
}
String userByPortWorkwechat = userByPort.getWorkwechat(); String userByPortWorkwechat = userByPort.getWorkwechat();
if (userByPortWorkwechat == null || "".equals(userByPortWorkwechat)) { if (userByPortWorkwechat == null || "".equals(userByPortWorkwechat)) {
userByPortWorkwechat = userByPort.getWechat(); userByPortWorkwechat = userByPort.getWechat();
@ -2557,6 +2568,10 @@ public class QyWxOperationService {
paramForGetUserByPost.put("position", roleAndDepository.getUserId()); paramForGetUserByPost.put("position", roleAndDepository.getUserId());
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, userKey, token); List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, userKey, token);
for (UserByPort userByPort : userByPortList) { for (UserByPort userByPort : userByPortList) {
int emptype = userByPort.getEmptype();
if(emptype > 10){
continue;
}
String userByPortWorkwechat = userByPort.getWorkwechat(); String userByPortWorkwechat = userByPort.getWorkwechat();
if (userByPortWorkwechat == null || "".equals(userByPortWorkwechat)) { if (userByPortWorkwechat == null || "".equals(userByPortWorkwechat)) {
userByPortWorkwechat = userByPort.getWechat(); userByPortWorkwechat = userByPort.getWechat();

8
src/main/java/com/dreamchaser/depository_manage/service/impl/SplitUnitServiceImpl.java

@ -137,6 +137,10 @@ public class SplitUnitServiceImpl implements SplitUnitService {
paramForGetUserByPost.put("position", roleAndDepository.getUserId()); paramForGetUserByPost.put("position", roleAndDepository.getUserId());
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, null, null); List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, null, null);
for (UserByPort userByPort : userByPortList) { for (UserByPort userByPort : userByPortList) {
int emptype = userByPort.getEmptype();
if(emptype > 10){
continue;
}
approverId.append(userByPort.getId()).append(","); approverId.append(userByPort.getId()).append(",");
} }
} }
@ -169,6 +173,10 @@ public class SplitUnitServiceImpl implements SplitUnitService {
paramForGetUserByPost.put("position", uid); paramForGetUserByPost.put("position", uid);
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, null, null); List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, null, null);
for (UserByPort userByPort : userByPortList) { for (UserByPort userByPort : userByPortList) {
int emptype = userByPort.getEmptype();
if(emptype > 10){
continue;
}
approverId.append(userByPort.getId()).append(","); approverId.append(userByPort.getId()).append(",");
} }
} }

Loading…
Cancel
Save