package com.yida.data.attendance.controller;

import com.yida.data.attendance.service.EduAttendanceStaffRecordService;
import com.yida.data.attendance.service.EduAttendanceStaffRuleRemindService;
import com.yida.data.common.core.common.ResultBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ccl
 */
@Api(tags = "考勤-教职工-考勤记录（不鉴权）")
@RestController
@RequiredArgsConstructor
@RequestMapping("/in/staffRecord")
public class InEduAttendanceStaffRecordController {

    private final EduAttendanceStaffRecordService eduAttendanceStaffRecordService;
    private final EduAttendanceStaffRuleRemindService eduAttendanceStaffRuleRemindService;

    @ApiOperation("处理记录到结果表")
    @GetMapping("/staffRecord")
    public ResultBean staffRecord() {
        eduAttendanceStaffRecordService.staffRecord();
        return ResultBean.buildSuccess();
    }

    @ApiOperation("提醒打卡")
    @GetMapping("/remindStaff")
    public ResultBean remindStaff() {
        eduAttendanceStaffRuleRemindService.remindStaff();
        return ResultBean.buildSuccess();
    }
}
