mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-13 03:39:55 +08:00
update推送枪口状态的bug
This commit is contained in:
@@ -37,7 +37,7 @@ public enum ThirdPlatformTypeEnum {
|
|||||||
HU_ZHOU_PLATFORM("24", "湖州市监管平台", "MA27U00HZ"),
|
HU_ZHOU_PLATFORM("24", "湖州市监管平台", "MA27U00HZ"),
|
||||||
CHANG_ZHOU_PLATFORM("25", "新运常畅充", "0585PCW57"),
|
CHANG_ZHOU_PLATFORM("25", "新运常畅充", "0585PCW57"),
|
||||||
SI_CHUAN_PLATFORM("26", "四川省平台", "MA01H3BQ2"),
|
SI_CHUAN_PLATFORM("26", "四川省平台", "MA01H3BQ2"),
|
||||||
JI_LIN_PLATFORM("27", "吉林省平台", ""),
|
JI_LIN_PLATFORM("27", "吉林省平台", "723195753"),
|
||||||
;
|
;
|
||||||
|
|
||||||
private String typeCode;
|
private String typeCode;
|
||||||
|
|||||||
@@ -358,6 +358,12 @@ public class UploadRealTimeMonitorHandler extends AbstractYkcHandler {
|
|||||||
// 异步推送第三方平台实时数据V2
|
// 异步推送第三方平台实时数据V2
|
||||||
CompletableFuture.runAsync(() -> {
|
CompletableFuture.runAsync(() -> {
|
||||||
try {
|
try {
|
||||||
|
log.info("thirdpartyTaskExecutor状态:活跃线程数={}, 队列大小={}, 任务总数={}, 拒绝任务数={}",
|
||||||
|
thirdpartyTaskExecutor.getActiveCount(),
|
||||||
|
thirdpartyTaskExecutor.getThreadPoolExecutor().getQueue().size(),
|
||||||
|
thirdpartyTaskExecutor.getThreadPoolExecutor().getTaskCount(),
|
||||||
|
thirdpartyTaskExecutor.getThreadPoolExecutor().getRejectedExecutionHandler().toString());
|
||||||
|
|
||||||
commonService.pushRealTimeInfoV2(pileSn, connectorCode, connectorStatus, realTimeMonitorData, transactionCode);
|
commonService.pushRealTimeInfoV2(pileSn, connectorCode, connectorStatus, realTimeMonitorData, transactionCode);
|
||||||
// log.info("统一推送第三方平台实时数据V2 success, pileSn:{}, connectorCode:{}, connectorStatus:{}, realTimeMonitorData:{}, transactionCode:{}", pileSn, connectorCode, connectorStatus, realTimeMonitorData, transactionCode);
|
// log.info("统一推送第三方平台实时数据V2 success, pileSn:{}, connectorCode:{}, connectorStatus:{}, realTimeMonitorData:{}, transactionCode:{}", pileSn, connectorCode, connectorStatus, realTimeMonitorData, transactionCode);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ import com.jsowell.thirdparty.yongchengboche.service.YCBCService;
|
|||||||
import com.jsowell.thirdparty.zhongdianlian.service.ZDLService;
|
import com.jsowell.thirdparty.zhongdianlian.service.ZDLService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.logging.log4j.util.Strings;
|
||||||
import org.bouncycastle.crypto.CryptoException;
|
import org.bouncycastle.crypto.CryptoException;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -418,6 +419,9 @@ public class CommonService {
|
|||||||
String stationId = String.valueOf(pileBasicInfo.getStationId());
|
String stationId = String.valueOf(pileBasicInfo.getStationId());
|
||||||
// 查询该站点是否推送第三方平台
|
// 查询该站点是否推送第三方平台
|
||||||
List<ThirdPartySecretInfoVO> thirdPartySecretInfoVOS = thirdpartySecretInfoService.queryStationToPlatformList(stationId);
|
List<ThirdPartySecretInfoVO> thirdPartySecretInfoVOS = thirdpartySecretInfoService.queryStationToPlatformList(stationId);
|
||||||
|
|
||||||
|
log.info("推送实时数据到第三方平台 stationId:{}, thirdPartySecretInfoVOS:{}", stationId, thirdPartySecretInfoVOS);
|
||||||
|
|
||||||
if (CollectionUtils.isEmpty(thirdPartySecretInfoVOS)) {
|
if (CollectionUtils.isEmpty(thirdPartySecretInfoVOS)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -432,10 +436,19 @@ public class CommonService {
|
|||||||
|
|
||||||
notificationService.notificationStationStatus(dto);
|
notificationService.notificationStationStatus(dto);
|
||||||
|
|
||||||
|
log.info("交易流水号transactionCode:{}", transactionCode);
|
||||||
// 查询订单信息
|
// 查询订单信息
|
||||||
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByTransactionCode(transactionCode);
|
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByTransactionCode(transactionCode);
|
||||||
|
// 新运有三个平台,当这个transactionCode为null或orderInfo为null时,这里就不会继续推送其它两家平台,直接return了
|
||||||
|
// 也就是说,只要这台桩没有订单,为空闲状态,就只推送一家平台循环就终止了
|
||||||
|
|
||||||
|
//判断transactionCode和orderInfo是否为空,为空就不推送充电状态
|
||||||
|
if (Strings.isEmpty(transactionCode)){
|
||||||
|
// return;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (Objects.isNull(orderInfo)) {
|
if (Objects.isNull(orderInfo)) {
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
dto.setOrderCode(orderInfo.getOrderCode());
|
dto.setOrderCode(orderInfo.getOrderCode());
|
||||||
notificationService.notificationConnectorChargeStatus(dto);
|
notificationService.notificationConnectorChargeStatus(dto);
|
||||||
|
|||||||
@@ -917,8 +917,11 @@ public class HaiNanPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
byte[] plainText = Cryptos.aesDecrypt(Encodes.decodeBase64(data),
|
byte[] plainText = Cryptos.aesDecrypt(Encodes.decodeBase64(data),
|
||||||
thirdPartySecretInfoVO.getOurDataSecret().getBytes(), thirdPartySecretInfoVO.getOurDataSecretIv().getBytes());
|
thirdPartySecretInfoVO.getOurDataSecret().getBytes(), thirdPartySecretInfoVO.getOurDataSecretIv().getBytes());
|
||||||
String dataStr = new String(plainText, StandardCharsets.UTF_8);
|
String dataStr = new String(plainText, StandardCharsets.UTF_8);
|
||||||
|
logger.info("解密后的数据 dataStr:{}", dataStr);
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(dataStr);
|
||||||
|
|
||||||
// 转成对应的对象
|
// 转成对应的对象
|
||||||
QueryChargingStatusVO vo = JSONObject.parseObject(dataStr, QueryChargingStatusVO.class);
|
QueryChargingStatusVO vo = JSONObject.parseObject(jsonObject.toJSONString(), QueryChargingStatusVO.class);
|
||||||
|
|
||||||
String url = urlAddress + BusinessInformationExchangeEnum.NOTIFICATION_EQUIP_CHARGE_STATUS.getValue();
|
String url = urlAddress + BusinessInformationExchangeEnum.NOTIFICATION_EQUIP_CHARGE_STATUS.getValue();
|
||||||
// 调用联联平台接口
|
// 调用联联平台接口
|
||||||
|
|||||||
Reference in New Issue
Block a user