|
@@ -289,13 +289,12 @@ class FollowUpRecordService extends Service
|
|
|
$visit_time = $this->changeDateToDateMin($time);
|
|
|
|
|
|
$follow_up_record = FollowUpRecord::where('del_time',0)
|
|
|
- ->where('visit_time',$visit_time)
|
|
|
+ ->where('visit_time','>=',$visit_time)
|
|
|
->where('type',$type)
|
|
|
- ->whereRaw("data_id not in (select data_id from follow_up_record where visit_time > $visit_time and del_time = 0)")
|
|
|
->select('data_id')
|
|
|
->get()->toArray();
|
|
|
|
|
|
- return array_values(array_column($follow_up_record,'data_id'));
|
|
|
+ return array_unique(array_column($follow_up_record,'data_id'));
|
|
|
}
|
|
|
|
|
|
public function getVisitDataOfTime($data_id = [], $type = 0){
|