|
|
@@ -3,7 +3,6 @@ package com.kym.service.miniapp.impl;
|
|
|
import cn.dev33.satoken.stp.StpUtil;
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
-import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
|
|
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
|
|
import com.kym.common.cache.ConnectorStatusCache;
|
|
|
import com.kym.common.config.EnPlusConfig;
|
|
|
@@ -30,8 +29,6 @@ import org.springframework.context.annotation.Lazy;
|
|
|
import org.springframework.scheduling.annotation.Async;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
-import java.io.IOException;
|
|
|
-import java.net.SocketTimeoutException;
|
|
|
import java.time.Duration;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.util.Map;
|
|
|
@@ -366,8 +363,14 @@ public class ChargeServiceImpl implements ChargeService {
|
|
|
return chargeOrder;
|
|
|
}
|
|
|
// 查询充电
|
|
|
+ JSONObject data;
|
|
|
var startChargeSeq = chargeOrder.getStartChargeSeq();
|
|
|
- var data = enPlusService.queryEquipChargeStatus(startChargeSeq);
|
|
|
+ try {
|
|
|
+ data = enPlusService.queryEquipChargeStatus(startChargeSeq);
|
|
|
+ } catch (Exception e) {
|
|
|
+ LOGGER.error("EN+请求设备充电状态异常", e);
|
|
|
+ throw new BusinessException("充电状态查询异常,请稍后重试");
|
|
|
+ }
|
|
|
|
|
|
// 更新订单信息
|
|
|
chargeOrderService.lambdaUpdate()
|