mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-06 02:50:13 +08:00
Merge branch 'feature-business-minigram' into dev
This commit is contained in:
@@ -5724,22 +5724,76 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
if (orderVO == null) {
|
||||
return vo;
|
||||
}
|
||||
// 查询该站点正在使用的计费模板
|
||||
List<BillingPriceVO> priceList = pileBillingTemplateService.queryBillingPrice(orderVO.getStationId());
|
||||
if (CollectionUtils.isNotEmpty(priceList)) {
|
||||
vo.setPriceList(priceList);
|
||||
}
|
||||
vo.setCreateTime(orderVO.getCreateTime());
|
||||
vo.setStartChargeTime(orderVO.getStartTime());
|
||||
vo.setEndChargeTime(orderVO.getEndTime());
|
||||
vo.setReason(orderVO.getReason());
|
||||
vo.setSettleTime(orderVO.getSettlementTime());
|
||||
vo.setPayTime(orderVO.getPayTime());
|
||||
vo.setOrderCode(orderVO.getOrderCode());
|
||||
vo.setStartMode(orderVO.getStartMode());
|
||||
vo.setStationName(orderVO.getStationName());
|
||||
if (StringUtils.isNotBlank(orderVO.getThirdPartyType())) {
|
||||
vo.setOrderSource(orderVO.getThirdPartyType());
|
||||
} else {
|
||||
vo.setOrderSource(Constants.WAN_CHE_CHONG_MINI_PROGRAM);
|
||||
}
|
||||
vo.setTransactionCode(orderVO.getTransactionCode());
|
||||
String startMode = StartModeEnum.getLabelByValue(orderVO.getStartMode());
|
||||
vo.setStartMode(startMode);
|
||||
// vo.setChargeType(orderVO.getChargeType(), Constants.ONE) ? "直流" : "交流");
|
||||
vo.setPileSn(orderVO.getPileSn());
|
||||
vo.setPileConnectorCode(orderVO.getPileConnectorCode());
|
||||
vo.setEndSOC(orderVO.getEndSoc());
|
||||
vo.setChargeTime(orderVO.getChargingTime());
|
||||
vo.setChargeDegree(orderVO.getChargingDegree());
|
||||
vo.setReason(orderVO.getReason());
|
||||
|
||||
vo.setOrderAmount(orderVO.getOrderAmount());
|
||||
vo.setDiscountAmount(new BigDecimal(orderVO.getDiscountAmount()));
|
||||
vo.setSettleAmount(orderVO.getSettleAmount());
|
||||
vo.setPayMode(orderVO.getPayMode());
|
||||
|
||||
vo.setSettleTime(orderVO.getSettlementTime());
|
||||
vo.setPayTime(orderVO.getPayTime());
|
||||
|
||||
String payMode = OrderPayModeEnum.getPayModeDescription(orderVO.getPayMode());
|
||||
vo.setPayMode(payMode);
|
||||
|
||||
|
||||
vo.setMemberId(orderVO.getMemberId());
|
||||
vo.setPhoneNumber(orderVO.getPhoneNumber());
|
||||
|
||||
if (StringUtils.isNotBlank(orderVO.getLicensePlateNumber())) {
|
||||
vo.setPlateNumber(orderVO.getLicensePlateNumber());
|
||||
}
|
||||
if (StringUtils.isNotBlank(orderVO.getVinCode())) {
|
||||
vo.setVinCode(orderVO.getVinCode());
|
||||
}
|
||||
if (StringUtils.isNotBlank(orderVO.getCardNumber())) {
|
||||
vo.setCardNumber(orderVO.getCardNumber());
|
||||
}
|
||||
|
||||
// 充电曲线
|
||||
List<RealTimeMonitorData> chargingRealTimeDataList = getChargingRealTimeData(orderVO.getTransactionCode());
|
||||
if (CollectionUtils.isNotEmpty(chargingRealTimeDataList)) {
|
||||
List<OrderDetailInfoVO.PileMonitorData> infoList = Lists.newArrayList();
|
||||
for (RealTimeMonitorData realTimeMonitorData : chargingRealTimeDataList) {
|
||||
OrderDetailInfoVO.PileMonitorData info = new OrderDetailInfoVO.PileMonitorData();
|
||||
info.setInstantCurrent(realTimeMonitorData.getOutputCurrent()); // 电流
|
||||
info.setInstantVoltage(realTimeMonitorData.getOutputVoltage()); // 电压
|
||||
info.setInstantPower(realTimeMonitorData.getOutputPower()); // 功率
|
||||
info.setSOC(realTimeMonitorData.getSOC());
|
||||
info.setTime(realTimeMonitorData.getDateTime()); // 时间
|
||||
|
||||
infoList.add(info);
|
||||
}
|
||||
// 根据时间进行正序排序
|
||||
infoList = infoList.stream()
|
||||
.sorted(Comparator.comparing(OrderDetailInfoVO.PileMonitorData::getTime))
|
||||
.collect(Collectors.toList());
|
||||
vo.setPileMonitorDataList(infoList);
|
||||
}
|
||||
|
||||
return vo;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package com.jsowell.pile.vo.uniapp.business;
|
||||
|
||||
import com.jsowell.pile.vo.uniapp.customer.BillingPriceVO;
|
||||
import com.jsowell.pile.vo.web.OrderDetailInfoVO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 运营端小程序订单详情VO
|
||||
@@ -195,4 +198,50 @@ public class BusinessOrderDetailInfoVO {
|
||||
*/
|
||||
private String timeRemaining;
|
||||
|
||||
/**
|
||||
* 充电开始时间
|
||||
*/
|
||||
private String chargeStartTime;
|
||||
|
||||
/**
|
||||
* 充电结束时间
|
||||
*/
|
||||
private String chargeEndTime;
|
||||
|
||||
/**
|
||||
* 订单来源
|
||||
*/
|
||||
private String orderSource;
|
||||
|
||||
/**
|
||||
* 外部交易流水号
|
||||
*/
|
||||
private String outTransactionCode;
|
||||
|
||||
/**
|
||||
* 充电类型
|
||||
*/
|
||||
private String chargeType;
|
||||
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
private String plateNumber;
|
||||
|
||||
/**
|
||||
* 车架号
|
||||
*/
|
||||
private String vinCode;
|
||||
|
||||
private BigDecimal orderAmount;
|
||||
|
||||
private BigDecimal discountAmount;
|
||||
|
||||
private String phoneNumber;
|
||||
|
||||
private String cardNumber;
|
||||
|
||||
private List<BillingPriceVO> priceList;
|
||||
|
||||
private List<OrderDetailInfoVO.PileMonitorData> pileMonitorDataList;
|
||||
}
|
||||
|
||||
@@ -158,4 +158,10 @@ public class OrderVO {
|
||||
private String memberId;
|
||||
|
||||
private String phoneNumber;
|
||||
|
||||
private String thirdPartyType;
|
||||
|
||||
private String vinCode;
|
||||
|
||||
private String cardNumber;
|
||||
}
|
||||
|
||||
@@ -3252,12 +3252,15 @@
|
||||
t1.transaction_code AS transactionCode,
|
||||
t1.order_status AS orderStatus,
|
||||
t1.station_id AS stationId,
|
||||
t1.third_party_type as thirdPartyType,
|
||||
t5.station_name as stationName,
|
||||
t1.pile_sn AS pileSn,
|
||||
t1.member_id as memberId,
|
||||
t1.connector_code AS connectorCode,
|
||||
t1.pile_connector_code AS pileConnectorCode,
|
||||
t1.pay_mode AS payMode,
|
||||
t1.pay_amount AS payAmount,
|
||||
t1.logic_card as cardNumber,
|
||||
t1.pay_time AS payTime,
|
||||
t1.order_amount AS orderAmount,
|
||||
t1.plate_number AS licensePlateNumber,
|
||||
@@ -3269,7 +3272,8 @@
|
||||
t1.charge_end_time AS endTime,
|
||||
t1.start_soc AS startSoc,
|
||||
t1.end_soc AS endSoc,
|
||||
t1.reason AS stopReason,
|
||||
t1.reason AS reason,
|
||||
t1.vin_code as vinCode,
|
||||
t2.total_used_electricity AS totalPower,
|
||||
t2.total_electricity_amount AS totalElectricityAmount,
|
||||
t2.total_service_amount AS totalServiceAmount
|
||||
@@ -3280,6 +3284,7 @@
|
||||
pile_merchant_info t3 on t1.merchant_id = t3.id
|
||||
join
|
||||
member_basic_info t4 on t1.member_id = t4.member_id
|
||||
join pile_station_info t5 on t1.station_id = t5.id
|
||||
WHERE t1.del_flag = '0'
|
||||
AND t1.order_code = #{orderCode,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user