mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-25 13:35:15 +08:00
update 电单车协议
This commit is contained in:
@@ -455,6 +455,17 @@ public class PileConnectorInfoServiceImpl implements PileConnectorInfoService {
|
||||
infoVO.setRatedPower(pileModelInfoVO.getRatedPower());
|
||||
infoVO.setRatedCurrent(pileModelInfoVO.getRatedCurrent());
|
||||
infoVO.setRatedVoltage(pileModelInfoVO.getRatedVoltage());
|
||||
String chargePortType;
|
||||
if (StringUtils.equals(Constants.TWO, pileModelInfoVO.getChargerPileType())) {
|
||||
chargePortType = Constants.THREE;
|
||||
} else {
|
||||
if (StringUtils.equals(Constants.ONE, pileModelInfoVO.getSpeedType())) {
|
||||
chargePortType = Constants.ONE;
|
||||
} else {
|
||||
chargePortType = Constants.TWO;
|
||||
}
|
||||
}
|
||||
infoVO.setChargePortType(chargePortType);
|
||||
}
|
||||
connectorInfoList.add(infoVO);
|
||||
}
|
||||
@@ -682,14 +693,14 @@ public class PileConnectorInfoServiceImpl implements PileConnectorInfoService {
|
||||
* @return true离线
|
||||
*/
|
||||
public boolean checkPileOffLine(String pileSn) {
|
||||
// 获取桩最后连接时间,最后连接到平台的时间在1分钟之前,判定为离线
|
||||
// 获取桩最后连接时间,最后连接到平台的时间在3分钟之前,判定为离线
|
||||
String lastConnectionTime = redisCache.getCacheObject(CacheConstants.PILE_LAST_CONNECTION + pileSn);
|
||||
if (StringUtils.isBlank(lastConnectionTime)) {
|
||||
// 没有最后连接时间,返回离线
|
||||
return true;
|
||||
}
|
||||
long l = DateUtils.intervalTime(lastConnectionTime, DateUtils.getDateTime());
|
||||
return l >= 1L;
|
||||
return l > 3L;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user