mirror of https://gitee.com/stylefeng/roses
【8.0.5】【org】更新org接口
parent
aff0f62e41
commit
72d26e5061
|
@ -4,6 +4,9 @@ import cn.stylefeng.roses.kernel.sys.api.enums.org.DetectModeEnum;
|
|||
import cn.stylefeng.roses.kernel.sys.api.pojo.org.CompanyDeptDTO;
|
||||
import cn.stylefeng.roses.kernel.sys.api.pojo.org.HrOrganizationDTO;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 组织机构信息的api
|
||||
*
|
||||
|
@ -63,4 +66,12 @@ public interface OrganizationServiceApi {
|
|||
*/
|
||||
HrOrganizationDTO getOrgInfo(Long orgId);
|
||||
|
||||
/**
|
||||
* 获取所有的组织机构名称
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @since 2024-01-09 18:26
|
||||
*/
|
||||
List<HrOrganizationDTO> getOrgNameList(Collection<Long> orgIdList);
|
||||
|
||||
}
|
||||
|
|
|
@ -375,6 +375,20 @@ public class HrOrganizationServiceImpl extends ServiceImpl<HrOrganizationMapper,
|
|||
return hrOrganizationDTO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HrOrganizationDTO> getOrgNameList(Collection<Long> orgIdList) {
|
||||
LambdaQueryWrapper<HrOrganization> hrOrganizationLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
hrOrganizationLambdaQueryWrapper.in(HrOrganization::getOrgId, orgIdList);
|
||||
hrOrganizationLambdaQueryWrapper.select(HrOrganization::getOrgId, HrOrganization::getOrgName);
|
||||
List<HrOrganization> list = this.list(hrOrganizationLambdaQueryWrapper);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(list)) {
|
||||
return BeanUtil.copyToList(list, HrOrganizationDTO.class);
|
||||
} else {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public HomeCompanyInfo orgStatInfo() {
|
||||
|
||||
|
|
Loading…
Reference in New Issue