|
@@ -21,7 +21,7 @@ import (
|
21
|
21
|
"time"
|
22
|
22
|
"unsafe"
|
23
|
23
|
|
24
|
|
- ole "github.com/go-ole/go-ole"
|
|
24
|
+ "github.com/go-ole/go-ole"
|
25
|
25
|
"github.com/go-ole/go-ole/oleutil"
|
26
|
26
|
)
|
27
|
27
|
|
|
@@ -141,7 +141,7 @@ func Gdyb1201(certNo string, org_name string, doctor string, fixmedins_code stri
|
141
|
141
|
}
|
142
|
142
|
|
143
|
143
|
// 人员基本信息
|
144
|
|
-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, certificates string) string {
|
|
144
|
+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, certificates string) (string, string) {
|
145
|
145
|
//生成签名
|
146
|
146
|
nonce := GetRandomString(32)
|
147
|
147
|
timestamp := time.Now().Unix()
|
|
@@ -178,11 +178,13 @@ func Gdyb1101(certNo string, org_name string, doctor string, fixmedins_code stri
|
178
|
178
|
input["data"] = inputData
|
179
|
179
|
inputMessage["input"] = input //交易输入
|
180
|
180
|
|
|
181
|
+ var inputLog string
|
181
|
182
|
bytesData, err := json.Marshal(inputMessage)
|
|
183
|
+ inputLog = string(bytesData)
|
182
|
184
|
fmt.Println(string(bytesData))
|
183
|
185
|
if err != nil {
|
184
|
186
|
fmt.Println(err.Error())
|
185
|
|
- return err.Error()
|
|
187
|
+ return err.Error(), ""
|
186
|
188
|
}
|
187
|
189
|
reader := bytes.NewReader(bytesData)
|
188
|
190
|
gdyb_url := beego.AppConfig.String("gdyb_url")
|
|
@@ -202,7 +204,7 @@ func Gdyb1101(certNo string, org_name string, doctor string, fixmedins_code stri
|
202
|
204
|
request, err := http.NewRequest("POST", url, reader)
|
203
|
205
|
if err != nil {
|
204
|
206
|
fmt.Println(err.Error())
|
205
|
|
- return err.Error()
|
|
207
|
+ return err.Error(), ""
|
206
|
208
|
}
|
207
|
209
|
|
208
|
210
|
request.Header.Set("Content-Type", "application/json;charset=UTF-8")
|
|
@@ -215,16 +217,16 @@ func Gdyb1101(certNo string, org_name string, doctor string, fixmedins_code stri
|
215
|
217
|
resp, err := client.Do(request)
|
216
|
218
|
if err != nil {
|
217
|
219
|
fmt.Println(err.Error())
|
218
|
|
- return err.Error()
|
|
220
|
+ return err.Error(), ""
|
219
|
221
|
}
|
220
|
222
|
respBytes, err := ioutil.ReadAll(resp.Body)
|
221
|
223
|
if err != nil {
|
222
|
224
|
fmt.Println(err.Error())
|
223
|
|
- return err.Error()
|
|
225
|
+ return err.Error(), ""
|
224
|
226
|
}
|
225
|
227
|
fmt.Println(string(respBytes))
|
226
|
228
|
str := string(respBytes)
|
227
|
|
- return str
|
|
229
|
+ return str, inputLog
|
228
|
230
|
}
|
229
|
231
|
|
230
|
232
|
func Gdyb1101A(certNo string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string) string {
|
|
@@ -290,7 +292,7 @@ func Gdyb1101A(certNo string, org_name string, doctor string, fixmedins_code str
|
290
|
292
|
}
|
291
|
293
|
|
292
|
294
|
// 门诊挂号
|
293
|
|
-func Gdyb2201(psnNo string, insutype string, certNo string, org_name string, doctor string, ipt_otp_no string, dept string, fixmedins_code string, dept_code string, doctor_id string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, id_card_type int64) string {
|
|
295
|
+func Gdyb2201(psnNo string, insutype string, certNo string, org_name string, doctor string, ipt_otp_no string, dept string, fixmedins_code string, dept_code string, doctor_id string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, id_card_type int64) (string, string) {
|
294
|
296
|
// 生成签名
|
295
|
297
|
nonce := GetRandomString(32)
|
296
|
298
|
timestamp := time.Now().Unix()
|
|
@@ -325,11 +327,13 @@ func Gdyb2201(psnNo string, insutype string, certNo string, org_name string, doc
|
325
|
327
|
input["data"] = inputData
|
326
|
328
|
inputMessage["input"] = input //交易输入
|
327
|
329
|
|
|
330
|
+ var requestLog string
|
328
|
331
|
bytesData, err := json.Marshal(inputMessage)
|
|
332
|
+ requestLog = string(bytesData)
|
329
|
333
|
fmt.Println(string(bytesData))
|
330
|
334
|
if err != nil {
|
331
|
335
|
fmt.Println(err.Error())
|
332
|
|
- return err.Error()
|
|
336
|
+ return err.Error(), ""
|
333
|
337
|
}
|
334
|
338
|
reader := bytes.NewReader(bytesData)
|
335
|
339
|
//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_api/prd/hsa/hgs/2201"
|
|
@@ -342,7 +346,7 @@ func Gdyb2201(psnNo string, insutype string, certNo string, org_name string, doc
|
342
|
346
|
request, err := http.NewRequest("POST", url, reader)
|
343
|
347
|
if err != nil {
|
344
|
348
|
fmt.Println(err.Error())
|
345
|
|
- return err.Error()
|
|
349
|
+ return err.Error(), ""
|
346
|
350
|
}
|
347
|
351
|
|
348
|
352
|
request.Header.Set("Content-Type", "application/json;charset=UTF-8")
|
|
@@ -355,20 +359,20 @@ func Gdyb2201(psnNo string, insutype string, certNo string, org_name string, doc
|
355
|
359
|
resp, err := client.Do(request)
|
356
|
360
|
if err != nil {
|
357
|
361
|
fmt.Println(err.Error())
|
358
|
|
- return err.Error()
|
|
362
|
+ return err.Error(), ""
|
359
|
363
|
}
|
360
|
364
|
respBytes, err := ioutil.ReadAll(resp.Body)
|
361
|
365
|
if err != nil {
|
362
|
366
|
fmt.Println(err.Error())
|
363
|
|
- return err.Error()
|
|
367
|
+ return err.Error(), ""
|
364
|
368
|
}
|
365
|
369
|
str := string(respBytes)
|
366
|
370
|
fmt.Println(str)
|
367
|
|
- return str
|
|
371
|
+ return str, requestLog
|
368
|
372
|
}
|
369
|
373
|
|
370
|
374
|
// 门诊挂号撤销
|
371
|
|
-func Gdyb2202(psnNo string, mdtrtId string, ipt_otp_no string, org_name string, doctor string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, fixmedins_code string) string {
|
|
375
|
+func Gdyb2202(psnNo string, mdtrtId string, ipt_otp_no string, org_name string, doctor string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, fixmedins_code string) (string, string) {
|
372
|
376
|
// 生成签名
|
373
|
377
|
nonce := GetRandomString(32)
|
374
|
378
|
timestamp := time.Now().Unix()
|
|
@@ -386,11 +390,14 @@ func Gdyb2202(psnNo string, mdtrtId string, ipt_otp_no string, org_name string,
|
386
|
390
|
input["data"] = inputData
|
387
|
391
|
inputMessage["input"] = input //交易输入
|
388
|
392
|
|
|
393
|
+ var requestLog string
|
|
394
|
+
|
389
|
395
|
bytesData, err := json.Marshal(inputMessage)
|
390
|
396
|
fmt.Println(string(bytesData))
|
|
397
|
+ requestLog = string(bytesData)
|
391
|
398
|
if err != nil {
|
392
|
399
|
fmt.Println(err.Error())
|
393
|
|
- return err.Error()
|
|
400
|
+ return err.Error(), ""
|
394
|
401
|
}
|
395
|
402
|
reader := bytes.NewReader(bytesData)
|
396
|
403
|
|
|
@@ -404,7 +411,7 @@ func Gdyb2202(psnNo string, mdtrtId string, ipt_otp_no string, org_name string,
|
404
|
411
|
request, err := http.NewRequest("POST", url, reader)
|
405
|
412
|
if err != nil {
|
406
|
413
|
fmt.Println(err.Error())
|
407
|
|
- return err.Error()
|
|
414
|
+ return err.Error(), ""
|
408
|
415
|
}
|
409
|
416
|
|
410
|
417
|
request.Header.Set("Content-Type", "application/json;charset=UTF-8")
|
|
@@ -419,20 +426,20 @@ func Gdyb2202(psnNo string, mdtrtId string, ipt_otp_no string, org_name string,
|
419
|
426
|
resp, err := client.Do(request)
|
420
|
427
|
if err != nil {
|
421
|
428
|
fmt.Println(err.Error())
|
422
|
|
- return err.Error()
|
|
429
|
+ return err.Error(), ""
|
423
|
430
|
}
|
424
|
431
|
respBytes, err := ioutil.ReadAll(resp.Body)
|
425
|
432
|
if err != nil {
|
426
|
433
|
fmt.Println(err.Error())
|
427
|
|
- return err.Error()
|
|
434
|
+ return err.Error(), ""
|
428
|
435
|
}
|
429
|
436
|
str := string(respBytes)
|
430
|
437
|
fmt.Println(str)
|
431
|
|
- return str
|
|
438
|
+ return str, requestLog
|
432
|
439
|
}
|
433
|
440
|
|
434
|
441
|
// 门诊就诊信息上传
|
435
|
|
-func Gdyb2203(psnNo string, mdtrtId string, doctor string, department string, org_name string, med_type string, doctor_id int64, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, sick_code string, sick_name string, dept string, config []*models.HisXtDiagnoseConfig) string {
|
|
442
|
+func Gdyb2203(psnNo string, mdtrtId string, doctor string, department string, org_name string, med_type string, doctor_id int64, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, sick_code string, sick_name string, dept string, config []*models.HisXtDiagnoseConfig) (string, string) {
|
436
|
443
|
// 生成签名
|
437
|
444
|
nonce := GetRandomString(32)
|
438
|
445
|
timestamp := time.Now().Unix()
|
|
@@ -475,12 +482,13 @@ func Gdyb2203(psnNo string, mdtrtId string, doctor string, department string, or
|
475
|
482
|
input["diseinfo"] = diseinfo
|
476
|
483
|
input["mdtrtinfo"] = inputData
|
477
|
484
|
inputMessage["input"] = input //交易输入
|
478
|
|
-
|
|
485
|
+ var requestLog string
|
479
|
486
|
bytesData, err := json.Marshal(inputMessage)
|
480
|
487
|
fmt.Println(string(bytesData))
|
|
488
|
+ requestLog = string(bytesData)
|
481
|
489
|
if err != nil {
|
482
|
490
|
fmt.Println(err.Error())
|
483
|
|
- return err.Error()
|
|
491
|
+ return err.Error(), ""
|
484
|
492
|
}
|
485
|
493
|
reader := bytes.NewReader(bytesData)
|
486
|
494
|
|
|
@@ -495,7 +503,7 @@ func Gdyb2203(psnNo string, mdtrtId string, doctor string, department string, or
|
495
|
503
|
request, err := http.NewRequest("POST", url, reader)
|
496
|
504
|
if err != nil {
|
497
|
505
|
fmt.Println(err.Error())
|
498
|
|
- return err.Error()
|
|
506
|
+ return err.Error(), ""
|
499
|
507
|
}
|
500
|
508
|
|
501
|
509
|
request.Header.Set("Content-Type", "application/json;charset=UTF-8")
|
|
@@ -508,20 +516,20 @@ func Gdyb2203(psnNo string, mdtrtId string, doctor string, department string, or
|
508
|
516
|
resp, err := client.Do(request)
|
509
|
517
|
if err != nil {
|
510
|
518
|
fmt.Println(err.Error())
|
511
|
|
- return err.Error()
|
|
519
|
+ return err.Error(), ""
|
512
|
520
|
}
|
513
|
521
|
respBytes, err := ioutil.ReadAll(resp.Body)
|
514
|
522
|
if err != nil {
|
515
|
523
|
fmt.Println(err.Error())
|
516
|
|
- return err.Error()
|
|
524
|
+ return err.Error(), ""
|
517
|
525
|
}
|
518
|
526
|
str := string(respBytes)
|
519
|
527
|
fmt.Println(str)
|
520
|
|
- return str
|
|
528
|
+ return str, requestLog
|
521
|
529
|
}
|
522
|
530
|
|
523
|
531
|
// 门诊就诊信息上传
|
524
|
|
-func Gdyb2203A(psnNo string, mdtrtId string, doctor string, department string, org_name string, med_type string, doctor_id int64, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, sick_code string, sick_name string, dept string, config []*models.HisXtDiagnoseConfig) string {
|
|
532
|
+func Gdyb2203A(psnNo string, mdtrtId string, doctor string, department string, org_name string, med_type string, doctor_id int64, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, sick_code string, sick_name string, dept string, config []*models.HisXtDiagnoseConfig) (string, string) {
|
525
|
533
|
// 生成签名
|
526
|
534
|
nonce := GetRandomString(32)
|
527
|
535
|
timestamp := time.Now().Unix()
|
|
@@ -567,12 +575,13 @@ func Gdyb2203A(psnNo string, mdtrtId string, doctor string, department string, o
|
567
|
575
|
input["diseinfo"] = diseinfo
|
568
|
576
|
input["mdtrtinfo"] = inputData
|
569
|
577
|
inputMessage["input"] = input //交易输入
|
570
|
|
-
|
|
578
|
+ var requestLog string
|
571
|
579
|
bytesData, err := json.Marshal(inputMessage)
|
572
|
580
|
fmt.Println(string(bytesData))
|
|
581
|
+ requestLog = string(bytesData)
|
573
|
582
|
if err != nil {
|
574
|
583
|
fmt.Println(err.Error())
|
575
|
|
- return err.Error()
|
|
584
|
+ return err.Error(), ""
|
576
|
585
|
}
|
577
|
586
|
reader := bytes.NewReader(bytesData)
|
578
|
587
|
|
|
@@ -587,7 +596,7 @@ func Gdyb2203A(psnNo string, mdtrtId string, doctor string, department string, o
|
587
|
596
|
request, err := http.NewRequest("POST", url, reader)
|
588
|
597
|
if err != nil {
|
589
|
598
|
fmt.Println(err.Error())
|
590
|
|
- return err.Error()
|
|
599
|
+ return err.Error(), ""
|
591
|
600
|
}
|
592
|
601
|
|
593
|
602
|
request.Header.Set("Content-Type", "application/json;charset=UTF-8")
|
|
@@ -600,16 +609,16 @@ func Gdyb2203A(psnNo string, mdtrtId string, doctor string, department string, o
|
600
|
609
|
resp, err := client.Do(request)
|
601
|
610
|
if err != nil {
|
602
|
611
|
fmt.Println(err.Error())
|
603
|
|
- return err.Error()
|
|
612
|
+ return err.Error(), ""
|
604
|
613
|
}
|
605
|
614
|
respBytes, err := ioutil.ReadAll(resp.Body)
|
606
|
615
|
if err != nil {
|
607
|
616
|
fmt.Println(err.Error())
|
608
|
|
- return err.Error()
|
|
617
|
+ return err.Error(), ""
|
609
|
618
|
}
|
610
|
619
|
str := string(respBytes)
|
611
|
620
|
fmt.Println(str)
|
612
|
|
- return str
|
|
621
|
+ return str, requestLog
|
613
|
622
|
}
|
614
|
623
|
|
615
|
624
|
type Custom struct {
|
|
@@ -669,7 +678,7 @@ type Result struct {
|
669
|
678
|
}
|
670
|
679
|
|
671
|
680
|
// 门诊费用明细信息上传
|
672
|
|
-func Gdyb2204(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) string {
|
|
681
|
+func Gdyb2204(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) (string, string) {
|
673
|
682
|
// 生成签名
|
674
|
683
|
nonce := GetRandomString(32)
|
675
|
684
|
timestamp := time.Now().Unix()
|
|
@@ -815,15 +824,15 @@ func Gdyb2204(psnNo string, mdtrtId string, hisPrescription []*models.HisPrescri
|
815
|
824
|
}
|
816
|
825
|
input["feedetail"] = feedetail
|
817
|
826
|
inputMessage["input"] = input //交易输入
|
818
|
|
-
|
|
827
|
+ var requestLog string
|
819
|
828
|
bytesData, err := json.Marshal(inputMessage)
|
820
|
829
|
fmt.Println("----------")
|
821
|
830
|
fmt.Println(string(bytesData))
|
822
|
831
|
fmt.Println("----------")
|
823
|
|
-
|
|
832
|
+ requestLog = string(bytesData)
|
824
|
833
|
if err != nil {
|
825
|
834
|
fmt.Println(err.Error())
|
826
|
|
- return ""
|
|
835
|
+ return "", ""
|
827
|
836
|
}
|
828
|
837
|
reader := bytes.NewReader(bytesData)
|
829
|
838
|
|
|
@@ -840,7 +849,7 @@ func Gdyb2204(psnNo string, mdtrtId string, hisPrescription []*models.HisPrescri
|
840
|
849
|
request, err := http.NewRequest("POST", url, reader)
|
841
|
850
|
if err != nil {
|
842
|
851
|
fmt.Println(err.Error())
|
843
|
|
- return ""
|
|
852
|
+ return "", ""
|
844
|
853
|
}
|
845
|
854
|
|
846
|
855
|
request.Header.Set("Content-Type", "application/json;charset=UTF-8")
|
|
@@ -853,21 +862,21 @@ func Gdyb2204(psnNo string, mdtrtId string, hisPrescription []*models.HisPrescri
|
853
|
862
|
resp, err := client.Do(request)
|
854
|
863
|
if err != nil {
|
855
|
864
|
fmt.Println(err.Error())
|
856
|
|
- return ""
|
|
865
|
+ return "", ""
|
857
|
866
|
}
|
858
|
867
|
respBytes, err := ioutil.ReadAll(resp.Body)
|
859
|
868
|
if err != nil {
|
860
|
869
|
fmt.Println(err.Error())
|
861
|
|
- return ""
|
|
870
|
+ return "", ""
|
862
|
871
|
}
|
863
|
|
- return string(respBytes)
|
|
872
|
+ return string(respBytes), requestLog
|
864
|
873
|
//var result RequestResult
|
865
|
874
|
//json.Unmarshal(respBytes, &result)
|
866
|
875
|
//return &result
|
867
|
876
|
}
|
868
|
877
|
|
869
|
878
|
// 门诊费用明细信息撤销
|
870
|
|
-func Gdyb2205(psnNo string, mdtrtId string, chrgBchno string, org_name string, doctor string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, fixmedins_code string) string {
|
|
879
|
+func Gdyb2205(psnNo string, mdtrtId string, chrgBchno string, org_name string, doctor string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, fixmedins_code string) (string, string) {
|
871
|
880
|
// 生成签名
|
872
|
881
|
nonce := GetRandomString(32)
|
873
|
882
|
timestamp := time.Now().Unix()
|
|
@@ -888,9 +897,12 @@ func Gdyb2205(psnNo string, mdtrtId string, chrgBchno string, org_name string, d
|
888
|
897
|
|
889
|
898
|
bytesData, err := json.Marshal(inputMessage)
|
890
|
899
|
fmt.Println(string(bytesData))
|
|
900
|
+
|
|
901
|
+ var requestLog string
|
|
902
|
+ requestLog = string(bytesData)
|
891
|
903
|
if err != nil {
|
892
|
904
|
fmt.Println(err.Error())
|
893
|
|
- return err.Error()
|
|
905
|
+ return err.Error(), ""
|
894
|
906
|
}
|
895
|
907
|
reader := bytes.NewReader(bytesData)
|
896
|
908
|
gdyb_url := beego.AppConfig.String("gdyb_url")
|
|
@@ -909,7 +921,7 @@ func Gdyb2205(psnNo string, mdtrtId string, chrgBchno string, org_name string, d
|
909
|
921
|
fmt.Println(request)
|
910
|
922
|
if err != nil {
|
911
|
923
|
fmt.Println(err.Error())
|
912
|
|
- return err.Error()
|
|
924
|
+ return err.Error(), ""
|
913
|
925
|
}
|
914
|
926
|
|
915
|
927
|
request.Header.Set("Content-Type", "application/json;charset=UTF-8")
|
|
@@ -922,21 +934,21 @@ func Gdyb2205(psnNo string, mdtrtId string, chrgBchno string, org_name string, d
|
922
|
934
|
resp, err := client.Do(request)
|
923
|
935
|
if err != nil {
|
924
|
936
|
fmt.Println(err.Error())
|
925
|
|
- return err.Error()
|
|
937
|
+ return err.Error(), ""
|
926
|
938
|
}
|
927
|
939
|
respBytes, err := ioutil.ReadAll(resp.Body)
|
928
|
940
|
if err != nil {
|
929
|
941
|
fmt.Println(err.Error())
|
930
|
|
- return err.Error()
|
|
942
|
+ return err.Error(), ""
|
931
|
943
|
}
|
932
|
944
|
str := string(respBytes)
|
933
|
945
|
fmt.Println(str)
|
934
|
|
- return str
|
|
946
|
+ return str, requestLog
|
935
|
947
|
}
|
936
|
948
|
|
937
|
949
|
// 门诊预结算
|
938
|
950
|
//func Gdyb2206(psnNo string, mdtrtId string, chrgBchno string, certNo string, insutype string, total string, org_name string, doctor string, secret_key string) string {
|
939
|
|
-func Gdyb2206(psnNo string, mdtrtId string, chrgBchno string, certNo string, insutype string, total string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, med_type string, id_card_type int64, fulamt_ownpay_amt float64, overlmt_selfpay float64, preselfpay_amt float64, inscp_scp_amt float64, certificates int64) string {
|
|
951
|
+func Gdyb2206(psnNo string, mdtrtId string, chrgBchno string, certNo string, insutype string, total string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, med_type string, id_card_type int64, fulamt_ownpay_amt float64, overlmt_selfpay float64, preselfpay_amt float64, inscp_scp_amt float64, certificates int64) (string, string) {
|
940
|
952
|
|
941
|
953
|
// 生成签名
|
942
|
954
|
nonce := GetRandomString(32)
|
|
@@ -973,11 +985,15 @@ func Gdyb2206(psnNo string, mdtrtId string, chrgBchno string, certNo string, ins
|
973
|
985
|
input["data"] = inputData
|
974
|
986
|
inputMessage["input"] = input //交易输入
|
975
|
987
|
|
|
988
|
+ var requestLog string
|
|
989
|
+
|
976
|
990
|
bytesData, err := json.Marshal(inputMessage)
|
|
991
|
+
|
|
992
|
+ requestLog = string(bytesData)
|
977
|
993
|
fmt.Println(string(bytesData))
|
978
|
994
|
if err != nil {
|
979
|
995
|
fmt.Println(err.Error())
|
980
|
|
- return err.Error()
|
|
996
|
+ return err.Error(), ""
|
981
|
997
|
}
|
982
|
998
|
reader := bytes.NewReader(bytesData)
|
983
|
999
|
|
|
@@ -994,7 +1010,7 @@ func Gdyb2206(psnNo string, mdtrtId string, chrgBchno string, certNo string, ins
|
994
|
1010
|
request, err := http.NewRequest("POST", url, reader)
|
995
|
1011
|
if err != nil {
|
996
|
1012
|
fmt.Println(err.Error())
|
997
|
|
- return err.Error()
|
|
1013
|
+ return err.Error(), ""
|
998
|
1014
|
}
|
999
|
1015
|
|
1000
|
1016
|
request.Header.Set("Content-Type", "application/json;charset=UTF-8")
|
|
@@ -1007,16 +1023,16 @@ func Gdyb2206(psnNo string, mdtrtId string, chrgBchno string, certNo string, ins
|
1007
|
1023
|
resp, err := client.Do(request)
|
1008
|
1024
|
if err != nil {
|
1009
|
1025
|
fmt.Println(err.Error())
|
1010
|
|
- return err.Error()
|
|
1026
|
+ return err.Error(), ""
|
1011
|
1027
|
}
|
1012
|
1028
|
respBytes, err := ioutil.ReadAll(resp.Body)
|
1013
|
1029
|
if err != nil {
|
1014
|
1030
|
fmt.Println(err.Error())
|
1015
|
|
- return err.Error()
|
|
1031
|
+ return err.Error(), ""
|
1016
|
1032
|
}
|
1017
|
1033
|
str := string(respBytes)
|
1018
|
1034
|
fmt.Println(str)
|
1019
|
|
- return str
|
|
1035
|
+ return str, requestLog
|
1020
|
1036
|
}
|
1021
|
1037
|
|
1022
|
1038
|
// 门诊结算
|