Explorar el Código

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

csx hace 3 años
padre
commit
6b3f73b6dc
Se han modificado 1 ficheros con 33 adiciones y 36 borrados
  1. 33 36
      service/gdyb_service.go

+ 33 - 36
service/gdyb_service.go Ver fichero

@@ -8,11 +8,8 @@ import (
8 8
 	"fmt"
9 9
 	"gdyb/models"
10 10
 	"github.com/astaxie/beego"
11
-	"github.com/go-ole/go-ole"
12
-	"github.com/go-ole/go-ole/oleutil"
13 11
 	"io"
14 12
 	"io/ioutil"
15
-	"log"
16 13
 	"math/rand"
17 14
 	"mime/multipart"
18 15
 	"net/http"
@@ -61,39 +58,39 @@ func Gdyb1201(certNo string, org_name string, doctor string, fixmedins_code stri
61 58
 	//var str string
62 59
 	//str1 := make([]byte, 1024)
63 60
 
64
-	var x interface{}
65
-	s3 := make([]byte, 256)
66
-	ole.CoInitialize(0)
67
-	unknown, err := oleutil.CreateObject("yinhai.yh_hb_sctr")
68
-	if err != nil {
69
-		log.Fatal("CreateObject: ", err)
70
-	}
71
-
72
-	xxxx := unknown.MustQueryInterface(ole.IID_IDispatch)
73
-
74
-	//p := (*string)(unsafe.Pointer(str))
75
-	var str6 string = ""
76
-
77
-	if err != nil {
78
-		log.Fatal("QueryInterface: ", err)
79
-	}
80
-
81
-	r, err1 := xxxx.CallMethod("yh_hb_call", "1201", string(bytesData), str6)
82
-	result := oleutil.MustGetProperty(xxxx, "astr_jysc")
83
-
84
-	if err1 != nil {
85
-		log.Fatal("CallMethod: ", err1, " | ", r)
86
-	}
87
-	fmt.Println("~~~~~~~")
88
-	fmt.Println(result)
89
-	fmt.Println(r)
90
-	fmt.Println(s3)
91
-	fmt.Println(x)
92
-	fmt.Println("~~~~~~~")
93
-
94
-	xxxx.Release()
95
-
96
-	ole.CoUninitialize()
61
+	//var x interface{}
62
+	//s3 := make([]byte, 256)
63
+	//ole.CoInitialize(0)
64
+	//unknown, err := oleutil.CreateObject("yinhai.yh_hb_sctr")
65
+	//if err != nil {
66
+	//	log.Fatal("CreateObject: ", err)
67
+	//}
68
+	//
69
+	//xxxx := unknown.MustQueryInterface(ole.IID_IDispatch)
70
+	//
71
+	////p := (*string)(unsafe.Pointer(str))
72
+	//var str6 string = ""
73
+	//
74
+	//if err != nil {
75
+	//	log.Fatal("QueryInterface: ", err)
76
+	//}
77
+	//
78
+	//r, err1 := xxxx.CallMethod("yh_hb_call", "1201", string(bytesData), str6)
79
+	//result := oleutil.MustGetProperty(xxxx, "astr_jysc")
80
+	//
81
+	//if err1 != nil {
82
+	//	log.Fatal("CallMethod: ", err1, " | ", r)
83
+	//}
84
+	//fmt.Println("~~~~~~~")
85
+	//fmt.Println(result)
86
+	//fmt.Println(r)
87
+	//fmt.Println(s3)
88
+	//fmt.Println(x)
89
+	//fmt.Println("~~~~~~~")
90
+	//
91
+	//xxxx.Release()
92
+	//
93
+	//ole.CoUninitialize()
97 94
 	//
98 95
 	var json2 string
99 96
 	cmd := exec.Command("java", "-jar", "yh_hb_fat.jar", "1201", string(bytesData), json2)