|
@@ -2711,13 +2711,24 @@ func GetRandomString(l int) string {
|
2711
|
2711
|
func SetInputMessage(nonce string, timestamp int64, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string) map[string]interface{} {
|
2712
|
2712
|
// 生成签名
|
2713
|
2713
|
tempTime := time.Unix(timestamp, 0)
|
2714
|
|
- timeFormat := tempTime.Format("20060102150405")
|
|
2714
|
+ //timeFormat := tempTime.Format("20060102150405")
|
2715
|
2715
|
timeFormatOne := tempTime.Format("2006-01-02 15:04:05")
|
2716
|
|
- randNum := rand.New(rand.NewSource(time.Now().UnixNano())).Int31n(10000)
|
|
2716
|
+ //randNum := rand.New(rand.NewSource(time.Now().UnixNano())).Int31n(10000)
|
|
2717
|
+
|
|
2718
|
+ month := time.Unix(1557042972, 0).Format("1")
|
|
2719
|
+ year := time.Now().Format("2006")
|
|
2720
|
+ month = time.Now().Format("01")
|
|
2721
|
+ day := time.Now().Format("02")
|
|
2722
|
+
|
|
2723
|
+ hour := time.Now().Format("15")
|
|
2724
|
+ min := time.Now().Format("04")
|
|
2725
|
+ sec := time.Now().Format("05")
|
|
2726
|
+
|
|
2727
|
+ msec := time.Now().Format("000")
|
2717
|
2728
|
|
2718
|
2729
|
// 生成输入报文
|
2719
|
2730
|
inputMessage := make(map[string]interface{})
|
2720
|
|
- inputMessage["msgid"] = fixmedins_code + timeFormat + strconv.FormatInt(int64(randNum), 10) // 发送方报文 ID
|
|
2731
|
+ inputMessage["msgid"] = fixmedins_code + year + month + day + hour + min + sec + msec + "0" // 发送方报文 ID
|
2721
|
2732
|
inputMessage["mdtrtarea_admvs"] = mdtrtarea_admvs // 就医地医保区划
|
2722
|
2733
|
inputMessage["insuplc_admdvs"] = insuplc_admdvs // 参保地医保区划
|
2723
|
2734
|
inputMessage["recer_sys_code"] = "1" // 接收方系统代码
|