Browse Source

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

csx 3 years ago
parent
commit
87ee0a7b3b
1 changed files with 52 additions and 52 deletions
  1. 52 52
      controllers/sg/gdyb_controller.go

+ 52 - 52
controllers/sg/gdyb_controller.go View File

@@ -20,7 +20,7 @@ func GdybRegistRouters() {
20 20
 	beego.Router("/gdyb/two", &GdybController{}, "get:PostTwo")
21 21
 	beego.Router("/gdyb/three", &GdybController{}, "get:PostThree")
22 22
 	//beego.Router("/gdyb/four", &GdybController{}, "get:PostFour")
23
-	beego.Router("/gdyb/five", &GdybController{}, "post:PostFive")
23
+	//beego.Router("/gdyb/five", &GdybController{}, "post:PostFive")
24 24
 	beego.Router("/gdyb/six", &GdybController{}, "get:PostSix")
25 25
 	//beego.Router("/gdyb/seven", &GdybController{}, "get:PostSeven")
26 26
 	beego.Router("/gdyb/eight", &GdybController{}, "get:PostEight")
@@ -213,57 +213,57 @@ type HisPrescription struct {
213 213
 	HisPrescriptionProject []*models.HisPrescriptionProject `gorm:"ForeignKey:PatientId,RecordDate,PrescriptionId;AssociationForeignKey:PatientId,RecordDate,ID" json:"project"`
214 214
 }
215 215
 
216
-func (c *GdybController) PostFive() {
217
-	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
218
-	var respJSON map[string]interface{}
219
-	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
220
-		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
221
-		return
222
-	}
223
-	userJSONBytes, _ := json.Marshal(respJSON["pre"])
224
-	var hp []*models.HisPrescription
225
-	if err := json.Unmarshal(userJSONBytes, &hp); err != nil {
226
-		utils.ErrorLog("解析失败:%v", err)
227
-		return
228
-	}
229
-	fmt.Println(respJSON["psn_no"].(string))
230
-	fmt.Println(respJSON["mdtrt_id"].(string))
231
-
232
-	fmt.Println(respJSON["chrg_bchno"].(string))
233
-	fmt.Println(respJSON["org_name"].(string))
234
-	fmt.Println(respJSON["doctor"].(string))
235
-	fmt.Println(respJSON["dept"].(string))
236
-
237
-	fmt.Println(respJSON["fixmedins_code"].(string))
238
-	fmt.Println(respJSON["dept_code"].(string))
239
-	fmt.Println(respJSON["doctor_id"].(string))
240
-
241
-	fmt.Println(respJSON["insuplc_admdvs"].(string))
242
-	fmt.Println(respJSON["mdtrtarea_admvs"].(string))
243
-	fmt.Println(respJSON["secret_key"].(string))
244
-
245
-	result, requestLog := service.Gdyb2204(respJSON["psn_no"].(string), respJSON["mdtrt_id"].(string), hp, respJSON["chrg_bchno"].(string), respJSON["org_name"].(string),
246
-		respJSON["doctor"].(string), respJSON["dept"].(string), respJSON["fixmedins_code"].(string), respJSON["dept_code"].(string), respJSON["doctor_id"].(string), respJSON["insuplc_admdvs"].(string), respJSON["mdtrtarea_admvs"].(string), respJSON["secret_key"].(string), respJSON["balance_accounts_type"].(string))
247
-
248
-	var dat map[string]interface{}
249
-	if err := json.Unmarshal([]byte(result), &dat); err == nil {
250
-		fmt.Println(dat)
251
-	} else {
252
-		fmt.Println(err)
253
-	}
254
-
255
-	var dat2 map[string]interface{}
256
-	if err := json.Unmarshal([]byte(requestLog), &dat2); err == nil {
257
-		fmt.Println(dat2)
258
-	} else {
259
-		fmt.Println(err)
260
-	}
261
-
262
-	c.ServeSuccessJSON(map[string]interface{}{
263
-		"pre":         dat,
264
-		"request_log": requestLog,
265
-	})
266
-}
216
+//func (c *GdybController) PostFive() {
217
+//	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
218
+//	var respJSON map[string]interface{}
219
+//	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
220
+//		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
221
+//		return
222
+//	}
223
+//	userJSONBytes, _ := json.Marshal(respJSON["pre"])
224
+//	var hp []*models.HisPrescription
225
+//	if err := json.Unmarshal(userJSONBytes, &hp); err != nil {
226
+//		utils.ErrorLog("解析失败:%v", err)
227
+//		return
228
+//	}
229
+//	fmt.Println(respJSON["psn_no"].(string))
230
+//	fmt.Println(respJSON["mdtrt_id"].(string))
231
+//
232
+//	fmt.Println(respJSON["chrg_bchno"].(string))
233
+//	fmt.Println(respJSON["org_name"].(string))
234
+//	fmt.Println(respJSON["doctor"].(string))
235
+//	fmt.Println(respJSON["dept"].(string))
236
+//
237
+//	fmt.Println(respJSON["fixmedins_code"].(string))
238
+//	fmt.Println(respJSON["dept_code"].(string))
239
+//	fmt.Println(respJSON["doctor_id"].(string))
240
+//
241
+//	fmt.Println(respJSON["insuplc_admdvs"].(string))
242
+//	fmt.Println(respJSON["mdtrtarea_admvs"].(string))
243
+//	fmt.Println(respJSON["secret_key"].(string))
244
+//
245
+//	result, requestLog := service.Gdyb2204(respJSON["psn_no"].(string), respJSON["mdtrt_id"].(string), hp, respJSON["chrg_bchno"].(string), respJSON["org_name"].(string),
246
+//		respJSON["doctor"].(string), respJSON["dept"].(string), respJSON["fixmedins_code"].(string), respJSON["dept_code"].(string), respJSON["doctor_id"].(string), respJSON["insuplc_admdvs"].(string), respJSON["mdtrtarea_admvs"].(string), respJSON["secret_key"].(string), respJSON["balance_accounts_type"].(string))
247
+//
248
+//	var dat map[string]interface{}
249
+//	if err := json.Unmarshal([]byte(result), &dat); err == nil {
250
+//		fmt.Println(dat)
251
+//	} else {
252
+//		fmt.Println(err)
253
+//	}
254
+//
255
+//	var dat2 map[string]interface{}
256
+//	if err := json.Unmarshal([]byte(requestLog), &dat2); err == nil {
257
+//		fmt.Println(dat2)
258
+//	} else {
259
+//		fmt.Println(err)
260
+//	}
261
+//
262
+//	c.ServeSuccessJSON(map[string]interface{}{
263
+//		"pre":         dat,
264
+//		"request_log": requestLog,
265
+//	})
266
+//}
267 267
 
268 268
 func (c *GdybController) PostSix() {
269 269
 	psnNo := c.GetString("psn_no")