mirror of https://gitee.com/stylefeng/roses
【7.6.0】【sys】【portal】初始化首页数据统计
parent
08efb1dfb9
commit
c56bf8e630
|
@ -0,0 +1,39 @@
|
|||
package cn.stylefeng.roses.kernel.sys.modular.org.controller;
|
||||
|
||||
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
|
||||
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
|
||||
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.org.pojo.response.HomeCompanyInfo;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.org.service.HrOrganizationService;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 获取组织机构统计信息
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @since 2023/6/26 22:51
|
||||
*/
|
||||
@RestController
|
||||
@ApiResource(name = "获取组织机构统计信息")
|
||||
public class HomeOrgStatController {
|
||||
|
||||
@Resource
|
||||
private HrOrganizationService hrOrganizationService;
|
||||
|
||||
/**
|
||||
* 获取组织机构统计信息,包含系统的统计,包含当前用户公司的统计
|
||||
* <p>
|
||||
* 一般用在首页展示组织机构的统计信息界面
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @since 2023/6/26 22:51
|
||||
*/
|
||||
@GetResource(name = "获取组织机构统计信息", path = "/org/statInfo")
|
||||
public ResponseData<HomeCompanyInfo> orgStatInfo() {
|
||||
return new SuccessResponseData<>(hrOrganizationService.orgStatInfo());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package cn.stylefeng.roses.kernel.sys.modular.org.pojo.response;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 组织机构信息统计
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @since 2023/6/26 22:52
|
||||
*/
|
||||
@Data
|
||||
public class HomeCompanyInfo {
|
||||
|
||||
/**
|
||||
* 所有组织机构数
|
||||
*/
|
||||
private Integer organizationNum;
|
||||
|
||||
/**
|
||||
* 所有企业人员总数
|
||||
*/
|
||||
private Integer enterprisePersonNum;
|
||||
|
||||
/**
|
||||
* 所有职位总数
|
||||
*/
|
||||
private Integer positionNum;
|
||||
|
||||
/**
|
||||
* 当前登录用户,所在公司的部门数量
|
||||
*/
|
||||
private Integer currentDeptNum;
|
||||
|
||||
/**
|
||||
* 当前登录用户,所在公司的总人数
|
||||
*/
|
||||
private Integer currentCompanyPersonNum;
|
||||
}
|
|
@ -4,6 +4,7 @@ import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
|
|||
import cn.stylefeng.roses.kernel.sys.api.pojo.org.CompanyDeptDTO;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.org.entity.HrOrganization;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.org.pojo.request.HrOrganizationRequest;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.org.pojo.response.HomeCompanyInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -110,4 +111,14 @@ public interface HrOrganizationService extends IService<HrOrganization> {
|
|||
*/
|
||||
CompanyDeptDTO getOrgCompanyInfo(HrOrganization hrOrganization);
|
||||
|
||||
/**
|
||||
* 获取组织机构统计信息,包含系统的统计,包含当前用户公司的统计
|
||||
* <p>
|
||||
* 一般用在首页展示组织机构的统计信息界面
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @since 2023/6/26 22:53
|
||||
*/
|
||||
HomeCompanyInfo orgStatInfo();
|
||||
|
||||
}
|
|
@ -20,6 +20,7 @@ import cn.stylefeng.roses.kernel.sys.modular.org.entity.HrOrganization;
|
|||
import cn.stylefeng.roses.kernel.sys.modular.org.factory.OrganizationFactory;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.org.mapper.HrOrganizationMapper;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.org.pojo.request.HrOrganizationRequest;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.org.pojo.response.HomeCompanyInfo;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.org.service.HrOrganizationService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
@ -198,6 +199,15 @@ public class HrOrganizationServiceImpl extends ServiceImpl<HrOrganizationMapper,
|
|||
return this.getOrgCompanyInfo(parentOrgInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HomeCompanyInfo orgStatInfo() {
|
||||
|
||||
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取信息
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue