|
@@ -25,7 +25,7 @@ class FollowUpRecordService extends Service
|
|
|
$model->visit_time = $data['visit_time'];
|
|
|
$model->content = $data['content'];
|
|
|
$model->is_remind = $data['is_remind'] ?? 0;
|
|
|
- $model->result = $data['result'] ?? '';
|
|
|
+ $model->level = $data['level'] ?? 0;
|
|
|
$model->save();
|
|
|
|
|
|
$time = time();
|
|
@@ -72,7 +72,7 @@ class FollowUpRecordService extends Service
|
|
|
$model->content = $data['content'];
|
|
|
$model->is_remind = $data['is_remind'] ?? 0;
|
|
|
$model->crt_id = $user['id'];
|
|
|
- $model->result = $data['result'] ?? '';
|
|
|
+ $model->level = $data['level'] ?? 0;
|
|
|
$model->save();
|
|
|
|
|
|
$time = time();
|
|
@@ -126,11 +126,10 @@ class FollowUpRecordService extends Service
|
|
|
|
|
|
public function followUpRecordList($data,$user){
|
|
|
$model = FollowUpRecord::where('del_time',0)
|
|
|
- ->select('data_id','data_title','basic_type_id','visit_time','id','content','is_remind','crt_time','crt_id','type','result')
|
|
|
+ ->select('data_id','data_title','basic_type_id','visit_time','id','content','is_remind','crt_time','crt_id','type','level')
|
|
|
->orderBy('id','desc');
|
|
|
|
|
|
if(! empty($data['data_id'])) $model->where('data_id',$data['data_id']);
|
|
|
- if(! empty($data['basic_type_id'])) $model->where('basic_type_id', $data['basic_type_id']);
|
|
|
if(! empty($data['crt_id'])) $model->where('crt_id',$data['crt_id']);
|
|
|
if(! empty($data['type'])) $model->where('type',$data['type']);
|
|
|
|
|
@@ -143,9 +142,6 @@ class FollowUpRecordService extends Service
|
|
|
public function organizationData($data) {
|
|
|
if (empty($data['data'])) return $data;
|
|
|
|
|
|
- $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'))
|
|
@@ -157,7 +153,6 @@ class FollowUpRecordService extends Service
|
|
|
$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']): '';
|
|
|
}
|
|
|
return $data;
|