mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-10 18:30:02 +08:00
整合OrderBasicInfo和OrderDetail
This commit is contained in:
@@ -51,6 +51,7 @@ import com.jsowell.pile.transaction.dto.ClearingBillTransactionDTO;
|
|||||||
import com.jsowell.pile.transaction.dto.OrderTransactionDTO;
|
import com.jsowell.pile.transaction.dto.OrderTransactionDTO;
|
||||||
import com.jsowell.pile.transaction.service.TransactionService;
|
import com.jsowell.pile.transaction.service.TransactionService;
|
||||||
import com.jsowell.pile.util.UserUtils;
|
import com.jsowell.pile.util.UserUtils;
|
||||||
|
import com.jsowell.pile.vo.OrderInfoDetailVO;
|
||||||
import com.jsowell.pile.vo.SupStationStatsVO;
|
import com.jsowell.pile.vo.SupStationStatsVO;
|
||||||
import com.jsowell.pile.vo.base.MerchantOrderInfoVO;
|
import com.jsowell.pile.vo.base.MerchantOrderInfoVO;
|
||||||
import com.jsowell.pile.vo.base.OrderAmountDetailVO;
|
import com.jsowell.pile.vo.base.OrderAmountDetailVO;
|
||||||
@@ -437,6 +438,80 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
|||||||
return resultVO;
|
return resultVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整合OrderBasicInfo和OrderDetail
|
||||||
|
*/
|
||||||
|
public OrderInfoDetailVO getOrderInfoDetailVO(OrderBasicInfo orderBasicInfo, OrderDetail orderDetail) {
|
||||||
|
if (orderBasicInfo == null || orderDetail == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
OrderInfoDetailVO orderInfoDetailVO = new OrderInfoDetailVO();
|
||||||
|
orderInfoDetailVO.setOrderCode(orderBasicInfo.getOrderCode());
|
||||||
|
orderInfoDetailVO.setTransactionCode(orderBasicInfo.getTransactionCode());
|
||||||
|
orderInfoDetailVO.setOrderStatus(orderBasicInfo.getOrderStatus());
|
||||||
|
orderInfoDetailVO.setMemberId(orderBasicInfo.getMemberId());
|
||||||
|
orderInfoDetailVO.setStationId(orderBasicInfo.getStationId());
|
||||||
|
orderInfoDetailVO.setMerchantId(orderBasicInfo.getMerchantId());
|
||||||
|
orderInfoDetailVO.setPileSn(orderBasicInfo.getPileSn());
|
||||||
|
orderInfoDetailVO.setConnectorCode(orderBasicInfo.getConnectorCode());
|
||||||
|
orderInfoDetailVO.setPileConnectorCode(orderBasicInfo.getPileConnectorCode());
|
||||||
|
orderInfoDetailVO.setLogicCard(orderBasicInfo.getLogicCard());
|
||||||
|
orderInfoDetailVO.setVinCode(orderBasicInfo.getVinCode());
|
||||||
|
orderInfoDetailVO.setStartMode(orderBasicInfo.getStartMode());
|
||||||
|
orderInfoDetailVO.setThirdPartyType(orderBasicInfo.getThirdPartyType());
|
||||||
|
orderInfoDetailVO.setPayMode(orderBasicInfo.getPayMode());
|
||||||
|
orderInfoDetailVO.setPayStatus(orderBasicInfo.getPayStatus());
|
||||||
|
orderInfoDetailVO.setPayAmount(orderBasicInfo.getPayAmount());
|
||||||
|
orderInfoDetailVO.setPayTime(orderBasicInfo.getPayTime());
|
||||||
|
orderInfoDetailVO.setPlateNumber(orderBasicInfo.getPlateNumber());
|
||||||
|
orderInfoDetailVO.setOrderAmount(orderBasicInfo.getOrderAmount());
|
||||||
|
orderInfoDetailVO.setVirtualAmount(orderBasicInfo.getVirtualAmount());
|
||||||
|
orderInfoDetailVO.setGroupCode(orderBasicInfo.getGroupCode());
|
||||||
|
orderInfoDetailVO.setDiscountAmount(orderBasicInfo.getDiscountAmount());
|
||||||
|
orderInfoDetailVO.setSettleAmount(orderBasicInfo.getSettleAmount());
|
||||||
|
orderInfoDetailVO.setRemedialAmount(orderBasicInfo.getRemedialAmount());
|
||||||
|
orderInfoDetailVO.setChargeStartTime(orderBasicInfo.getChargeStartTime());
|
||||||
|
orderInfoDetailVO.setChargeEndTime(orderBasicInfo.getChargeEndTime());
|
||||||
|
orderInfoDetailVO.setStartType(orderBasicInfo.getStartType());
|
||||||
|
orderInfoDetailVO.setReservedStartTime(orderBasicInfo.getReservedStartTime());
|
||||||
|
orderInfoDetailVO.setReservedEndTime(orderBasicInfo.getReservedEndTime());
|
||||||
|
orderInfoDetailVO.setStartSoc(orderBasicInfo.getStartSoc());
|
||||||
|
orderInfoDetailVO.setEndSoc(orderBasicInfo.getEndSoc());
|
||||||
|
orderInfoDetailVO.setStopReasonCode(orderBasicInfo.getStopReasonCode());
|
||||||
|
orderInfoDetailVO.setReason(orderBasicInfo.getReason());
|
||||||
|
orderInfoDetailVO.setSettlementTime(orderBasicInfo.getSettlementTime());
|
||||||
|
orderInfoDetailVO.setRefundAmount(orderBasicInfo.getRefundAmount());
|
||||||
|
orderInfoDetailVO.setRefundStatus(orderBasicInfo.getRefundStatus());
|
||||||
|
orderInfoDetailVO.setTotalUsedElectricity(orderDetail.getTotalUsedElectricity());
|
||||||
|
orderInfoDetailVO.setTotalOrderAmount(orderDetail.getTotalOrderAmount());
|
||||||
|
orderInfoDetailVO.setTotalElectricityAmount(orderDetail.getTotalElectricityAmount());
|
||||||
|
orderInfoDetailVO.setDiscountElectricityAmount(orderDetail.getDiscountElectricityAmount());
|
||||||
|
orderInfoDetailVO.setTotalServiceAmount(orderDetail.getTotalServiceAmount());
|
||||||
|
orderInfoDetailVO.setDiscountServiceAmount(orderDetail.getDiscountServiceAmount());
|
||||||
|
orderInfoDetailVO.setSharpPrice(orderDetail.getSharpPrice());
|
||||||
|
orderInfoDetailVO.setSharpUsedElectricity(orderDetail.getSharpUsedElectricity());
|
||||||
|
orderInfoDetailVO.setSharpElectricityPrice(orderDetail.getSharpElectricityPrice());
|
||||||
|
orderInfoDetailVO.setSharpServicePrice(orderDetail.getSharpServicePrice());
|
||||||
|
orderInfoDetailVO.setSharpAmount(orderDetail.getSharpAmount());
|
||||||
|
orderInfoDetailVO.setPeakPrice(orderDetail.getPeakPrice());
|
||||||
|
orderInfoDetailVO.setPeakUsedElectricity(orderDetail.getPeakUsedElectricity());
|
||||||
|
orderInfoDetailVO.setPeakElectricityPrice(orderDetail.getPeakElectricityPrice());
|
||||||
|
orderInfoDetailVO.setPeakServicePrice(orderDetail.getPeakServicePrice());
|
||||||
|
orderInfoDetailVO.setPeakAmount(orderDetail.getPeakAmount());
|
||||||
|
orderInfoDetailVO.setFlatPrice(orderDetail.getFlatPrice());
|
||||||
|
orderInfoDetailVO.setFlatUsedElectricity(orderDetail.getFlatUsedElectricity());
|
||||||
|
orderInfoDetailVO.setFlatElectricityPrice(orderDetail.getFlatElectricityPrice());
|
||||||
|
orderInfoDetailVO.setFlatServicePrice(orderDetail.getFlatServicePrice());
|
||||||
|
orderInfoDetailVO.setFlatAmount(orderDetail.getFlatAmount());
|
||||||
|
orderInfoDetailVO.setValleyPrice(orderDetail.getValleyPrice());
|
||||||
|
orderInfoDetailVO.setValleyUsedElectricity(orderDetail.getValleyUsedElectricity());
|
||||||
|
orderInfoDetailVO.setValleyElectricityPrice(orderDetail.getValleyElectricityPrice());
|
||||||
|
orderInfoDetailVO.setValleyServicePrice(orderDetail.getValleyServicePrice());
|
||||||
|
orderInfoDetailVO.setValleyAmount(orderDetail.getValleyAmount());
|
||||||
|
return orderInfoDetailVO;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询时间段内订单总金额和总用电量V2
|
* 查询时间段内订单总金额和总用电量V2
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -0,0 +1,322 @@
|
|||||||
|
package com.jsowell.pile.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OrderBasicInfo和OrderDetail所有字段整合的VO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OrderInfoDetailVO {
|
||||||
|
/**
|
||||||
|
* 订单编号
|
||||||
|
*/
|
||||||
|
private String orderCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 交易流水号
|
||||||
|
*/
|
||||||
|
private String transactionCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单状态(0-未启动;1-充电中;2-待结算;3-待补缴;4-异常;5-可疑;6-订单完成;7-超时关闭)
|
||||||
|
*/
|
||||||
|
private String orderStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员id
|
||||||
|
*/
|
||||||
|
private String memberId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 站点id
|
||||||
|
*/
|
||||||
|
private String stationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营商id
|
||||||
|
*/
|
||||||
|
private String merchantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充电桩sn
|
||||||
|
*/
|
||||||
|
private String pileSn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充电桩枪口号
|
||||||
|
*/
|
||||||
|
private String connectorCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充电桩枪口编号
|
||||||
|
*/
|
||||||
|
private String pileConnectorCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 卡启动时的卡号
|
||||||
|
*/
|
||||||
|
private String logicCard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* vin启动时的vin码
|
||||||
|
*/
|
||||||
|
private String vinCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 启动方式(0-后管启动;1-用户app启动;2-卡启动;3-离线卡启动; 4-联联平台启动; 5-车辆vin码启动; 6-个人桩预约启动)
|
||||||
|
*/
|
||||||
|
private String startMode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 第三方平台类型
|
||||||
|
*/
|
||||||
|
private String thirdPartyType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付方式(1-余额支付;3-白名单支付;4-微信支付;5-支付宝支付)
|
||||||
|
*/
|
||||||
|
private String payMode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付状态(0-待支付;1-支付完成; 2-无需支付; 3-待补缴)
|
||||||
|
*/
|
||||||
|
private String payStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付金额(指用户预存的金额)
|
||||||
|
*/
|
||||||
|
private BigDecimal payAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付时间
|
||||||
|
*/
|
||||||
|
private Date payTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车牌号码
|
||||||
|
*/
|
||||||
|
private String plateNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单总金额 = 电费总金额 + 服务费总金额
|
||||||
|
*/
|
||||||
|
private BigDecimal orderAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 虚拟金额(指使用赠送余额消费部分)
|
||||||
|
*/
|
||||||
|
private BigDecimal virtualAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员组编号
|
||||||
|
*/
|
||||||
|
private String groupCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 折扣金额(指会员优惠金额)
|
||||||
|
*/
|
||||||
|
private BigDecimal discountAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算金额(指实际产生的消费,包括本金支付,微信支付等)
|
||||||
|
*/
|
||||||
|
private BigDecimal settleAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应补缴金额
|
||||||
|
*/
|
||||||
|
private BigDecimal remedialAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充电开始时间
|
||||||
|
*/
|
||||||
|
private Date chargeStartTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充电结束时间
|
||||||
|
*/
|
||||||
|
private Date chargeEndTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 启动类型(now-立即启动;reserved-预约启动)
|
||||||
|
*/
|
||||||
|
private String startType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预约开始时间
|
||||||
|
*/
|
||||||
|
private Date reservedStartTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预约结束时间
|
||||||
|
*/
|
||||||
|
private Date reservedEndTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始SOC
|
||||||
|
*/
|
||||||
|
private String startSoc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束SOC
|
||||||
|
*/
|
||||||
|
private String endSoc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 停止原因码
|
||||||
|
*/
|
||||||
|
private String stopReasonCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 异常原因
|
||||||
|
*/
|
||||||
|
private String reason;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算时间
|
||||||
|
*/
|
||||||
|
private Date settlementTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退款金额
|
||||||
|
*/
|
||||||
|
private BigDecimal refundAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退款状态(0-不需要退款;1-退款中;2-退款完成)
|
||||||
|
*/
|
||||||
|
private String refundStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总用电量
|
||||||
|
*/
|
||||||
|
private BigDecimal totalUsedElectricity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单总金额(电费总额+服务费总额)
|
||||||
|
*/
|
||||||
|
private BigDecimal totalOrderAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电费总金额(各时段消耗电费总金额)
|
||||||
|
*/
|
||||||
|
private BigDecimal totalElectricityAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电费折扣金额
|
||||||
|
*/
|
||||||
|
private BigDecimal discountElectricityAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务费总金额(各时段服务费总金额)
|
||||||
|
*/
|
||||||
|
private BigDecimal totalServiceAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务费折扣金额
|
||||||
|
*/
|
||||||
|
private BigDecimal discountServiceAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 尖单价(尖电费+尖服务费)
|
||||||
|
*/
|
||||||
|
private BigDecimal sharpPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 尖时段用电量
|
||||||
|
*/
|
||||||
|
private BigDecimal sharpUsedElectricity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 尖时段电费单价
|
||||||
|
*/
|
||||||
|
private BigDecimal sharpElectricityPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 尖时段服务费单价
|
||||||
|
*/
|
||||||
|
private BigDecimal sharpServicePrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 尖金额
|
||||||
|
*/
|
||||||
|
private BigDecimal sharpAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 峰单价
|
||||||
|
*/
|
||||||
|
private BigDecimal peakPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 峰时段用电量
|
||||||
|
*/
|
||||||
|
private BigDecimal peakUsedElectricity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 峰时段电费单价
|
||||||
|
*/
|
||||||
|
private BigDecimal peakElectricityPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 峰时段服务费单价
|
||||||
|
*/
|
||||||
|
private BigDecimal peakServicePrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 峰金额
|
||||||
|
*/
|
||||||
|
private BigDecimal peakAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 平单价
|
||||||
|
*/
|
||||||
|
private BigDecimal flatPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 平时段用电量
|
||||||
|
*/
|
||||||
|
private BigDecimal flatUsedElectricity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 平时段电费单价
|
||||||
|
*/
|
||||||
|
private BigDecimal flatElectricityPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 平时段服务费单价
|
||||||
|
*/
|
||||||
|
private BigDecimal flatServicePrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 平金额
|
||||||
|
*/
|
||||||
|
private BigDecimal flatAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 谷单价
|
||||||
|
*/
|
||||||
|
private BigDecimal valleyPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 谷时段用电量
|
||||||
|
*/
|
||||||
|
private BigDecimal valleyUsedElectricity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 谷时段电费单价
|
||||||
|
*/
|
||||||
|
private BigDecimal valleyElectricityPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 谷时段服务费单价
|
||||||
|
*/
|
||||||
|
private BigDecimal valleyServicePrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 谷金额
|
||||||
|
*/
|
||||||
|
private BigDecimal valleyAmount;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user