Commit b6c33969133bc3dd8f5dc6f4a1174d33079a7e47
Merge remote-tracking branch 'origin/dev' into test
Showing
1 changed file
with
9 additions
and
2 deletions
fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/cust/AbstractCustomerService.java
... | ... | @@ -205,9 +205,10 @@ public abstract class AbstractCustomerService { |
205 | 205 | protected Long create(Customer customer, CustomerBaseInfo baseInfo) { |
206 | 206 | final SpecDTO spec = oopService.spec(customer.getSpecId()); |
207 | 207 | customer.setCarImage(Optional.ofNullable(spec).orElse(new SpecDTO()).getThumbnail()); |
208 | + final String plateNo = customer.getPlateNo(); | |
208 | 209 | final int count = customerService.count(Wrappers.<Customer>lambdaQuery() |
209 | 210 | .eq(Customer::getYn, Boolean.TRUE) |
210 | - .eq(Customer::getPlateNo, customer.getPlateNo()) | |
211 | + .eq(Customer::getPlateNo, plateNo) | |
211 | 212 | .eq(Customer::getFrameNo, customer.getFrameNo()) |
212 | 213 | ); |
213 | 214 | BV.isTrue(count == 0, "车辆档案已存在已存在"); |
... | ... | @@ -233,8 +234,14 @@ public abstract class AbstractCustomerService { |
233 | 234 | boolean saved = customerService.save(customer); |
234 | 235 | if (saved) { |
235 | 236 | StammkundePool simpleInfo = createSimpleInfo(customer, customer.getAdviserId()); |
236 | - simpleInfo.setSources(StammkundeSourcesEnum.RECEPTION); | |
237 | + if (plateNo.contains("临")) { | |
238 | + simpleInfo.setSources(StammkundeSourcesEnum.ORDER); | |
239 | + } else { | |
240 | + simpleInfo.setSources(StammkundeSourcesEnum.RECEPTION); | |
241 | + } | |
237 | 242 | simpleInfo.setPoolStatus(StammkundeStatusEnum.KUNDE); |
243 | + simpleInfo.setAktiv(Boolean.TRUE); | |
244 | + simpleInfo.setActivationTime(new Date()); | |
238 | 245 | stammkundePoolService.save(simpleInfo); |
239 | 246 | final CustomerInfoDto customerInfoDto = new CustomerInfoDto(); |
240 | 247 | BeanUtils.copyProperties(customer, customerInfoDto); | ... | ... |