|
@@ -7,6 +7,7 @@ import (
|
7
|
7
|
"encoding/json"
|
8
|
8
|
"fmt"
|
9
|
9
|
"gdyb/models"
|
|
10
|
+ "gdyb/utils"
|
10
|
11
|
"github.com/astaxie/beego"
|
11
|
12
|
"github.com/go-ole/go-ole"
|
12
|
13
|
"github.com/go-ole/go-ole/oleutil"
|
|
@@ -1994,7 +1995,7 @@ func Gdyb5203(baseParams models.BaseParams, businessParams models.BusinessParams
|
1994
|
1995
|
signature := setSignature(timestamp, nonce, baseParams.SecretKey)
|
1995
|
1996
|
|
1996
|
1997
|
// 生成输入报文
|
1997
|
|
- inputMessage := SetInputMessage(nonce, timestamp, baseParams.OrgName, baseParams.Doctor, baseParams.FixmedinsCode, baseParams.InsuplcAdmdvs, baseParams.MdtrtareaAdmvs)
|
|
1998
|
+ inputMessage := SetInputMessageFour(nonce, timestamp, baseParams.OrgName, baseParams.Doctor, baseParams.FixmedinsCode, baseParams.InsuplcAdmdvs, baseParams.MdtrtareaAdmvs)
|
1998
|
1999
|
input := make(map[string]interface{})
|
1999
|
2000
|
inputData := make(map[string]interface{})
|
2000
|
2001
|
inputMessage["infno"] = "5203" // 交易编码
|
|
@@ -4371,3 +4372,33 @@ func Gdyb1101D(certNo string, org_name string, doctor string, fixmedins_code str
|
4371
|
4372
|
}
|
4372
|
4373
|
|
4373
|
4374
|
}
|
|
4375
|
+
|
|
4376
|
+func SetInputMessageFour(nonce string, timestamp int64, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string) map[string]interface{} {
|
|
4377
|
+ // 生成签名
|
|
4378
|
+ //tempTime := time.Unix(timestamp, 0)
|
|
4379
|
+ //timeFormat := tempTime.Format("20060102150405")
|
|
4380
|
+ //timeFormatOne := tempTime.Format("2006-01-02 15:04:05")
|
|
4381
|
+ //randNum := rand.New(rand.NewSource(time.Now().UnixNano())).Int31n(10000)
|
|
4382
|
+
|
|
4383
|
+ msec := time.Now().Format("000")
|
|
4384
|
+
|
|
4385
|
+ // 生成输入报文
|
|
4386
|
+ inputMessage := make(map[string]interface{})
|
|
4387
|
+ inputMessage["msgid"] = fixmedins_code + utils.GetNetTime() + msec + "0" // 发送方报文 ID
|
|
4388
|
+ inputMessage["mdtrtarea_admvs"] = mdtrtarea_admvs // 就医地医保区划
|
|
4389
|
+ inputMessage["insuplc_admdvs"] = insuplc_admdvs // 参保地医保区划
|
|
4390
|
+ inputMessage["recer_sys_code"] = "1" // 接收方系统代码
|
|
4391
|
+ inputMessage["dev_no"] = "" // 设备编号
|
|
4392
|
+ inputMessage["dev_safe_info"] = "" // 设备安全信息
|
|
4393
|
+ inputMessage["cainfo"] = "" // 数字签名信息
|
|
4394
|
+ inputMessage["signtype"] = "SM3" // 签名类型
|
|
4395
|
+ inputMessage["infver"] = "V1.0" // 接收方系统代码
|
|
4396
|
+ inputMessage["opter_type"] = "1" // 经办人类别
|
|
4397
|
+ inputMessage["opter"] = doctor // 经办人
|
|
4398
|
+ inputMessage["opter_name"] = doctor // 经办人姓名
|
|
4399
|
+ inputMessage["inf_time"] = utils.GetNetTime() // 交易时间
|
|
4400
|
+ inputMessage["fixmedins_code"] = fixmedins_code // 定点医药机构编号
|
|
4401
|
+ inputMessage["fixmedins_name"] = org_name //定点医药机构名称
|
|
4402
|
+ inputMessage["sign_no"] = "" //交易签到流水号
|
|
4403
|
+ return inputMessage
|
|
4404
|
+}
|