Browse Source

Merge branch 'master' of http://git.shengws.com/csx/gdyb

csx 2 years ago
parent
commit
364f847082
1 changed files with 8 additions and 14 deletions
  1. 8 14
      controllers/sg/his_api_controller.go

+ 8 - 14
controllers/sg/his_api_controller.go View File

85
 
85
 
86
 	beego.Router("/api/readelecard", &HisApiController{}, "get:ReadEleCard")
86
 	beego.Router("/api/readelecard", &HisApiController{}, "get:ReadEleCard")
87
 
87
 
88
-
89
-
90
-
91
-
92
 }
88
 }
93
 
89
 
94
 func (c *HisApiController) Get9001() {
90
 func (c *HisApiController) Get9001() {
12105
 		var token string
12101
 		var token string
12106
 		var res ResultTwo           //1101结果
12102
 		var res ResultTwo           //1101结果
12107
 		var res10265 ResultTwo10265 //1101结果
12103
 		var res10265 ResultTwo10265 //1101结果
12108
-		if status == "0" { //读卡成功
12104
+		if status == "0" {          //读卡成功
12109
 			var card_info string //卡信息
12105
 			var card_info string //卡信息
12110
 			var busi_card_info string
12106
 			var busi_card_info string
12111
 			token = respJSON["data"].(map[string]interface{})["token"].(string)
12107
 			token = respJSON["data"].(map[string]interface{})["token"].(string)
12129
 			res.Output = res10265.Output
12125
 			res.Output = res10265.Output
12130
 			res.InfRefmsgid = res10265.InfRefmsgid
12126
 			res.InfRefmsgid = res10265.InfRefmsgid
12131
 			if res.Infcode == 0 {
12127
 			if res.Infcode == 0 {
12132
-					c.ServeSuccessJSON(map[string]interface{}{
12133
-						"number":  token,
12134
-					})
12135
-				}
12136
-			} else {
12137
-				c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeHisFailedException)
12138
-				return
12128
+				c.ServeSuccessJSON(map[string]interface{}{
12129
+					"number": token,
12130
+				})
12139
 			}
12131
 			}
12140
-		} else { //读卡失败
12132
+		} else {
12141
 			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeHisFailedException)
12133
 			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeHisFailedException)
12142
 			return
12134
 			return
12143
 		}
12135
 		}
12136
+	} else { //读卡失败
12137
+		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeHisFailedException)
12138
+		return
12144
 	}
12139
 	}
12145
-
12146
 }
12140
 }