update 电单车协议

This commit is contained in:
Guoqs
2024-08-30 17:23:04 +08:00
parent 07f4f4f76e
commit 0e38ea9e13
9 changed files with 58 additions and 12 deletions

View File

@@ -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;
}
/**

View File

@@ -46,6 +46,11 @@ public class ConnectorInfoVO {
*/
private String chargingType;
/**
* 充电接口类型 1-快充2-慢充3-电单车
*/
private String chargePortType;
/**
* 额定功率
*/

View File

@@ -60,6 +60,11 @@ public class PileInfoVO {
*/
private String speedType;
/**
* 充电接口类型 1-快充2-慢充3-电单车
*/
private String chargePortType;
/**
* 枪口编号
*/

View File

@@ -55,5 +55,8 @@ public class PileConnectorDetailVO {
*/
private String softwareProtocol;
/**
* 充电接口类型 1-快充2-慢充3-电单车
*/
private String chargePortType;
}

View File

@@ -132,4 +132,9 @@ public class PileDetailVO {
* 型号名称
*/
private String modelName;
/**
* 充电接口类型 1-快充2-慢充3-电单车
*/
private String chargePortType;
}

View File

@@ -47,7 +47,7 @@ public class PileModelInfoVO {
private String ratedVoltage;
/**
* 充电类型
* 充电类型 1-快充2-慢充)
*/
private String speedType;