package com.ruoyi.web.controller.common;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.service.IBomanReservatService;
import com.ruoyi.system.service.IClockRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/statistics")
public class StatisticsController {

    @Autowired
    private IBomanReservatService bomanReservatService;

    @Autowired
    private IClockRecordService clockRecordService;


    /**
     * pc首页统计每周预约
     */
    @GetMapping(value = "/week/appointment")
    public AjaxResult weekAppointment()
    {
        return bomanReservatService.weekAppointment();
    }

    /**
     * pc首页统计考勤和订餐
     */
    @GetMapping(value = "/kqdc")
    public AjaxResult kqdc()
    {
        return clockRecordService.kqdc();
    }

    /**
     * APP首页统计预约和订餐
     */
    @GetMapping(value = "/app/yydc")
    public AjaxResult yydc()
    {
        return bomanReservatService.yydc();
    }

}
