This commit is contained in:
Lemon
2026-02-05 16:42:41 +08:00
parent 344aa073f9
commit a9117c0bdb

View File

@@ -198,15 +198,8 @@ public class ConfirmStartChargingRequestHandler extends AbstractYkcHandler {
.vinCode(vinCode)
.build();
// 初始化返回值
Map<String, String> resultMap = new HashMap<>();
try {
// 启动充电
resultMap = this.confirmStartCharging(confirmStartChargingData);
} catch (Exception e) {
// 有报错,说明验证失败,应该返回鉴权失败
resultMap.put("defeatReasonCode", "05"); // 05 桩停用
}
// 启动充电
Map<String, String> resultMap = this.confirmStartCharging(confirmStartChargingData);
byte[] defeatReasonByteArr = Constants.zeroByteArray;
/**
@@ -360,7 +353,14 @@ public class ConfirmStartChargingRequestHandler extends AbstractYkcHandler {
dto.setMerchantId(pileBasicInfo.getMerchantId() + "");
// 校验充电桩相关的信息
orderBasicInfoService.checkPileInfoForEV(dto);
try {
orderBasicInfoService.checkPileInfoForEV(dto);
} catch (Exception e) {
// 校验充电桩报错,返回校验值 05-桩停用
resultMap.put("transactionCode", Constants.ILLEGAL_TRANSACTION_CODE);
resultMap.put("accountBalance", accountBalance);
resultMap.put("defeatReasonCode", "05");
}
// 异步创建订单
CompletableFuture.runAsync(() -> {