From 3205d774875064d566f81d28e2fff3bdb8e90e42 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期二, 22 七月 2025 18:18:00 +0800
Subject: [PATCH] 修改手动推送订单
---
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java | 6 +++---
ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/drainage/TCECUtil.java | 42 ++++++++++++++++++++++++------------------
2 files changed, 27 insertions(+), 21 deletions(-)
diff --git a/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/drainage/TCECUtil.java b/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/drainage/TCECUtil.java
index 6e2c1b1..b338caf 100644
--- a/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/drainage/TCECUtil.java
+++ b/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/drainage/TCECUtil.java
@@ -61,12 +61,13 @@
log.info("获取三方平台授权token请求Data:" + jsonString);
post.body(request_json);
HttpResponse execute = post.execute();
+ String body = execute.body();
if(200 != execute.getStatus()){
- log.error("获取三方平台授权token失败:" + execute.body());
+ log.error("获取三方平台授权token失败:" + body);
return null;
}
- log.info("获取三方平台授权token响应参数:" + execute.body());
- BaseResult baseResult = JSON.parseObject(execute.body(), BaseResult.class);
+ log.info("获取三方平台授权token响应参数:" + body);
+ BaseResult baseResult = JSON.parseObject(body, BaseResult.class);
Integer Ret = baseResult.getRet();
if(0 != Ret){
log.error("获取三方平台授权token失败:" + baseResult.getMsg());
@@ -107,12 +108,13 @@
HttpRequest post = HttpUtil.createPost(operator.getUrl() + InterfaceUrlEnum.NOTIFICATION_STATION_STATUS.getUrl());
buildBody(post, info, operator);
HttpResponse execute = post.execute();
+ String body = execute.body();
if(200 != execute.getStatus()){
- log.error("推送三方平台设备状态失败:" + execute.body());
+ log.error("推送三方平台设备状态失败:" + body);
return null;
}
- log.info("推送三方平台设备状态响应:" + execute.body());
- BaseResult baseResult = JSON.parseObject(execute.body(), BaseResult.class);
+ log.info("推送三方平台设备状态响应:" + body);
+ BaseResult baseResult = JSON.parseObject(body, BaseResult.class);
Integer Ret = baseResult.getRet();
if(0 != Ret){
log.error("推送三方平台设备状态失败:" + baseResult.getMsg());
@@ -139,12 +141,13 @@
HttpRequest post = HttpUtil.createPost(operator.getUrl() + InterfaceUrlEnum.NOTIFICATION_START_CHARGE_RESULT.getUrl());
buildBody(post, info, operator);
HttpResponse execute = post.execute();
+ String body = execute.body();
if(200 != execute.getStatus()){
- log.error("推送三方平台启动充电结果失败:" + execute.body());
+ log.error("推送三方平台启动充电结果失败:" + body);
return null;
}
- log.info("推送三方平台启动充电结果响应:" + execute.body());
- BaseResult baseResult = JSON.parseObject(execute.body(), BaseResult.class);
+ log.info("推送三方平台启动充电结果响应:" + body);
+ BaseResult baseResult = JSON.parseObject(body, BaseResult.class);
Integer Ret = baseResult.getRet();
if(0 != Ret){
log.error("推送三方平台启动充电结果失败:" + baseResult.getMsg());
@@ -172,12 +175,13 @@
HttpRequest post = HttpUtil.createPost(operator.getUrl() + InterfaceUrlEnum.NOTIFICATION_EQUIP_CHARGE_STATUS.getUrl());
buildBody(post, info, operator);
HttpResponse execute = post.execute();
+ String body = execute.body();
if(200 != execute.getStatus()){
- log.error("推送三方平台充电状态失败:" + execute.body());
+ log.error("推送三方平台充电状态失败:" + body);
return null;
}
- log.info("推送三方平台充电状态响应:" + execute.body());
- BaseResult baseResult = JSON.parseObject(execute.body(), BaseResult.class);
+ log.info("推送三方平台充电状态响应:" + body);
+ BaseResult baseResult = JSON.parseObject(body, BaseResult.class);
Integer Ret = baseResult.getRet();
if(0 != Ret){
log.error("推送三方平台充电状态失败:" + baseResult.getMsg());
@@ -200,12 +204,13 @@
HttpRequest post = HttpUtil.createPost(operator.getUrl() + InterfaceUrlEnum.NOTIFICATION_STOP_CHARGE_RESULT.getUrl());
buildBody(post, info, operator);
HttpResponse execute = post.execute();
+ String body = execute.body();
if(200 != execute.getStatus()){
- log.error("推送三方平台停止充电结果失败:" + execute.body());
+ log.error("推送三方平台停止充电结果失败:" + body);
return null;
}
- log.info("推送三方平台停止充电结果响应:" + execute.body());
- BaseResult baseResult = JSON.parseObject(execute.body(), BaseResult.class);
+ log.info("推送三方平台停止充电结果响应:" + body);
+ BaseResult baseResult = JSON.parseObject(body, BaseResult.class);
Integer Ret = baseResult.getRet();
if(0 != Ret){
log.error("推送三方平台停止充电结果失败:" + baseResult.getMsg());
@@ -231,12 +236,13 @@
HttpRequest post = HttpUtil.createPost(operator.getUrl() + InterfaceUrlEnum.NOTIFICATION_CHARGE_ORDER_INFO.getUrl());
buildBody(post, info, operator);
HttpResponse execute = post.execute();
+ String body = execute.body();
if(200 != execute.getStatus()){
- log.error("推送三方平台充电订单信息失败:" + execute.body());
+ log.error("推送三方平台充电订单信息失败:" + body);
return null;
}
- log.info("推送三方平台充电订单信息响应:" + execute.body());
- BaseResult baseResult = JSON.parseObject(execute.body(), BaseResult.class);
+ log.info("推送三方平台充电订单信息响应:" + body);
+ BaseResult baseResult = JSON.parseObject(body, BaseResult.class);
Integer Ret = baseResult.getRet();
if(0 != Ret){
log.error("推送三方平台充电订单信息失败:" + baseResult.getMsg());
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java
index 0b89153..a7766a4 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java
@@ -4219,9 +4219,9 @@
@Override
public R pushOrderInfo(String code) {
TChargingOrder chargingOrder = this.getOne(new LambdaQueryWrapper<TChargingOrder>().eq(TChargingOrder::getCode, code));
- tcecClient.notificationEquipChargeStatus(chargingOrder.getStartChargeSeq(), chargingOrder.getOperatorId());
- tcecClient.notificationStopChargeResult(chargingOrder.getStartChargeSeq(), chargingOrder.getChargingGunId().toString(),
- chargingOrder.getOperatorId());
+// tcecClient.notificationEquipChargeStatus(chargingOrder.getStartChargeSeq(), chargingOrder.getOperatorId());
+// tcecClient.notificationStopChargeResult(chargingOrder.getStartChargeSeq(), chargingOrder.getChargingGunId().toString(),
+// chargingOrder.getOperatorId());
tcecClient.notificationChargeOrderInfo(chargingOrder.getStartChargeSeq(), chargingOrder.getOperatorId());
return R.ok();
}
--
Gitblit v1.7.1