Merge branch 'test-training2' of https://git.code.tencent.com/lian-cbtc/rtss-server into test-training2-zhouyin

This commit is contained in:
tiger_zhou 2022-10-24 16:45:02 +08:00
commit 6fcbf24d13
3 changed files with 7 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import club.joylink.rtss.configuration.configProp.OtherConfig;
import club.joylink.rtss.configuration.configProp.WeChatConfig;
import club.joylink.rtss.constants.MapPrdTypeEnum;
import club.joylink.rtss.constants.ProjectDeviceType;
import club.joylink.rtss.entity.project.Project;
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
import club.joylink.rtss.services.*;
import club.joylink.rtss.services.org.IOrgService;
@ -1086,7 +1087,7 @@ public class GroupSimulationServiceImpl implements GroupSimulationService {
}
}
if (accountVO.getCompanyId() != null) {
String mapProject = mapDetail.getProjectCode();
String mapProject = Project.isDefault(mapDetail.getProjectCode()) ? Project.DEFAULT_PROJECT_CODE : mapDetail.getProjectCode();
return accountVO.getProjectCodes().stream().anyMatch(orgProject -> Objects.equals(mapProject, orgProject));
}
return false;

View File

@ -327,10 +327,12 @@ public class AccountVO implements Serializable {
this.companyName = orgProjectVO.getName();
this.companyAdmin = !CollectionUtils.isEmpty(orgProjectVO.getRole())
&& orgProjectVO.getRole().contains(BusinessConsts.OrgRole.Admin.name());
this.projectCodes = Arrays.asList(orgProjectVO.getProjectCode().split(","));
} else {
this.companyId = 0L;
this.companyName = null;
this.companyAdmin = false;
this.projectCodes = List.of();
}
}
}

View File

@ -17,9 +17,12 @@ public class OrgProjectVO {
private List<String> role;
private String projectCode;
public OrgProjectVO(Org org) {
this.orgId = org.getId();
this.name = org.getName();
this.topOrgId = org.getRootId();
this.projectCode = org.getProjectCode();
}
}