【8.0】【sys】修复获取首页信息接口

pull/57/head
fengshuonan 2023-07-19 00:45:02 +08:00
parent ded1c7ec54
commit bed2599140
1 changed files with 15 additions and 0 deletions

View File

@ -181,6 +181,21 @@ public class UserIndexInfoService {
return;
}
// 判断用户是否被改过机构判断currentOrgId是否失效
if (currentOrgId != null) {
boolean haveChangeDept = true;
for (UserOrgDTO userOrgDTO : userOrgList) {
Long companyId = userOrgDTO.getCompanyId();
Long deptId = userOrgDTO.getDeptId();
if (currentOrgId.equals(companyId) || currentOrgId.equals(deptId)) {
haveChangeDept = false;
}
}
if (haveChangeDept) {
currentOrgId = null;
}
}
// 将查询结果转化为前端需要的信息
for (UserOrgDTO userOrgItem : userOrgList) {
IndexUserOrgInfo indexUserOrgInfo = new IndexUserOrgInfo();