mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 11:35:12 +08:00
新增 青海平台推送站点实时功率接口
This commit is contained in:
@@ -179,10 +179,11 @@ public class CommonService {
|
||||
// 海南
|
||||
result = haiNanChargeService.pushStationInfoV2(dto);
|
||||
}
|
||||
// if (StringUtils.equals(ThirdPlatformTypeEnum.QING_HAI_PLATFORM.getTypeCode(), dto.getThirdPartyType())) {
|
||||
// // 青海平台
|
||||
// qingHaiPlatformService.
|
||||
// }
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.QING_HAI_PLATFORM.getTypeCode(), dto.getThirdPartyType())) {
|
||||
// 青海平台
|
||||
insertInfo2DataBase(dto);
|
||||
result = dto.getThirdPartyType() + ":" + "OK";
|
||||
}
|
||||
finalResult.append(result).append("\n");
|
||||
}
|
||||
return finalResult.toString();
|
||||
@@ -319,8 +320,24 @@ public class CommonService {
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.QING_HAI_PLATFORM.getTypeCode(), thirdPartyType)) {
|
||||
// 青海省平台
|
||||
String result = qingHaiPlatformService.notificationStationStatus(pileConnectorCode, changedStatus);
|
||||
log.info("推送甬城泊车平台设备状态变化推送 pileConnectorCode:{}, changedStatus:{}, result:{}"
|
||||
log.info("推送青海平台设备状态变化推送 pileConnectorCode:{}, changedStatus:{}, result:{}"
|
||||
, pileConnectorCode, changedStatus, result);
|
||||
// 先判断缓存中是否有数据
|
||||
String redisKey = CacheConstants.JIANGSU_PUSH_PILE_STATUS + pileConnectorCode;
|
||||
Object cacheObject = redisCache.getCacheObject(redisKey);
|
||||
|
||||
if (StringUtils.equals(connectorStatus, "03")) {
|
||||
// 充电状态, 查出订单信息
|
||||
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByTransactionCode(transactionCode);
|
||||
if (orderInfo == null) {
|
||||
return;
|
||||
}
|
||||
// 如果缓存有数据,证明上次推送未超过2分钟,不予推送,若缓存中无数据,说明需要推送
|
||||
if (cacheObject == null) {
|
||||
String pushResult = qingHaiPlatformService.notificationEquipChargeStatus(orderInfo.getOrderCode());
|
||||
redisCache.setCacheObject(redisKey, realTimeMonitorData, 2, TimeUnit.MINUTES);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -394,6 +411,10 @@ public class CommonService {
|
||||
// log.info("甬城泊车平台 推送充电订单信息 result:{}", result);
|
||||
}
|
||||
}
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.QING_HAI_PLATFORM.getTypeCode(), thirdPartyType)) {
|
||||
// 青海平台
|
||||
qingHaiPlatformService.notificationChargeOrderInfo(orderBasicInfo.getOrderCode());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user