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.employee.*;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 员工概况Controller
 *
 * @author change
 * @date 2024-10-21
 */
@RestController
@RequestMapping("/large/health")
@RequiredArgsConstructor(onConstructor_ = @Autowired)
public class PlatEmployeeHealthController extends BaseController {

    private final IPlatEmployeeHealthService platEmployeeHealthService;
    private final IPlatEmployeeHealthIllnessService platEmployeeHealthIllnessService;

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

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





//    @ApiOperation("员工健康分布 去除")
//    @RequestMapping("/getHealthPieData/{appOrg}")
//    public AjaxResult getHealthPieData(@PathVariable String appOrg) {
//        return AjaxResult.success("查询成功", platEmployeeHealthService.getHealthPieData(appOrg));
//    }

//    @ApiOperation("近12月大病发现数量")
//    @RequestMapping("/getHealthIllnessBrokenData/{appOrg}")
//    public AjaxResult getHealthIllnessBrokenData(@PathVariable String appOrg) {
//        return AjaxResult.success("查询成功", platEmployeeHealthChartService.getHealthBrokenData(appOrg,1));
//    }


}
