diff --git a/jsowell-admin/src/test/java/SpringBootTestController.java b/jsowell-admin/src/test/java/SpringBootTestController.java index 5b6a3f874..f103d146d 100644 --- a/jsowell-admin/src/test/java/SpringBootTestController.java +++ b/jsowell-admin/src/test/java/SpringBootTestController.java @@ -43,6 +43,7 @@ import com.jsowell.service.MemberService; import com.jsowell.service.OrderService; import com.jsowell.service.PileRemoteService; import com.jsowell.service.PileService; +import com.jsowell.thirdparty.amap.service.AMapService; import com.jsowell.thirdparty.lianlian.dto.CommonParamsDTO; import com.jsowell.thirdparty.lianlian.service.LianLianService; import com.jsowell.thirdparty.lianlian.util.Cryptos; @@ -165,6 +166,9 @@ public class SpringBootTestController { @Autowired private AdapayMemberService adapayMemberService; + @Autowired + private AMapService aMapService; + @Test public void testQueryAdapayMemberInfo() { String adapayMemberId = "AM25703321"; @@ -249,6 +253,13 @@ public class SpringBootTestController { } + @Test + public void testAMap() throws Exception { + String pileConnectorCode = "8800000000012601"; + String s = aMapService.pushChargingDeviceDynamics(pileConnectorCode); + System.out.println(s); + } + @Test public void testVinCode() { String msg = "880000000000210203000000000000000000000000000000000000000000000000004C5257594743454B584D43303437313434"; diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/domain/AMapEquipmentInfo.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/domain/AMapEquipmentInfo.java index 59a47564e..187296de7 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/domain/AMapEquipmentInfo.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/domain/AMapEquipmentInfo.java @@ -35,7 +35,7 @@ public class AMapEquipmentInfo { // 充电设备接口列表 @JSONField(name = "ConnectorInfos") - private List AMapConnectorInfos; + private List ConnectorInfos; // 充电设备总功率 单位:kW @JSONField(name = "Power") diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/domain/AMapStationInfo.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/domain/AMapStationInfo.java index abf04f895..d560bb616 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/domain/AMapStationInfo.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/domain/AMapStationInfo.java @@ -132,7 +132,7 @@ public class AMapStationInfo { // 充电收费信息 @JSONField(name = "PriceChargingInfo") - private List AMapPriceChargingInfo; + private List PriceChargingInfo; // 快充总桩数 @JSONField(name = "FastEquipmentNum") @@ -144,5 +144,5 @@ public class AMapStationInfo { // 充电设备信息列表 @JSONField(name = "EquipmentInfos") - private List AMapEquipmentInfos; + private List EquipmentInfos; } diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/service/impl/AMapServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/service/impl/AMapServiceImpl.java index 8484d707b..9532367eb 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/service/impl/AMapServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/service/impl/AMapServiceImpl.java @@ -1,17 +1,14 @@ package com.jsowell.thirdparty.amap.service.impl; import com.alibaba.fastjson.JSONObject; -import com.jsowell.common.constant.Constants; import com.jsowell.common.exception.BusinessException; import com.jsowell.common.util.PageUtils; import com.jsowell.common.util.StringUtils; import com.jsowell.pile.domain.OrderBasicInfo; import com.jsowell.pile.domain.PileBasicInfo; import com.jsowell.pile.domain.PileStationInfo; -import com.jsowell.pile.dto.amap.ChargeDeviceDynamicsDTO; import com.jsowell.pile.dto.amap.GetStationInfoDTO; import com.jsowell.pile.service.*; -import com.jsowell.pile.service.impl.PileStationInfoServiceImpl; import com.jsowell.pile.vo.base.ConnectorInfoVO; import com.jsowell.pile.vo.uniapp.BillingPriceVO; import com.jsowell.pile.vo.uniapp.PileConnectorDetailVO; @@ -25,7 +22,6 @@ import org.springframework.util.CollectionUtils; import java.math.BigDecimal; import java.util.ArrayList; -import java.util.LinkedHashMap; import java.util.List; import java.util.Map; @@ -106,14 +102,14 @@ public class AMapServiceImpl implements AMapService { aMapInfo.setBusineHours(stationInfo.getBusinessHours()); List priceList = getPriceInfoByStationId(String.valueOf(stationInfo.getId())); - aMapInfo.setAMapPriceChargingInfo(priceList); + aMapInfo.setPriceChargingInfo(priceList); Map pileNumMap = pileConnectorInfoService.getPileTypeNum(stationInfo.getId()); aMapInfo.setFastEquipmentNum(pileNumMap.get("fastTotal")); aMapInfo.setSlowEquipmentNum(pileNumMap.get("slowTotal")); List aMapEquipmentInfos = getPileListByStationId(String.valueOf(stationInfo.getId())); - aMapInfo.setAMapEquipmentInfos(aMapEquipmentInfos); + aMapInfo.setEquipmentInfos(aMapEquipmentInfos); resultList.add(aMapInfo); } @@ -225,7 +221,7 @@ public class AMapServiceImpl implements AMapService { List aMapConnectorInfos = getConnectorListBySN(pileBasicInfo.getSn()); - info.setAMapConnectorInfos(aMapConnectorInfos); + info.setConnectorInfos(aMapConnectorInfos); pileList.add(info); } diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/util/AMapUtils.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/util/AMapUtils.java index 7b9dc9edc..b59ba21f8 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/util/AMapUtils.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/util/AMapUtils.java @@ -29,7 +29,7 @@ public class AMapUtils { private static String PRD_URL; @Value("${aMap.merchantPrivateKey}") - public static void setMerchantPrivateKey(String merchantPrivateKey) { + public void setMerchantPrivateKey(String merchantPrivateKey) { AMapUtils.MERCHANT_PRIVATE_KEY = merchantPrivateKey; }