lgy 2 months ago
parent
commit
3526220c1d
1 changed files with 27 additions and 15 deletions
  1. 27 15
      jcjyhr/app/zskk/controller/Patient.php

+ 27 - 15
jcjyhr/app/zskk/controller/Patient.php

@@ -94,15 +94,19 @@ class Patient extends ZskkApiController
      */
     public function postExamInfo(PatientServies $servies): void
     {
-        try {
+//        try {
             $params = $this->request->post();
             $params = $this->getDecryptData($params['data']);
+            if(empty($params))
+            {
+                $this->error('密文解析失败');
+            }
             $params = $servies->makeMappingData($params,'0','postExamInfo');
             $data = $servies->postExamInfo($params);
-        }catch (\Exception $e)
-        {
-            $this->error($e->getMessage());
-        }
+//        }catch (\Exception $e)
+//        {
+//            $this->error($e->getMessage());
+//        }
         $this->success('success','');
     }
     /**
@@ -110,15 +114,19 @@ class Patient extends ZskkApiController
      */
     public function postExamReport(PatientServies $servies): void
     {
-        try {
+//        try {
             $params = $this->request->post();
             $params = $this->getDecryptData($params['data']);
+            if(empty($params))
+            {
+                $this->error('密文解析失败');
+            }
             $params = $servies->makeMappingData($params,'0','postExamReport');
             $data = $servies->postExamReport($params);
-        }catch (\Exception $e)
-        {
-            $this->error($e->getMessage());
-        }
+//        }catch (\Exception $e)
+//        {
+//            $this->error($e->getMessage());
+//        }
         $this->success('success',$data);
     }
 
@@ -127,16 +135,20 @@ class Patient extends ZskkApiController
      */
     public function postLabReport(PatientServies $servies): void
     {
-        try {
+//        try {
             $params = $this->request->post();
             $params = $this->getDecryptData($params['data']);
+            if(empty($params))
+            {
+                $this->error('密文解析失败');
+            }
             $params = $servies->makeMappingData($params,'0','postLabReport');
             $data = $servies->postLabReport($params);
             $data = $this->makeEncryptData($data);
-        }catch (\Exception $e)
-        {
-            $this->error($e->getMessage());
-        }
+//        }catch (\Exception $e)
+//        {
+//            $this->error($e->getMessage());
+//        }
         $this->success('success',$data);
     }
 }