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.service.employee.IPlatEmployeeHealthIllnessService;
import com.project.zcustom.service.service.employee.IPlatEmployeeHealthService;
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/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));
    }

}
