|
@@ -24,6 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
24
|
24
|
import org.springframework.web.bind.annotation.*;
|
25
|
25
|
|
26
|
26
|
import javax.servlet.http.HttpServletRequest;
|
|
27
|
+import java.time.LocalDateTime;
|
27
|
28
|
import java.util.List;
|
28
|
29
|
|
29
|
30
|
/**
|
|
@@ -48,6 +49,9 @@ public class TaMainUsherRecordController extends BaseController {
|
48
|
49
|
|
49
|
50
|
@Autowired
|
50
|
51
|
private ITaPersonService iTaPersonService;
|
|
52
|
+
|
|
53
|
+ @Autowired
|
|
54
|
+ private ITaCustomerService taCustomerService;
|
51
|
55
|
|
52
|
56
|
/**
|
53
|
57
|
* 保存对象
|
|
@@ -189,6 +193,16 @@ public class TaMainUsherRecordController extends BaseController {
|
189
|
193
|
query.orderByDesc("visite_date");
|
190
|
194
|
query.last("limit 1");
|
191
|
195
|
rec.setLastRecord(iTaMainUsherRecordService.getOne(query));
|
|
196
|
+ TaCustomer taCustomer = taCustomerService.getByPhoneOrPlate(rec.getPhone(),rec.getPlateNumber());
|
|
197
|
+ if (null != taCustomer){
|
|
198
|
+ if (DateUtils.sameDay(taCustomer.getCreateDate(), LocalDateTime.now())){
|
|
199
|
+ rec.setNewCustomer(true);
|
|
200
|
+ }else {
|
|
201
|
+ rec.setNewCustomer(false);
|
|
202
|
+ }
|
|
203
|
+ }else {
|
|
204
|
+ rec.setNewCustomer(true);
|
|
205
|
+ }
|
192
|
206
|
}
|
193
|
207
|
|
194
|
208
|
// if (onlyNew) {
|