mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
对接内蒙古平台
This commit is contained in:
@@ -469,15 +469,15 @@ public class SpringBootTestController {
|
||||
|
||||
@Test
|
||||
public void queryBillingPriceTest() {
|
||||
String stationId = "19";
|
||||
String stationId = "1";
|
||||
// List<BillingPriceVO> billingPriceVOS = pileBillingTemplateService.queryBillingPriceOld(stationId);
|
||||
// System.out.println("老版:" + JSON.toJSONString(billingPriceVOS));
|
||||
//
|
||||
// List<BillingPriceVO> billingPriceVOS1 = pileBillingTemplateService.queryBillingPrice(stationId);
|
||||
// System.out.println("新版:" + JSON.toJSONString(billingPriceVOS1));
|
||||
List<BillingPriceVO> billingPriceVOS1 = pileBillingTemplateService.queryBillingPrice(stationId);
|
||||
System.out.println("新版:" + JSON.toJSONString(billingPriceVOS1));
|
||||
|
||||
CurrentTimePriceDetails currentTimePriceDetails = pileBillingTemplateService.getCurrentTimePriceDetails(stationId);
|
||||
System.out.println("currentTimePriceDetails:" + JSON.toJSONString(currentTimePriceDetails));
|
||||
// CurrentTimePriceDetails currentTimePriceDetails = pileBillingTemplateService.getCurrentTimePriceDetails(stationId);
|
||||
// System.out.println("currentTimePriceDetails:" + JSON.toJSONString(currentTimePriceDetails));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -142,6 +142,13 @@ public class StationInfo extends BaseStationInfo {
|
||||
@JSONField(name = "SiteGuide")
|
||||
private String siteGuide;
|
||||
|
||||
/**
|
||||
* 站点额定总功率
|
||||
* 单位 kW,保留 1 位小数
|
||||
*/
|
||||
@JSONField(name = "RatedPower")
|
||||
private BigDecimal ratedPower;
|
||||
|
||||
/**
|
||||
* 建设场所 Y
|
||||
* 1:居民区
|
||||
@@ -268,6 +275,20 @@ public class StationInfo extends BaseStationInfo {
|
||||
@JSONField(name = "Capacity")
|
||||
private BigDecimal capacity;
|
||||
|
||||
/**
|
||||
* 峰谷分时
|
||||
* 0:否 1:是
|
||||
*/
|
||||
@JSONField(name = "PeriodFee")
|
||||
private Integer periodFee;
|
||||
|
||||
/**
|
||||
* 视频监控配套情况
|
||||
* 0:无 1:有
|
||||
*/
|
||||
@JSONField(name = "VideoMonitor")
|
||||
private Integer videoMonitor;
|
||||
|
||||
/**
|
||||
* 是否是公共停车场库 (0-否;1-是) Y
|
||||
* 如果是公共停车场库需要填写场库编号
|
||||
|
||||
@@ -32,5 +32,64 @@ public class SupStationInfo extends StationInfo {
|
||||
@JSONField(name = "AreaCodeCountryside")
|
||||
private String areaCodeCountryside;
|
||||
|
||||
/**
|
||||
* 站点分类
|
||||
* 1:充电站
|
||||
* 2:换电站
|
||||
* 3:充换电一体站
|
||||
*/
|
||||
@JSONField(name = "StationClassification")
|
||||
private int stationClassification;
|
||||
|
||||
/**
|
||||
* 7*24小时营业
|
||||
* 0:否
|
||||
* 1:是
|
||||
*/
|
||||
@JSONField(name = "RoundTheClock")
|
||||
private String roundTheClock;
|
||||
|
||||
/**
|
||||
* 停车费类型
|
||||
* 0:免费
|
||||
* 1:不免费
|
||||
* 2:限时免费停车
|
||||
* 3:充电限时减免
|
||||
* 255:参考场地实际收费标准
|
||||
*/
|
||||
@JSONField(name = "ParkType")
|
||||
private String parkType;
|
||||
|
||||
/**
|
||||
* 电费类型
|
||||
* 1:商业用电
|
||||
* 2:普通工业用电
|
||||
* 3:大工业用电
|
||||
* 4:其它用电
|
||||
*/
|
||||
@JSONField(name = "ElectricityType")
|
||||
private Integer electricityType;
|
||||
|
||||
/**
|
||||
* 报装类型
|
||||
* 是否独立报装:
|
||||
* 0:否
|
||||
* 1:是
|
||||
*/
|
||||
@JSONField(name = "BusinessExpandType")
|
||||
private Integer businessExpandType;
|
||||
|
||||
/**
|
||||
* 正式投运时间
|
||||
*/
|
||||
@JSONField(name = "OfficialRunTime")
|
||||
private String officialRunTime;
|
||||
|
||||
/**
|
||||
* 建站时间
|
||||
*/
|
||||
@JSONField(name = "BuildTime")
|
||||
private String BuildTime;
|
||||
|
||||
private List<PolicyInfo> PolicyInfos;
|
||||
}
|
||||
|
||||
@@ -50,11 +50,14 @@ import com.jsowell.thirdparty.platform.util.Encodes;
|
||||
import com.jsowell.thirdparty.platform.util.HttpRequestUtil;
|
||||
import com.jsowell.thirdparty.platform.util.ThirdPartyPlatformUtils;
|
||||
import com.jsowell.thirdparty.service.ThirdpartySecretInfoService;
|
||||
import com.yi.business.geo.GeoCodeInfo;
|
||||
import com.yi.business.geo.TermRelationTreeCoordinate;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -241,20 +244,45 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
stationInfo.setIsPublicParkingLot(Integer.valueOf(pileStationInfo.getPublicParking()));
|
||||
stationInfo.setCountryCode(pileStationInfo.getCountryCode());
|
||||
stationInfo.setAreaCode(pileStationInfo.getAreaCode());
|
||||
// areaCodeCountryside
|
||||
GeoCodeInfo geoCode = TermRelationTreeCoordinate.completeGeoCode(pileStationInfo.getAddress());
|
||||
if (geoCode != null) {
|
||||
String areaCodeCountryside = geoCode.getCounty_code();
|
||||
stationInfo.setAreaCodeCountryside(areaCodeCountryside);
|
||||
}
|
||||
stationInfo.setAddress(pileStationInfo.getAddress());
|
||||
stationInfo.setServiceTel(pileStationInfo.getStationTel());
|
||||
stationInfo.setStationType(Integer.valueOf(pileStationInfo.getStationType()));
|
||||
stationInfo.setStationClassification(1);
|
||||
stationInfo.setStationStatus(Integer.parseInt(pileStationInfo.getStationStatus()));
|
||||
stationInfo.setParkNums(Integer.valueOf(pileStationInfo.getParkNums()));
|
||||
stationInfo.setStationLng(new BigDecimal(pileStationInfo.getStationLng()));
|
||||
stationInfo.setStationLat(new BigDecimal(pileStationInfo.getStationLat()));
|
||||
stationInfo.setConstruction(Integer.valueOf(pileStationInfo.getConstruction()));
|
||||
stationInfo.setOpenAllDay(Integer.valueOf(pileStationInfo.getOpenAllDay()));
|
||||
// stationInfo.setMinElectricityPrice(pileStationInfo); // 最低充电电费率
|
||||
// stationInfo.setElectricityFee(); // 电费 xx元/度
|
||||
// stationInfo.setServiceFee(); // 服务费 xx元/度
|
||||
List<String> pictures = Lists.newArrayList();
|
||||
if (StringUtils.isNotBlank(pileStationInfo.getPictures())) {
|
||||
pictures = Lists.newArrayList(pileStationInfo.getPictures().split(","));
|
||||
}
|
||||
stationInfo.setPictures(pictures);
|
||||
stationInfo.setMatchCars(pileStationInfo.getMatchCars());
|
||||
stationInfo.setBusineHours(getBusineHours());
|
||||
stationInfo.setRoundTheClock(Constants.ONE);
|
||||
// stationInfo.setMinElectricityPrice(""); // 最低充电电费率
|
||||
Map<String, String> feeMap = getFeeMap(stationId);
|
||||
stationInfo.setElectricityFee(feeMap.get("electricityFee")); // 电费 xx元/度
|
||||
stationInfo.setServiceFee(feeMap.get("serviceFee")); // 服务费 xx元/度
|
||||
stationInfo.setParkType("255");
|
||||
stationInfo.setParkFree(Integer.valueOf(pileStationInfo.getParkFree()));
|
||||
stationInfo.setElectricityType(1);
|
||||
stationInfo.setBusinessExpandType(Integer.parseInt(pileStationInfo.getAloneApply()));
|
||||
stationInfo.setCapacity(pileStationInfo.getCapacity().setScale(4, RoundingMode.HALF_UP));
|
||||
stationInfo.setPayment(pileStationInfo.getPayment());
|
||||
stationInfo.setSupportOrder(Integer.valueOf(pileStationInfo.getSupportOrder()));
|
||||
stationInfo.setPeriodFee(1);
|
||||
stationInfo.setOfficialRunTime(DateUtils.dateTime(pileStationInfo.getCreateTime()));
|
||||
stationInfo.setBuildTime(DateUtils.dateTime(pileStationInfo.getCreateTime()));
|
||||
stationInfo.setVideoMonitor(0);
|
||||
stationInfo.setSupportOrder(Integer.parseInt(pileStationInfo.getSupportOrder()));
|
||||
// stationInfo.setParkFeeType(pileStationInfo); // 停车收费类型
|
||||
stationInfo.setToiletFlag(Integer.valueOf(pileStationInfo.getToiletFlag()));
|
||||
stationInfo.setStoreFlag(Integer.valueOf(pileStationInfo.getStoreFlag()));
|
||||
@@ -279,6 +307,36 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
private String getBusineHours() {
|
||||
Map<String, String> map = new LinkedHashMap<>();
|
||||
map.put("1", "[\"00:00-24:00\"]");
|
||||
map.put("2", "[\"00:00-24:00\"]");
|
||||
map.put("3", "[\"00:00-24:00\"]");
|
||||
map.put("4", "[\"00:00-24:00\"]");
|
||||
map.put("5", "[\"00:00-24:00\"]");
|
||||
map.put("6", "[\"00:00-24:00\"]");
|
||||
map.put("7", "[\"00:00-24:00\"]");
|
||||
|
||||
return map.toString();
|
||||
}
|
||||
|
||||
private Map<String, String> getFeeMap(String stationId) {
|
||||
Map<String, String> resultMap = Maps.newHashMap();
|
||||
JSONObject electricityFeeJson = new JSONObject();
|
||||
JSONObject serviceFeeJson = new JSONObject();
|
||||
|
||||
// 查询站点计费模板列表
|
||||
List<BillingPriceVO> billingList = pileBillingTemplateService.queryBillingPrice(stationId);
|
||||
for (BillingPriceVO billingPriceVO : billingList) {
|
||||
String key = billingPriceVO.getStartTime() + "-" + billingPriceVO.getEndTime();
|
||||
electricityFeeJson.put(key, billingPriceVO.getElectricityPrice());
|
||||
serviceFeeJson.put(key, billingPriceVO.getServicePrice());
|
||||
}
|
||||
resultMap.put("electricityFee", electricityFeeJson.toJSONString());
|
||||
resultMap.put("serviceFee", serviceFeeJson.toJSONString());
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设备接口状态查询 query_station_status
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user