package com.xinelu.manage.controller.homepage;

import com.xinelu.common.core.controller.BaseController;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.manage.service.homepage.SystemHomePageService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 首页信息Controller
 *
 * @author zh
 * @date 2024-08-13
 */
@RestController
@RequestMapping("/system/homePage")
public class SystemHomePageController extends BaseController {

    @Resource
    private SystemHomePageService systemHomePageService;

    /**
     * 顶部统计
     */
    @GetMapping("topStatistics")
    public AjaxResult topStatistics() {
        return AjaxResult.success(systemHomePageService.topStatistics());
    }

    /**
     * 患者签约情况
     */
    @GetMapping("signPatientCount")
    public AjaxResult signPatientCount() {
        return AjaxResult.success(systemHomePageService.signPatientCount());
    }

    /**
     * 服务方式
     */
    @GetMapping("serviceModeStatistics")
    public AjaxResult serviceModeStatistics() {
        return AjaxResult.success(systemHomePageService.serviceModeStatistics());
    }

    /**
     * 代办任务
     */
    @GetMapping("taskSituation")
    public AjaxResult taskSituation() {
        return AjaxResult.success(systemHomePageService.taskSituation());
    }
}
