1 package com.foxinmy.weixin4j.pay.payment.mch;
2
3 import com.alibaba.fastjson.annotation.JSONField;
4 import com.foxinmy.weixin4j.type.CurrencyType;
5 import com.foxinmy.weixin4j.util.DateUtil;
6
7 import javax.xml.bind.annotation.XmlElement;
8 import java.util.Date;
9
10
11
12
13
14
15
16
17
18
19 public class SettlementRecord extends MerchantResult {
20
21 private static final long serialVersionUID = 7952659545609519979L;
22
23
24
25
26 @XmlElement(name = "fbatchno")
27 @JSONField(name = "fbatchno")
28 private String batchNo;
29
30
31
32 @XmlElement(name = "date_settlement")
33 @JSONField(name = "date_settlement")
34 private String settleDate;
35
36
37
38 @XmlElement(name = "date_start")
39 @JSONField(name = "date_start")
40 private String startDate;
41
42
43
44 @XmlElement(name = "date_end")
45 @JSONField(name = "date_end")
46 private String endDate;
47
48
49
50 @XmlElement(name = "transaction_id")
51 @JSONField(name = "transaction_id")
52 private int settleFee;
53
54
55
56 @XmlElement(name = "unsettlement_fee")
57 @JSONField(name = "unsettlement_fee")
58 private int unSettleFee;
59
60
61
62 @XmlElement(name = "settlementfee_type")
63 @JSONField(name = "settlementfee_type")
64 private String settleFeeType;
65
66
67
68 @XmlElement(name = "pay_fee")
69 @JSONField(name = "pay_fee")
70 private int payFee;
71
72
73
74 @XmlElement(name = "refund_fee")
75 @JSONField(name = "refund_fee")
76 private int refundFee;
77
78
79
80 @XmlElement(name = "pay_net_fee")
81 @JSONField(name = "pay_net_fee")
82 private int payNetFee;
83
84
85
86 @XmlElement(name = "poundage_fee")
87 @JSONField(name = "poundage_fee")
88 private int poundageFee;
89
90 protected SettlementRecord() {
91
92 }
93
94 public String getBatchNo() {
95 return batchNo;
96 }
97
98 public void setBatchNo(String batchNo) {
99 this.batchNo = batchNo;
100 }
101
102 public String getSettleDate() {
103 return settleDate;
104 }
105
106 @JSONField(serialize = false)
107 public Date getFormatSettleDate() {
108 return DateUtil.parse2yyyyMMddHHmmss(settleDate);
109 }
110
111 public void setSettleDate(String settleDate) {
112 this.settleDate = settleDate;
113 }
114
115 public String getStartDate() {
116 return startDate;
117 }
118
119 @JSONField(serialize = false)
120 public Date getFormatStartDate() {
121 return DateUtil.parse2yyyyMMddHHmmss(startDate);
122 }
123
124 public void setStartDate(String startDate) {
125 this.startDate = startDate;
126 }
127
128 public String getEndDate() {
129 return endDate;
130 }
131
132 @JSONField(serialize = false)
133 public Date getFormatEndDate() {
134 return DateUtil.parse2yyyyMMddHHmmss(settleDate);
135 }
136
137 public void setEndDate(String endDate) {
138 this.endDate = endDate;
139 }
140
141 public int getSettleFee() {
142 return settleFee;
143 }
144
145
146
147
148
149
150 @JSONField(serialize = false)
151 public double getFormatSettleFee() {
152 return settleFee / 100d;
153 }
154
155 public void setSettleFee(int settleFee) {
156 this.settleFee = settleFee;
157 }
158
159 public int getUnSettleFee() {
160 return unSettleFee;
161 }
162
163
164
165
166
167
168 @JSONField(serialize = false)
169 public double getFormatUnSettleFee() {
170 return unSettleFee / 100d;
171 }
172
173 public void setUnSettleFee(int unSettleFee) {
174 this.unSettleFee = unSettleFee;
175 }
176
177 public String getSettleFeeType() {
178 return settleFeeType;
179 }
180
181 @JSONField(serialize = false)
182 public CurrencyType getFormatSettleFeeType() {
183 return CurrencyType.valueOf(settleFeeType.toUpperCase());
184 }
185
186 public void setSettleFeeType(String settleFeeType) {
187 this.settleFeeType = settleFeeType;
188 }
189
190 public int getPayFee() {
191 return payFee;
192 }
193
194
195
196
197
198
199 @JSONField(serialize = false)
200 public double getFormatPayFee() {
201 return payFee / 100d;
202 }
203
204 public void setPayFee(int payFee) {
205 this.payFee = payFee;
206 }
207
208 public int getRefundFee() {
209 return refundFee;
210 }
211
212
213
214
215
216
217 @JSONField(serialize = false)
218 public double getFormatRefundFee() {
219 return refundFee / 100d;
220 }
221
222 public void setRefundFee(int refundFee) {
223 this.refundFee = refundFee;
224 }
225
226 public int getPayNetFee() {
227 return payNetFee;
228 }
229
230 public void setPayNetFee(int payNetFee) {
231 this.payNetFee = payNetFee;
232 }
233
234
235
236
237
238
239 @JSONField(serialize = false)
240 public double getFormatPayNetFee() {
241 return payNetFee / 100d;
242 }
243
244 public int getPoundageFee() {
245 return poundageFee;
246 }
247
248
249
250
251
252
253 @JSONField(serialize = false)
254 public double getFormatPoundageFee() {
255 return poundageFee / 100d;
256 }
257
258 public void setPoundageFee(int poundageFee) {
259 this.poundageFee = poundageFee;
260 }
261
262 @Override
263 public String toString() {
264 return "SettlementRecord [batchNo=" + batchNo + ", settleDate="
265 + settleDate + ", startDate=" + startDate + ", endDate="
266 + endDate + ", settleFee=" + settleFee + ", unSettleFee="
267 + unSettleFee + ", settleFeeType=" + settleFeeType
268 + ", payFee=" + payFee + ", refundFee=" + refundFee
269 + ", payNetFee=" + payNetFee + ", poundageFee=" + poundageFee
270 + ", " + super.toString() + "]";
271 }
272 }