mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
Merge branch 'dev' of http://192.168.2.2:8099/jsowell/jsowell-charger-web into dev
This commit is contained in:
@@ -365,9 +365,24 @@ public class UploadRealTimeMonitorHandler extends AbstractHandler {
|
||||
zdlService.notificationStationStatus(pileConnectorCode, connectorStatus);
|
||||
}
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.JIANG_SU_PLATFORM.getCode(), relationInfo.getThirdPartyType())) {
|
||||
// 江苏省平台
|
||||
String result = nrService.pushPileStatus(realTimeMonitorData);
|
||||
log.info("推送江苏省平台实时数据 result:{}", result);
|
||||
// 先判断缓存中是否有数据
|
||||
String redisKey = "JIANGSU_PUSH_PILE_STATUS:" + pileConnectorCode;
|
||||
Object cacheObject = redisCache.getCacheObject(redisKey);
|
||||
|
||||
// 江苏省平台(充电状态至少一分钟推送一次)
|
||||
if (!StringUtils.equals(realTimeMonitorData.getConnectorStatus(), "03")) {
|
||||
// 如果不是充电状态,直接推送就可以
|
||||
nrService.pushPileStatus(realTimeMonitorData);
|
||||
}else {
|
||||
// 充电状态
|
||||
// 如果缓存有数据,证明上次推送未超过一分钟,不予推送,若缓存中无数据,说明需要推送
|
||||
if (cacheObject == null) {
|
||||
nrService.pushPileStatus(realTimeMonitorData);
|
||||
redisCache.setCacheObject(redisKey, realTimeMonitorData, 1, TimeUnit.MINUTES);
|
||||
}
|
||||
}
|
||||
|
||||
// log.info("推送江苏省平台实时数据 result:{}", result);
|
||||
}
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getCode(), relationInfo.getThirdPartyType())) {
|
||||
// 甬城泊车
|
||||
|
||||
Reference in New Issue
Block a user