刘桂岩 3 years ago
parent
commit
f620e02d3c
2 changed files with 3 additions and 26 deletions
  1. 2 6
      app/controller/DiAn.php
  2. 1 20
      app/controller/Index.php

+ 2 - 6
app/controller/DiAn.php

@@ -34,9 +34,7 @@ class DiAn extends BaseController
                 'Response'=>[
                     'resultCode'=>'1',
                     'result'=>'请求成功',
-                    'xml'=>$info[1],
-                    'patientId'=>$info[2],
-                    'barCode'=>$info[3]
+                    'data'=>$info[1]
                 ]
             ];
             $a2x = new array2xml();
@@ -47,9 +45,7 @@ class DiAn extends BaseController
                 'Response'=>[
                     'resultCode'=>'0',
                     'result'=>'数据无法找到',
-                    'xml'=>'',
-                    'patientId'=>'',
-                    'barCode'=>$obj
+                    'data'=>''
                 ]
             ];
             $a2x = new array2xml();

+ 1 - 20
app/controller/Index.php

@@ -21,27 +21,7 @@ class Index extends BaseController
     public function getReport()
     {
         libxml_disable_entity_loader(false);
-//        $opts = array(
-//            'ssl'   => array(
-//                'verify_peer'          => false
-//            ),
-//            'https' => array(
-//                'curl_verify_ssl_peer'  => false,
-//                'curl_verify_ssl_host'  => false
-//            )
-//        );
-//        $streamContext = stream_context_create($opts);
-//        $client = new \SoapClient("http://112.103.134.89:10020/server.php?wsdl",
-//            array(
-//                'stream_context'    => $streamContext
-//            ));
         $client = new \SoapClient("http://112.103.134.89:10020/server.php?wsdl");
-
-//        $client = new \SoapClient('http://localhost:8085/server.php?wsdl');
-//        use_soap_error_handler(false);
-//        $requestUrl = "localhost:8085/server.php?wsdl";
-//        $options = array("trace" => 1, "cache_wsdl" => WSDL_CACHE_NONE,"exception" => 0,'location'=>'localhost:8085/server.php?wsdl','uri'=>'http://tempuri.org/');
-//        $client = new \SoapClient($requestUrl, $options);
         $data = [
             'Barcode'=>'12203310010001'
         ];   //请求参数
@@ -67,6 +47,7 @@ class Index extends BaseController
         $sql = "select * from dianApiInfo where Barcode='12203020024872'";
         $result = mysqli_query($conn, $sql);
         $info = mysqli_fetch_row($result);
+        var_dump($info);die;
         if(!empty($info))
         {
             $return = [