AuctionOrderBean.java
5.2 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
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.AuctionOrderStateConverter;
import com.glsx.usedcar.export.converter.BooleanConverter;
import com.glsx.usedcar.module.account.entity.Account;
import com.glsx.usedcar.module.auction.entity.Auction;
import com.glsx.usedcar.module.auction.entity.AuctionOrder;
import com.glsx.usedcar.module.auction.entity.Contract;
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 AuctionOrderBean {
@ExcelIgnore
private int orderId;
@ExcelProperty("订单编号")
@ColumnWidth(20)
private String orderCode;
@ExcelProperty("场次名称")
private String auctionName;
@ExcelProperty("中拍人姓名")
private String accountName;
@ExcelProperty("中拍人电话")
private String mobile;
@ExcelProperty("车源号")
@ColumnWidth(30)
private String sourceNo;
@ExcelProperty("车系名字")
@ColumnWidth(15)
private String carSeriesName;
@ExcelProperty("车型名称")
@ColumnWidth(30)
private String carTypeName;
@ExcelProperty("原车牌号")
private String licensePlate;
@ExcelProperty("所属门店")
@ColumnWidth(30)
private String venueName;
@ExcelIgnore
@ExcelProperty("机动车登记证书")
private List<FileInfo> registrationCertificate;
@ExcelIgnore
@ExcelProperty("新的机动车行驶证")
private List<FileInfo> vehicleLicense;
@ExcelProperty("成交价")
private double orderPrice;
@ExcelProperty("佣金")
private double commissionPrice;
@ExcelProperty("买家应付车款")
private double totalPrice;
@ExcelIgnore
@ExcelProperty("支付凭证")
private List<FileInfo> payVouchers;
@ExcelIgnore
@ExcelProperty(value = "是否结算", converter = BooleanConverter.class)
private boolean settlement;
/**
* 拍卖合同
*/
@ExcelIgnore
private Contract contract;
/**
* 交付合同
*/
@ExcelIgnore
private Contract deliveryContract;
// @ExcelProperty(value = "审核状态", converter = AuditStateConverter.class)
// private AuditState auditState;
@ExcelProperty(value = "订单状态", converter = AuctionOrderStateConverter.class)
private AuctionOrder.OrderState orderState;
@ExcelProperty("负责人")
private String realName;
@ExcelProperty("新车牌号")
private String newPlateNumber;
@ExcelProperty("过户时间")
private LocalDateTime transferredTime;
@ExcelProperty("中拍时间")
private LocalDateTime createTime;
@ExcelProperty("订单更新时间")
private LocalDateTime updateTime;
@ExcelProperty(value = "是否在申诉中", converter = BooleanConverter.class)
private boolean onAppeal;
@ExcelProperty("优惠券名称")
private String couponName;
@ExcelProperty("优惠券抵扣金额")
private String couponDeductionAmount;
public AuctionOrderBean(AuctionOrder auctionOrder) {
Account account = auctionOrder.getAccount();
Vehicle vehicle = auctionOrder.getVehicle();
Auction auction = auctionOrder.getAuction();
this.orderId = auctionOrder.getOrderId();
this.orderCode = auctionOrder.getOrderCode();
this.auctionName = auction.getAuctionName();
this.accountName = account.getAccountName();
this.mobile = account.getMobile();
this.sourceNo = vehicle.getBaseInfo().getSourceNo();
this.carSeriesName = vehicle.getBaseInfo().getCarSeriesName();
this.carTypeName = vehicle.getBaseInfo().getCarTypeName();
this.newPlateNumber = auctionOrder.getNewPlateNumber();
this.registrationCertificate = auctionOrder.getRegistrationCertificate();
this.vehicleLicense = auctionOrder.getVehicleLicense();
this.orderPrice = auctionOrder.getOrderPrice();
this.commissionPrice = auctionOrder.getCommissionPrice();
this.payVouchers = auctionOrder.getPayVouchers();
this.settlement = auctionOrder.isSettlement();
this.contract = auctionOrder.getContract();
this.deliveryContract = auctionOrder.getDeliveryContract();
this.orderState = auctionOrder.getOrderState();
this.transferredTime = auctionOrder.getTransferredTime();
this.onAppeal = auctionOrder.isOnAppeal();
this.couponName = auctionOrder.getCouponName() == null ? "" : auctionOrder.getCouponName();
this.couponDeductionAmount = auctionOrder.getCouponDeduction() == null ? "" : String.valueOf(auctionOrder.getCouponDeduction().doubleValue());
this.realName = auction.getUser().getRealName();
this.createTime = auctionOrder.getCreateTime();
this.updateTime = auctionOrder.getUpdateTime();
this.totalPrice = auctionOrder.getOrderPrice() + auctionOrder.getCommissionPrice();
this.licensePlate = vehicle.getBaseInfo().getLicensePlate();
this.venueName = vehicle.getVenue().getVenueName();
}
}