package com.microservices.dms.achievementLibrary.service;


import com.microservices.dms.achievementLibrary.domain.ExpertTotallVo;
import com.microservices.dms.achievementLibrary.domain.KeyValueVo;
import com.microservices.dms.resourceLibrary.mapper.ExpertResourceLibraryMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@RequiredArgsConstructor
public class ExpertDashboardService {
    @Autowired
    private ExpertResourceLibraryMapper expertResourceLibraryMapper;
    /**
     * 专家职称级分布
      * @return
     */
    public List<KeyValueVo> getTitleRankStatistic() {
        return expertResourceLibraryMapper.getTitleRankStatistic();
    }

    /**
     * 专家专业类别
     * @return
     */
    public List<KeyValueVo>  getExpertTypeStatistic() {
        return expertResourceLibraryMapper.getExpertTypeStatistic();
    }

    /**
     * 专家学历分布
     * @return
     */
    public List<KeyValueVo> getHighestDegreeStatistic() {
        return expertResourceLibraryMapper.getHighestDegreeStatistic();
    }

    /**
     * 专家单位类别分布
     * @return
     */
    public List<KeyValueVo> getWorkplaceTypeStatistic() {
        return expertResourceLibraryMapper.getWorkplaceTypeStatistic();
    }

    /**
     * 获取专家总数
     * @return
     */
    public Long getExpertTotal() {
        return expertResourceLibraryMapper.getExpertTotal();
    }
    /**
     * 专家实名完成度 userId   users.authentication
     * @return
     */
    public KeyValueVo getAuthenticationStatistic() {
        return expertResourceLibraryMapper.getAuthenticationStatistic();
    }

    /**
     * 年度专家数据统计  cretate_on
     * @return
     */
    public List<KeyValueVo> getExpertTotalByYear() {
        return expertResourceLibraryMapper.getExpertTotalByYear();
    }

    /**
     * 热门专家领域
     * reviewAreaOne、reviewAreaTwo、reviewAreaThree
     * @return
     */
    public List<KeyValueVo> getReviewAreasStatistic() {
        return expertResourceLibraryMapper.getReviewAreasStatistic();
    }

    /**
     * 近一年专家评审数
     * @return
     */
    public List<ExpertTotallVo> getExpertAduit() {
        return expertResourceLibraryMapper.getExpertAduit();
    }

}
