Browse Source

上传检查日志

lgy 13 hours ago
parent
commit
33fa50bb38
2 changed files with 25 additions and 5 deletions
  1. 14 5
      jcjyhr/app/zskk/controller/Patient.php
  2. 11 0
      jcjyhr/app/zskk/model/ExamLog.php

+ 14 - 5
jcjyhr/app/zskk/controller/Patient.php

@@ -6,6 +6,8 @@ namespace app\zskk\controller;
 use app\common\controller\ZskkApiController;
 use app\common\library\Gm;
 use app\common\library\Handle;
+use app\zskk\model\ExamLog;
+use app\zskk\model\ExamReport;
 use app\zskk\model\Mapping;
 use think\Config;
 use think\db\exception\DataNotFoundException;
@@ -94,12 +96,12 @@ class Patient extends ZskkApiController
     {
         $params = $this->request->get();
         $id = $params['id_card'] ?? '';
-        $id = 'xCldB8dASEqkHUWN2cSByZRbzQCIL7xgFYnHrL8ET0Y=';
-        $mpiIdCard = Gm::decrypt(\think\facade\Config::get('gm.key'),$id);
-        echo $mpiIdCard;
-        $id = 'qrnDuZJDJm+dW/sYPSWahg==';
-        $mpiIdCard = Gm::decrypt(\think\facade\Config::get('gm.key'),$id);
+        $id = '140321196310171515';
+        $mpiIdCard = Gm::encrypt(\think\facade\Config::get('gm.key'),$id);
         echo $mpiIdCard;
+//        $id = 'qrnDuZJDJm+dW/sYPSWahg==';
+//        $mpiIdCard = Gm::decrypt(\think\facade\Config::get('gm.key'),$id);
+//        echo $mpiIdCard;
     }
 
     /**
@@ -117,6 +119,13 @@ class Patient extends ZskkApiController
             $params = $servies->makeMappingData($params,'0','postExamInfo');
 //            Log::record('检查信息参数'.json_encode($params));
             $data = $servies->postExamInfo($params);
+            $arr = [
+                'DATA'=>json_encode($params),
+                'ID_CARD'=>$params['PATIENT']['ID_CARDNUM'] ?? '',
+                'CREATEDAT'=>date('Y-m-d H:i:s'),
+                'ORGCODE'=>$params['MEDICAL_INFORMATION']['ORGCODE'] ?? ''
+            ];
+            ExamLog::insert($arr);
 //        }catch (\Exception $e)
 //        {
 //            $this->error($e->getMessage());

+ 11 - 0
jcjyhr/app/zskk/model/ExamLog.php

@@ -0,0 +1,11 @@
+<?php
+
+namespace app\zskk\model;
+
+use app\common\model\ZskkModel;
+
+
+class ExamLog extends ZskkModel{
+
+
+}