|
|
@@ -116,10 +116,10 @@ public class QwUserController extends BaseController
|
|
|
startPage();
|
|
|
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
qwUser.setCompanyId(loginUser.getCompany().getCompanyId());
|
|
|
- // 添加部门查询条件
|
|
|
- //本部门
|
|
|
+
|
|
|
+ // 添加企微部门查询条件
|
|
|
Long deptId = qwUser.getDeptId();
|
|
|
- if(deptId!=null){
|
|
|
+ if(deptId!=null && qwUser.getCorpId()!=null){
|
|
|
List<Long> qwDeptIdList = new ArrayList<>();
|
|
|
if (deptId!=null){
|
|
|
qwDeptIdList.add(deptId);
|
|
|
@@ -204,6 +204,23 @@ public class QwUserController extends BaseController
|
|
|
if (!deptList.isEmpty()){
|
|
|
combinedList.addAll(deptList);
|
|
|
}
|
|
|
+
|
|
|
+ // 添加企微部门查询条件
|
|
|
+ Long qwDeptId = qwUser.getDeptId();
|
|
|
+ if(qwDeptId!=null && qwUser.getCorpId()!=null){
|
|
|
+ List<Long> qwDeptIdList = new ArrayList<>();
|
|
|
+ if (qwDeptId!=null){
|
|
|
+ qwDeptIdList.add(qwDeptId);
|
|
|
+ }
|
|
|
+ // 本部门的下级部门
|
|
|
+ List<Long> qwDeptList = qwUserService.selectDeptByParentId(qwDeptId,qwUser.getCorpId());
|
|
|
+ if (!qwDeptList.isEmpty()){
|
|
|
+ qwDeptIdList.addAll(qwDeptList);
|
|
|
+ }
|
|
|
+ qwUser.setQwDeptIdList(qwDeptIdList);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
qwUser.setCuDeptIdList(combinedList);
|
|
|
qwUser.setUserType(loginUser.getUser().getUserType());
|
|
|
|