diff --git a/Laravel/app/Http/Controllers/API/WeiHu/TiJianListController.php b/Laravel/app/Http/Controllers/API/WeiHu/TiJianListController.php index c9ba48e..74fe6ac 100644 --- a/Laravel/app/Http/Controllers/API/WeiHu/TiJianListController.php +++ b/Laravel/app/Http/Controllers/API/WeiHu/TiJianListController.php @@ -40,11 +40,12 @@ class TiJianListController }; // 预约记录查询 - $yuyue_list = DB::table('appointment_record') - ->select('id', 'type', 'name', 'id_card_num', 'org_name', 'created_at') + $yuyue_list = DB::table('appointment_record as a') + ->leftJoin('medical_institution as b', 'a.org_code', '=', 'b.sn') + ->select('a.id', 'a.type', 'a.name', 'a.id_card_num', 'b.org_name', 'a.created_at') ->where($searchCondition) - ->where('is_del', 0) - ->orderBy('id', 'desc') + ->where('a.is_del', 0) + ->orderBy('a.id', 'desc') ->get() ->map(function ($value) { return (array)$value;