|
|
@ -37,7 +37,7 @@ import org.springframework.transaction.annotation.Propagation;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -333,7 +333,7 @@ public class SysUserService implements ISysUserService {
|
|
|
|
@ApiOperation(value = "查询用户ID 集合",notes = "根据部门Id 查询用户ID集合")
|
|
|
|
@ApiOperation(value = "查询用户ID 集合",notes = "根据部门Id 查询用户ID集合")
|
|
|
|
public List<Long> findSysUserIdListByDepartmentId(List<Long> idList) {
|
|
|
|
public List<Long> findSysUserIdListByDepartmentId(List<Long> idList) {
|
|
|
|
List<Long> result = new ArrayList<>();
|
|
|
|
List<Long> result = new ArrayList<>();
|
|
|
|
if(idList != null){
|
|
|
|
if(idList != null && idList.size() > 0){
|
|
|
|
StringBuffer hqlWhere = new StringBuffer();
|
|
|
|
StringBuffer hqlWhere = new StringBuffer();
|
|
|
|
HqlPack.getInPack(StringUtils.join(idList, ","), "departmentId", hqlWhere);
|
|
|
|
HqlPack.getInPack(StringUtils.join(idList, ","), "departmentId", hqlWhere);
|
|
|
|
List<SysRefUserDepartment> list = refUserDepartmentRDao.findByHqlWhere(hqlWhere.toString());
|
|
|
|
List<SysRefUserDepartment> list = refUserDepartmentRDao.findByHqlWhere(hqlWhere.toString());
|
|
|
@ -380,7 +380,7 @@ public class SysUserService implements ISysUserService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
List<Long> idList = findSysUserIdListByDepartmentId(departmentIdList);
|
|
|
|
List<Long> idList = findSysUserIdListByDepartmentId(departmentIdList);
|
|
|
|
user.setDepartmentIdList(StringTool.getListString(idList));
|
|
|
|
user.setDepartmentIdList(StringTool.getListString(idList.stream().distinct().collect(Collectors.toList())));
|
|
|
|
|
|
|
|
|
|
|
|
//生成hql查询语句
|
|
|
|
//生成hql查询语句
|
|
|
|
String hqlPack = CoreHqlPack.packHqlSysUser(user);
|
|
|
|
String hqlPack = CoreHqlPack.packHqlSysUser(user);
|
|
|
|