扫码查询充电桩详情判断站点状态

This commit is contained in:
2023-04-03 10:47:45 +08:00
parent 0f7103ecd0
commit 55aaaf4981
4 changed files with 50 additions and 12 deletions

View File

@@ -426,6 +426,13 @@ public class OrderService {
log.error("checkPileInfo充电枪口为空 pileSn:{}, connectorCode:{}", dto.getPileSn(), dto.getConnectorCode());
throw new BusinessException(ReturnCodeEnum.CODE_CONNECTOR_INFO_NULL_ERROR);
}
// 查询站点状态
PileStationVO stationInfo = pileStationInfoService.getStationInfo(pileConnector.getStationId());
if (stationInfo == null || StringUtils.equals(stationInfo.getOpenFlag(), Constants.ZERO)) {
throw new BusinessException(ReturnCodeEnum.CODE_STATION_IS_NOT_OPEN);
}
// 判断枪口状态
if (!(StringUtils.equals(pileConnector.getConnectorStatus(), PileConnectorDataBaseStatusEnum.FREE.getValue())
|| StringUtils.equals(pileConnector.getConnectorStatus(), PileConnectorDataBaseStatusEnum.OCCUPIED_NOT_CHARGED.getValue()))) {