CustomerDetailDto.java
4.08 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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
package cn.fw.valhalla.domain.dto;
import cn.fw.valhalla.common.utils.BeanUtils;
import cn.fw.valhalla.domain.db.MemberVehicle;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Objects;
/**
* @author kurisu
*/
@Data
public class CustomerDetailDto {
private Long id;
private Long memberId;
/**
* 车牌号
*/
private String plateNo;
/**
* 车架号
*/
private String frameNo;
/**
* 发动机编号
*/
private String engineNo;
/**
* 行驶证注册日期
*/
private Date regDate;
/**
* 车型代码
*/
private String specCode;
/**
* 品牌id
*/
private Long brandId;
/**
* 品牌名称
*/
private String brandName;
/**
* 车系id
*/
private Long seriesId;
/**
* 车系名称
*/
private String seriesName;
/**
* 车系id
*/
private Long specId;
/**
* 车系名称
*/
private String specName;
/**
* 车辆图片
*/
private String carImage;
/**
* 标签
*/
private String tags;
/**
* 客户星级
*/
private Integer cusLevel;
/**
* 购车日期
*/
private Date buyDate;
/**
* 使用性质 1:非运营 2:运营
*/
private Integer useType;
/**
* 使用地城市代码
*/
private String cityCode;
/**
* 使用地城市名称
*/
private String cityName;
/**
* 车主姓名
*/
private String name;
/**
* 联系人姓名
*/
private String contact;
/**
* 客户性别
*/
private Integer gender;
/**
* 客户出生日期
*/
private Date birthday;
/**
* 联系地址
*/
private String address;
/**
* 纬度
*/
private BigDecimal lat;
/**
* 经度
*/
private BigDecimal lng;
/**
* 工作单位;个人
*/
private String companyName;
/**
* 联系电话
*/
private String mobile;
/**
* 爱好
*/
private String hobby;
/**
* 职业
*/
private String job;
/**
* 号码归属地
*/
private String region;
/**
* 客户类型;1:个人;2:单位
*/
private Integer cusType;
/**
* 组织机构代码
*/
private String idCode;
/**
* 进站次数
*/
private Integer arrivalCount;
/**
* 上次进站时间
*/
private Date arrivalTime;
/**
* 最后一次进站行驶里程
*/
private Integer currentMileage;
/**
* 保险到期时间
*/
private Date insuranceExpires;
/**
* 专属服务顾问id
*/
private Long adviserId;
/**
* 专属服务顾问名称
*/
private String adviserName;
/**
* 档案创建时间
*/
private Date createTime;
/**
* 集团id
*/
private Long groupId;
/**
* 行驶证附件
*/
private String vehicleLicense;
/**
* 所属服务站
*/
private Long shopId;
/**
* 上次进站门店
*/
private Long lastArrivalShop;
/**
* 车价 (分)
*/
private Long buyPrice;
/**
* 档案来源
*/
private Integer source;
/**
* 使用有效
*/
private Boolean yn;
/**
* 是否是贷款客户
*/
private boolean loanCustomer;
/**
* 分期期数
*/
private Integer periods;
/**
* 贷款到期时间
*/
private Date expires;
/**
* 临时的专属顾问关系
*/
private Boolean temporary;
public Long getBuyPrice() {
if (Objects.isNull(buyPrice)) {
return 0L;
}
return buyPrice;
}
public static CustomerDetailDto with(MemberVehicle memberVehicle) {
CustomerDetailDto dto = BeanUtils.copy(memberVehicle, CustomerDetailDto.class);
dto.setUseType(memberVehicle.getUseType().getValue());
dto.setCusType(memberVehicle.getCusType().getValue());
return dto;
}
}