mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 19:45:09 +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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -46,6 +46,11 @@ public class ConnectorInfoVO {
|
||||
*/
|
||||
private String chargingType;
|
||||
|
||||
/**
|
||||
* 充电接口类型 1-快充,2-慢充,3-电单车
|
||||
*/
|
||||
private String chargePortType;
|
||||
|
||||
/**
|
||||
* 额定功率
|
||||
*/
|
||||
|
||||
@@ -60,6 +60,11 @@ public class PileInfoVO {
|
||||
*/
|
||||
private String speedType;
|
||||
|
||||
/**
|
||||
* 充电接口类型 1-快充,2-慢充,3-电单车
|
||||
*/
|
||||
private String chargePortType;
|
||||
|
||||
/**
|
||||
* 枪口编号
|
||||
*/
|
||||
|
||||
@@ -55,5 +55,8 @@ public class PileConnectorDetailVO {
|
||||
*/
|
||||
private String softwareProtocol;
|
||||
|
||||
|
||||
/**
|
||||
* 充电接口类型 1-快充,2-慢充,3-电单车
|
||||
*/
|
||||
private String chargePortType;
|
||||
}
|
||||
|
||||
@@ -132,4 +132,9 @@ public class PileDetailVO {
|
||||
* 型号名称
|
||||
*/
|
||||
private String modelName;
|
||||
|
||||
/**
|
||||
* 充电接口类型 1-快充,2-慢充,3-电单车
|
||||
*/
|
||||
private String chargePortType;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ public class PileModelInfoVO {
|
||||
private String ratedVoltage;
|
||||
|
||||
/**
|
||||
* 充电类型
|
||||
* 充电类型 (1-快充;2-慢充)
|
||||
*/
|
||||
private String speedType;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user