停用账号不分配审批bug修复
This commit is contained in:
parent
7865ebbd27
commit
087b1ca78f
|
@ -94,9 +94,9 @@ public class ApplyDistrictListener implements TaskListener, ExecutionListener, A
|
|||
SysRoleDTO roleDTO = sysRoleService.getByName(roleName);
|
||||
logger.error("roleDTOId:" + roleDTO.getId());
|
||||
|
||||
List<SysUserEntity> userList = sysUserDao.getList(ImmutableMap.of("role_id", roleDTO.getId(), "status", "1"));
|
||||
List<SysUserEntity> userList = sysUserDao.getList(ImmutableMap.of("role_id", roleDTO.getId()));
|
||||
Optional<SysUserEntity> userEntityOptional = userList.stream().sorted(Comparator.comparing(SysUserEntity::getUpdateDate).reversed()).collect(Collectors.toList()).stream()
|
||||
.filter(user -> Objects.equals(regionEntity.getId(), sysRegionService.getByLevel(sysDeptService.get(user.getDeptId()).getDistrict(), RegionLevelEnum.THREE).getId())).findFirst();
|
||||
.filter(user -> Objects.equals(regionEntity.getId(), sysRegionService.getByLevel(sysDeptService.get(user.getDeptId()).getDistrict(), RegionLevelEnum.THREE).getId()) && user.getStatus()==1).findFirst();
|
||||
if (userEntityOptional.isPresent()) {
|
||||
userId = userEntityOptional.get().getId().toString();
|
||||
}
|
||||
|
|
|
@ -95,9 +95,9 @@ public class CityListener implements TaskListener, ExecutionListener, ActivitiEv
|
|||
SysRoleDTO roleDTO = sysRoleService.getByName(roleName);
|
||||
logger.error("roleDTOId:" + roleDTO.getId());
|
||||
|
||||
List<SysUserEntity> userList = sysUserDao.getList(ImmutableMap.of("role_id", roleDTO.getId(), "status", "1"));
|
||||
List<SysUserEntity> userList = sysUserDao.getList(ImmutableMap.of("role_id", roleDTO.getId()));
|
||||
Optional<SysUserEntity> userEntityOptional = userList.stream().sorted(Comparator.comparing(SysUserEntity::getUpdateDate).reversed()).collect(Collectors.toList()).stream()
|
||||
.filter(user -> Objects.equals(regionEntity.getId(), sysRegionService.getByLevel(sysDeptService.get(user.getDeptId()).getDistrict(), RegionLevelEnum.TWO).getId())).findFirst();
|
||||
.filter(user -> Objects.equals(regionEntity.getId(), sysRegionService.getByLevel(sysDeptService.get(user.getDeptId()).getDistrict(), RegionLevelEnum.TWO).getId()) && user.getStatus()==1).findFirst();
|
||||
if (userEntityOptional.isPresent()) {
|
||||
userId = userEntityOptional.get().getId().toString();
|
||||
}
|
||||
|
|
|
@ -91,9 +91,9 @@ public class OwnerDistrictListener implements TaskListener, ExecutionListener, A
|
|||
logger.error("regionEntityId:" + regionEntity.getId());
|
||||
SysRoleDTO roleDTO = sysRoleService.getByName(roleName);
|
||||
logger.error("roleDTOId:" + roleDTO.getId());
|
||||
List<SysUserEntity> userList = sysUserDao.getList(ImmutableMap.of("role_id", roleDTO.getId(), "status", "1"));
|
||||
List<SysUserEntity> userList = sysUserDao.getList(ImmutableMap.of("role_id", roleDTO.getId()));
|
||||
Optional<SysUserEntity> userEntityOptional = userList.stream().sorted(Comparator.comparing(SysUserEntity::getUpdateDate).reversed()).collect(Collectors.toList()).stream()
|
||||
.filter(user -> Objects.equals(regionEntity.getId(), sysRegionService.getByLevel(sysDeptService.get(user.getDeptId()).getDistrict(), RegionLevelEnum.THREE).getId())).findFirst();
|
||||
.filter(user -> Objects.equals(regionEntity.getId(), sysRegionService.getByLevel(sysDeptService.get(user.getDeptId()).getDistrict(), RegionLevelEnum.THREE).getId()) && user.getStatus()==1).findFirst();
|
||||
if (userEntityOptional.isPresent()) {
|
||||
userId = userEntityOptional.get().getId().toString();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue