From c41c65dd61d030ff3d5621e87c57bb4f6691db8d Mon Sep 17 00:00:00 2001 From: yanzai Date: Sat, 27 Jul 2024 10:46:39 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E6=88=90=E4=BA=8C=E7=BB=B4=E7=A0=81?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E6=8E=A5=E5=8F=A3=20=E6=8E=A5=E6=94=B6?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E5=A2=9E=E5=8A=A0code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Http/Controllers/API/mH5/PersonController.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Laravel/app/Http/Controllers/API/mH5/PersonController.php b/Laravel/app/Http/Controllers/API/mH5/PersonController.php index 81eb390..a39784f 100644 --- a/Laravel/app/Http/Controllers/API/mH5/PersonController.php +++ b/Laravel/app/Http/Controllers/API/mH5/PersonController.php @@ -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('没有此体检号对应的记录');