|
@@ -305,13 +305,14 @@ func Jsyb2203A(psnNo string, mdtrtId string, doctor string, department string, o
|
305
|
305
|
// 门诊费用明细信息上传
|
306
|
306
|
func Jsyb2204(psnNo string, mdtrtId string, hisPrescription []*models.HisPrescription, chrg_bchno string, org_name string, doctor string, dept string, fixmedins_code string, dept_code string, doctor_id string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, balance_accounts_type string, diag_code string, request_url string, access_key string, new_doctor_name string, time_stamp_2203 string) (string, string) {
|
307
|
307
|
// 生成签名
|
|
308
|
+ //timestamp := time.Now().Unix()
|
308
|
309
|
timestamp := time.Now().Unix()
|
309
|
|
- tempTime := time.Unix(timestamp, 0)
|
310
|
|
- //timeFormat := tempTime.Format("20060102150405")
|
|
310
|
+
|
|
311
|
+ timestamp2 := time.Now().Unix()
|
|
312
|
+
|
|
313
|
+ tempTime := time.Unix(timestamp2, 0)
|
311
|
314
|
timeFormatOne := tempTime.Format("2006-01-02 15:04:05")
|
312
|
|
- //chrgBchno := rand.Intn(100000) + 10000
|
313
|
315
|
var customs []*Custom
|
314
|
|
-
|
315
|
316
|
for _, item := range hisPrescription {
|
316
|
317
|
|
317
|
318
|
if item.Type == 1 { //药品
|
|
@@ -405,7 +406,7 @@ func Jsyb2204(psnNo string, mdtrtId string, hisPrescription []*models.HisPrescri
|
405
|
406
|
}
|
406
|
407
|
|
407
|
408
|
// 生成输入报文
|
408
|
|
- inputMessage := SetJSInputMessage(timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs)
|
|
409
|
+ inputMessage := SetJSInputMessage(timestamp2, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs)
|
409
|
410
|
input := make(map[string]interface{})
|
410
|
411
|
feedetail := make([]map[string]interface{}, 0)
|
411
|
412
|
inputMessage["infno"] = "2204" // 交易编码
|
|
@@ -469,21 +470,18 @@ func Jsyb2204(psnNo string, mdtrtId string, hisPrescription []*models.HisPrescri
|
469
|
470
|
feedetailInfo["expContent"] = subfeedetailInfo
|
470
|
471
|
feedetail = append(feedetail, feedetailInfo)
|
471
|
472
|
}
|
|
473
|
+
|
472
|
474
|
input["feedetail"] = feedetail
|
473
|
475
|
inputMessage["input"] = input //交易输入
|
474
|
476
|
var requestLog string
|
475
|
477
|
bytesData, err := json.Marshal(inputMessage)
|
476
|
|
- fmt.Println("----------")
|
477
|
|
- fmt.Println(string(bytesData))
|
478
|
|
- fmt.Println("----------")
|
479
|
|
- requestLog = string(bytesData)
|
|
478
|
+
|
480
|
479
|
if err != nil {
|
481
|
480
|
fmt.Println(err.Error())
|
482
|
481
|
return "", ""
|
483
|
482
|
}
|
484
|
483
|
|
485
|
484
|
request_url = request_url + "2204"
|
486
|
|
- //time_stamp, _ := strconv.ParseInt(time_stamp_2203, 10, 64)
|
487
|
485
|
return HttpRequest(request_url, access_key, secret_key, timestamp, string(bytesData)), requestLog
|
488
|
486
|
}
|
489
|
487
|
|