|
|
|
|
@ -106,7 +106,7 @@ class PersonController extends Controller
|
|
|
|
|
return \Yz::echoError1('调用HSM解密失败');
|
|
|
|
|
}
|
|
|
|
|
$get_info['tj_num'] = $HSM['data'];
|
|
|
|
|
$info=$info->where(['tijian_num'=>$get_info['tj_num']]);
|
|
|
|
|
$info=$info->where(['id'=>$get_info['tj_num']]);
|
|
|
|
|
}else{
|
|
|
|
|
if(!isset($get_info['sfz'])) return \Yz::echoError1('身份证不能为空');
|
|
|
|
|
if(!isset($get_info['tel'])) return \Yz::echoError1('电话不能为空');
|
|
|
|
|
@ -155,17 +155,19 @@ class PersonController extends Controller
|
|
|
|
|
public function GetReportUrl()
|
|
|
|
|
{
|
|
|
|
|
$tijian_num =request('tijian_num');
|
|
|
|
|
$code =request('code');
|
|
|
|
|
//$baseUrl='http://223.71.106.251:82';
|
|
|
|
|
$baseUrl=env('QIANZHI_WAIWANG');
|
|
|
|
|
|
|
|
|
|
$report=DB::table('examination_records')->where(['tijian_num'=>$tijian_num,'is_del'=>0])->first();
|
|
|
|
|
$org=DB::table('medical_institution')->where(['sn'=>$code])->first();
|
|
|
|
|
if(!$org) return \Yz::echoError1('体检机构不存在');
|
|
|
|
|
$report=DB::table('examination_records')->where(['tijian_num'=>$tijian_num,'institution_id'=>$org->id,'is_del'=>0])->first();
|
|
|
|
|
if(!!$report){
|
|
|
|
|
$HSM=\App\Lib\HSM::HsmEncrypt($tijian_num);
|
|
|
|
|
$HSM=\App\Lib\HSM::HsmEncrypt($report->id);
|
|
|
|
|
if($HSM['status']!=true){
|
|
|
|
|
return \Yz::echoError1('调用HSM加密失败');
|
|
|
|
|
}
|
|
|
|
|
$tijian_num=$HSM['data'];
|
|
|
|
|
$url=$baseUrl.'/mh5/#/personReportLogin?lg_type=ewm&tj_num='.$tijian_num;
|
|
|
|
|
$url=$baseUrl.'/mh5/#/personReportLogin?lg_type=ewm&&tj_num='.$tijian_num;
|
|
|
|
|
return \Yz::Return(true,'获取成功',$url);
|
|
|
|
|
}else{
|
|
|
|
|
return \Yz::echoError1('没有此体检号对应的记录');
|
|
|
|
|
|