From 8831df995a01f8e09d2899654158482890192a9f Mon Sep 17 00:00:00 2001 From: yanzai Date: Thu, 11 Apr 2024 00:21:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B5=8B=E8=AF=95=E5=85=AC?= =?UTF-8?q?=E5=8D=AB=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/Http/Controllers/TestController.php | 28 +++++++++++++------ .../Admin/YeWu/AppointmentService.php | 22 ++++++++++----- Laravel/resources/views/gongweitest.blade.php | 17 +++++++++++ Laravel/routes/web.php | 5 +++- el-admin/.env.production | 4 +-- 5 files changed, 57 insertions(+), 19 deletions(-) create mode 100644 Laravel/resources/views/gongweitest.blade.php diff --git a/Laravel/app/Http/Controllers/TestController.php b/Laravel/app/Http/Controllers/TestController.php index bf64a47..d840b2d 100644 --- a/Laravel/app/Http/Controllers/TestController.php +++ b/Laravel/app/Http/Controllers/TestController.php @@ -2,21 +2,31 @@ namespace App\Http\Controllers; +use App\Services\Admin\YeWu\AppointmentService; use Illuminate\Http\Request; class TestController extends Controller { public function DBtest(){ //echo DB::table('users')->count(); - $SendData=' - - 王新书 - - 142423194705202719]]> - '; - - $url = config('app.globals.GongWeiBaseUrl'); - return \Yz::XmlHttp($SendData,$url); + + + +// $SendData=' +// +// 王新书 +// +// 142423194705202719]]> +// '; +// +// $url = config('app.globals.GongWeiBaseUrl'); + // return \Yz::XmlHttp($SendData,$url); + + $name =request('name'); + $sfz =request('sfz'); + + $info=AppointmentService::CheckGongWei($name,$sfz); + return $info; } diff --git a/Laravel/app/Services/Admin/YeWu/AppointmentService.php b/Laravel/app/Services/Admin/YeWu/AppointmentService.php index 712bb04..7717739 100644 --- a/Laravel/app/Services/Admin/YeWu/AppointmentService.php +++ b/Laravel/app/Services/Admin/YeWu/AppointmentService.php @@ -99,12 +99,12 @@ class AppointmentService $lastDay = date('Y-12-31', strtotime($currentYear)); $SendData=' - '.$name.' + '.$name.' - '.$id_card_num.']]> + '.$id_card_num.' '; - $url = config('app.globals.GongWeiBaseUrl').'/jkdacp/webservice/DPService?wsdl'; + $url = config('app.globals.GongWeiBaseUrl'); $res=\Yz::XmlHttp($SendData,$url); //如果没有返回queryCheckUp节点,返回异常 if(!isset($res['queryCheckUp'])) { @@ -115,12 +115,20 @@ class AppointmentService } $result=[]; if(isset($res['queryCheckUp']['tjrq']) and ($res['queryCheckUp']['tjrq']>=$firstDay and $res['queryCheckUp']['tjrq']<=$lastDay)){ - $result['status']=false; - $result['msg']='公卫有记录'; - $result['GongWeiinfo']=$res['queryCheckUp']; + //判断老年人体检字段 + if(isset($res['queryCheckUp']['sflnrtj']) and $res['queryCheckUp']['sflnrtj']==1){ + $result['status']=false; + $result['msg']='公卫有记录'; + $result['GongWeiinfo']=$res['queryCheckUp']; + }else{ + $result['status']=true; + $result['msg']='公卫有记录,但是没有老年人体检'; + $result['GongWeiinfo']=$res['queryCheckUp']; + } + }else{ $result['status']=true; - $result['msg']='公卫有无记录'; + $result['msg']='公卫无记录'; $result['GongWeiinfo']=$res['queryCheckUp']; } return $result; diff --git a/Laravel/resources/views/gongweitest.blade.php b/Laravel/resources/views/gongweitest.blade.php new file mode 100644 index 0000000..f044d85 --- /dev/null +++ b/Laravel/resources/views/gongweitest.blade.php @@ -0,0 +1,17 @@ + + + + + + + Laravel + +
+ @csrf + + + +
+ + + diff --git a/Laravel/routes/web.php b/Laravel/routes/web.php index 08abe1d..ed0b661 100644 --- a/Laravel/routes/web.php +++ b/Laravel/routes/web.php @@ -25,4 +25,7 @@ Route::get('/wxLogin/{env}', function ($env) { }); //微信登录授权获取openid Route::get('/wxGetCode','App\Http\Controllers\API\mH5\LoginController@wxGetCode' ); -Route::get('/test','App\Http\Controllers\TestController@DBtest' ); +Route::any('/test','App\Http\Controllers\TestController@DBtest' ); +Route::any('/gongweitest', function () { + return view('gongweitest'); +}); diff --git a/el-admin/.env.production b/el-admin/.env.production index 0e01be5..b2249c1 100644 --- a/el-admin/.env.production +++ b/el-admin/.env.production @@ -1,4 +1,4 @@ ENV = 'production' -VITE_APP_API = 'http://223.71.106.251:33581/common/la/public/api/' -VITE_APP_FILE = 'http://223.71.106.251:33581/common/la/public' +VITE_APP_API = 'http://192.168.50.123:33583/common/la/public/api/' +VITE_APP_FILE = 'http://192.168.50.123:33583/common/la/public'