|
|
@@ -18,6 +18,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
/**
|
|
|
* @author skyline
|
|
|
* @description 充电
|
|
|
@@ -53,7 +55,7 @@ public class ChargeServiceImpl implements ChargeService {
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public String queryStartCharge(String connectorId, String stationId) {
|
|
|
+ public Map queryStartCharge(String connectorId, String stationId) {
|
|
|
var userId = StpUtil.getSession().getLong("userId");
|
|
|
if (connectorId.length() == 6) {
|
|
|
// 查询EN+设备SN
|
|
|
@@ -108,8 +110,7 @@ public class ChargeServiceImpl implements ChargeService {
|
|
|
order.setConnectorId(connectorId);
|
|
|
order.setChargeStatus(startCharge.getIntValue("StartChargeSeqStat"));
|
|
|
chargeOrderService.save(order);
|
|
|
- // TODO: 2023-08-07 包装成自己的数据
|
|
|
- return startChargeSeq;
|
|
|
+ return Map.of("startChargeSeq", startChargeSeq);
|
|
|
} else {
|
|
|
// 启动充电失败
|
|
|
LOGGER.error("设备启动充电失败:{}", startCharge);
|
|
|
@@ -128,7 +129,7 @@ public class ChargeServiceImpl implements ChargeService {
|
|
|
case 1 -> // 设备未插枪
|
|
|
throw new BusinessException(ResponseEnum.EN_PLUS_EQUIP_NOT_CONNECTED);
|
|
|
case 2 -> // 设备检测失败
|
|
|
- throw new BusinessException(ResponseEnum.EN_PLUS_EQUIP_AUTH_FAIL);
|
|
|
+ throw new BusinessException(ResponseEnum.EN_PLUS_EQUIP_CHECK_FAIL);
|
|
|
}
|
|
|
throw new BusinessException(ResponseEnum.EN_PLUS_EQUIP_AUTH_FAIL);
|
|
|
}
|