@@ -620,7 +620,9 @@ class ServiceWorkLogic extends BaseLogic
return ServiceWork::where(['master_worker_id'=>$userId,'appoint_approval'=>1])
->field(['id', 'work_sn','real_name','mobile', 'address', 'title', 'appointment_time'])
->order(['appointment_time' => 'asc'])//上门时间排序
- ->select()
+ ->select()->each(function (&$item){
+ $item['last_appointment_time'] = ServiceWorkAppointmentLog::where('work_id',$item['id'])->order('id desc')->value('last_appointment_time');
+ })
->toArray();
}