diff --git a/jsowell-admin/src/main/java/com/jsowell/amap/AMapController.java b/jsowell-admin/src/main/java/com/jsowell/amap/AMapController.java index 3bf8d657d..e0ccb7271 100644 --- a/jsowell-admin/src/main/java/com/jsowell/amap/AMapController.java +++ b/jsowell-admin/src/main/java/com/jsowell/amap/AMapController.java @@ -44,7 +44,7 @@ public class AMapController extends BaseController { // List stationInfos = aMapService.getStationInfos(dto); List stationInfos = aMapService.getStationInfosV2(dto); result = result.successResponse(stationInfos); - logger.info("高德拉取充电站静态数据 success 业务参数:{}", JSON.toJSONString(stationInfos)); + // logger.info("高德拉取充电站静态数据 success 业务参数:{}", JSON.toJSONString(stationInfos)); logger.info("高德拉取充电站静态数据 success result:{}", JSON.toJSONString(result)); return result; } diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/domain/AMapDiscountPriceChargingInfo.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/domain/AMapDiscountPriceChargingInfo.java new file mode 100644 index 000000000..6aa1d16a2 --- /dev/null +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/domain/AMapDiscountPriceChargingInfo.java @@ -0,0 +1,31 @@ +package com.jsowell.thirdparty.amap.domain; + +import com.alibaba.fastjson.annotation.JSONField; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 站点充电优惠价格 + * + * @author Lemon + * @Date 2023/6/27 14:46 + */ +@Data +public class AMapDiscountPriceChargingInfo { + + // 收费时间段 00:00-24:00表示全天电价相同 + @JSONField(name = "DiscountTime") + private String discountTime; + + // 站点充电费优惠价 + // 只填数字或数字区间,单位:元/度。 + // 空表示未获取到价格,0.00表示免费 + // 格式:保留四位小数 + @JSONField(name = "DiscountTime") + private BigDecimal discountElectricityFee; + + // 站点服务费优惠价 + @JSONField(name = "DiscountTime") + private BigDecimal discountServiceFee; +} diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/domain/AMapPictures.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/domain/AMapPictures.java new file mode 100644 index 000000000..5c9d90eb8 --- /dev/null +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/domain/AMapPictures.java @@ -0,0 +1,25 @@ +package com.jsowell.thirdparty.amap.domain; + +import com.alibaba.fastjson.annotation.JSONField; +import lombok.Data; + +/** + * 图片信息 + * + * @author Lemon + * @Date 2023/6/27 14:48 + */ +@Data +public class AMapPictures { + // 图片ID + @JSONField(name = "PicID") + private String PicID; + + // 图片网址 + @JSONField(name = "Url") + private String url; + + // 图片标题 + @JSONField(name = "Title") + private String title; +} 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 19e658d0d..9cec9af1b 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 @@ -134,6 +134,14 @@ public class AMapStationInfo { @JSONField(name = "PriceChargingInfo") private List priceChargingInfo; + // 站点照片 + @JSONField(name = "Pictures") + private List pictures; + + // 站点收费价格明细_优惠价 + @JSONField(name = "DiscountPriceChargingInfo") + private List discountPriceChargingInfo; + // 快充总桩数 @JSONField(name = "FastEquipmentNum") private Integer fastEquipmentNum; 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 dea9c084b..b9995842e 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 @@ -153,6 +153,8 @@ public class AMapServiceImpl implements AMapService { Map> equipmentInfoMap = getPileListByStationIdList(stationIdList); // 拼装数据 + List discountInfoList = new ArrayList<>(); + List picturesList = new ArrayList<>(); AMapStationInfo aMapInfo = null; for (PileStationInfo stationInfo : stationList) { aMapInfo = new AMapStationInfo(); @@ -182,10 +184,31 @@ public class AMapServiceImpl implements AMapService { aMapInfo.setBusineHours(stationInfo.getBusinessHours()); // 计费模板 - aMapInfo.setPriceChargingInfo(priceInfoMap.get(stationId)); + List aMapPriceChargingInfos = priceInfoMap.get(stationId); + aMapInfo.setPriceChargingInfo(aMapPriceChargingInfos); // 站点设备信息 List equipmentInfos = equipmentInfoMap.get(stationId); aMapInfo.setEquipmentInfos(equipmentInfos); + // 站点充电优惠价格(目前无优惠措施) + AMapDiscountPriceChargingInfo info; + for (AMapPriceChargingInfo aMapPriceChargingInfo : aMapPriceChargingInfos) { + info = new AMapDiscountPriceChargingInfo(); + info.setDiscountTime(aMapPriceChargingInfo.getFeeTime()); + info.setDiscountServiceFee(aMapPriceChargingInfo.getServiceFee()); + info.setDiscountElectricityFee(aMapPriceChargingInfo.getElectricityFee()); + + discountInfoList.add(info); + } + aMapInfo.setDiscountPriceChargingInfo(discountInfoList); + + AMapPictures pictures = new AMapPictures(); + pictures.setPicID("001"); + pictures.setUrl(stationInfo.getPictures()); + pictures.setTitle("1"); + + picturesList.add(pictures); + + aMapInfo.setPictures(picturesList); int fastTotal = 0; int slowTotal = 0;