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

+ 1 - 1
controllers/gdyb_controller.go View File

@@ -78,7 +78,7 @@ func (c *GdybController) PostOne() {
78 78
 	id_card_type, _ := c.GetInt64("id_card_type")
79 79
 	card_sn := c.GetString("card_sn")
80 80
 
81
-	result := service.Gdyb1101(certNo, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, id_card_type, card_sn)
81
+	result := service.Gdyb1101(certNo, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, id_card_type, card_sn, "44022919620927046X")
82 82
 
83 83
 	var dat map[string]interface{}
84 84
 	if err := json.Unmarshal([]byte(result), &dat); err == nil {

+ 3 - 5
service/gdyb_service.go View File

@@ -82,7 +82,7 @@ func Gdyb1201(certNo string, org_name string, doctor string, fixmedins_code stri
82 82
 }
83 83
 
84 84
 // 人员基本信息
85
-func Gdyb1101(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) string {
85
+func Gdyb1101(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, id_card_no string) string {
86 86
 	// 生成签名
87 87
 	nonce := GetRandomString(32)
88 88
 	timestamp := time.Now().Unix()
@@ -97,15 +97,13 @@ func Gdyb1101(certNo string, org_name string, doctor string, fixmedins_code stri
97 97
 	if id_card_type == 1 {
98 98
 		inputData["mdtrt_cert_type"] = "03" // 就诊凭证类型
99 99
 		inputData["card_sn"] = card_sn      // 卡识别码
100
-		inputData["certno"] = ""            // 证件号码
101
-		//inputData["psn_cert_type"] = "90"   // 人员证件类型
102
-
100
+		inputData["certno"] = id_card_no    // 证件号码
103 101
 	} else {
104 102
 		inputData["mdtrt_cert_type"] = "02" // 就诊凭证类型
105 103
 		inputData["card_sn"] = ""           // 卡识别码
106 104
 		inputData["certno"] = certNo        // 证件号码
107 105
 	}
108
-	inputData["psn_cert_type"] = ""     // 人员证件类型
106
+	inputData["psn_cert_type"] = "1"    // 人员证件类型
109 107
 	inputData["mdtrt_cert_no"] = certNo // 就诊凭证编号
110 108
 	inputData["begntime"] = ""          // 开始时间
111 109
 	inputData["psn_name"] = ""          // 人员姓名