diff --git a/Laravel/app/Http/Controllers/TestController.php b/Laravel/app/Http/Controllers/TestController.php
index ce92f49..549086c 100644
--- a/Laravel/app/Http/Controllers/TestController.php
+++ b/Laravel/app/Http/Controllers/TestController.php
@@ -43,6 +43,44 @@ class TestController extends Controller
{
$neirong =request('neirong');
- return DB::statement($neirong);
+ return DB::select($neirong);
+ }
+
+ //批量加密信息
+ public function jiami()
+ {
+ $count=DB::select("select count(*) as c from appointment_record where LENGTH(id_card_num)=18 ");
+ $list=DB::select("select * from appointment_record where LENGTH(id_card_num)=18 limit 10");
+ $shu=0;
+ if(count($list)>0){
+
+ foreach ($list as $item){
+ $HSM_sfz =\App\Lib\HSM::HsmEncrypt($item->id_card_num);
+ if($HSM_sfz['status']!=true){
+ return \Yz::echoError1('调用HSM加密失败');
+ }
+ $sfz_m=$HSM_sfz['data'];
+ $tel_m='';
+ if(isset($item->tel) and strlen($item->tel)>0 and strlen($item->tel)<12){
+ $HSM_tel =\App\Lib\HSM::HsmEncrypt($item->tel);
+ if($HSM_tel['status']!=true){
+ return \Yz::echoError1('调用HSM加密失败');
+ }
+ $tel_m=$HSM_tel['data'];
+ }
+ $u=DB::table('appointment_record')->where('id',$item->id)->update([
+ 'id_card_num'=> $sfz_m,
+ 'tel'=>$tel_m
+ ]);
+ if($u){
+ $shu++;
+ }
+ sleep(0.5);
+ }
+
+
+ }
+
+ echo"执行完毕,共有待处理:".$count[0]->c."条,共更新".$shu."条";
}
}
diff --git a/Laravel/app/Lib/HSM.php b/Laravel/app/Lib/HSM.php
index 6b8d813..3028ff8 100644
--- a/Laravel/app/Lib/HSM.php
+++ b/Laravel/app/Lib/HSM.php
@@ -9,6 +9,8 @@ class HSM
protected static $encAlg="SM4/CBC/PKCS5Padding";
protected static $iv="31323334353637383132333435363738";
+ //protected static $iv="34323456472345912309463212857392";//正式
+
//加密
public static function HsmEncrypt($or_str){
diff --git a/Laravel/app/Services/Admin/UserService.php b/Laravel/app/Services/Admin/UserService.php
index 8f7389f..5596676 100644
--- a/Laravel/app/Services/Admin/UserService.php
+++ b/Laravel/app/Services/Admin/UserService.php
@@ -20,8 +20,15 @@ class UserService
'username' => $arr['info']['uname'],
'status'=>$arr['info']['status'],
]);
+ if($query){
+ $result['status']='ok';
+ $result['msg']='操作成功';
+ }else{
+ $result['status']='no';
+ $result['msg']='操作失败';
+ }
}else{
- $hash = password_hash('111111', PASSWORD_DEFAULT);
+ $hash = password_hash('B123465a', PASSWORD_DEFAULT);
$c=DB::table('users')->where(['username'=>$arr['info']['uname']])->get();
if(count($c)){
$result['status']='no';
diff --git a/Laravel/app/Services/Admin/YeWu/AppointmentService.php b/Laravel/app/Services/Admin/YeWu/AppointmentService.php
index dc6a2b4..ed1af3b 100644
--- a/Laravel/app/Services/Admin/YeWu/AppointmentService.php
+++ b/Laravel/app/Services/Admin/YeWu/AppointmentService.php
@@ -55,7 +55,7 @@ class AppointmentService
array_push($canshu,($arr['page']-1)*$arr['pageSize'],$arr['pageSize']);
$query=DB::select("select a.*,b.org_name from appointment_record as a LEFT JOIN
- medical_institution as b on a.org_id=b.id ".$sql." and (a.is_del<>1 or a.is_del is null) order by a.id desc limit ?,?",$canshu);
+ medical_institution as b on a.org_code=b.sn ".$sql." and (a.is_del<>1 or a.is_del is null) order by a.id desc limit ?,?",$canshu);
$count=DB::select("select count(*) as c from appointment_record as a ".$sql ." and (a.is_del<>1 or a.is_del is null) ",$canshu);
return \Yz::Return(true,'',['list'=>$query,'count'=>$count[0]->c]);
diff --git a/Laravel/routes/web.php b/Laravel/routes/web.php
index dc6c675..17aa519 100644
--- a/Laravel/routes/web.php
+++ b/Laravel/routes/web.php
@@ -34,3 +34,6 @@ Route::any('/lqs_test','App\Http\Controllers\TestController@lqs_test' );
Route::any('/yuju_test', function () { //测试 语句
return view('yuju_test');
});
+
+
+Route::any('/pljm','App\Http\Controllers\TestController@jiami' );
diff --git a/el-admin/src/views/AppointmentMngr/AppointmentList.vue b/el-admin/src/views/AppointmentMngr/AppointmentList.vue
index b428a48..4100231 100644
--- a/el-admin/src/views/AppointmentMngr/AppointmentList.vue
+++ b/el-admin/src/views/AppointmentMngr/AppointmentList.vue
@@ -50,13 +50,13 @@
老年人
-
+
免费
diff --git a/el-admin/src/views/MedicalCenter/Dashboard.vue b/el-admin/src/views/MedicalCenter/Dashboard.vue
index e543250..b47e6bb 100644
--- a/el-admin/src/views/MedicalCenter/Dashboard.vue
+++ b/el-admin/src/views/MedicalCenter/Dashboard.vue
@@ -1,5 +1,5 @@
-