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.
45 lines
1.5 KiB
PHP
45 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\API\mH5;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use Illuminate\Http\Request;
|
|
use App\Services\mH5\OrganizationService;
|
|
|
|
class OrganizationController extends Controller
|
|
{
|
|
//获取正常状态的体检机构
|
|
public function GetEnableList(){
|
|
$yuyue_type=request('yuyue_type');
|
|
$s=app()->make(OrganizationService::class);
|
|
return $s->GetList(['type'=>'enable','yuyue_type'=>$yuyue_type]);
|
|
}
|
|
//获取单独体检机构可预约日历时间表
|
|
public function GetEnableCalendar(){
|
|
$org_id=request('org_id');
|
|
$institutionalId =request('id'); //机构id
|
|
$s=app()->make(OrganizationService::class);
|
|
return $s->GetCalendar(['type'=>'enable','institutionalId'=>$institutionalId,'org_id'=>$org_id]);
|
|
}
|
|
|
|
//开始预约
|
|
public function StartYuYue(Request $request){
|
|
$openid = $request->get('userid');//中间件产生的参数
|
|
$group = $request->get('role');//中间件产生的参数
|
|
$subinfo=request('subinfo');
|
|
if(isset($openid) and isset($subinfo)){
|
|
foreach ($subinfo as $info){
|
|
if(!isset($info)) return \Yz::echoError1("部分参数不完整");
|
|
|
|
}
|
|
$s=app()->make(OrganizationService::class);
|
|
$type=1;//1 健康证体检 2老年人体检
|
|
return $s->StartYuYue(['openid'=>$openid,'group'=>$group,'info'=>$subinfo],$type);
|
|
}else{
|
|
return \Yz::echoError1("参数不完整");
|
|
}
|
|
|
|
}
|
|
|
|
}
|