csx 4 years ago
parent
commit
9a4558ed6f
3 changed files with 6 additions and 7 deletions
  1. 4 5
      controllers/gdyb_controller.go
  2. 1 1
      controllers/his_api_controller.go
  3. 1 1
      service/gdyb_service.go

+ 4 - 5
controllers/gdyb_controller.go View File

@@ -8,7 +8,6 @@ import (
8 8
 	"fmt"
9 9
 	"github.com/astaxie/beego"
10 10
 	"io/ioutil"
11
-	"unsafe"
12 11
 )
13 12
 
14 13
 type GdybController struct {
@@ -412,11 +411,11 @@ func (c *GdybController) PostEleven() {
412 411
 		Doctor:         doctor,
413 412
 	}
414 413
 
415
-	x := (*[2]uintptr)(unsafe.Pointer(&file_byte))
416
-	h := [3]uintptr{x[0], x[1], x[1]}
417
-	bytes := *(*[]byte)(unsafe.Pointer(&h))
414
+	//x := (*[2]uintptr)(unsafe.Pointer(&file_byte))
415
+	//h := [3]uintptr{x[0], x[1], x[1]}
416
+	//bytes := *(*[]byte)(unsafe.Pointer(&h))
418 417
 
419
-	result := service.Gdyb9101(baseParams, file_name, bytes)
418
+	result := service.Gdyb9101(baseParams, file_name, []byte(file_byte))
420 419
 	var dat map[string]interface{}
421 420
 	if err := json.Unmarshal([]byte(result), &dat); err == nil {
422 421
 		fmt.Println(dat)

+ 1 - 1
controllers/his_api_controller.go View File

@@ -2301,7 +2301,7 @@ func (c *HisApiController) GetCheckDetailAccount() {
2301 2301
 	if config.IsOpen == 1 {
2302 2302
 		api := "http://127.0.0.1:9532/" + "gdyb/eleven?" +
2303 2303
 			"file_byte=" + string(ReadFile(zip_path)) +
2304
-			"&file_name=" + zip_path +
2304
+			"&file_name=" + zip_name +
2305 2305
 			"&fixmedins_code=" + miConfig.Code +
2306 2306
 			"&insuplc_admdvs=" + miConfig.InsuplcAdmdvs +
2307 2307
 			"&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs +

+ 1 - 1
service/gdyb_service.go View File

@@ -814,7 +814,7 @@ func Gdyb9101(baseParams models.BaseParams, file_name string, file_byte []byte)
814 814
 	inputData := make(map[string]interface{})
815 815
 	inputMessage["infno"] = "9101"                         // 交易编码
816 816
 	inputData["file_name"] = file_name                     //文件名
817
-	inputData["in"] = bytes.NewReader(file_byte)           //文件数据
817
+	inputData["in"] = file_byte                            //文件数据
818 818
 	inputData["fixmedins_code"] = baseParams.FixmedinsCode //编码
819 819
 
820 820
 	input["data"] = inputData