update 对接第三方平台

This commit is contained in:
2024-03-26 17:13:00 +08:00
parent 7db83ee738
commit 79caa6f0bb
24 changed files with 750 additions and 544 deletions

View File

@@ -1,40 +0,0 @@
package com.jsowell.thirdparty.zhongdianlian.domain;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.Data;
import java.math.BigDecimal;
/**
* TODO
*
* @author Lemon
* @Date 2023/9/7 14:03
*/
@Data
public class ZDLConnectorInfo {
@JSONField(name = "ConnectorID")
private String connectorId;
@JSONField(name = "ConnectorType")
private Integer connectorType;
@JSONField(name = "VoltageUpperLimits")
private Integer voltageUpperLimits;
@JSONField(name = "VoltageLowerLimits")
private Integer voltageLowerLimits;
@JSONField(name = "Current")
private Integer current;
@JSONField(name = "ParkNo")
private String parkNo;
@JSONField(name = "Power")
private BigDecimal power;
@JSONField(name = "NationalStandard")
private Integer nationalStandard;
}

View File

@@ -1,28 +0,0 @@
package com.jsowell.thirdparty.zhongdianlian.domain;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
* 设备基本信息
*
* @author Lemon
* @Date 2023/9/5 15:16
*/
@Data
public class ZDLEquipmentInfo {
@JSONField(name = "EquipmentID")
private String equipmentId;
@JSONField(name = "EquipmentType")
private Integer equipmentType;
@JSONField(name = "Power")
private BigDecimal power;
@JSONField(name = "ConnectorInfos")
private List<ZDLConnectorInfo> connectorInfos;
}

View File

@@ -1,73 +0,0 @@
package com.jsowell.thirdparty.zhongdianlian.domain;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.util.List;
/**
* 站点基本信息
*
* @author Lemon
* @Date 2023/9/5 14:10
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ZDLStationInfo {
@JSONField(name = "StationID")
private String stationId;
@JSONField(name = "OperatorID")
private String operatorId;
@JSONField(name = "EquipmentOwnerID")
private String equipmentOwnerId;
@JSONField(name = "StationName")
private String stationName;
@JSONField(name = "CountryCode")
private String countryCode;
@JSONField(name = "AreaCode")
private String areaCode;
@JSONField(name = "Address")
private String address;
@JSONField(name = "ServiceTel")
private String serviceTel;
@JSONField(name = "StationType")
private Integer stationType;
@JSONField(name = "StationStatus")
private Integer stationStatus;
@JSONField(name = "ParkNums")
private Integer parkNums;
@JSONField(name = "StationLng")
private BigDecimal stationLng;
@JSONField(name = "StationLat")
private BigDecimal stationLat;
@JSONField(name = "Construction")
private Integer construction;
@JSONField(name = "ParkFee")
private String parkFee;
@JSONField(name = "Pictures")
private List<String> pictures;
@JSONField(name = "EquipmentInfos")
private List<ZDLEquipmentInfo> equipmentInfos;
}

View File

@@ -27,9 +27,9 @@ import com.jsowell.thirdparty.lianlian.util.GBSignUtils;
import com.jsowell.thirdparty.lianlian.util.HttpRequestUtil;
import com.jsowell.thirdparty.yongchengboche.dto.YCBCGetTokenDTO;
import com.jsowell.thirdparty.yongchengboche.service.YCBCService;
import com.jsowell.thirdparty.zhongdianlian.domain.ZDLConnectorInfo;
import com.jsowell.thirdparty.zhongdianlian.domain.ZDLEquipmentInfo;
import com.jsowell.thirdparty.zhongdianlian.domain.ZDLStationInfo;
import com.jsowell.pile.thirdparty.ZDLConnectorInfo;
import com.jsowell.pile.thirdparty.ZDLEquipmentInfo;
import com.jsowell.pile.thirdparty.ZDLStationInfo;
import com.jsowell.thirdparty.zhongdianlian.dto.ZDLGetTokenDTO;
import com.jsowell.thirdparty.zhongdianlian.service.ZDLService;
import org.apache.commons.collections4.CollectionUtils;
@@ -172,7 +172,7 @@ public class ZDLServiceImpl implements ZDLService {
// 获取令牌
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);
@@ -261,7 +261,7 @@ public class ZDLServiceImpl implements ZDLService {
// 获取令牌
String token = "";
String result = "";
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getCode(), dto.getThirdPartyType())) {
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getTypeCode(), dto.getThirdPartyType())) {
YCBCGetTokenDTO ycbcGetTokenDTO = new YCBCGetTokenDTO();
ycbcGetTokenDTO.setOperatorId(operatorId);
ycbcGetTokenDTO.setDataSecret(dataSecret);