【portal】获取第三方机构id找到本系统公司id

dev-7.6.0-portal
fengshuonan 2023-06-15 17:10:40 +08:00
parent 7dc13e3ba9
commit 53a92b6d28
2 changed files with 33 additions and 0 deletions

View File

@ -103,4 +103,12 @@ public interface OrganizationServiceApi {
*/
HrOrganizationDTO getOrgCompanyInfo(Long orgId);
/**
* idid
*
* @author fengshuonan
* @since 2023/6/15 17:05
*/
Long getMasterOrgIdCompanyId(String masterOrgId);
}

View File

@ -519,6 +519,31 @@ public class HrOrganizationServiceImpl extends ServiceImpl<HrOrganizationMapper,
return getOrgCompanyInfo(orgDetail.getOrgParentId());
}
@Override
public Long getMasterOrgIdCompanyId(String masterOrgId) {
// 获取第三方公司对应的本系统机构id
LambdaQueryWrapper<HrOrganization> hrOrganizationLambdaQueryWrapper = new LambdaQueryWrapper<>();
hrOrganizationLambdaQueryWrapper.eq(HrOrganization::getMasterOrgId, masterOrgId);
hrOrganizationLambdaQueryWrapper.select(HrOrganization::getOrgId);
HrOrganization hrOrganization = this.getOne(hrOrganizationLambdaQueryWrapper, false);
if (hrOrganization == null) {
return null;
}
Long orgId = hrOrganization.getOrgId();
// 获取组织机构对应的公司id
HrOrganizationDTO companyInfo = this.getOrgCompanyInfo(orgId);
if (companyInfo == null) {
return null;
}
return companyInfo.getOrgId();
}
@Override
public HomeCompanyInfo getHomeCompanyInfo() {
HomeCompanyInfo homeCompanyInfo = new HomeCompanyInfo();