|
|
|
|
@ -113,10 +113,23 @@ class PersonService
|
|
|
|
|
|
|
|
|
|
$cha = DB::select("SELECT a.*,b.sex,b.tel,b.status,c.org_name from appointment_record as a INNER JOIN
|
|
|
|
|
persons as b on a.person_id=b.id INNER JOIN medical_institution as c on a.org_id=c.id where a.id_card_num=?
|
|
|
|
|
and a.status=1",[$arr['id_num']]);
|
|
|
|
|
and a.status in (1,2) and is_del=0",[$arr['id_num']]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(count($cha)>0){
|
|
|
|
|
//HSM解密
|
|
|
|
|
$HSM_tel =\App\Lib\HSM::HsmDecrypt($cha[0]->tel);
|
|
|
|
|
if($HSM_sfz['status']!=true){
|
|
|
|
|
return \Yz::echoError1('调用HSM解密失败');
|
|
|
|
|
}
|
|
|
|
|
$cha[0]->tel=$HSM_tel['data'];
|
|
|
|
|
|
|
|
|
|
$HSM_sfz =\App\Lib\HSM::HsmDecrypt($cha[0]->id_card_num);
|
|
|
|
|
if($HSM_sfz['status']!=true){
|
|
|
|
|
return \Yz::echoError1('调用HSM解密失败');
|
|
|
|
|
}
|
|
|
|
|
$cha[0]->id_card_num=$HSM_sfz['data'];
|
|
|
|
|
|
|
|
|
|
$cha[0]->bind_check_type=null;
|
|
|
|
|
$cha[0]->bind_unit_id=null;
|
|
|
|
|
$cha[0]->bind_group_id=null;
|
|
|
|
|
@ -133,7 +146,7 @@ class PersonService
|
|
|
|
|
$cha_img =DB::table('appointment_img')->where('appointment_record_id',$cha[0]->id)->get();
|
|
|
|
|
//env('APP_URL')
|
|
|
|
|
foreach ($cha_img as $key=>$item){
|
|
|
|
|
$cha_img[$key]->imgurl=env('APP_URL').$item->imgurl;
|
|
|
|
|
$cha_img[$key]->imgurl=env('ZHUAN_WANG').$item->imgurl;
|
|
|
|
|
}
|
|
|
|
|
$cha[0]->imgs=$cha_img;
|
|
|
|
|
}
|
|
|
|
|
|