mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-10 08:58:02 +08:00
update 贵州平台推送数据
This commit is contained in:
@@ -88,4 +88,15 @@ public class SupChargeDetails {
|
|||||||
*/
|
*/
|
||||||
@JSONField(name = "DetailSeviceMoney")
|
@JSONField(name = "DetailSeviceMoney")
|
||||||
private BigDecimal detailSeviceMoney;
|
private BigDecimal detailSeviceMoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时段服务费
|
||||||
|
* DetailServiceMoney
|
||||||
|
* 时段服务费金额,单位:元,小数点后4位
|
||||||
|
* 否
|
||||||
|
* 浮点数
|
||||||
|
* ≤8字符,小数点后4位
|
||||||
|
*/
|
||||||
|
@JSONField(name = "DetailServiceMoney")
|
||||||
|
private BigDecimal detailServiceMoney;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -655,12 +655,12 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
// 拼装成平台所需格式对象
|
// 拼装成平台所需格式对象
|
||||||
ChargeOrderInfo orderInfo = transformChargeOrderInfo(orderBasicInfo, orderDetail);
|
ChargeOrderInfo orderInfo = transformChargeOrderInfo(orderBasicInfo, orderDetail);
|
||||||
|
|
||||||
// List<BillingPriceVO> billingList = pileBillingTemplateService.queryBillingPrice(orderBasicInfo.getStationId());
|
List<BillingPriceVO> billingList = pileBillingTemplateService.queryBillingPrice(orderBasicInfo.getStationId());
|
||||||
// 先将list按照 尖、峰、平、谷 时段排序
|
// 先将list按照 尖、峰、平、谷 时段排序
|
||||||
// List<BillingPriceVO> collect = billingList.stream().sorted(Comparator.comparing(BillingPriceVO::getTimeType)).collect(Collectors.toList());
|
List<BillingPriceVO> collect = billingList.stream().sorted(Comparator.comparing(BillingPriceVO::getTimeType)).collect(Collectors.toList());
|
||||||
// 再循环该list,拼装对应的充电价格、费率
|
// 再循环该list,拼装对应的充电价格、费率
|
||||||
// List<SupChargeDetails> chargeDetails = transformSupChargeDetails(orderDetail, billingList);
|
List<SupChargeDetails> chargeDetails = transformSupChargeDetails(orderDetail, collect);
|
||||||
// orderInfo.setChargeDetails(chargeDetails);
|
orderInfo.setChargeDetails(chargeDetails);
|
||||||
|
|
||||||
// 获取令牌
|
// 获取令牌
|
||||||
String token = getToken(urlAddress, operatorId, operatorSecret, dataSecretIv, signSecret, dataSecret);
|
String token = getToken(urlAddress, operatorId, operatorSecret, dataSecretIv, signSecret, dataSecret);
|
||||||
@@ -699,12 +699,12 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
|
|
||||||
ChargeOrderInfo orderInfo = transformChargeOrderInfo(orderBasicInfo, orderDetail);
|
ChargeOrderInfo orderInfo = transformChargeOrderInfo(orderBasicInfo, orderDetail);
|
||||||
|
|
||||||
// List<BillingPriceVO> billingList = pileBillingTemplateService.queryBillingPrice(orderBasicInfo.getStationId());
|
List<BillingPriceVO> billingList = pileBillingTemplateService.queryBillingPrice(orderBasicInfo.getStationId());
|
||||||
// 先将list按照 尖、峰、平、谷 时段排序
|
// 先将list按照 尖、峰、平、谷 时段排序
|
||||||
// List<BillingPriceVO> collect = billingList.stream().sorted(Comparator.comparing(BillingPriceVO::getTimeType)).collect(Collectors.toList());
|
List<BillingPriceVO> collect = billingList.stream().sorted(Comparator.comparing(BillingPriceVO::getTimeType)).collect(Collectors.toList());
|
||||||
// 再循环该list,拼装对应的充电价格、费率
|
// 再循环该list,拼装对应的充电价格、费率
|
||||||
// List<SupChargeDetails> chargeDetails = transformSupChargeDetails(orderDetail, billingList);
|
List<SupChargeDetails> chargeDetails = transformSupChargeDetails(orderDetail, collect);
|
||||||
// orderInfo.setChargeDetails(chargeDetails);
|
orderInfo.setChargeDetails(chargeDetails);
|
||||||
|
|
||||||
// 获取令牌
|
// 获取令牌
|
||||||
String token = getToken(urlAddress, operatorId, operatorSecret, dataSecretIv, signSecret, dataSecret);
|
String token = getToken(urlAddress, operatorId, operatorSecret, dataSecretIv, signSecret, dataSecret);
|
||||||
@@ -801,7 +801,7 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
connectorStatsInfo.setConnectorId(pileConnectorCode);
|
connectorStatsInfo.setConnectorId(pileConnectorCode);
|
||||||
|
|
||||||
connectorStatsInfo.setEquipmentClassification(1);
|
connectorStatsInfo.setEquipmentClassification(1);
|
||||||
connectorStatsInfo.setConnectorElectricity((vo.getTotalPower() != null) ? vo.getTotalPower() : BigDecimal.ZERO);
|
connectorStatsInfo.setConnectorElectricity((vo.getTotalPower() != null) ? vo.getTotalPower().setScale(2, RoundingMode.HALF_UP) : BigDecimal.ZERO);
|
||||||
connectorStatsInfo.setConnectorTotalChargeTime((vo.getChargingTime() != null) ? vo.getChargingTime() : Constants.zero);
|
connectorStatsInfo.setConnectorTotalChargeTime((vo.getChargingTime() != null) ? vo.getChargingTime() : Constants.zero);
|
||||||
connectorStatsInfo.setConnectorTotalChargeNum(orderVOS.size());
|
connectorStatsInfo.setConnectorTotalChargeNum(orderVOS.size());
|
||||||
connectorStatsInfo.setConnectorTotalWarningNum(0);
|
connectorStatsInfo.setConnectorTotalWarningNum(0);
|
||||||
@@ -834,7 +834,7 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
pileTotalPower = pileTotalPower.add((vo.getTotalPower() != null) ? vo.getTotalPower() : BigDecimal.ZERO);
|
pileTotalPower = pileTotalPower.add((vo.getTotalPower() != null) ? vo.getTotalPower() : BigDecimal.ZERO);
|
||||||
pileChargeTime += (vo.getChargingTime() != null) ? vo.getChargingTime() : Constants.zero;
|
pileChargeTime += (vo.getChargingTime() != null) ? vo.getChargingTime() : Constants.zero;
|
||||||
|
|
||||||
equipmentStatsInfo.setEquipmentElectricity(pileTotalPower); // 第一次判断时一定不会进入到这里,所以不用判断 equipmentStatsInfo 是否为 null
|
equipmentStatsInfo.setEquipmentElectricity(pileTotalPower.setScale(2, RoundingMode.HALF_UP)); // 第一次判断时一定不会进入到这里,所以不用判断 equipmentStatsInfo 是否为 null
|
||||||
equipmentStatsInfo.setEquipmentTotalChargeTime(pileChargeTime);
|
equipmentStatsInfo.setEquipmentTotalChargeTime(pileChargeTime);
|
||||||
|
|
||||||
connectorStatsInfoList.add(connectorStatsInfo);
|
connectorStatsInfoList.add(connectorStatsInfo);
|
||||||
@@ -858,7 +858,7 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
.startTime(startTime)
|
.startTime(startTime)
|
||||||
.endTime(endTime)
|
.endTime(endTime)
|
||||||
.stationElectricity(stationTotalElectricity)
|
.stationElectricity(stationTotalElectricity)
|
||||||
.stationTotalChargeEnergy(stationTotalElectricity)
|
.stationTotalChargeEnergy(stationTotalElectricity.setScale(2, RoundingMode.HALF_UP))
|
||||||
.stationTotalChargeNum(orderVOS.size())
|
.stationTotalChargeNum(orderVOS.size())
|
||||||
.stationTotalChargeTime(stationChargeTime)
|
.stationTotalChargeTime(stationChargeTime)
|
||||||
.stationTotalWarningNum(0)
|
.stationTotalWarningNum(0)
|
||||||
@@ -1051,10 +1051,10 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
.flatElect(orderDetail.getFlatUsedElectricity())
|
.flatElect(orderDetail.getFlatUsedElectricity())
|
||||||
.valleyElect(orderDetail.getValleyUsedElectricity())
|
.valleyElect(orderDetail.getValleyUsedElectricity())
|
||||||
.pushTimeStamp(DateUtils.getDateTime())
|
.pushTimeStamp(DateUtils.getDateTime())
|
||||||
.totalElecMoney(orderDetail.getTotalElectricityAmount())
|
.totalElecMoney(orderDetail.getTotalElectricityAmount().setScale(2, RoundingMode.HALF_UP))
|
||||||
.totalSeviceMoney(orderDetail.getTotalServiceAmount())
|
.totalSeviceMoney(orderDetail.getTotalServiceAmount().setScale(2, RoundingMode.HALF_UP))
|
||||||
.totalServiceMoney(orderDetail.getTotalServiceAmount())
|
.totalServiceMoney(orderDetail.getTotalServiceAmount().setScale(2, RoundingMode.HALF_UP))
|
||||||
.totalMoney(orderDetail.getTotalOrderAmount())
|
.totalMoney(orderDetail.getTotalOrderAmount().setScale(2, RoundingMode.HALF_UP))
|
||||||
.stopReason(2)
|
.stopReason(2)
|
||||||
.stopDesc(orderBasicInfo.getReason())
|
.stopDesc(orderBasicInfo.getReason())
|
||||||
.sumPeriod(0)
|
.sumPeriod(0)
|
||||||
@@ -1095,7 +1095,7 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
detail.setSevicePrice(new BigDecimal(billingPriceVO.getServicePrice()).setScale(4, BigDecimal.ROUND_HALF_UP));
|
detail.setSevicePrice(new BigDecimal(billingPriceVO.getServicePrice()).setScale(4, BigDecimal.ROUND_HALF_UP));
|
||||||
detail.setDetailPower(orderDetail.getSharpUsedElectricity());
|
detail.setDetailPower(orderDetail.getSharpUsedElectricity());
|
||||||
detail.setDetailElecMoney(orderDetail.getSharpElectricityPrice());
|
detail.setDetailElecMoney(orderDetail.getSharpElectricityPrice());
|
||||||
detail.setDetailSeviceMoney(orderDetail.getSharpServicePrice());
|
detail.setDetailServiceMoney(orderDetail.getSharpServicePrice());
|
||||||
} else if (StringUtils.equals(billingPriceVO.getTimeType(), BillingTimeTypeEnum.PEAK.getValue())) {
|
} else if (StringUtils.equals(billingPriceVO.getTimeType(), BillingTimeTypeEnum.PEAK.getValue())) {
|
||||||
// 峰时段
|
// 峰时段
|
||||||
detail.setDetailStartTime(DateUtils.getDateTime());
|
detail.setDetailStartTime(DateUtils.getDateTime());
|
||||||
@@ -1104,7 +1104,7 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
detail.setSevicePrice(new BigDecimal(billingPriceVO.getServicePrice()).setScale(4, BigDecimal.ROUND_HALF_UP));
|
detail.setSevicePrice(new BigDecimal(billingPriceVO.getServicePrice()).setScale(4, BigDecimal.ROUND_HALF_UP));
|
||||||
detail.setDetailPower(orderDetail.getPeakUsedElectricity());
|
detail.setDetailPower(orderDetail.getPeakUsedElectricity());
|
||||||
detail.setDetailElecMoney(orderDetail.getPeakElectricityPrice());
|
detail.setDetailElecMoney(orderDetail.getPeakElectricityPrice());
|
||||||
detail.setDetailSeviceMoney(orderDetail.getPeakServicePrice());
|
detail.setDetailServiceMoney(orderDetail.getPeakServicePrice());
|
||||||
} else if (StringUtils.equals(billingPriceVO.getTimeType(), BillingTimeTypeEnum.FLAT.getValue())) {
|
} else if (StringUtils.equals(billingPriceVO.getTimeType(), BillingTimeTypeEnum.FLAT.getValue())) {
|
||||||
// 平时段
|
// 平时段
|
||||||
detail.setDetailStartTime(DateUtils.getDateTime());
|
detail.setDetailStartTime(DateUtils.getDateTime());
|
||||||
@@ -1113,7 +1113,7 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
detail.setSevicePrice(new BigDecimal(billingPriceVO.getServicePrice()).setScale(4, BigDecimal.ROUND_HALF_UP));
|
detail.setSevicePrice(new BigDecimal(billingPriceVO.getServicePrice()).setScale(4, BigDecimal.ROUND_HALF_UP));
|
||||||
detail.setDetailPower(orderDetail.getFlatUsedElectricity());
|
detail.setDetailPower(orderDetail.getFlatUsedElectricity());
|
||||||
detail.setDetailElecMoney(orderDetail.getFlatElectricityPrice());
|
detail.setDetailElecMoney(orderDetail.getFlatElectricityPrice());
|
||||||
detail.setDetailSeviceMoney(orderDetail.getFlatServicePrice());
|
detail.setDetailServiceMoney(orderDetail.getFlatServicePrice());
|
||||||
} else if (StringUtils.equals(billingPriceVO.getTimeType(), BillingTimeTypeEnum.VALLEY.getValue())) {
|
} else if (StringUtils.equals(billingPriceVO.getTimeType(), BillingTimeTypeEnum.VALLEY.getValue())) {
|
||||||
// 谷时段
|
// 谷时段
|
||||||
detail.setDetailStartTime(DateUtils.getDateTime());
|
detail.setDetailStartTime(DateUtils.getDateTime());
|
||||||
@@ -1122,7 +1122,7 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
detail.setSevicePrice(new BigDecimal(billingPriceVO.getServicePrice()).setScale(4, BigDecimal.ROUND_HALF_UP));
|
detail.setSevicePrice(new BigDecimal(billingPriceVO.getServicePrice()).setScale(4, BigDecimal.ROUND_HALF_UP));
|
||||||
detail.setDetailPower(orderDetail.getValleyUsedElectricity());
|
detail.setDetailPower(orderDetail.getValleyUsedElectricity());
|
||||||
detail.setDetailElecMoney(orderDetail.getValleyElectricityPrice());
|
detail.setDetailElecMoney(orderDetail.getValleyElectricityPrice());
|
||||||
detail.setDetailSeviceMoney(orderDetail.getValleyServicePrice());
|
detail.setDetailServiceMoney(orderDetail.getValleyServicePrice());
|
||||||
}
|
}
|
||||||
resultList.add(detail);
|
resultList.add(detail);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user