package com.dcsoft.system.api;

import com.dcsoft.common.core.constant.SecurityConstants;
import com.dcsoft.common.core.constant.ServiceNameConstants;
import com.dcsoft.common.core.domain.R;
import com.dcsoft.common.core.web.domain.AjaxResult;
import com.dcsoft.common.core.web.page.TableDatasInfo;
import com.dcsoft.system.api.domain.FaceStudentBody;
import com.dcsoft.system.api.domain.SysFile;
import com.dcsoft.system.api.factory.RemoteLogFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 日志服务
 *
 * @author dcsoft
 */
@FeignClient(contextId = "remoteStudentService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteLogFallbackFactory.class)
public interface RemoteStudentService
{
    /**
     * 保存系统日志
     *
     * @param source 请求来源
     * @return 结果
     */
    @PostMapping(value = "/student/studentList")
    public TableDatasInfo studentList(@RequestBody FaceStudentBody faceStudent, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @PostMapping(value = "/student/gatherMonth")
    public void gatherMonth(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @PostMapping(value = "/config/backSql")
    public void backUp(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @PostMapping(value = "/student/gather")
    public void gather(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @PostMapping(value = "/peopleLeave/peopleLeave")
    public void peopleLeave(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    /**
     * 新增请假人员信息
     * @param source
     */
    @PostMapping(value = "/gather/saveAskForLeave")
    void saveAskForLeave(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    /**
     * 新增补卡信息
     * @param inner
     */
    @PostMapping(value = "/gather/saveCardReplacement")
    void saveCardReplacement(String inner);

    /**
     * 定时批量下发
     */
    @PostMapping(value = "/sysPeople/batchDistribute")
    void batchDistribute(String inner);

    @PostMapping(value = "/sysBranch/saveBranchTree")
    void saveBranchTree(String inner);

    @PostMapping(value = "/sysPeople/saveUserInfo")
    void saveUserInfo(String inner);

    @PostMapping(value = "/sysBranch/saveStation")
    void saveStation(String inner);

    @PostMapping(value = "/sysPeople/batchDown")
    void batchDown(String inner);

    @PostMapping(value = "/consumeRecord/amendConsume")
    void amendConsume(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @PostMapping(value = "/subsidyRecord/createJob")
    public AjaxResult createConsumeSubsidy(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @PostMapping(value = "/consumeRecord/syncConsume")
    void syncConsume(String inner);

    @PostMapping(value = "/consumeGroup/createConsumeGroup")
    void createConsumeGroup(String inner);

    @PostMapping(value = "/consumePeopleDay/syncHkRecord")
    public AjaxResult syncHkRecord(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @PostMapping(value = "/visitor/personHkDelete")
    public AjaxResult  personHkDelete(@RequestPart(value = "guid") String guid, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @PostMapping(value = "/visitor/carHkDelete")
    public AjaxResult  carHkDelete(@RequestPart(value = "carNo") String carNo, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
