package com.xhpc.common.api;

import com.xhpc.common.api.factory.ChargingStationServiceFactory;
import com.xhpc.common.core.constant.ServiceNameConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import com.xhpc.common.core.domain.R;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

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

/**
 * @author yuyang
 * @date 2023-09-12 9:51
 */
@FeignClient(contextId = "ChargingStationService", value = ServiceNameConstants.XHPC_CHARGING_STATION, fallbackFactory = ChargingStationServiceFactory.class)
public interface ChargingStationService {

    //获取场站信息
    @GetMapping("/station/getChargingStationServiceById")
    R getChargingStationServiceById(@PathVariable("stationId") Long stationId);

    //获取场站桩信息
    @GetMapping("/chargingPile/getChargingPileSerialNumber")
    R getChargingPileSerialNumber(@PathVariable("serialNumber") String serialNumber);

    @PostMapping("/requirementInfo/addRequirementInfo")
    R addRequirementInfo(@RequestParam("name") String name, @RequestParam("area") String area, @RequestParam("code") String code, @RequestParam("list") String list, @RequestParam("requireDate") String requireDate, @RequestParam("releaseTime") String releaseTime, @RequestParam("deliveryTime") String deliveryTime);

    @PostMapping("/requirementInfo/addNotificationTask")
    R addNotificationTask(@RequestParam("taskName") String taskName,@RequestParam("taskCode") String taskCode,@RequestParam("demandDate") String demandDate,@RequestParam("stationID") String stationID,@RequestParam("operatorID") String operatorID,@RequestParam("equipmentOwnerID") String equipmentOwnerID,@RequestParam("eleNo") String eleNo,@RequestParam("list") String list,@RequestParam("deliveryTime") String deliveryTime);

    @GetMapping("/station/getXhpcRateTimeOrder")
    R getXhpcRateTimeOrder(@RequestParam(value = "rateModelId")Long rateModelId,@RequestParam(value = "startTime") String startTime,@RequestParam(value = "endTime") String endTime,@RequestParam(value = "serialNumber") String serialNumber);

    @GetMapping("/station/getCrossDayXhpcRateTimeOrder")
    R getCrossDayXhpcRateTimeOrder(@RequestParam(value = "rateModelId")Long rateModelId,@RequestParam(value = "startTime") String startTime,@RequestParam(value = "endTime") String endTime,@RequestParam(value = "serialNumber") String serialNumber);

}
