mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
update 订单详情中的收费明细
This commit is contained in:
@@ -22,6 +22,7 @@ import com.jsowell.common.enums.ykc.ReturnCodeEnum;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.common.util.bean.BeanUtils;
|
||||
import com.jsowell.common.util.id.IdUtils;
|
||||
import com.jsowell.netty.command.ykc.StartChargingCommand;
|
||||
import com.jsowell.netty.service.yunkuaichong.YKCPushCommandService;
|
||||
@@ -667,7 +668,13 @@ public class OrderService {
|
||||
vo.setPayRecordList(payRecordList);
|
||||
}
|
||||
|
||||
|
||||
// 查订单明细
|
||||
OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderCode);
|
||||
if (orderDetail != null) {
|
||||
OrderDetailInfoVO.BillingDetails billingDetails = new OrderDetailInfoVO.BillingDetails();
|
||||
BeanUtils.copyBeanProp(billingDetails, orderDetail);
|
||||
vo.setBillingDetails(billingDetails);
|
||||
}
|
||||
|
||||
// 用户信息
|
||||
MemberVO memberVO = memberService.getMemberInfoByMemberId(orderBasicInfo.getMemberId());
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.jsowell.pile.vo.base.PileInfoVO;
|
||||
import com.jsowell.pile.vo.uniapp.MemberVO;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -14,6 +15,8 @@ public class OrderDetailInfoVO {
|
||||
// 订单信息
|
||||
private OrderInfo orderInfo;
|
||||
|
||||
private BillingDetails billingDetails;
|
||||
|
||||
// 用户信息
|
||||
private MemberVO memberInfo;
|
||||
|
||||
@@ -29,6 +32,91 @@ public class OrderDetailInfoVO {
|
||||
// 订单相关实时数据
|
||||
private OrderRealTimeInfo orderRealTimeInfo;
|
||||
|
||||
// billingDetails
|
||||
|
||||
@Data
|
||||
public static class BillingDetails{
|
||||
/**
|
||||
* 总用电量
|
||||
*/
|
||||
private BigDecimal totalUsedElectricity;
|
||||
|
||||
/**
|
||||
* 订单总金额(电费总额+服务费总额)
|
||||
*/
|
||||
private BigDecimal totalOrderAmount;
|
||||
|
||||
/**
|
||||
* 电费总金额(各时段消耗电费总金额)
|
||||
*/
|
||||
private BigDecimal totalElectricityAmount;
|
||||
|
||||
/**
|
||||
* 服务费总金额(各时段服务费总金额)
|
||||
*/
|
||||
private BigDecimal totalServiceAmount;
|
||||
|
||||
/**
|
||||
* 尖时段用电量
|
||||
*/
|
||||
private BigDecimal sharpUsedElectricity;
|
||||
|
||||
/**
|
||||
* 尖时段电费单价
|
||||
*/
|
||||
private BigDecimal sharpElectricityPrice;
|
||||
|
||||
/**
|
||||
* 尖时段服务费单价
|
||||
*/
|
||||
private BigDecimal sharpServicePrice;
|
||||
|
||||
/**
|
||||
* 峰时段用电量
|
||||
*/
|
||||
private BigDecimal peakUsedElectricity;
|
||||
|
||||
/**
|
||||
* 峰时段电费单价
|
||||
*/
|
||||
private BigDecimal peakElectricityPrice;
|
||||
|
||||
/**
|
||||
* 峰时段服务费单价
|
||||
*/
|
||||
private BigDecimal peakServicePrice;
|
||||
|
||||
/**
|
||||
* 平时段用电量
|
||||
*/
|
||||
private BigDecimal flatUsedElectricity;
|
||||
|
||||
/**
|
||||
* 平时段电费单价
|
||||
*/
|
||||
private BigDecimal flatElectricityPrice;
|
||||
|
||||
/**
|
||||
* 平时段服务费单价
|
||||
*/
|
||||
private BigDecimal flatServicePrice;
|
||||
|
||||
/**
|
||||
* 谷时段用电量
|
||||
*/
|
||||
private BigDecimal valleyUsedElectricity;
|
||||
|
||||
/**
|
||||
* 谷时段电费单价
|
||||
*/
|
||||
private BigDecimal valleyElectricityPrice;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private BigDecimal valleyServicePrice; // 谷时段服务费单价
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class OrderInfo {
|
||||
private String orderCode; // 订单编号
|
||||
|
||||
@@ -6,29 +6,29 @@
|
||||
<div
|
||||
style="text-align: center; margin-bottom: 30px"
|
||||
v-if="
|
||||
orderDetail[0].orderStatus === '4' ||
|
||||
orderDetail[0].orderStatus === '6'
|
||||
orderInfo[0].orderStatus === '4' ||
|
||||
orderInfo[0].orderStatus === '6'
|
||||
"
|
||||
>
|
||||
停止理由:
|
||||
<span style="color: red">{{ orderDetail[0].stopReasonMsg }}</span>
|
||||
<span style="color: red">{{ orderInfo[0].stopReasonMsg }}</span>
|
||||
</div>
|
||||
<el-steps
|
||||
:active="orderDetail[0].orderStatus !== '6' ? 2 : 4"
|
||||
:active="orderInfo[0].orderStatus !== '6' ? 2 : 4"
|
||||
align-center
|
||||
finish-status="success"
|
||||
>
|
||||
<el-step
|
||||
title="客户下单"
|
||||
:description="orderDetail[0].createTime"
|
||||
:description="orderInfo[0].createTime"
|
||||
></el-step>
|
||||
<el-step
|
||||
title="开始充电"
|
||||
:description="status(orderDetail[0].orderStatus)"
|
||||
:description="status(orderInfo[0].orderStatus)"
|
||||
></el-step>
|
||||
<el-step
|
||||
title="结束充电"
|
||||
:description="orderDetail[0].endTime"
|
||||
:description="orderInfo[0].endTime"
|
||||
></el-step>
|
||||
<el-step title="完成充电" description="充电时长"></el-step>
|
||||
</el-steps>
|
||||
@@ -37,7 +37,7 @@
|
||||
<!-- 订单信息 -->
|
||||
<el-card class="cardStyle">
|
||||
<h3>订单信息</h3>
|
||||
<el-table style="width: 100%" :data="orderDetail" border>
|
||||
<el-table style="width: 100%" :data="orderInfo" border>
|
||||
<el-table-column
|
||||
prop="orderCode"
|
||||
label="订单号"
|
||||
@@ -88,6 +88,34 @@
|
||||
<div class="marginTop"></div>
|
||||
</el-card>
|
||||
|
||||
<!-- 收费明细 -->
|
||||
<el-card class="cardStyle">
|
||||
<h3>收费明细</h3>
|
||||
<el-table style="width: 100%" :data="orderDetail" border>
|
||||
<el-table-column prop="totalUsedElectricity" label="总用电量" align="center"/>
|
||||
<el-table-column prop="totalOrderAmount" label="订单总金额" align="center"/>
|
||||
<el-table-column prop="totalElectricityAmount" label="电费总金额" align="center"/>
|
||||
<el-table-column prop="totalServiceAmount" label="服务费总金额" align="center"/>
|
||||
|
||||
<el-table-column prop="sharpUsedElectricity" label="尖时段用电量" align="center"/>
|
||||
<el-table-column prop="sharpElectricityPrice" label="尖时段电费单价" align="center"/>
|
||||
<el-table-column prop="sharpServicePrice" label="尖时段服务费单价" align="center"/>
|
||||
|
||||
<el-table-column prop="peakUsedElectricity" label="峰时段用电量" align="center"/>
|
||||
<el-table-column prop="peakElectricityPrice" label="峰时段电费单价" align="center"/>
|
||||
<el-table-column prop="peakServicePrice" label="峰时段服务费单价" align="center"/>
|
||||
|
||||
<el-table-column prop="flatUsedElectricity" label="平时段用电量" align="center"/>
|
||||
<el-table-column prop="flatElectricityPrice" label="平时段电费单价" align="center"/>
|
||||
<el-table-column prop="flatServicePrice" label="平时段服务费单价" align="center"/>
|
||||
|
||||
<el-table-column prop="valleyUsedElectricity" label="谷时段用电量" align="center"/>
|
||||
<el-table-column prop="valleyElectricityPrice" label="谷时段电费单价" align="center"/>
|
||||
<el-table-column prop="valleyServicePrice" label="谷时段服务费单价" align="center"/>
|
||||
</el-table>
|
||||
<div class="marginTop"></div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="cardStyle">
|
||||
<h3>实时订单数据</h3>
|
||||
<el-table style="width: 100%" :data="orderRealTimeInfo" border>
|
||||
@@ -246,7 +274,7 @@
|
||||
<el-card
|
||||
class="cardStyle"
|
||||
v-if="
|
||||
orderDetail[0].orderStatus === '1' || orderDetail[0].orderStatus === '6'
|
||||
orderInfo[0].orderStatus === '1' || orderInfo[0].orderStatus === '6'
|
||||
"
|
||||
>
|
||||
<div class="marginTop"></div>
|
||||
@@ -264,10 +292,11 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
orderList: this.$route.params.orderCode,
|
||||
orderDetail: [],
|
||||
orderInfo: [],
|
||||
payDetail: [],
|
||||
userInfo: [],
|
||||
obj: {},
|
||||
orderDetail:[],
|
||||
pileIn: [],
|
||||
orderRealTimeInfo: null,
|
||||
};
|
||||
@@ -282,8 +311,8 @@ export default {
|
||||
const { data } = await getOrder(this.orderList);
|
||||
console.log("getOrder", data);
|
||||
this.obj = data;
|
||||
this.orderDetail = [data.orderInfo];
|
||||
console.log("this.orderDetail", this.orderDetail);
|
||||
this.orderInfo = [data.orderInfo];
|
||||
console.log("this.orderInfo", this.orderDetail);
|
||||
this.payDetail = data.payRecordList;
|
||||
console.log("this.payDetail", this.payDetail);
|
||||
this.userInfo = [data.memberInfo];
|
||||
@@ -291,6 +320,7 @@ export default {
|
||||
this.pileIn = [data.pileInfo];
|
||||
console.log("this.pileIn", this.pileIn);
|
||||
this.orderRealTimeInfo = [data.orderRealTimeInfo];
|
||||
this.orderDetail = [data.orderDetail];
|
||||
},
|
||||
status(e) {
|
||||
let arr = [
|
||||
|
||||
Reference in New Issue
Block a user