|
@@ -149,7 +149,17 @@ class FollowUpRecordService extends Service
|
|
|
$basic_type = BasicType::whereIn('id',array_unique(array_column($data['data'],'basic_type_id')))
|
|
|
->pluck('title','id')
|
|
|
->toArray();
|
|
|
+ $follow_up_record_id = FollowUpRecordFile::where('del_time',0)
|
|
|
+ ->where('type',FollowUpRecordFile::type_one)
|
|
|
+ ->whereIn('follow_up_record_id',array_column($data['data'],'id'))
|
|
|
+ ->where('file','<>','')
|
|
|
+ ->select('follow_up_record_id')
|
|
|
+ ->get()->toArray();
|
|
|
+ $follow_up_record_id = array_unique(array_column($follow_up_record_id,'follow_up_record_id'));
|
|
|
foreach ($data['data'] as $key => $value){
|
|
|
+ $has_image = 0;
|
|
|
+ if(in_array($value['id'], $follow_up_record_id)) $has_image = 1;
|
|
|
+ $data['data'][$key]['has_image'] = $has_image;
|
|
|
$data['data'][$key]['basic_type_name'] = $basic_type[$value['basic_type_id']] ?? '';
|
|
|
$data['data'][$key]['crt_time'] = $value['crt_time'] ? date("Y-m-d H:i:s",$value['crt_time']): '';
|
|
|
}
|