|
|
|
|
@ -40,6 +40,33 @@ class UserPersonController extends Controller
|
|
|
|
|
$relationship = $request->post('relationship');
|
|
|
|
|
$marriage = $request->post('marriage');
|
|
|
|
|
$default = $request->post('default');
|
|
|
|
|
$hospital = $request->post('hospital');
|
|
|
|
|
|
|
|
|
|
$peis = new PEISApiController();
|
|
|
|
|
$res = $peis::Post('体检报告查询', $hospital, [
|
|
|
|
|
"电话号码" => "",
|
|
|
|
|
"证件号码" => $id_number,
|
|
|
|
|
"体检号" => "",
|
|
|
|
|
"包含内部信息"=>true
|
|
|
|
|
]);
|
|
|
|
|
if(isset($res['data']) and count($res['data'])>0){
|
|
|
|
|
if($res['data'][0]['电话号码']<>$phone){
|
|
|
|
|
Yo::error_echo(200099);
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
//获取三方报告
|
|
|
|
|
$sanfang_res = $peis::Post('三方体检报告查询', $hospital, [
|
|
|
|
|
"电话号码" => "",
|
|
|
|
|
"证件号码" => $id_number,
|
|
|
|
|
"报告Id" => ''
|
|
|
|
|
])['data'];
|
|
|
|
|
if(count($sanfang_res)==0){
|
|
|
|
|
Yo::error_echo(200098);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$user_person_default_count = UserPerson::where('user', Login::$info->id)
|
|
|
|
|
->where('del', 2)->where('default', 1)->count();
|
|
|
|
|
if ($user_person_default_count == 0) $default = 1;
|
|
|
|
|
|