Browse Source

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

csx 2 years ago
parent
commit
fb03c96a55
1 changed files with 9 additions and 2 deletions
  1. 9 2
      controllers/zh/zh_his_api_controller.go

+ 9 - 2
controllers/zh/zh_his_api_controller.go View File

2752
 	fmt.Println(readCard)
2752
 	fmt.Println(readCard)
2753
 	fmt.Println("!!!!!")
2753
 	fmt.Println("!!!!!")
2754
 	pBusiCardInfo := make([]byte, 8192)
2754
 	pBusiCardInfo := make([]byte, 8192)
2755
+	input := make(map[string]interface{})
2755
 	inputData := make(map[string]interface{})
2756
 	inputData := make(map[string]interface{})
2756
 	inputData["orgId"] = code
2757
 	inputData["orgId"] = code
2757
 	inputData["businessType"] = "01101"
2758
 	inputData["businessType"] = "01101"
2760
 	inputData["officeId"] = "001"
2761
 	inputData["officeId"] = "001"
2761
 	inputData["officeName"] = "血透室"
2762
 	inputData["officeName"] = "血透室"
2762
 	inputData["deviceType"] = ""
2763
 	inputData["deviceType"] = ""
2763
-	bytesData, _ := json.Marshal(inputData)
2764
-	url := "http://localcfc/api/hsecfc/localQrCodeQuery"
2764
+	input["data"] = inputData
2765
+	input["orgId"] = code
2766
+	input["transType"] = "ec.query"
2767
+
2768
+	bytesData, _ := json.Marshal(input)
2769
+	gdyb_url := beego.AppConfig.String("gdyb_url")
2770
+
2771
+	url := gdyb_url + "/localcfc/api/hsecfc/localQrCodeQuery"
2765
 	ret2, _, _ := readCard.Call(StrPtr(url), StrPtr(string(bytesData)), (uintptr)(unsafe.Pointer(&pBusiCardInfo[0])))
2772
 	ret2, _, _ := readCard.Call(StrPtr(url), StrPtr(string(bytesData)), (uintptr)(unsafe.Pointer(&pBusiCardInfo[0])))
2766
 	fmt.Println(ret2)
2773
 	fmt.Println(ret2)
2767
 	fmt.Println(DeleteExtraSpace(string(pBusiCardInfo)))
2774
 	fmt.Println(DeleteExtraSpace(string(pBusiCardInfo)))