package cn.iocoder.yudao.module.bpm.api.oa;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.bpm.api.oa.vo.salesperformance.SalesPerformanceDTO;
import cn.iocoder.yudao.module.bpm.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = ApiConstants.NAME) // TODO 芋艿：fallbackFactory =
@Tag(name = "RPC 服务 - 销售目标")
public interface BpmOASalesPerformanceApi {

    String PREFIX = ApiConstants.PREFIX + "/oa/salesPerformance";

    @GetMapping(PREFIX + "/getSalesPerformance")
    @Operation(summary = "根据日期获取用户销售目标申请")
    CommonResult<List<SalesPerformanceDTO>> getReceiptSettlement(@RequestParam(name = "year", required = false) String year,
                                                                 @RequestParam(name = "month", required = false) String month);

    @GetMapping(PREFIX + "/getBySalesPerformanceId")
    @Operation(summary = "根据日期获取用户销售目标申请")
    CommonResult<SalesPerformanceDTO> getBySalesPerformanceId(@RequestParam(name = "salesPerformanceId", required = false) Long salesPerformanceId);
}
