package cn.com.oa.controller;

import cn.com.oa.model.vo.AttendanceRecordResultVo;
import cn.com.oa.service.IAttendanceRecordResultService;
import cn.com.v2.common.base.BaseController;
import cn.com.v2.common.domain.AjaxResult;
import io.swagger.annotations.ApiOperation;
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.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/api/attendanceRecordResult")
public class AttendanceRecordResultController extends BaseController {
    @Autowired
    private IAttendanceRecordResultService attendanceRecordResultService;

    @ApiOperation(value = "获取本月考勤统计结果", notes = "获取本月考勤统计结果")
    @GetMapping("/getResultMonth")
    @ResponseBody
    public AjaxResult getResultMonth()
    {
        Map<String, Object> map = attendanceRecordResultService.getResultMonth();
        //return map;
        return AjaxResult.successData(200,map).put("msg","获取成功");
    }

    @ApiOperation(value = "获取本日考勤统计结果", notes = "获取本日考勤统计结果")
    @GetMapping("/getResultDay")
    @ResponseBody
    public AjaxResult getResultDay()
    {
        AttendanceRecordResultVo map = attendanceRecordResultService.getResultDay();
        //return map;
        return AjaxResult.successData(200, map).put("msg","获取成功");
    }

}
