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:
@@ -317,7 +317,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
info.setAreaCode(subAreaCode);
|
||||
// 截取运营商组织机构代码(去除最后一位后的最后九位)
|
||||
String organizationCode = "";
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.LIAN_LIAN_PLATFORM.getCode(), dto.getThirdPartyType())) {
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.LIAN_LIAN_PLATFORM.getTypeCode(), dto.getThirdPartyType())) {
|
||||
// 联联平台先使用自己运营商的组织机构代码
|
||||
organizationCode = Constants.OPERATORID_LIANLIAN;
|
||||
info.setEquipmentOwnerID(organizationCode);
|
||||
@@ -797,7 +797,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
|
||||
.build();
|
||||
String type = ThirdPartyOperatorIdEnum.getTypeByOperatorId(dto.getOperatorId());
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.XIN_DIAN_TU.getCode(), type)) {
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.XIN_DIAN_TU.getTypeCode(), type)) {
|
||||
// 如果是新电途平台,则将 startChargeSeqStat 改为 1-启动中
|
||||
vo.setStartChargeSeqStat(1);
|
||||
}
|
||||
@@ -837,7 +837,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
public Map<String, String> query_equip_charge_status(QueryEquipChargeStatusDTO dto) {
|
||||
String operatorID = dto.getOperatorID();
|
||||
String type = ThirdPartyOperatorIdEnum.getTypeByOperatorId(operatorID);
|
||||
String operatorName = ThirdPlatformTypeEnum.getLabelByCode(type);
|
||||
String operatorName = ThirdPlatformTypeEnum.getTypeLabelByTypeCode(type);
|
||||
// 通过订单号查询订单信息
|
||||
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(dto.getStartChargeSeq());
|
||||
// logger.info(operatorName + "查询订单信息 orderInfo:{}", orderInfo);
|
||||
@@ -950,7 +950,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
vo.setFailReason(0);
|
||||
|
||||
String type = ThirdPartyOperatorIdEnum.getTypeByOperatorId(dto.getOperatorId());
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.XIN_DIAN_TU.getCode(), type)) {
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.XIN_DIAN_TU.getTypeCode(), type)) {
|
||||
// 如果是新电途平台,则将 startChargeSeqStat 改为 3-停止中
|
||||
vo.setStartChargeSeqStat(3);
|
||||
}
|
||||
@@ -1070,7 +1070,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
// 获取令牌
|
||||
String result = "";
|
||||
String token = "";
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getCode(), thirdPartyType)) {
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getTypeCode(), thirdPartyType)) {
|
||||
YCBCGetTokenDTO dto = new YCBCGetTokenDTO();
|
||||
dto.setOperatorId(operatorId);
|
||||
dto.setDataSecret(dataSecret);
|
||||
@@ -1273,7 +1273,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
|
||||
String token = "";
|
||||
String result = "";
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getCode(), thirdPartyType)) {
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getTypeCode(), thirdPartyType)) {
|
||||
YCBCGetTokenDTO dto = new YCBCGetTokenDTO();
|
||||
dto.setOperatorId(operatorId);
|
||||
dto.setDataSecret(dataSecret);
|
||||
@@ -1343,7 +1343,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
// 获取令牌
|
||||
String token = "";
|
||||
String result = "";
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getCode(), thirdPartyType)) {
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getTypeCode(), thirdPartyType)) {
|
||||
YCBCGetTokenDTO ycbcGetTokenDTO = new YCBCGetTokenDTO();
|
||||
ycbcGetTokenDTO.setOperatorId(operatorId);
|
||||
ycbcGetTokenDTO.setDataSecret(dataSecret);
|
||||
@@ -1419,7 +1419,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
// 获取token
|
||||
String token = "";
|
||||
String result = "";
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getCode(), thirdPartyType)) {
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getTypeCode(), thirdPartyType)) {
|
||||
YCBCGetTokenDTO dto = new YCBCGetTokenDTO();
|
||||
dto.setOperatorId(operatorId);
|
||||
dto.setDataSecret(dataSecret);
|
||||
@@ -1491,7 +1491,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
// 获取令牌
|
||||
String token = "";
|
||||
String result = "";
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getCode(), thirdPartyType)) {
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getTypeCode(), thirdPartyType)) {
|
||||
YCBCGetTokenDTO dto = new YCBCGetTokenDTO();
|
||||
dto.setOperatorId(operatorId);
|
||||
dto.setDataSecret(dataSecret);
|
||||
|
||||
@@ -125,7 +125,7 @@ public class HttpRequestUtil {
|
||||
String dataSecretIV, String operatorId, String sigSecret,
|
||||
String thirdPlatformType) {
|
||||
String type = ThirdPartyOperatorIdEnum.getTypeByOperatorId(operatorId);
|
||||
String label = ThirdPlatformTypeEnum.getLabelByCode(type);
|
||||
String label = ThirdPlatformTypeEnum.getTypeLabelByTypeCode(type);
|
||||
if(StringUtils.isBlank(label)) {
|
||||
label = operatorId + "(" + url + ")";
|
||||
}
|
||||
@@ -143,7 +143,7 @@ public class HttpRequestUtil {
|
||||
params.put("Seq", "001");
|
||||
|
||||
// 此处是与其他获取令牌方法唯一不同之处,甬城泊车获取令牌需要添加此字段
|
||||
if (ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getCode().equals(thirdPlatformType)) {
|
||||
if (ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getTypeCode().equals(thirdPlatformType)) {
|
||||
params.put("Portname", "wcc-pro");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user