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
 	id_card_type, _ := c.GetInt64("id_card_type")
78
 	id_card_type, _ := c.GetInt64("id_card_type")
79
 	card_sn := c.GetString("card_sn")
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
 	var dat map[string]interface{}
83
 	var dat map[string]interface{}
84
 	if err := json.Unmarshal([]byte(result), &dat); err == nil {
84
 	if err := json.Unmarshal([]byte(result), &dat); err == nil {

+ 3 - 5
service/gdyb_service.go View File

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
 	nonce := GetRandomString(32)
87
 	nonce := GetRandomString(32)
88
 	timestamp := time.Now().Unix()
88
 	timestamp := time.Now().Unix()
97
 	if id_card_type == 1 {
97
 	if id_card_type == 1 {
98
 		inputData["mdtrt_cert_type"] = "03" // 就诊凭证类型
98
 		inputData["mdtrt_cert_type"] = "03" // 就诊凭证类型
99
 		inputData["card_sn"] = card_sn      // 卡识别码
99
 		inputData["card_sn"] = card_sn      // 卡识别码
100
-		inputData["certno"] = ""            // 证件号码
101
-		//inputData["psn_cert_type"] = "90"   // 人员证件类型
102
-
100
+		inputData["certno"] = id_card_no    // 证件号码
103
 	} else {
101
 	} else {
104
 		inputData["mdtrt_cert_type"] = "02" // 就诊凭证类型
102
 		inputData["mdtrt_cert_type"] = "02" // 就诊凭证类型
105
 		inputData["card_sn"] = ""           // 卡识别码
103
 		inputData["card_sn"] = ""           // 卡识别码
106
 		inputData["certno"] = certNo        // 证件号码
104
 		inputData["certno"] = certNo        // 证件号码
107
 	}
105
 	}
108
-	inputData["psn_cert_type"] = ""     // 人员证件类型
106
+	inputData["psn_cert_type"] = "1"    // 人员证件类型
109
 	inputData["mdtrt_cert_no"] = certNo // 就诊凭证编号
107
 	inputData["mdtrt_cert_no"] = certNo // 就诊凭证编号
110
 	inputData["begntime"] = ""          // 开始时间
108
 	inputData["begntime"] = ""          // 开始时间
111
 	inputData["psn_name"] = ""          // 人员姓名
109
 	inputData["psn_name"] = ""          // 人员姓名