package com.zsElectric.boot.charging.controller; import com.zsElectric.boot.charging.service.ChargingBusinessService; import com.zsElectric.boot.charging.vo.ChargingPricePolicyVO; import com.zsElectric.boot.charging.vo.EquipmentAuthResponseVO; import com.zsElectric.boot.charging.vo.QueryStationStatusVO; import com.zsElectric.boot.charging.vo.QueryStationsInfoVO; import com.zsElectric.boot.common.util.electric.ApiToken; import com.zsElectric.boot.core.web.Result; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import java.util.List; @Slf4j @RestController @RequiredArgsConstructor @Tag(name = "充电业务相关接口") @RequestMapping("/dev/v1/linkData") public class ChargingBusinessController { private final ChargingBusinessService chargingBusinessService; /** *

获取token

* @author wzq * @return 获取到的token * */ @Operation(summary = "获取token") @GetMapping("/queryToken") public Result queryToken(){ return Result.success(chargingBusinessService.queryToken()); } /** *

查询业务策略信息

* @author SheepHy * @param EquipBizSeq 设备业务流水号 * @param ConnectorID 充电设备接口编码 * @return 返回值描述,如无返回值则为void 返回值为类则包含{@link ChargingPricePolicyVO} * */ @Operation(summary = "查询业务策略信息") @GetMapping("/queryEquipBusinessPolicy") public Result queryEquipBusinessPolicy(@RequestParam("EquipBizSeq") @Schema(description = "设备业务流水号", example = "123456789123456789123456789") String EquipBizSeq, @RequestParam("ConnectorID") @Schema(description = "充电设备接口编码") String ConnectorID) throws Exception{ return Result.success(chargingBusinessService.queryEquipBusinessPolicy(EquipBizSeq, ConnectorID)); } /** *

请求设备认证

* @author SheepHy * @param EquipAuthSeq 设备认证流水号 * @param ConnectorID 充电设备接口编码 * @return 返回值描述,如无返回值则为void 返回值为类则包含{@link EquipmentAuthResponseVO} * */ @Operation(summary = "查询业务策略信息") @GetMapping("/queryEquipAuth") public Result queryEquipAuth(String EquipAuthSeq, String ConnectorID) throws Exception { return Result.success(chargingBusinessService.queryEquipAuth(EquipAuthSeq, ConnectorID)); } /** *

查询充电站信息

* @author wzq * @param LastQueryTime 最后一次查询时间 * @param PageNo 页码 * @param PageSize 页大小 * @return 充电站信息列表 * */ @Operation(summary = "查询充电站信息") @GetMapping("/queryStationsInfo") public Result queryStationsInfo(@RequestParam(value = "LastQueryTime", required = false) @Schema(description = "最后一次查询时间") String LastQueryTime, @RequestParam(value = "PageNo",defaultValue = "1") @Schema(description = "页码") Integer PageNo, @RequestParam(value = "PageSize", defaultValue = "10") @Schema(description = "页大小") Integer PageSize) throws Exception { return Result.success(chargingBusinessService.queryStationsInfo(LastQueryTime, PageNo, PageSize)); } /** *

设备接口状态查询

* @author wzq * @param stationIDs 充电站ID列表 * @return 设备接口状态 * */ @Operation(summary = "设备接口状态查询") @GetMapping("/queryStationStatus") public Result queryStationStatus(List stationIDs) throws Exception { return Result.success(chargingBusinessService.queryStationStatus(stationIDs)); } }