OrderTransactionBean.java
3.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
package com.glsx.usedcar.export;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.glsx.usedcar.export.converter.AuditStateConverter;
import com.glsx.usedcar.export.converter.PaymentTypeConverter;
import com.glsx.usedcar.module.account.entity.Account;
import com.glsx.usedcar.module.finance.entity.OrderTransaction;
import com.glsx.usedcar.module.meta.AuditState;
import com.glsx.usedcar.module.track.entity.ApproveHistory;
import com.glsx.usedcar.module.vehicle.entity.Vehicle;
import lombok.Data;
import org.summerframework.storage.domain.FileInfo;
import java.time.LocalDateTime;
import java.util.List;
@Data
public class OrderTransactionBean {
/**
* TRANSACTION_ID
*/
@ExcelIgnore
private int transactionId;
/**
* 流水号
*/
@ExcelProperty("流水号")
@ColumnWidth(20)
private String transactionCode;
@ExcelProperty("订单编号")
@ColumnWidth(20)
private String orderCode;
@ExcelProperty("付款方姓名")
private String accountName;
@ExcelProperty("手机号")
@ColumnWidth(15)
private String mobile;
@ExcelProperty("车系名字")
@ColumnWidth(15)
private String carSeriesName;
@ExcelProperty("车型名称")
@ColumnWidth(30)
private String carTypeName;
@ExcelProperty("交易说明")
@ColumnWidth(35)
private String transactionDesc;
/**
* 支付凭证
*/
@ExcelIgnore
private List<FileInfo> payVouchers;
@ExcelProperty(value = "审核状态", converter = AuditStateConverter.class)
private AuditState auditState;
@ExcelProperty("实际到账金额")
@ColumnWidth(15)
private double amount;
@ExcelProperty(value = "支付类型", converter = PaymentTypeConverter.class)
@ColumnWidth(10)
private OrderTransaction.PaymentType paymentType;
@ExcelProperty("审核人姓名账号")
private String userName;
@ExcelProperty("审核人姓名")
private String realName;
@ExcelProperty("审批意见")
@ColumnWidth(30)
private String remark;
@ExcelProperty("审批时间")
@ColumnWidth(20)
private LocalDateTime auditTime;
public OrderTransactionBean(OrderTransaction transaction) {
Account account = transaction.getAuctionOrder().getAccount();
Vehicle vehicle = transaction.getAuctionOrder().getVehicle();
this.transactionId = transaction.getTransactionId();
this.transactionCode = transaction.getTransactionCode();
this.orderCode = transaction.getAuctionOrder().getOrderCode();
this.accountName = account.getAccountName();
this.mobile = account.getMobile();
this.carSeriesName = vehicle.getBaseInfo().getCarSeriesName();
this.carTypeName = vehicle.getBaseInfo().getCarTypeName();
this.transactionDesc = transaction.getTransactionDesc();
this.payVouchers = transaction.getPayVouchers();
this.auditState = transaction.getAuditState();
this.amount = transaction.getAmount();
this.paymentType = transaction.getPaymentType();
}
public void setApproveHistory(ApproveHistory approveHistory) {
if (approveHistory == null) {
return;
}
this.userName = approveHistory.getUser().getUserName();
this.realName = approveHistory.getUser().getRealName();
this.remark = approveHistory.getRemark();
this.auditTime = approveHistory.getCreateTime();
}
}