<?php

namespace App\Http\Controllers\API\Admin\YeWu;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Services\Admin\YeWu\HealthOrganizationService;

class HealthOrganizationController extends Controller
{
    //获取可用的体检机构
    public function GetEnableList(Request $request){
        $s_group=[1,7,8];
        $userid = $request->get('userid');//中间件产生的参数
        $group = $request->get('role');//中间件产生的参数
        if(!in_array($group,$s_group) ) return \Yz::echoError('无此接口访问权限');

        $s=app()->make(HealthOrganizationService::class);
        return  $s->GetList(['type'=>'enable','group'=>$group,'userid'=>$userid]);

    }
}
