mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-11 10:49:52 +08:00
转换订单状态描述
This commit is contained in:
@@ -14,7 +14,6 @@ import com.jsowell.common.enums.MemberWalletEnum;
|
|||||||
import com.jsowell.common.enums.ykc.ActionTypeEnum;
|
import com.jsowell.common.enums.ykc.ActionTypeEnum;
|
||||||
import com.jsowell.common.enums.ykc.OrderPayModeEnum;
|
import com.jsowell.common.enums.ykc.OrderPayModeEnum;
|
||||||
import com.jsowell.common.enums.ykc.OrderPayRecordEnum;
|
import com.jsowell.common.enums.ykc.OrderPayRecordEnum;
|
||||||
import com.jsowell.common.enums.ykc.OrderPayStatusEnum;
|
|
||||||
import com.jsowell.common.enums.ykc.OrderStatusEnum;
|
import com.jsowell.common.enums.ykc.OrderStatusEnum;
|
||||||
import com.jsowell.common.enums.ykc.PayModeEnum;
|
import com.jsowell.common.enums.ykc.PayModeEnum;
|
||||||
import com.jsowell.common.enums.ykc.PileConnectorDataBaseStatusEnum;
|
import com.jsowell.common.enums.ykc.PileConnectorDataBaseStatusEnum;
|
||||||
@@ -727,20 +726,7 @@ public class OrderService {
|
|||||||
vo.setPayAmount(String.valueOf(orderBasicInfo.getPayAmount()));
|
vo.setPayAmount(String.valueOf(orderBasicInfo.getPayAmount()));
|
||||||
|
|
||||||
// 订单状态描述
|
// 订单状态描述
|
||||||
String orderStatusDescribe;
|
String orderStatusDescribe = orderBasicInfoService.transformOrderStatusDescribe(orderStatus, orderBasicInfo.getPayStatus());
|
||||||
if (StringUtils.equals(orderStatus, OrderStatusEnum.NOT_START.getValue())) {
|
|
||||||
// 未启动还有两种情况 待支付 / 支付成功
|
|
||||||
String payStatus = orderBasicInfo.getPayStatus();
|
|
||||||
if (StringUtils.equals(payStatus, OrderPayStatusEnum.paid.getValue())) {
|
|
||||||
// 支付成功,未启动
|
|
||||||
orderStatusDescribe = OrderPayStatusEnum.paid.getLabel() + ", " + OrderStatusEnum.getOrderStatus(orderStatus);
|
|
||||||
} else {
|
|
||||||
// 待支付
|
|
||||||
orderStatusDescribe = OrderPayStatusEnum.unpaid.getLabel();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
orderStatusDescribe = OrderStatusEnum.getOrderStatus(orderStatus);
|
|
||||||
}
|
|
||||||
vo.setOrderStatusDescribe(orderStatusDescribe);
|
vo.setOrderStatusDescribe(orderStatusDescribe);
|
||||||
|
|
||||||
// 获取充电桩枪口信息
|
// 获取充电桩枪口信息
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import com.jsowell.common.core.controller.BaseController;
|
|||||||
import com.jsowell.common.core.domain.AjaxResult;
|
import com.jsowell.common.core.domain.AjaxResult;
|
||||||
import com.jsowell.common.core.page.TableDataInfo;
|
import com.jsowell.common.core.page.TableDataInfo;
|
||||||
import com.jsowell.common.enums.BusinessType;
|
import com.jsowell.common.enums.BusinessType;
|
||||||
import com.jsowell.common.response.RestApiResponse;
|
|
||||||
import com.jsowell.common.util.poi.ExcelUtil;
|
import com.jsowell.common.util.poi.ExcelUtil;
|
||||||
import com.jsowell.pile.domain.OrderBasicInfo;
|
import com.jsowell.pile.domain.OrderBasicInfo;
|
||||||
import com.jsowell.pile.dto.QueryOrderDTO;
|
import com.jsowell.pile.dto.QueryOrderDTO;
|
||||||
@@ -74,7 +73,7 @@ public class OrderBasicInfoController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取订单详细信息
|
* 获取订单详细信息 后管订单详情页
|
||||||
* http://localhost:8080/order/orderDetail/88000000000001012211161342359448
|
* http://localhost:8080/order/orderDetail/88000000000001012211161342359448
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('order:order:query')")
|
@PreAuthorize("@ss.hasPermi('order:order:query')")
|
||||||
|
|||||||
@@ -159,6 +159,14 @@ public interface IOrderBasicInfoService {
|
|||||||
*/
|
*/
|
||||||
void updateOrderStatusById(List<String> orderIds, String orderStatus);
|
void updateOrderStatusById(List<String> orderIds, String orderStatus);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过订单状态和支付状态 转换订单状态描述
|
||||||
|
* @param orderStatus 订单状态
|
||||||
|
* @param payStatus 支付状态
|
||||||
|
* @return 订单状态描述
|
||||||
|
*/
|
||||||
|
String transformOrderStatusDescribe(String orderStatus, String payStatus);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询时间段内订单总金额和总用电量
|
* 查询时间段内订单总金额和总用电量
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -179,10 +179,23 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
|||||||
orderListVO.setOutTradeNo(wxpayCallbackRecord.getOutTradeNo());
|
orderListVO.setOutTradeNo(wxpayCallbackRecord.getOutTradeNo());
|
||||||
}
|
}
|
||||||
orderListVO.setPileConnectorCode(orderListVO.getPileSn() + orderListVO.getConnectorCode());
|
orderListVO.setPileConnectorCode(orderListVO.getPileSn() + orderListVO.getConnectorCode());
|
||||||
|
orderListVO.setOrderStatusDescribe(transformOrderStatusDescribe(orderListVO.getOrderStatus(), orderListVO.getPayStatus()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return orderListVOS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过订单状态和支付状态 转换订单状态描述
|
||||||
|
* @param orderStatus
|
||||||
|
* @param payStatus
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String transformOrderStatusDescribe(String orderStatus, String payStatus) {
|
||||||
// 订单状态描述
|
// 订单状态描述
|
||||||
String orderStatus = orderListVO.getOrderStatus(); // 订单状态
|
// String orderStatus = orderListVO.getOrderStatus(); // 订单状态
|
||||||
String payStatus = orderListVO.getPayStatus(); // 支付状态
|
// String payStatus = orderListVO.getPayStatus(); // 支付状态
|
||||||
String orderStatusDescribe;
|
String orderStatusDescribe;
|
||||||
if (StringUtils.equals(orderStatus, OrderStatusEnum.NOT_START.getValue())) {
|
if (StringUtils.equals(orderStatus, OrderStatusEnum.NOT_START.getValue())) {
|
||||||
// 未启动还有两种情况 待支付 / 支付成功
|
// 未启动还有两种情况 待支付 / 支付成功
|
||||||
@@ -196,10 +209,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
|||||||
} else {
|
} else {
|
||||||
orderStatusDescribe = OrderStatusEnum.getOrderStatus(orderStatus);
|
orderStatusDescribe = OrderStatusEnum.getOrderStatus(orderStatus);
|
||||||
}
|
}
|
||||||
orderListVO.setOrderStatusDescribe(orderStatusDescribe);
|
return orderStatusDescribe;
|
||||||
}
|
|
||||||
}
|
|
||||||
return orderListVOS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ public class OrderDetailInfoVO {
|
|||||||
public static class OrderInfo {
|
public static class OrderInfo {
|
||||||
private String orderCode; // 订单编号
|
private String orderCode; // 订单编号
|
||||||
private String orderStatus; // 订单状态
|
private String orderStatus; // 订单状态
|
||||||
|
private String orderStatusDescribe; // 订单状态描述
|
||||||
private String startTime; // 充电开始时间
|
private String startTime; // 充电开始时间
|
||||||
private String endTime; // 充电结束时间
|
private String endTime; // 充电结束时间
|
||||||
private String stopReasonMsg; // 停止原因
|
private String stopReasonMsg; // 停止原因
|
||||||
|
|||||||
@@ -54,11 +54,6 @@
|
|||||||
<span>{{ status(scope.row.orderStatus) }}</span>
|
<span>{{ status(scope.row.orderStatus) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column-->
|
|
||||||
<!-- prop="orderAmount"-->
|
|
||||||
<!-- label="订单金额"-->
|
|
||||||
<!-- align="center"-->
|
|
||||||
<!-- ></el-table-column>-->
|
|
||||||
<el-table-column prop="createTime" label="创建时间" align="center"/>
|
<el-table-column prop="createTime" label="创建时间" align="center"/>
|
||||||
<el-table-column prop="startTime" label="开始时间" align="center"/>
|
<el-table-column prop="startTime" label="开始时间" align="center"/>
|
||||||
<el-table-column prop="endTime" label="结束时间" align="center"/>
|
<el-table-column prop="endTime" label="结束时间" align="center"/>
|
||||||
@@ -121,8 +116,6 @@
|
|||||||
<div class="marginTop"></div>
|
<div class="marginTop"></div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 支付信息-->
|
<!-- 支付信息-->
|
||||||
<el-card class="cardStyle">
|
<el-card class="cardStyle">
|
||||||
<h3>支付信息</h3>
|
<h3>支付信息</h3>
|
||||||
@@ -142,26 +135,6 @@
|
|||||||
<div class="marginTop"></div>
|
<div class="marginTop"></div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<!-- -->
|
|
||||||
<!-- <el-card class="cardStyle">
|
|
||||||
<h3>消费信息</h3>
|
|
||||||
<el-table style="width: 100%" :data="payDetail" border>
|
|
||||||
<el-table-column prop="payAmount" label="支付金额" align="center"></el-table-column>
|
|
||||||
<el-table-column prop="payModeDesc" label="支付方式" align="center"></el-table-column>
|
|
||||||
<el-table-column prop="payStatus" label="支付状态" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{scope.row.payStatus === '1' ? '支付完成' :'待支付'}}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="payTime" label="支付时间" align="center"></el-table-column>
|
|
||||||
<el-table-column prop="outTradeNo" label="商务单号" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{scope.row.outTradeNo === null ? '一' :scope.row.outTradeNo}}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<div class="marginTop"></div>
|
|
||||||
</el-card> -->
|
|
||||||
<!-- 设备信息 -->
|
<!-- 设备信息 -->
|
||||||
<el-card class="cardStyle">
|
<el-card class="cardStyle">
|
||||||
<h3>设备信息</h3>
|
<h3>设备信息</h3>
|
||||||
@@ -174,6 +147,7 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
<div class="marginTop"></div>
|
<div class="marginTop"></div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<!-- 用户信息 -->
|
<!-- 用户信息 -->
|
||||||
<el-card class="cardStyle">
|
<el-card class="cardStyle">
|
||||||
<h3>用户信息</h3>
|
<h3>用户信息</h3>
|
||||||
|
|||||||
Reference in New Issue
Block a user