You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
< ? php
namespace App\Services\Admin\YeWu ;
use Illuminate\Support\Facades\DB ;
class HealthOrganizationService
{
//'type'=>'enable','group'=>$group,'userid'=>$userid
//获取体检机构列表
//如果需要获取可用的列表 需要传参[‘ type’ =>'enable']
//获取全部 [‘ type’ =>'all']
//如果gropid==7 则查询单条
//userid 确认身份
public function GetList ( $arr ){
$result = array ();
if ( $arr [ 'type' ] == 'enable' ){
$s = [ 1 ];
}
if ( $arr [ 'type' ] == 'all' ){
$s = [ 0 , 1 ];
}
if ( $arr [ 'group' ] == 7 ){
$query = DB :: table ( 'medical_institution' ) -> where ([ 'status' => 1 , 'link_user_id' => $arr [ 'userid' ]]) -> get ();
} else {
$query = DB :: table ( 'medical_institution' ) -> whereIn ( 'status' , $s ) -> get ();
}
return \Yz :: Return ( true , 'ok' , $query );
}
}