|
@@ -123,6 +123,14 @@ class CustomService
|
|
|
$query->whereBetween('created_at', $createdDate);
|
|
|
}];
|
|
|
}
|
|
|
+ if (!empty($params['check_date'])) {
|
|
|
+ $checkDate = $params['check_date'];
|
|
|
+ $checkDate[0] = strtotime($checkDate[0].' 00:00:00');
|
|
|
+ $checkDate[1] = strtotime($checkDate[1].' 23:59:59');
|
|
|
+ $where[] = [function($query) use ($checkDate) {
|
|
|
+ $query->whereBetween('check_time', $checkDate)->where('current_status', '>', 1);
|
|
|
+ }];
|
|
|
+ }
|
|
|
|
|
|
if (!empty($params['current_status'])) {
|
|
|
$currentStatus = $params['current_status'];
|
|
@@ -1093,7 +1101,8 @@ class CustomService
|
|
|
'consultant_name' => $consultantKeys[$item->consultant_id]['name'] ?? '', //健康顾问
|
|
|
'team_name' => TeamService::getTeamName($teamKeys, $item->dept_id), //所属团队
|
|
|
'current_status' => $currentStatusText, //当前状态
|
|
|
- 'visit_time' => $item->visit_time, //到访时间
|
|
|
+ 'visit_time' => $item->visit_time, //最后一次跟进时间
|
|
|
+ 'check_time' => $item->current_status > 1 ? $item->check_time : '', //首次到访时间
|
|
|
"age_range" => $ageRangeText, //年龄区间
|
|
|
"level" => $levelText, //客户等级
|
|
|
"region" => $regionText, //所在区域
|