This commit is contained in:
chenbo 2024-02-29 17:58:48 +08:00
parent 3b6d685d39
commit 9a6684ca68

@ -112,7 +112,9 @@ class CostConsultationReportController extends BaseAdminController
return $count > 0 ? 1: 0;
});
$count = $query->count();
$lists = $query->page($page_no, $page_size)->select();
$lists = $query->append(['dept'])->withAttr('dept', function ($value, $data){
return Dept::where('id', $data['depar'])->findOrEmpty()->toArray();
})->page($page_no, $page_size)->select();
return $this->success('成功', compact('count', 'lists', 'page_no', 'page_size'));
}
}