package jnpf.attendance;

import jnpf.attendance.fallback.FtbClockInApiFallback;
import jnpf.util.NoDataSourceBind;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 打卡api
 *
 * @author yanwenfu
 * @create 2023-12-04
 */
@FeignClient(name = "jnpf-ftb", fallbackFactory = FtbClockInApiFallback.class, path = "/attendance/clockIn")
public interface FtbClockInApi {

    @GetMapping(value = "/daily-rule-change/execute")
    Boolean dailyRuleChangeExecute();

    @PostMapping(value = "/absenceRecord")
    @NoDataSourceBind
    Boolean generateFtbAbsenceRecord(@RequestParam(value = "tenantId") String tenantId);

    @PostMapping(value = "/absenceTask")
    @NoDataSourceBind
    Boolean generateAbsenceTask(@RequestParam(value = "tenantId") String tenantId);

    /**
     * 生成打卡提醒记录
     * @return java.lang.Boolean
     */
    @PostMapping(value = "/remindRecord")
    @NoDataSourceBind
    Boolean generateBeforeWorkRemind(@RequestParam(value = "tenantId") String tenantId);

    @PostMapping(value = "/repairNum")
    @NoDataSourceBind
    Boolean generateRepairNum(@RequestParam(value = "tenantId") String tenantId);

    @PostMapping(value = "/continuousCheck")
    Boolean continuousCheck(@RequestParam(value = "tenantId") String tenantId);
}
