|
|
|
|
@ -11,13 +11,21 @@ class ItemController extends Controller
|
|
|
|
|
//获取全部自选项目
|
|
|
|
|
public function GetItems()
|
|
|
|
|
{
|
|
|
|
|
$openid= request('openid');
|
|
|
|
|
$person=DB::table('web_users as a') ->leftJoin('web_user_person as b' ,'a.id','=','b.user_id')
|
|
|
|
|
->where(['openid'=>$openid,'b.is_del'=>0,'b.is_default'=>1])
|
|
|
|
|
->first();
|
|
|
|
|
if(!$person) return \Yz::echoError1("就诊人信息不存在");
|
|
|
|
|
//查询所有可以自选的项目
|
|
|
|
|
$items=DB::table('items')->where(['is_choose'=>1,'status'=>1])->get();
|
|
|
|
|
$items=DB::table('items')->where(['is_choose'=>1,'status'=>1])->get();
|
|
|
|
|
$search= request('search');
|
|
|
|
|
$list = [];
|
|
|
|
|
$group_arr = [];
|
|
|
|
|
$group_list = [];
|
|
|
|
|
foreach ($items as $item) {
|
|
|
|
|
if($item->sex <> $person->sex and $item->sex<>0){
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
$push_type = false;
|
|
|
|
|
if ($search == '') {
|
|
|
|
|
$push_type = true;
|
|
|
|
|
|