|
@@ -70,7 +70,6 @@ public class ChannelCustomerServiceImpl extends ServiceImpl<ChannelCustomerMappe
|
70
|
70
|
// 保存到访单
|
71
|
71
|
CustomerVisit customerVisit = channelCustomerDTO.getCustomerVisit();
|
72
|
72
|
customerVisit.setBuildingId(customer.getBuildingId());
|
73
|
|
- customerVisit.setName(customer.getName());
|
74
|
73
|
customerVisit.setRecommendPerson(customer.getRecommendPerson());
|
75
|
74
|
TaPerson recommendPerson = taPersonMapper.getById(customer.getRecommendPerson());
|
76
|
75
|
if (null != recommendPerson) {
|
|
@@ -91,7 +90,7 @@ public class ChannelCustomerServiceImpl extends ServiceImpl<ChannelCustomerMappe
|
91
|
90
|
if (null == recommendCustomer) {
|
92
|
91
|
// 进业务客户表
|
93
|
92
|
TaRecommendCustomer taRecommendCustomer = new TaRecommendCustomer();
|
94
|
|
- taRecommendCustomer.setName(customer.getName());
|
|
93
|
+ taRecommendCustomer.setName(customerVisit.getName());
|
95
|
94
|
taRecommendCustomer.setPicture(customer.getPicture());
|
96
|
95
|
taRecommendCustomer.setPhone(customer.getPhone());
|
97
|
96
|
taRecommendCustomer.setSex(customer.getSex());
|
|
@@ -113,6 +112,7 @@ public class ChannelCustomerServiceImpl extends ServiceImpl<ChannelCustomerMappe
|
113
|
112
|
customer.setCustomerId(taRecommendCustomer.getCustomerId());
|
114
|
113
|
customerVisit.setCustomerId(taRecommendCustomer.getCustomerId());
|
115
|
114
|
customer.setVisitDate(LocalDateTime.now());
|
|
115
|
+ customer.setName(customerVisit.getName());
|
116
|
116
|
channelCustomerMapper.updateById(customer);
|
117
|
117
|
}else if (StringUtils.isEmpty(recommendCustomer.getRealtyConsultant()) &&
|
118
|
118
|
(StringUtils.isEmpty(recommendCustomer.getRecommendPerson()) || recommendCustomer.getRecommendPerson().equals(customer.getRecommendPerson()))){
|
|
@@ -122,6 +122,7 @@ public class ChannelCustomerServiceImpl extends ServiceImpl<ChannelCustomerMappe
|
122
|
122
|
customerVisit.setCustomerId(recommendCustomer.getCustomerId());
|
123
|
123
|
customer.setVisitDate(LocalDateTime.now());
|
124
|
124
|
customer.setRealtyConsultant(channelCustomerDTO.getRealtyConsultant());
|
|
125
|
+ customer.setName(customerVisit.getName());
|
125
|
126
|
channelCustomerMapper.updateById(customer);
|
126
|
127
|
// 修改状态为确认到访状态
|
127
|
128
|
recommendCustomer.setRecommendPerson(customer.getRecommendPerson());
|
|
@@ -156,7 +157,6 @@ public class ChannelCustomerServiceImpl extends ServiceImpl<ChannelCustomerMappe
|
156
|
157
|
ChannelCustomer customer = channelCustomerMapper.selectById(params.getId());
|
157
|
158
|
|
158
|
159
|
customerVisit.setBuildingId(customer.getBuildingId());
|
159
|
|
- customerVisit.setName(customer.getName());
|
160
|
160
|
customerVisit.setRecommendPerson(customer.getRecommendPerson());
|
161
|
161
|
TaPerson recommendPerson = taPersonMapper.getById(customer.getRecommendPerson());
|
162
|
162
|
if (null != recommendPerson) {
|
|
@@ -177,7 +177,7 @@ public class ChannelCustomerServiceImpl extends ServiceImpl<ChannelCustomerMappe
|
177
|
177
|
if (null == recommendCustomer) {
|
178
|
178
|
// 进业务客户表
|
179
|
179
|
TaRecommendCustomer taRecommendCustomer = new TaRecommendCustomer();
|
180
|
|
- taRecommendCustomer.setName(customer.getName());
|
|
180
|
+ taRecommendCustomer.setName(customerVisit.getName());
|
181
|
181
|
taRecommendCustomer.setPicture(customer.getPicture());
|
182
|
182
|
taRecommendCustomer.setPhone(customer.getPhone());
|
183
|
183
|
taRecommendCustomer.setSex(customer.getSex());
|
|
@@ -200,6 +200,7 @@ public class ChannelCustomerServiceImpl extends ServiceImpl<ChannelCustomerMappe
|
200
|
200
|
customer.setVisitDate(LocalDateTime.now());
|
201
|
201
|
customer.setCustomerId(taRecommendCustomer.getCustomerId());
|
202
|
202
|
customerVisit.setCustomerId(taRecommendCustomer.getCustomerId());
|
|
203
|
+ customer.setName(customerVisit.getName());
|
203
|
204
|
channelCustomerMapper.updateById(customer);
|
204
|
205
|
}else if (StringUtils.isEmpty(recommendCustomer.getRealtyConsultant()) &&
|
205
|
206
|
(StringUtils.isEmpty(recommendCustomer.getRecommendPerson()) || recommendCustomer.getRecommendPerson().equals(customer.getRecommendPerson()))){
|
|
@@ -208,6 +209,7 @@ public class ChannelCustomerServiceImpl extends ServiceImpl<ChannelCustomerMappe
|
208
|
209
|
customer.setVisitDate(LocalDateTime.now());
|
209
|
210
|
customer.setCustomerId(recommendCustomer.getCustomerId());
|
210
|
211
|
customerVisit.setCustomerId(recommendCustomer.getCustomerId());
|
|
212
|
+ customer.setName(customerVisit.getName());
|
211
|
213
|
channelCustomerMapper.updateById(customer);
|
212
|
214
|
|
213
|
215
|
// 修改状态为确认到访状态
|
|
@@ -216,6 +218,7 @@ public class ChannelCustomerServiceImpl extends ServiceImpl<ChannelCustomerMappe
|
216
|
218
|
recommendCustomer.setStatus(CommConstant.CUSTOMER_VISITE);
|
217
|
219
|
recommendCustomer.setRealtyConsultant(params.getRealtyConsultant());
|
218
|
220
|
recommendCustomer.setCirculationTime(LocalDateTime.now());
|
|
221
|
+ recommendCustomer.setName(customerVisit.getName());
|
219
|
222
|
taRecommendCustomerMapper.updateById(recommendCustomer);
|
220
|
223
|
}
|
221
|
224
|
}else if ("customer".equals(params.getType())) {
|
|
@@ -301,6 +304,7 @@ public class ChannelCustomerServiceImpl extends ServiceImpl<ChannelCustomerMappe
|
301
|
304
|
channelCustomerLambdaQueryWrapper.eq(ChannelCustomer::getCustomerId,params.getCustomerId());
|
302
|
305
|
ChannelCustomer customer = channelCustomerMapper.selectOne(channelCustomerLambdaQueryWrapper);
|
303
|
306
|
customer.setPreparatoryDate(LocalDateTime.now());
|
|
307
|
+ channelCustomerMapper.updateById(customer);
|
304
|
308
|
|
305
|
309
|
CustomerPreparatory customerPreparatory = params.getCustomerPreparatory();
|
306
|
310
|
customerPreparatory.setCreateDate(LocalDateTime.now());
|
|
@@ -324,6 +328,7 @@ public class ChannelCustomerServiceImpl extends ServiceImpl<ChannelCustomerMappe
|
324
|
328
|
channelCustomerLambdaQueryWrapper.eq(ChannelCustomer::getCustomerId,params.getCustomerId());
|
325
|
329
|
ChannelCustomer customer = channelCustomerMapper.selectOne(channelCustomerLambdaQueryWrapper);
|
326
|
330
|
customer.setCommissionDate(LocalDateTime.now());
|
|
331
|
+ channelCustomerMapper.updateById(customer);
|
327
|
332
|
|
328
|
333
|
return ResponseBean.success("审核成功");
|
329
|
334
|
}
|
|
@@ -336,16 +341,19 @@ public class ChannelCustomerServiceImpl extends ServiceImpl<ChannelCustomerMappe
|
336
|
341
|
*/
|
337
|
342
|
@Override
|
338
|
343
|
public ResponseBean signatoryCustomer(MarkingSignatoryCustomerDTO params) {
|
|
344
|
+ CustomerSignatory customerSignatory = params.getCustomerSignatory();
|
339
|
345
|
TaRecommendCustomer taRecommendCustomer = taRecommendCustomerMapper.selectById(params.getCustomerId());
|
340
|
346
|
taRecommendCustomer.setStatus(CommConstant.CUSTOMER_SIGNED);
|
|
347
|
+ taRecommendCustomer.setRealtyConsultant(customerSignatory.getRealtyConsultant());
|
341
|
348
|
taRecommendCustomerMapper.updateById(taRecommendCustomer);
|
342
|
349
|
|
343
|
350
|
LambdaQueryWrapper<ChannelCustomer> channelCustomerLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
344
|
351
|
channelCustomerLambdaQueryWrapper.eq(ChannelCustomer::getCustomerId,params.getCustomerId());
|
345
|
352
|
ChannelCustomer customer = channelCustomerMapper.selectOne(channelCustomerLambdaQueryWrapper);
|
346
|
353
|
customer.setSignedDate(LocalDateTime.now());
|
|
354
|
+ customer.setRealtyConsultant(customerSignatory.getRealtyConsultant());
|
|
355
|
+ channelCustomerMapper.updateById(customer);
|
347
|
356
|
|
348
|
|
- CustomerSignatory customerSignatory = params.getCustomerSignatory();
|
349
|
357
|
customerSignatory.setCreateDate(LocalDateTime.now());
|
350
|
358
|
customerSignatoryMapper.insert(customerSignatory);
|
351
|
359
|
return ResponseBean.success("审核成功");
|