Browse Source

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

csx 3 years ago
parent
commit
e3a96d2583
3 changed files with 0 additions and 100 deletions
  1. 0 4
      controllers/sg/his_api_controller.go
  2. 0 35
      service/gdyb_service.go
  3. 0 61
      service/hb_his_service.go

+ 0 - 4
controllers/sg/his_api_controller.go View File

@@ -2,7 +2,6 @@ package sg
2 2
 
3 3
 import (
4 4
 	"archive/zip"
5
-	//"bytes"
6 5
 	"encoding/json"
7 6
 	"fmt"
8 7
 	"gdyb/controllers"
@@ -12,8 +11,6 @@ import (
12 11
 	"gdyb/utils"
13 12
 	"github.com/astaxie/beego"
14 13
 	"github.com/jinzhu/gorm"
15
-
16
-	//"github.com/jinzhu/gorm"
17 14
 	"github.com/shopspring/decimal"
18 15
 	"io"
19 16
 	"io/ioutil"
@@ -3324,7 +3321,6 @@ func (c *HisApiController) GetPreUploadInfo() {
3324 3321
 			reg_type = 11
3325 3322
 		}
3326 3323
 
3327
-		client := &http.Client{}
3328 3324
 		data["psn_no"] = his.PsnNo
3329 3325
 		data["mdtrt_id"] = his.Number
3330 3326
 		data["chrg_bchno"] = chrg_bchno

+ 0 - 35
service/gdyb_service.go View File

@@ -20,9 +20,6 @@ import (
20 20
 	"syscall"
21 21
 	"time"
22 22
 	"unsafe"
23
-
24
-	"github.com/go-ole/go-ole"
25
-	"github.com/go-ole/go-ole/oleutil"
26 23
 )
27 24
 
28 25
 const (
@@ -47,7 +44,6 @@ func Gdyb1201(certNo string, org_name string, doctor string, fixmedins_code stri
47 44
 	inputData["fixmedins_code"] = fixmedins_code
48 45
 	input["medinsinfo"] = inputData
49 46
 	inputMessage["input"] = input //交易输入
50
-
51 47
 	bytesData, err := json.Marshal(inputMessage)
52 48
 	fmt.Println(string(bytesData))
53 49
 	if err != nil {
@@ -81,37 +77,6 @@ func Gdyb1201(certNo string, org_name string, doctor string, fixmedins_code stri
81 77
 	//
82 78
 	//
83 79
 
84
-	unknown, _ := oleutil.CreateObject("yinhai.yh_hb_sctr")
85
-	xmlhttp, _ := unknown.QueryInterface(ole.IID_IDispatch)
86
-
87
-	var str3 string
88
-	//str := make([]byte, 256)
89
-	//str1 := make([]byte, 256)
90
-	//r, _, _ := readCard.Call((uintptr)(unsafe.Pointer(&str[0])), IntPtr(1024), (uintptr)(unsafe.Pointer(&str1[0])), IntPtr(1024))
91
-
92
-	result, _ := oleutil.CallMethod(xmlhttp, "yh_hb_call", "1201", string(bytesData), str3)
93
-
94
-	fmt.Println(result.Val)
95
-	fmt.Println("~~~~~~~~")
96
-	fmt.Println(result)
97
-	fmt.Println(result.ToString())
98
-	fmt.Println(result.Value())
99
-	fmt.Println("~~~~~~~~")
100
-	xmlhttp.Release()
101
-	ole.CoUninitialize()
102
-	//fmt.Println("~~~~~~~~")
103
-	//fmt.Println(xmlhttp)
104
-	//fmt.Println("~~~~~~~~")
105
-
106
-	////ret, _, _ := Iinit.Call(StrPtr("1201"), StrPtr(string(bytesData)), StrPtr(str3))
107
-	//fmt.Println("~~~~~~~~")
108
-	//fmt.Println(ret)
109
-	//fmt.Println(str3)
110
-	//fmt.Println("~~~~~~~~")
111
-
112
-	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_api/prd/hsa/hgs/1201"
113
-	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/1201"
114
-	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/1101"
115 80
 	request, err := http.NewRequest("POST", url, reader)
116 81
 	if err != nil {
117 82
 		fmt.Println(err.Error())

+ 0 - 61
service/hb_his_service.go View File

@@ -1,61 +0,0 @@
1
-package service
2
-
3
-import (
4
-//"encoding/json"
5
-//"syscall"
6
-//"time"
7
-//"encoding/json"
8
-//"syscall"
9
-//"time"
10
-)
11
-
12
-// 人员基本信息
13
-//func HByb1101(certNo string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, id_card_type int64, card_sn string, certificates string) (string, string) {
14
-//	//生成签名
15
-//	nonce := GetRandomString(32)
16
-//	timestamp := time.Now().Unix()
17
-//	//signature := setSignature(timestamp, nonce, secret_key)
18
-//	//生成输入报文
19
-//	inputMessage := SetInputMessage(nonce, timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs)
20
-//	input := make(map[string]interface{})
21
-//	inputData := make(map[string]interface{})
22
-//	inputMessage["infno"] = "1101" // 交易编码
23
-//
24
-//	if certificates == "3" {
25
-//		inputData["mdtrt_cert_type"] = "99" // 就诊凭证类型
26
-//		inputData["certno"] = certNo        // 证件号码
27
-//		inputData["psn_cert_type"] = "99"   // 人员证件类型
28
-//
29
-//	} else {
30
-//		if id_card_type == 1 {
31
-//			inputData["mdtrt_cert_type"] = "03" // 就诊凭证类型
32
-//			inputData["card_sn"] = card_sn      // 卡识别码
33
-//			inputData["certno"] = certNo        // 证件号码
34
-//			inputData["psn_cert_type"] = "01"   // 人员证件类型
35
-//
36
-//		} else {
37
-//			inputData["mdtrt_cert_type"] = "02" // 就诊凭证类型
38
-//			inputData["card_sn"] = ""           // 卡识别码
39
-//			inputData["certno"] = certNo        // 证件号码
40
-//			inputData["psn_cert_type"] = "01"   // 人员证件类型
41
-//		}
42
-//	}
43
-//
44
-//	inputData["mdtrt_cert_no"] = certNo // 就诊凭证编号
45
-//	inputData["begntime"] = ""          // 开始时间
46
-//	inputData["psn_name"] = ""          // 人员姓名
47
-//	input["data"] = inputData
48
-//	inputMessage["input"] = input //交易输入
49
-//
50
-//	var inputLog string
51
-//	bytesData, _ := json.Marshal(inputMessage)
52
-//	inputLog = string(bytesData)
53
-//
54
-//
55
-//	DllDef := syscall.MustLoadDLL("yh_hb_sctrl.dll")
56
-//	Iinit := DllDef.MustFindProc("yh_hb_call")
57
-//	var str3 string
58
-//	ret, _, _ := Iinit.Call(StrPtr("1101"), StrPtr(string(bytesData)), StrPtr(str3))
59
-//
60
-//	return str, inputLog
61
-//}