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.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author: 王强
 * @create: 2023-07-26 17:01
 **/
@FeignClient(contextId = "assessApi", name = AppNameConstants.APP_ASSESS_MODULES, fallbackFactory = AssessApiFallbackFactory.class)
public interface IAssessApi {

    /**
     * 修改报告归档 归档状态信息
     * @param id
     * @param archiveStatus
     * @param overArchiveStatus
     */
    @GetMapping(value = "/program/projectList/updateArchiveStatus")
    void updateArchiveStatus(@RequestParam(value = "id")String id,
                             @RequestParam(value = "archiveStatus")String archiveStatus,
                             @RequestParam(value = "overArchiveStatus")String overArchiveStatus);

    /**
     * 查询项目签发单完成后3天未归档项目信息
     * @return
     */
    @GetMapping(value = "/program/projectList/getOverdueFilingProjectList")
    String getOverdueFilingProjectList();

    /**
     * 查询归档完成，但开票日期未填写的项目信息
     * @return
     */
    @GetMapping(value = "/program/projectList/getInvoiceDateIsNullProjectList")
    String getInvoiceDateIsNullProjectList();

    /**
     * 查询未关联项目的报告
     */
    @GetMapping(value = "/program/projectList/getProjectList")
    String getProjectList();

    /**
     * 保存作废的报告号
     */
    @GetMapping(value = "/program/projectList/insertReportNo")
    void insertReportNo(@RequestParam(value = "value")String value);

    /**
     * 查询已作废项目的报告
     */
    @GetMapping(value = "/program/projectList/getCancelledProject")
    String getCancelledProject();

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


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

    @GetMapping(value = "/program/projectList/getProjectData")
    List<String> getProjectData(@RequestParam(value = "id") String id);

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

    @RequestMapping(value = "/program/projectList/insertMembers", method = RequestMethod.POST)
    void insertMembers(@RequestParam(value = "projectId")String projectId,@RequestParam(value = "membersId")String membersId,@RequestParam(value = "userId")String userId);
    @GetMapping(value = "/reimbursement/info/getUserBySignatureScribe")
    String getUserBySignatureScribe(@RequestParam(value = "name") String name,@RequestParam(value = "userId") String userId);

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

}
