package com.jeeplus.flowable.feign;

import com.jeeplus.common.constant.AppNameConstants;
import com.jeeplus.flowable.factory.AssessApiFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author: 徐滕
 * @create: 2023-10-16 16:21
 **/
@FeignClient(contextId = "financeApi", name = AppNameConstants.APP_FINANCE_MODULES, fallbackFactory = AssessApiFallbackFactory.class)
public interface IFinanceApi {

    /**
     * 查询暂时未归档报告归档数据
     * @return
     */
    @GetMapping(value = "/cwProjectReportArchive/getNotFiledYetList")
    String getNotFiledYetList();

    @GetMapping(value = "/cwProjectRecords/getCwProjectData")
    List<String> getCwProjectData(@RequestParam(value = "id") String id);

    @GetMapping(value = "/cwProjectRecords/getMembersId")
    List<String> getMembersId(@RequestParam(value = "id")String id);

    @RequestMapping(value = "/cwProjectRecords/insertMembers", method = RequestMethod.POST)
    void insertMembers(@RequestParam(value = "projectId")String projectId,@RequestParam(value = "membersId")String membersId,@RequestParam(value = "userId")String userId);

    /**
     * 查询预开票项目
     */
    @GetMapping(value = "/cwProjectRecords/getCompleteCollection")
    String getCompleteCollection();

    /**
     * 查询暂时未归档报告归档数据
     * @return
     */
    @GetMapping(value = "/reimbursementApproval/info/disposeElectronicEngineeringInvoice")
    String disposeElectronicEngineeringInvoice();

    /**
     * 查询开票时间距今超过1个月的开票数据
     */
    @GetMapping(value = "/cw_finance/invoice/getExceedCwFinance")
    String getExceedCwFinance();

    /**
     * 根据项目ids获取项目名称
     * @param ids
     * @return
     */
    @GetMapping(value = "/reimbursementApproval/info/getCwProjectNameByIds")
    String getCwProjectNameByIds(@RequestParam(value = "ids") String ids);

    /**
     * 修改数电发票报销数据
     */
    @GetMapping(value = "/reimbursementApproval/info/updateOldData")
    void updateOldData();


    /**
     * 根据流程id获取报销创建人id
     * @param id
     * @return
     */
    @GetMapping(value = "/reimbursementApproval/info/getReimbursementCreateUserIdByProcessInstanceId")
    String getReimbursementCreateUserIdByProcessInstanceId(@RequestParam(value = "id") String id);


    /**
     * 用于发票开票获取数电票信息处理
     * 和开票系统相关的定时任务
     */
    @GetMapping(value = "/cw_finance/invoice/processInvoiceDownloadTasks")
    void processInvoiceDownloadTasks();

    /**
     * 用于发票开票红冲定时任务信息处理
     * 和开票系统相关的定时任务
     */
    @GetMapping(value = "/cw_finance/invoice/processRedInvoiceScheduledTask")
    void processRedInvoiceScheduledTask();


    /**
     * 用于发票开票时报9998错误时进行重新处理的方法
     * 和开票系统相关的定时任务
     */
    @GetMapping(value = "/cw_finance/invoice/redInvoiceRetryScheduledTask")
    void redInvoiceRetryScheduledTask();


}
