TalentAnalysisController.java 4.36 KB
package com.glsk.controller2;

import cn.hutool.json.JSONUtil;
import com.glsk.service.TalentAnalysisService;
import com.glsk.vo.ReqRet;
import com.glsk.vo.RopResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Jinglf
 * @create 2025-10-16 10:41
 */

@CrossOrigin(origins = "*")
@RestController
@RequestMapping("/talentAnalysis")
@Api(value = "人才分析", tags = {"人才分析"})
public class TalentAnalysisController {
    protected final Logger logger = LoggerFactory.getLogger(getClass());


    @Autowired
    private TalentAnalysisService talentAnalysisService;


    @GetMapping("/getBasicData")
    @ApiOperation("获取基础数据")
    public RopResponse<ReqRet.TalentAnalysisBasicDataRet> getBasicData(ReqRet.TalentAnalysisBasicDataReq req) throws Exception {
        logger.info("获取基础数据-请求参数:{}", JSONUtil.toJsonStr(req));
        ReqRet.TalentAnalysisBasicDataRet ret = talentAnalysisService.getBasicData(req);
        return RopResponse.success(ret);

    }


    @GetMapping("/getSummaryRetentionAnalysis")
    @ApiOperation("汇总留存分析")
    public RopResponse<ReqRet.SummaryRetentionAnalysisRet> getSummaryRetentionAnalysis(ReqRet.SummaryRetentionAnalysisReq req) throws Exception {
        logger.info("汇总留存分析-请求参数:{}", JSONUtil.toJsonStr(req));
        ReqRet.SummaryRetentionAnalysisRet ret = talentAnalysisService.getSummaryRetentionAnalysis(req);
        return RopResponse.success(ret);

    }


    @GetMapping("/getSummaryRetentionAnalysisDetail")
    @ApiOperation("汇总留存分析详细分析")
    public RopResponse<ReqRet.SummaryRetentionAnalysisRet> getSummaryRetentionAnalysisDetail(ReqRet.SummaryRetentionAnalysisDetailReq req) throws Exception {
        logger.info("汇总留存分析详细分析-请求参数:{}", JSONUtil.toJsonStr(req));
        ReqRet.SummaryRetentionAnalysisRet ret = talentAnalysisService.getSummaryRetentionAnalysisDetail(req);
        return RopResponse.success(ret);

    }


    @GetMapping("/getCurrentActivePersonnelAnalysis")
    @ApiOperation("当前在职人数分析")
    public RopResponse<ReqRet.SummaryRetentionAnalysisRet> getCurrentActivePersonnelAnalysis(ReqRet.SummaryRetentionAnalysisReq req) throws Exception {
        logger.info("当前在职人数分析-请求参数:{}", JSONUtil.toJsonStr(req));
        ReqRet.SummaryRetentionAnalysisRet ret = talentAnalysisService.getCurrentActivePersonnelAnalysis(req);
        return RopResponse.success(ret);

    }


    @GetMapping("/getCurrentActivePersonnelAnalysisDetail")
    @ApiOperation("当前在职人数分析详细分析")
    public RopResponse<ReqRet.SummaryRetentionAnalysisRet> getCurrentActivePersonnelAnalysisDetail(ReqRet.SummaryRetentionAnalysisDetailReq req) throws Exception {
        logger.info("当前在职人数分析详细分析-请求参数:{}", JSONUtil.toJsonStr(req));
        ReqRet.SummaryRetentionAnalysisRet ret = talentAnalysisService.getCurrentActivePersonnelAnalysisDetail(req);
        return RopResponse.success(ret);

    }


    @GetMapping("/getResignEmployeelAnalysis")
    @ApiOperation("离职人数分析")
    public RopResponse<ReqRet.ResignEmployeelAnalysisRet> getResignEmployeelAnalysis(ReqRet.SummaryRetentionAnalysisReq req) throws Exception {
        logger.info("离职人数分析-请求参数:{}", JSONUtil.toJsonStr(req));
        ReqRet.ResignEmployeelAnalysisRet ret = talentAnalysisService.getResignEmployeelAnalysis(req);
        return RopResponse.success(ret);

    }

    @GetMapping("/getResignEmployeelAnalysisDetail")
    @ApiOperation("离职人数分析详细分析")
    public RopResponse<ReqRet.ResignEmployeelAnalysisRet> getResignEmployeelAnalysisDetail(ReqRet.SummaryRetentionAnalysisDetailReq req) throws Exception {
        logger.info("离职人数分析详细分析-请求参数:{}", JSONUtil.toJsonStr(req));
        ReqRet.ResignEmployeelAnalysisRet ret = talentAnalysisService.getResignEmployeelAnalysisDetail(req);
        return RopResponse.success(ret);

    }


}