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:
@@ -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;
|
||||
}
|
||||
25
jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/domain/AMapPictures.java
vendored
Normal file
25
jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/domain/AMapPictures.java
vendored
Normal file
@@ -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;
|
||||
}
|
||||
@@ -134,6 +134,14 @@ public class AMapStationInfo {
|
||||
@JSONField(name = "PriceChargingInfo")
|
||||
private List<AMapPriceChargingInfo> priceChargingInfo;
|
||||
|
||||
// 站点照片
|
||||
@JSONField(name = "Pictures")
|
||||
private List<AMapPictures> pictures;
|
||||
|
||||
// 站点收费价格明细_优惠价
|
||||
@JSONField(name = "DiscountPriceChargingInfo")
|
||||
private List<AMapDiscountPriceChargingInfo> discountPriceChargingInfo;
|
||||
|
||||
// 快充总桩数
|
||||
@JSONField(name = "FastEquipmentNum")
|
||||
private Integer fastEquipmentNum;
|
||||
|
||||
@@ -153,6 +153,8 @@ public class AMapServiceImpl implements AMapService {
|
||||
Map<String, List<AMapEquipmentInfo>> equipmentInfoMap = getPileListByStationIdList(stationIdList);
|
||||
|
||||
// 拼装数据
|
||||
List<AMapDiscountPriceChargingInfo> discountInfoList = new ArrayList<>();
|
||||
List<AMapPictures> 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<AMapPriceChargingInfo> aMapPriceChargingInfos = priceInfoMap.get(stationId);
|
||||
aMapInfo.setPriceChargingInfo(aMapPriceChargingInfos);
|
||||
// 站点设备信息
|
||||
List<AMapEquipmentInfo> 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;
|
||||
|
||||
Reference in New Issue
Block a user