csx 4 years ago
parent
commit
548ecaccd1
2 changed files with 5 additions and 4 deletions
  1. 3 0
      controllers/gdyb_controller.go
  2. 2 4
      controllers/his_api_controller.go

+ 3 - 0
controllers/gdyb_controller.go View File

@@ -152,9 +152,12 @@ func (c *GdybController) PostFour() {
152 152
 	secret_key := c.GetString("secret_key")
153 153
 
154 154
 	result := service.Gdyb2203(psnNo, mdtrtId, doctor, department, diag, org_name, med_type, doctor_id, fixmedins_code, diag_code, insuplc_admdvs, mdtrtarea_admvs, secret_key)
155
+
155 156
 	var dat map[string]interface{}
156 157
 	if err := json.Unmarshal([]byte(result), &dat); err == nil {
158
+
157 159
 	} else {
160
+
158 161
 	}
159 162
 	c.ServeSuccessJSON(map[string]interface{}{
160 163
 		"pre": dat,

+ 2 - 4
controllers/his_api_controller.go View File

@@ -554,7 +554,7 @@ func (c *HisApiController) GetRegisterInfo() {
554 554
 				}
555 555
 				body2, ioErr2 := ioutil.ReadAll(resp2.Body)
556 556
 				if ioErr2 != nil {
557
-					utils.ErrorLog("接口返回数据读取失败: %v", ioErr)
557
+					utils.ErrorLog("接口返回数据读取失败: %v", ioErr2)
558 558
 					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
559 559
 					return
560 560
 				}
@@ -564,10 +564,8 @@ func (c *HisApiController) GetRegisterInfo() {
564 564
 					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
565 565
 					return
566 566
 				}
567
-				respJSON2 = respJSON["data"].(map[string]interface{})["pre"].(map[string]interface{})
567
+				respJSON2 = respJSON2["data"].(map[string]interface{})["pre"].(map[string]interface{})
568 568
 				userJSONBytes2, _ := json.Marshal(respJSON2)
569
-				fmt.Println(respJSON2)
570
-				fmt.Println(userJSONBytes2)
571 569
 
572 570
 				var res2 ResultSix
573 571
 				if err := json.Unmarshal(userJSONBytes2, &res2); err != nil {