package com.jeeplus.flowable.feign;

import com.jeeplus.common.constant.AppNameConstants;
import com.jeeplus.flowable.factory.HumanApiFallBackFactory;
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;

import java.util.List;

/**
 * @author 王强
 * @version 1.0
 * @date 2023-09-21 9:20
 */
@FeignClient(contextId = "humanApi", name = AppNameConstants.APP_HUMAN_MODULES, fallbackFactory = HumanApiFallBackFactory.class)
public interface IHumanApi {

    /**
     * 查询3天未发送日志状态为实习中的人员信息
     * @return
     */
    @GetMapping(value = "/register/getTimeOutRegisters")
    String getTimeOutRegisters();

    /**
     * 获取最后一次发起报销且实习状态为结束，并且报销状态为完成的
     * @return
     */
    @GetMapping(value = "/register/getTimeOutReimburseRegisters")
    String getTimeOutReimburseRegisters();

    /**
     * 获取正式工在职状态为离职的，并且user表中未删除的
     * @return
     */
    @GetMapping(value = "/register/getFormalUserInfo")
    String getFormalUserInfo();

    /**
     * 定时任务发起  个人信息完善所用
     * @param value
     */
    @GetMapping(value = "/enrollmentRegistration/insertIntoEnrollmentRegistrationInfo")
    void insertIntoEnrollmentRegistrationInfo(@RequestParam(value = "value")String value);

    //获取所有的入职登记表中的有效数据的id
    @GetMapping(value = "/enrollmentRegistration/getAllUserIdInSuccess")
    List<String> getAllUserIdInSuccess();
    //获取实习日期结束,但实习状态为修改的数据
    @GetMapping(value = "/register/getAllRegister")
    String getAllRegister();
    //修改实习状态
    @PostMapping(value = "/register/updatePracticeStatus")
    void updatePracticeStatus(@RequestParam(value = "id")String id);

    //同步钉钉数据
    @GetMapping(value = "/enrollmentRegistration/syncDingTalkInfo")
    void syncDingTalkInfo();

    //同步钉钉数据
    @GetMapping(value = "/departRegistration/dingConfirmResign")
    void dingConfirmResign(@RequestParam(value = "id")String id,@RequestParam(value = "mobilePhone")String mobilePhone);
}
