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

import com.yuchen.saas.parking.api.dto.PmgBatVehicleFlowQueryDTO;
import com.yuchen.saas.parking.api.vo.*;
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.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(
        value = AppNameConstant.SAAS_PARKING,
        fallbackFactory = PmgBatStatisticCarDataClientFallback.class
)
public interface PmgBatStatisticCarDataClient {

    @PostMapping("/parking/statisticCarData/getParkVehicleFlow")
    R<PmgBatVehicleFlowVO> getParkVehicleFlow(@RequestBody PmgBatVehicleFlowQueryDTO queryDTO);

    @GetMapping("/parking/statisticCarData/getParkVehicleType")
    R<PmgBatVehicleTypeVO> getParkVehicleType(@RequestParam Long parkId, @RequestParam String beginTime, @RequestParam String endTime);

    @GetMapping("/parking/statisticCarData/getDeptInfo")
    R<Map<String, Object>> getDeptInfo(@RequestParam Long deptId);

    @GetMapping("/parking/statisticCarData/getParkingPaymentInfo")
    R<ParkingPaymentInfoVO> getParkingPaymentInfo(@RequestParam Long deptId, @RequestParam Long parkingId, @RequestParam String beginTime, @RequestParam String endTime);

    @GetMapping("/parking/statisticCarData/getParkingIncomeTrend")
    R<ParkingIncomeTrendVO> getParkingIncomeTrend(@RequestParam Long deptId, @RequestParam Long parkingId, @RequestParam Integer statistType, @RequestParam String beginTime, @RequestParam String endTime);

    @GetMapping("/parking/statisticCarData/getParkingInfo")
    R<ParkingInfoVO> getParkingInfo(@RequestParam Long parkingId);
}
