package com.yuchen.saas.parking.api.feign.order;

import com.yuchen.saas.parking.api.entity.*;
import com.yuchen.saas.parking.api.feign.order.fallback.ParkingOrderBillDataClientFeignFallback;
import com.yuchen.saas.parking.api.vo.order.MonthlyCardBillDataVO;
import com.yuchen.saas.parking.api.vo.order.OrderManageDetailDto;
import com.yuchen.saas.parking.api.vo.order.OrderPmgBatParkBillVo;
import com.yuchen.saas.parking.api.vo.order.StaggeredMonthlyCardBillDataVO;
import org.nest.springwrap.core.launch.app.AppNameConstant;
import org.nest.springwrap.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @author zhouhanwei
 * @create 2023/6/16 13:51
 */
@FeignClient(
        value = AppNameConstant.SAAS_PARKING,
        fallbackFactory = ParkingOrderBillDataClientFeignFallback.class
)
public interface ParkingOrderBillDataClientFeign {

    @GetMapping("/parkingOrder/billData/getUnpaidParkingBillData/{billId}")
    R<PmgBatParkBill> getUnpaidParkingBillData(@PathVariable Long billId);

    /**
     * 获取停车账单数据 - 已支付使用
     **/
    @GetMapping("/parkingOrder/billData/getPayParkingBillData/{paymentId}")
    R<PmgBatParkBill> getPayParkingBillData(@PathVariable Long paymentId);

    @PostMapping("/parkingOrder/billData/getPayParkingBillDataByPaymentIds")
    R<Map<Long, OrderPmgBatParkBillVo>> getPayParkingBillDataByPaymentIds(@RequestBody List<Long> paymentIds);

    /**
     * 获取占位账单数据  - 待支付-已关闭使用
     **/
    @GetMapping("/parkingOrder/billData/getUnpaidOccupancyFeeBillData/{billId}")
    R<VehicleOccupancyFeeBill> getUnpaidOccupancyFeeBillData(@PathVariable Long billId);

    /**
     * 获取占位账单数据  - 已支付使用
     **/
    @GetMapping("/parkingOrder/billData/getPayOccupancyFeeBillData/{paymentId}")
    R<VehicleOccupancyFeeBill> getPayOccupancyFeeBillData(@PathVariable Long paymentId);

    /**
     * 获取月卡账单数据
     **/
    @GetMapping("/parkingOrder/billData/getMonthlyCardBillData/{billId}")
    R<MonthlyCardBillDataVO> getMonthlyCardBillData(@PathVariable Long billId);

    /**
     * 获取月卡账单数据
     **/
    @GetMapping("/parkingOrder/billData/getMonthlyCardBillDataByPlateNo/{plateNo}")
    R<List<MonthlyCardBillDataVO>> getMonthlyCardBillDataByPlateNo(@PathVariable String plateNo);

    /**
     * 获取月卡账单数据
     **/
    @PostMapping("/parkingOrder/billData/getMonthlyCardBillDataList")
    R<List<MonthlyCardBillDataVO>> getMonthlyCardBillDataList(@RequestBody List<Long> billIdList);

    /**
     * 获取错时卡账单数据
     **/
    @GetMapping("/parkingOrder/billData/getStaggeredMonthlyCardBillData/{billId}")
    R<StaggeredMonthlyCardBillDataVO> getStaggeredMonthlyCardBillData(@PathVariable Long billId);

    /**
     * 获取错时卡账单数据
     **/
    @GetMapping("/parkingOrder/billData/getTimeFreeCardBillDataByPlateNo/{plateNo}")
    R<List<StaggeredMonthlyCardBillDataVO>> getTimeFreeCardBillDataByPlateNo(@PathVariable String plateNo);

    /**
     * 获取错时卡账单数据
     **/
    @PostMapping("/parkingOrder/billData/getStaggeredMonthlyCardBillDataList")
    R<List<StaggeredMonthlyCardBillDataVO>> getStaggeredMonthlyCardBillDataList(@RequestBody List<Long> billIdList);

    /**
     * 获取停车账单数据
     **/
    @GetMapping("/parkingOrder/billData/getParkingBillDataByPlateNo/{plateNo}")
    R<List<PmgBatParkBillPayment>> getParkingBillDataByPlateNo(@PathVariable String plateNo);

    /**
     * 获取停车已出场账单数据
     **/
    @GetMapping("/parkingOrder/billData/getBillPaymentByPlateNo/{plateNo}")
    R<List<PmgBatParkBillPayment>> getBillPaymentByPlateNo(@PathVariable String plateNo);

    @GetMapping("/parkingOrder/billData/getOrderManageDetail")
    R<OrderManageDetailDto> getOrderManageDetail(@RequestParam("billId")Long billId,@RequestParam("orderType")String orderType,@RequestParam("orderStats")String orderStats);


    @GetMapping("/parkingOrder/billData/getParkingSettlementRatio")
    R<Map<Long,PmgBatParkingSettlementRatio>> getParkingSettlementRatio();

}
