package com.project.zcustom.controller.service;


import com.project.zcustom.controller.core.AjaxResult;
import com.project.zcustom.controller.core.BaseController;
import com.project.zcustom.service.access.IPlatAccessService;
import com.project.zcustom.service.service.employee.IPlatEmployeeTypeService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 员工概况Controller
 *
 * @author change
 * @date 2024-10-21
 */

@RestController
@RequestMapping("/large/employee")
@RequiredArgsConstructor(onConstructor_ = @Autowired)
public class PlatEmployeeController extends BaseController {

    private final IPlatEmployeeTypeService platEmployeeTypeService;
    private final IPlatAccessService iPlatAccessService;


    @RequestMapping("/getEmployeePieData")
    public AjaxResult getEmployeePieData(@RequestParam String appOrg) {
        return AjaxResult.success("查询成功", platEmployeeTypeService.getEmployeePieData(appOrg));
    }


    @RequestMapping("/getEnterBuildData")
    public AjaxResult getEnterBuildData(@RequestParam String appOrg) {
        return AjaxResult.success("查询成功", platEmployeeTypeService.getEnterBuildData(appOrg));
    }


    @RequestMapping("/getPastWeekFlowData" )
    public AjaxResult getPastWeekFlowData(@RequestParam String appOrg) {
        return AjaxResult.success("查询成功", platEmployeeTypeService.getChartsFlowData(appOrg));
    }


    @RequestMapping("/getSexChartData")
    public AjaxResult getSexChartData(@RequestParam String appOrg) {
        return AjaxResult.success("查询成功", platEmployeeTypeService.getSexChartData(appOrg));
    }


    @RequestMapping("/getOtherData")
    public AjaxResult getOtherData(@RequestParam String appOrg) {
        return AjaxResult.success("查询成功", iPlatAccessService.getOtherData(appOrg));
    }



}
