mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 11:35:12 +08:00
update 对接内蒙古平台
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
package com.jsowell.thirdparty.platform.neimenggu.domain;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* 内蒙古平台运营商信息
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class SupOperatorInfo {
|
||||
/**
|
||||
* 名称: 运营商ID
|
||||
@@ -16,6 +19,7 @@ public class SupOperatorInfo {
|
||||
* 类型: 字符串
|
||||
* 长度: 9字符
|
||||
*/
|
||||
@JSONField(name = "OperatorID")
|
||||
private String operatorID;
|
||||
|
||||
/**
|
||||
@@ -25,7 +29,8 @@ public class SupOperatorInfo {
|
||||
* 类型: 字符串
|
||||
* 长度: 18字符
|
||||
*/
|
||||
private String OperatorUSCID;
|
||||
@JSONField(name = "OperatorUSCID")
|
||||
private String operatorUSCID;
|
||||
|
||||
/**
|
||||
* 名称: 运营商名称
|
||||
@@ -34,7 +39,8 @@ public class SupOperatorInfo {
|
||||
* 类型: 字符串
|
||||
* 长度: ≤64字符
|
||||
*/
|
||||
private String OperatorName;
|
||||
@JSONField(name = "OperatorName")
|
||||
private String operatorName;
|
||||
|
||||
/**
|
||||
* 名称: 运营商电话1
|
||||
@@ -43,7 +49,8 @@ public class SupOperatorInfo {
|
||||
* 类型: 字符串
|
||||
* 长度: ≤32字符
|
||||
*/
|
||||
private String OperatorTel1;
|
||||
@JSONField(name = "OperatorTel1")
|
||||
private String operatorTel1;
|
||||
|
||||
/**
|
||||
* 名称: 运营商电话2
|
||||
@@ -52,7 +59,8 @@ public class SupOperatorInfo {
|
||||
* 类型: 字符串
|
||||
* 长度: ≤32字符
|
||||
*/
|
||||
private String OperatorTel2;
|
||||
@JSONField(name = "OperatorTel2")
|
||||
private String operatorTel2;
|
||||
|
||||
/**
|
||||
* 名称: 运营商注册地址
|
||||
@@ -61,7 +69,8 @@ public class SupOperatorInfo {
|
||||
* 类型: 字符串
|
||||
* 长度: ≤64字符
|
||||
*/
|
||||
private String OperatorRegAddress;
|
||||
@JSONField(name = "OperatorRegAddress")
|
||||
private String operatorRegAddress;
|
||||
|
||||
/**
|
||||
* 名称: 运营商备注
|
||||
@@ -70,5 +79,6 @@ public class SupOperatorInfo {
|
||||
* 类型: 字符串
|
||||
* 长度: ≤255字符
|
||||
*/
|
||||
private String OperatorNote;
|
||||
@JSONField(name = "OperatorNote")
|
||||
private String operatorNote;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ import com.jsowell.pile.thirdparty.CommonParamsDTO;
|
||||
import com.jsowell.pile.thirdparty.EquipmentInfo;
|
||||
import com.jsowell.pile.util.MerchantUtils;
|
||||
import com.jsowell.pile.vo.base.ConnectorInfoVO;
|
||||
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||
import com.jsowell.pile.vo.base.ThirdPartyStationInfoVO;
|
||||
import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
|
||||
import com.jsowell.pile.vo.uniapp.BillingPriceVO;
|
||||
@@ -42,6 +43,7 @@ import com.jsowell.thirdparty.platform.ThirdPartyPlatformService;
|
||||
import com.jsowell.thirdparty.platform.common.StationInfo;
|
||||
import com.jsowell.thirdparty.platform.neimenggu.domain.ChargeOrderInfo;
|
||||
import com.jsowell.thirdparty.platform.neimenggu.domain.SupChargeDetails;
|
||||
import com.jsowell.thirdparty.platform.neimenggu.domain.SupOperatorInfo;
|
||||
import com.jsowell.thirdparty.platform.util.Cryptos;
|
||||
import com.jsowell.thirdparty.platform.util.Encodes;
|
||||
import com.jsowell.thirdparty.platform.util.HttpRequestUtil;
|
||||
@@ -78,6 +80,9 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
@Autowired
|
||||
private PileStationInfoService pileStationInfoService;
|
||||
|
||||
@Autowired
|
||||
private PileMerchantInfoService pileMerchantInfoService;
|
||||
|
||||
@Autowired
|
||||
private PileConnectorInfoService pileConnectorInfoService;
|
||||
|
||||
@@ -105,7 +110,6 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
// 通过operatorId 查出 operatorSecret
|
||||
ThirdPartyPlatformConfig platformConfig = thirdPartyPlatformConfigService.getInfoByOperatorId(operatorId);
|
||||
if (platformConfig == null) {
|
||||
// throw new BusinessException("1", "无此对接平台");
|
||||
failReason = 1;
|
||||
succStat = 1;
|
||||
} else {
|
||||
@@ -120,7 +124,6 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
}
|
||||
// 对比密钥
|
||||
if (!StringUtils.equals(operatorSecret, inputOperatorSecret)) {
|
||||
// throw new RuntimeException("密钥不一致");
|
||||
failReason = 1;
|
||||
succStat = 1;
|
||||
} else {
|
||||
@@ -139,8 +142,6 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询运营商信息 query_operator_info
|
||||
* supervise_query_operator_info
|
||||
@@ -151,10 +152,20 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
@Override
|
||||
public Map<String, String> queryOperatorInfo(QueryOperatorInfoDTO dto) {
|
||||
Map<String, String> resultMap = Maps.newHashMap();
|
||||
// TODO 查询接入内蒙古平台的站点信息
|
||||
List<ThirdPartyStationRelation> thirdPartyStationRelations =
|
||||
thirdPartyStationRelationService.selectThirdPartyStationRelationList(thirdPlatformType);
|
||||
|
||||
List<MerchantInfoVO> merchantList = thirdPartyStationRelationService.selectMerchantList(thirdPlatformType);
|
||||
if (CollectionUtils.isNotEmpty(merchantList)) {
|
||||
List<SupOperatorInfo> operatorInfos = Lists.newArrayList();
|
||||
SupOperatorInfo supOperatorInfo;
|
||||
for (MerchantInfoVO merchantInfoVO : merchantList) {
|
||||
supOperatorInfo = new SupOperatorInfo();
|
||||
supOperatorInfo.setOperatorID(MerchantUtils.getOperatorID(merchantInfoVO.getOrganizationCode()));
|
||||
supOperatorInfo.setOperatorUSCID(merchantInfoVO.getOrganizationCode());
|
||||
supOperatorInfo.setOperatorName(merchantInfoVO.getMerchantName());
|
||||
supOperatorInfo.setOperatorTel1(merchantInfoVO.getMerchantTel());
|
||||
supOperatorInfo.setOperatorRegAddress(merchantInfoVO.getMerchantAddress());
|
||||
operatorInfos.add(supOperatorInfo);
|
||||
}
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@@ -231,14 +242,6 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
map.put("ItemSize", resultList.size());
|
||||
map.put("StationInfos", resultList);
|
||||
|
||||
// Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// 加密数据
|
||||
// String encryptData = Cryptos.aesEncrypt(JSON.toJSONString(map), configInfo.getDataSecret(), configInfo.getDataSecretIv());
|
||||
// resultMap.put("Data", encryptData);
|
||||
// 生成sig
|
||||
// String resultSign = GBSignUtils.sign(resultMap, configInfo.getSignSecret());
|
||||
// resultMap.put("Sig", resultSign);
|
||||
|
||||
Map<String, String> resultMap = ThirdPartyPlatformUtils.generateResultMap(map, configInfo);
|
||||
return resultMap;
|
||||
}
|
||||
@@ -317,14 +320,6 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
map.put("Total", total);
|
||||
map.put("StationStatusInfos", collect);
|
||||
|
||||
// Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||
// // 加密数据
|
||||
// String encryptData = Cryptos.aesEncrypt(JSON.toJSONString(map), configInfo.getDataSecret(), configInfo.getDataSecretIv());
|
||||
// resultMap.put("Data", encryptData);
|
||||
// // 生成sig
|
||||
// String resultSign = GBSignUtils.sign(resultMap, configInfo.getSignSecret());
|
||||
// resultMap.put("Sig", resultSign);
|
||||
|
||||
Map<String, String> resultMap = ThirdPartyPlatformUtils.generateResultMap(map, configInfo);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user