update 电单车协议

This commit is contained in:
Guoqs
2024-09-03 09:51:51 +08:00
parent 58096b74af
commit 95649e4c47
14 changed files with 68 additions and 51 deletions

View File

@@ -21,6 +21,7 @@ import com.jsowell.common.enums.ykc.StartModeEnum;
import com.jsowell.common.util.DateUtils;
import com.jsowell.common.util.StringUtils;
import com.jsowell.common.util.Threads;
import com.jsowell.common.util.YKCUtils;
import com.jsowell.pile.domain.*;
import com.jsowell.pile.domain.huawei.HWStationInfo;
import com.jsowell.pile.domain.huawei.HWStationStatusInfo;
@@ -281,7 +282,8 @@ public class HuaweiServiceV2 {
public Map<String, String> receiveNotificationStationStatus(ConnectorStatusInfo connectorStatusInfo) {
String pileConnectorCode = connectorStatusInfo.getConnectorID();
Integer status = connectorStatusInfo.getStatus();
String pileSn = StringUtils.substring(pileConnectorCode, 0, 14);
// String pileSn = StringUtils.substring(pileConnectorCode, 0, 14);
String pileSn = YKCUtils.getPileSn(pileConnectorCode);
if (status != 0) {
setPileAlive(pileSn);
}
@@ -350,7 +352,8 @@ public class HuaweiServiceV2 {
return null;
}
// 截取桩号
String pileSn = StringUtils.substring(pileConnectorCode, 0, 14);
// String pileSn = StringUtils.substring(pileConnectorCode, 0, 14);
String pileSn = YKCUtils.getPileSn(pileConnectorCode);
// 查询该桩的站点id
PileBasicInfo pileBasicInfo = pileBasicInfoService.selectPileBasicInfoBySN(pileSn);
// 根据桩号查询正在使用的计费模板
@@ -423,7 +426,8 @@ public class HuaweiServiceV2 {
DeliverEquipBusinessDTO.ChargePolicyInfo.PricePolicyInfo.PolicyInfo policyInfo = null;
// 截取桩号
String pileSn = StringUtils.substring(pileConnectorCode, 0, 14);
// String pileSn = StringUtils.substring(pileConnectorCode, 0, 14);
String pileSn = YKCUtils.getPileSn(pileConnectorCode);
// 查询该桩的站点id
PileBasicInfo pileBasicInfo = pileBasicInfoService.selectPileBasicInfoBySN(pileSn);
String stationId = String.valueOf(pileBasicInfo.getStationId());
@@ -775,7 +779,8 @@ public class HuaweiServiceV2 {
String startChargeSeq = dto.getStartChargeSeq();
List<QueryChargeStatusVO.ChargeDetail> chargeDetails = dto.getChargeDetails();
String pileConnectorCode = dto.getConnectorID();
String pileSn = StringUtils.substring(pileConnectorCode, 0, 14);
// String pileSn = StringUtils.substring(pileConnectorCode, 0, 14);
String pileSn = YKCUtils.getPileSn(pileConnectorCode);
setPileAlive(pileSn);
// 将源数据存缓存
@@ -883,8 +888,10 @@ public class HuaweiServiceV2 {
String vinCode = dto.getVin();
String pileConnectorCode = dto.getConnectorID();
// 截取桩号、枪口号
String pileSn = StringUtils.substring(pileConnectorCode, 0, pileConnectorCode.length() - 2);
String connectorCode = StringUtils.substring(pileConnectorCode, pileConnectorCode.length() - 2, pileConnectorCode.length());
// String pileSn = StringUtils.substring(pileConnectorCode, 0, pileConnectorCode.length() - 2);
String pileSn = YKCUtils.getPileSn(pileConnectorCode);
// String connectorCode = StringUtils.substring(pileConnectorCode, pileConnectorCode.length() - 2, pileConnectorCode.length());
String connectorCode = YKCUtils.getConnectorCode(pileConnectorCode);
// 根据vin查询小程序平台用户信息
MemberPlateNumberRelation basicInfo = memberPlateNumberRelationService.getMemberPlateInfoByVinCode(vinCode);
if (basicInfo == null) {

View File

@@ -8,6 +8,7 @@ import com.jsowell.common.enums.ykc.ReturnCodeEnum;
import com.jsowell.common.enums.ykc.StartModeEnum;
import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.util.StringUtils;
import com.jsowell.common.util.YKCUtils;
import com.jsowell.pile.domain.*;
import com.jsowell.pile.domain.huawei.HWStationInfo;
import com.jsowell.pile.dto.*;
@@ -272,7 +273,8 @@ public class HuaWeiServiceImpl implements HuaWeiService {
return null;
}
// 截取桩号
String pileSn = StringUtils.substring(pileConnectorCode, 0, 14);
// String pileSn = StringUtils.substring(pileConnectorCode, 0, 14);
String pileSn = YKCUtils.getPileSn(pileConnectorCode);
// 查询该桩的站点id
PileBasicInfo pileBasicInfo = pileBasicInfoService.selectPileBasicInfoBySN(pileSn);
// 根据桩号查询正在使用的计费模板
@@ -344,7 +346,8 @@ public class HuaWeiServiceImpl implements HuaWeiService {
DeliverEquipBusinessDTO.ChargePolicyInfo.PricePolicyInfo.PolicyInfo policyInfo = null;
// 截取桩号
String pileSn = StringUtils.substring(pileConnectorCode, 0, 14);
// String pileSn = StringUtils.substring(pileConnectorCode, 0, 14);
String pileSn = YKCUtils.getPileSn(pileConnectorCode);
// 查询该桩的站点id
PileBasicInfo pileBasicInfo = pileBasicInfoService.selectPileBasicInfoBySN(pileSn);
String stationId = String.valueOf(pileBasicInfo.getStationId());
@@ -493,8 +496,10 @@ public class HuaWeiServiceImpl implements HuaWeiService {
String vinCode = dto.getVin();
String pileConnectorCode = dto.getConnectorID();
// 截取桩号、枪口号
String pileSn = StringUtils.substring(pileConnectorCode, 0, pileConnectorCode.length() - 2);
String connectorCode = StringUtils.substring(pileConnectorCode, pileConnectorCode.length() - 2, pileConnectorCode.length());
// String pileSn = StringUtils.substring(pileConnectorCode, 0, pileConnectorCode.length() - 2);
String pileSn = YKCUtils.getPileSn(pileConnectorCode);
// String connectorCode = StringUtils.substring(pileConnectorCode, pileConnectorCode.length() - 2, pileConnectorCode.length());
String connectorCode = YKCUtils.getConnectorCode(pileConnectorCode);
// 根据vin查询小程序平台用户信息
MemberPlateNumberRelation basicInfo = memberPlateNumberRelationService.getMemberPlateInfoByVinCode(vinCode);
if (basicInfo == null) {