|
@@ -49,11 +49,12 @@ func HisManagerApiRegistRouters() {
|
49
|
49
|
beego.Router("/api/refundnumber/post", &HisApiController{}, "get:RefundNumber")
|
50
|
50
|
|
51
|
51
|
beego.Router("/api/refunddetail/post", &HisApiController{}, "get:RefundDetail")
|
|
52
|
+
|
|
53
|
+ beego.Router("/api/presettle/get", &HisApiController{}, "get:GetPreUploadInfo")
|
52
|
54
|
|
53
|
55
|
beego.Router("/api/treatment/check", &HisApiController{}, "get:CheckTreatment")
|
54
|
56
|
beego.Router("/api/org/info", &HisApiController{}, "get:GetOrgInfo")
|
55
|
57
|
beego.Router("/api/readcard", &HisApiController{}, "get:ReadCard")
|
56
|
|
- beego.Router("/api/presettle/get", &HisApiController{}, "get:GetPreUploadInfo")
|
57
|
58
|
beego.Router("/api/310", &HisApiController{}, "get:Check310")
|
58
|
59
|
beego.Router("/api/390", &HisApiController{}, "get:Check390")
|
59
|
60
|
beego.Router("/api/patient/info", &HisApiController{}, "get:GetPatientInfo")
|
|
@@ -72,11 +73,7 @@ func HisManagerApiRegistRouters() {
|
72
|
73
|
beego.Router("/api/insutype/check", &HisApiController{}, "get:CheckInsutype")
|
73
|
74
|
beego.Router("/api/batchsettlelist/get", &HisApiController{}, "get:GetBatchSettleList")
|
74
|
75
|
beego.Router("/api/psn/info", &HisApiController{}, "get:GetPsnNcdsInfo")
|
75
|
|
-
|
76
|
|
-
|
77
|
|
-
|
78
|
76
|
beego.Router("/api/allopatry/refund", &HisApiController{}, "post:RefundAllopatry")
|
79
|
|
-
|
80
|
77
|
beego.Router("/api/check", &HisApiController{}, "get:Check")
|
81
|
78
|
beego.Router("/api/check3101", &HisApiController{}, "get:Check3101")
|
82
|
79
|
beego.Router("/api/check3102", &HisApiController{}, "get:Check3102")
|
|
@@ -1896,6 +1893,8 @@ func (c *HisApiController) ReadCard() {
|
1896
|
1893
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeHisFailedException)
|
1897
|
1894
|
return
|
1898
|
1895
|
}
|
|
1896
|
+ } else if miConfig.MdtrtareaAdmvs == "440300" || miConfig.MdtrtareaAdmvs == "440305" {
|
|
1897
|
+
|
1899
|
1898
|
}
|
1900
|
1899
|
break
|
1901
|
1900
|
}
|
|
@@ -1995,10 +1994,8 @@ type CustomFundPay struct {
|
1995
|
1994
|
}
|
1996
|
1995
|
|
1997
|
1996
|
func (c *HisApiController) GetSettleList() {
|
1998
|
|
-
|
1999
|
1997
|
order_id, _ := c.GetInt64("order_id")
|
2000
|
1998
|
admin_user_id, _ := c.GetInt64("admin_user_id")
|
2001
|
|
-
|
2002
|
1999
|
order, _ := service.GetHisOrderByIDTwo(order_id)
|
2003
|
2000
|
roles, _ := service.GetDoctorListTwo(c.GetAdminUserInfo().CurrentOrgId)
|
2004
|
2001
|
his, _ := service.GetHisPatientByNumber(order.MdtrtId)
|
|
@@ -5761,7 +5758,19 @@ func (c *HisApiController) GetUploadInfo() {
|
5761
|
5758
|
|
5762
|
5759
|
} else if miConfig.MdtrtareaAdmvs == "350500" {
|
5763
|
5760
|
result, requestLog = service.FJyb2203(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, strconv.FormatInt(reg_type, 10), doctor_info.DoctorNumber, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.ContentCode, sickConfig.ClassName, roles.UserName, config, begin_time, doctor_info.UserName, roles.UserName, miConfig.Url, miConfig.Code, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey)
|
5764
|
|
-
|
|
5761
|
+ saveLog(result, requestLog, "2203", "上传就诊信息")
|
|
5762
|
+ var respJSON2 map[string]interface{}
|
|
5763
|
+ if err := json.Unmarshal([]byte(string(result)), &respJSON2); err != nil {
|
|
5764
|
+ utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
|
|
5765
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
5766
|
+ return
|
|
5767
|
+ }
|
|
5768
|
+ userJSONBytes2, _ := json.Marshal(respJSON2)
|
|
5769
|
+ if err := json.Unmarshal(userJSONBytes2, &res2); err != nil {
|
|
5770
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
5771
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
5772
|
+ return
|
|
5773
|
+ }
|
5765
|
5774
|
} else {
|
5766
|
5775
|
if miConfig.MdtrtareaAdmvs == "440781" {
|
5767
|
5776
|
result, requestLog = service.Gdyb2203A(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, strconv.FormatInt(reg_type, 10), doctor_info.DoctorNumber, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.ContentCode, sickConfig.ClassName, roles.UserName, config, begin_time)
|
|
@@ -6000,7 +6009,29 @@ func (c *HisApiController) GetUploadInfo() {
|
6000
|
6009
|
|
6001
|
6010
|
} else if miConfig.MdtrtareaAdmvs == "350500" {
|
6002
|
6011
|
|
6003
|
|
-
|
|
6012
|
+ result, request_log := service.FJyb2204(his.PsnNo, his.Number, prescriptions, chrg_bchno, miConfig.OrgName, roles.UserName, strconv.FormatInt(patientPrescription.Departments, 10), miConfig.Code, department.Number, strconv.FormatInt(roles.AdminUserId, 10), his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(his.BalanceAccountsType, 10), roles.UserName, miConfig.Url, miConfig.Code, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey)
|
|
6013
|
+ var dat map[string]interface{}
|
|
6014
|
+ if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
6015
|
+ fmt.Println(dat)
|
|
6016
|
+ } else {
|
|
6017
|
+ fmt.Println(err)
|
|
6018
|
+ }
|
|
6019
|
+ saveLog(result, request_log, "2204", "上传费用明细")
|
|
6020
|
+ userJSONBytes, _ := json.Marshal(dat)
|
|
6021
|
+
|
|
6022
|
+ if err := json.Unmarshal(userJSONBytes, &resFour10265); err != nil {
|
|
6023
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
6024
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
6025
|
+ return
|
|
6026
|
+ }
|
|
6027
|
+
|
|
6028
|
+ res.InfRefmsgid = resFour10265.InfRefmsgid
|
|
6029
|
+ res.Output = resFour10265.Output
|
|
6030
|
+ res.ErrMsg = resFour10265.ErrMsg
|
|
6031
|
+ res.Cainfo = resFour10265.Cainfo
|
|
6032
|
+ res.WarnMsg = resFour10265.WarnMsg
|
|
6033
|
+ infocode, _ := strconv.ParseInt(resFour10265.Infcode, 10, 64)
|
|
6034
|
+ res.Infcode = infocode
|
6004
|
6035
|
|
6005
|
6036
|
} else {
|
6006
|
6037
|
|
|
@@ -6382,6 +6413,33 @@ func (c *HisApiController) GetUploadInfo() {
|
6382
|
6413
|
infocode, _ := strconv.ParseInt(resSeven10265.Infcode, 10, 64)
|
6383
|
6414
|
res.Infcode = infocode
|
6384
|
6415
|
|
|
6416
|
+ } else if miConfig.MdtrtareaAdmvs == "350500" {
|
|
6417
|
+
|
|
6418
|
+ result2, src_resquest = service.FJyb2207(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(reg_type, 10), his.IdCardType, tempOrder.FulamtOwnpayAmt, tempOrder.OverlmtSelfPay, tempOrder.PreselfpayAmt, tempOrder.InscpScpAmt, his.IdType, acct_used_flag, miConfig.Url, miConfig.Code, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey)
|
|
6419
|
+
|
|
6420
|
+
|
|
6421
|
+ var dat map[string]interface{}
|
|
6422
|
+ if err := json.Unmarshal([]byte(result2), &dat); err == nil {
|
|
6423
|
+ fmt.Println(dat)
|
|
6424
|
+ } else {
|
|
6425
|
+ fmt.Println(err)
|
|
6426
|
+ }
|
|
6427
|
+ saveLog(result2, src_resquest, "2207", "结算")
|
|
6428
|
+ userJSONBytes, _ := json.Marshal(dat)
|
|
6429
|
+ if err := json.Unmarshal(userJSONBytes, &resSeven10265); err != nil {
|
|
6430
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
6431
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
6432
|
+ return
|
|
6433
|
+ }
|
|
6434
|
+
|
|
6435
|
+ res.InfRefmsgid = resSeven10265.InfRefmsgid
|
|
6436
|
+ res.Output = resSeven10265.Output
|
|
6437
|
+ res.ErrMsg = resSeven10265.ErrMsg
|
|
6438
|
+ res.Cainfo = resSeven10265.Cainfo
|
|
6439
|
+ res.WarnMsg = resSeven10265.WarnMsg
|
|
6440
|
+ infocode, _ := strconv.ParseInt(resSeven10265.Infcode, 10, 64)
|
|
6441
|
+ res.Infcode = infocode
|
|
6442
|
+
|
6385
|
6443
|
} else {
|
6386
|
6444
|
if miConfig.Code == "H15049901371" {
|
6387
|
6445
|
|
|
@@ -6794,6 +6852,21 @@ func (c *HisApiController) GetUploadInfo() {
|
6794
|
6852
|
infocode, _ := strconv.ParseInt(resSeven10265.Infcode, 10, 64)
|
6795
|
6853
|
res.Infcode = infocode
|
6796
|
6854
|
|
|
6855
|
+ } else if miConfig.MdtrtareaAdmvs == "350500" {
|
|
6856
|
+ result2, src_resquest = service.FJyb2207(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(reg_type, 10), his.IdCardType, tempOrder.FulamtOwnpayAmt, tempOrder.OverlmtSelfPay, tempOrder.PreselfpayAmt, tempOrder.InscpScpAmt, his.IdType, acct_used_flag, miConfig.Url, miConfig.Code, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey)
|
|
6857
|
+ var dat map[string]interface{}
|
|
6858
|
+ if err := json.Unmarshal([]byte(result2), &dat); err == nil {
|
|
6859
|
+ fmt.Println(dat)
|
|
6860
|
+ } else {
|
|
6861
|
+ fmt.Println(err)
|
|
6862
|
+ }
|
|
6863
|
+ saveLog(result2, src_resquest, "2207", "结算")
|
|
6864
|
+ userJSONBytes, _ := json.Marshal(dat)
|
|
6865
|
+ if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
6866
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
6867
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
6868
|
+ return
|
|
6869
|
+ }
|
6797
|
6870
|
} else {
|
6798
|
6871
|
|
6799
|
6872
|
var src_resquest string
|
|
@@ -7601,24 +7674,6 @@ func (c *HisApiController) GetPreUploadInfo() {
|
7601
|
7674
|
}
|
7602
|
7675
|
|
7603
|
7676
|
} else if miConfig.MdtrtareaAdmvs == "320921" || miConfig.MdtrtareaAdmvs == "320982" {
|
7604
|
|
-
|
7605
|
|
-
|
7606
|
|
-
|
7607
|
|
-
|
7608
|
|
-
|
7609
|
|
-
|
7610
|
|
-
|
7611
|
|
-
|
7612
|
|
-
|
7613
|
|
-
|
7614
|
|
-
|
7615
|
|
-
|
7616
|
|
-
|
7617
|
|
-
|
7618
|
|
-
|
7619
|
|
-
|
7620
|
|
-
|
7621
|
|
-
|
7622
|
7677
|
|
7623
|
7678
|
data := make(map[string]interface{})
|
7624
|
7679
|
client := &http.Client{}
|
|
@@ -7693,6 +7748,22 @@ func (c *HisApiController) GetPreUploadInfo() {
|
7693
|
7748
|
infocode, _ := strconv.ParseInt(resSix10265.Infcode, 10, 64)
|
7694
|
7749
|
res2.Infcode = infocode
|
7695
|
7750
|
|
|
7751
|
+ } else if miConfig.MdtrtareaAdmvs == "350500" {
|
|
7752
|
+ result, requestLog := service.FJyb2203(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, strconv.FormatInt(reg_type, 10), doctor_info.DoctorNumber, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.ContentCode, sickConfig.ClassName, roles.UserName, config, begin_time, doctor_info.UserName, roles.UserName, miConfig.Url, miConfig.Code, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey)
|
|
7753
|
+ saveLog(result, requestLog, "2203", "上传就诊信息")
|
|
7754
|
+ var respJSON2 map[string]interface{}
|
|
7755
|
+ if err := json.Unmarshal([]byte(string(result)), &respJSON2); err != nil {
|
|
7756
|
+ utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
|
|
7757
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
7758
|
+ return
|
|
7759
|
+ }
|
|
7760
|
+ userJSONBytes2, _ := json.Marshal(respJSON2)
|
|
7761
|
+ if err := json.Unmarshal(userJSONBytes2, &res2); err != nil {
|
|
7762
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
7763
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
7764
|
+ return
|
|
7765
|
+ }
|
|
7766
|
+
|
7696
|
7767
|
} else {
|
7697
|
7768
|
var result string
|
7698
|
7769
|
var requestLog string
|
|
@@ -7918,6 +7989,23 @@ func (c *HisApiController) GetPreUploadInfo() {
|
7918
|
7989
|
infocode, _ := strconv.ParseInt(resFour10265.Infcode, 10, 64)
|
7919
|
7990
|
res.Infcode = infocode
|
7920
|
7991
|
|
|
7992
|
+ } else if miConfig.MdtrtareaAdmvs == "350500" {
|
|
7993
|
+
|
|
7994
|
+ result, request_log := service.FJyb2204(his.PsnNo, his.Number, prescriptions, chrg_bchno, miConfig.OrgName, roles.UserName, strconv.FormatInt(patientPrescription.Departments, 10), miConfig.Code, department.Number, strconv.FormatInt(roles.AdminUserId, 10), his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(his.BalanceAccountsType, 10), roles.UserName, miConfig.Url, miConfig.Code, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey)
|
|
7995
|
+ var dat map[string]interface{}
|
|
7996
|
+ if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
7997
|
+ fmt.Println(dat)
|
|
7998
|
+ } else {
|
|
7999
|
+ fmt.Println(err)
|
|
8000
|
+ }
|
|
8001
|
+ saveLog(result, request_log, "2204", "上传费用明细")
|
|
8002
|
+ userJSONBytes, _ := json.Marshal(dat)
|
|
8003
|
+ if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
8004
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
8005
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
8006
|
+ return
|
|
8007
|
+ }
|
|
8008
|
+
|
7921
|
8009
|
} else {
|
7922
|
8010
|
|
7923
|
8011
|
if miConfig.Code == "H15049901371" {
|
|
@@ -8272,6 +8360,22 @@ func (c *HisApiController) GetPreUploadInfo() {
|
8272
|
8360
|
infocode, _ := strconv.ParseInt(resSeven10265.Infcode, 10, 64)
|
8273
|
8361
|
res.Infcode = infocode
|
8274
|
8362
|
|
|
8363
|
+ } else if miConfig.MdtrtareaAdmvs == "350500" {
|
|
8364
|
+
|
|
8365
|
+ result, request_log := service.FJyb2206(his.PsnNo, his.Number, chrg_bchno, cert_no, insutype, allTotal, miConfig.OrgName, roles.UserName, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, strconv.FormatInt(reg_type, 10), his.IdCardType, 0, 0, 0, 0, his.IdType, miConfig.Url, miConfig.Code, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey)
|
|
8366
|
+ var dat map[string]interface{}
|
|
8367
|
+ if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
8368
|
+ fmt.Println(dat)
|
|
8369
|
+ } else {
|
|
8370
|
+ fmt.Println(err)
|
|
8371
|
+ }
|
|
8372
|
+ saveLog(result, request_log, "2206", "预结算")
|
|
8373
|
+ userJSONBytes, _ := json.Marshal(dat)
|
|
8374
|
+ if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
8375
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
8376
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
8377
|
+ return
|
|
8378
|
+ }
|
8275
|
8379
|
} else {
|
8276
|
8380
|
|
8277
|
8381
|
var result string
|
|
@@ -8466,212 +8570,6 @@ func (c *HisApiController) GetPreUploadInfo() {
|
8466
|
8570
|
}
|
8467
|
8571
|
}
|
8468
|
8572
|
|
8469
|
|
-
|
8470
|
|
-
|
8471
|
|
-
|
8472
|
|
-
|
8473
|
|
-
|
8474
|
|
-
|
8475
|
|
-
|
8476
|
|
-
|
8477
|
|
-
|
8478
|
|
-
|
8479
|
|
-
|
8480
|
|
-
|
8481
|
|
-
|
8482
|
|
-
|
8483
|
|
-
|
8484
|
|
-
|
8485
|
|
-
|
8486
|
|
-
|
8487
|
|
-
|
8488
|
|
-
|
8489
|
|
-
|
8490
|
|
-
|
8491
|
|
-
|
8492
|
|
-
|
8493
|
|
-
|
8494
|
|
-
|
8495
|
|
-
|
8496
|
|
-
|
8497
|
|
-
|
8498
|
|
-
|
8499
|
|
-
|
8500
|
|
-
|
8501
|
|
-
|
8502
|
|
-
|
8503
|
|
-
|
8504
|
|
-
|
8505
|
|
-
|
8506
|
|
-
|
8507
|
|
-
|
8508
|
|
-
|
8509
|
|
-
|
8510
|
|
-
|
8511
|
|
-
|
8512
|
|
-
|
8513
|
|
-
|
8514
|
|
-
|
8515
|
|
-
|
8516
|
|
-
|
8517
|
|
-
|
8518
|
|
-
|
8519
|
|
-
|
8520
|
|
-
|
8521
|
|
-
|
8522
|
|
-
|
8523
|
|
-
|
8524
|
|
-
|
8525
|
|
-
|
8526
|
|
-
|
8527
|
|
-
|
8528
|
|
-
|
8529
|
|
-
|
8530
|
|
-
|
8531
|
|
-
|
8532
|
|
-
|
8533
|
|
-
|
8534
|
|
-
|
8535
|
|
-
|
8536
|
|
-
|
8537
|
|
-
|
8538
|
|
-
|
8539
|
|
-
|
8540
|
|
-
|
8541
|
|
-
|
8542
|
|
-
|
8543
|
|
-
|
8544
|
|
-
|
8545
|
|
-
|
8546
|
|
-
|
8547
|
|
-
|
8548
|
|
-
|
8549
|
|
-
|
8550
|
|
-
|
8551
|
|
-
|
8552
|
|
-
|
8553
|
|
-
|
8554
|
|
-
|
8555
|
|
-
|
8556
|
|
-
|
8557
|
|
-
|
8558
|
|
-
|
8559
|
|
-
|
8560
|
|
-
|
8561
|
|
-
|
8562
|
|
-
|
8563
|
|
-
|
8564
|
|
-
|
8565
|
|
-
|
8566
|
|
-
|
8567
|
|
-
|
8568
|
|
-
|
8569
|
|
-
|
8570
|
|
-
|
8571
|
|
-
|
8572
|
|
-
|
8573
|
|
-
|
8574
|
|
-
|
8575
|
|
-
|
8576
|
|
-
|
8577
|
|
-
|
8578
|
|
-
|
8579
|
|
-
|
8580
|
|
-
|
8581
|
|
-
|
8582
|
|
-
|
8583
|
|
-
|
8584
|
|
-
|
8585
|
|
-
|
8586
|
|
-
|
8587
|
|
-
|
8588
|
|
-
|
8589
|
|
-
|
8590
|
|
-
|
8591
|
|
-
|
8592
|
|
-
|
8593
|
|
-
|
8594
|
|
-
|
8595
|
|
-
|
8596
|
|
-
|
8597
|
|
-
|
8598
|
|
-
|
8599
|
|
-
|
8600
|
|
-
|
8601
|
|
-
|
8602
|
|
-
|
8603
|
|
-
|
8604
|
|
-
|
8605
|
|
-
|
8606
|
|
-
|
8607
|
|
-
|
8608
|
|
-
|
8609
|
|
-
|
8610
|
|
-
|
8611
|
|
-
|
8612
|
|
-
|
8613
|
|
-
|
8614
|
|
-
|
8615
|
|
-
|
8616
|
|
-
|
8617
|
|
-
|
8618
|
|
-
|
8619
|
|
-
|
8620
|
|
-
|
8621
|
|
-
|
8622
|
|
-
|
8623
|
|
-
|
8624
|
|
-
|
8625
|
|
-
|
8626
|
|
-
|
8627
|
|
-
|
8628
|
|
-
|
8629
|
|
-
|
8630
|
|
-
|
8631
|
|
-
|
8632
|
|
-
|
8633
|
|
-
|
8634
|
|
-
|
8635
|
|
-
|
8636
|
|
-
|
8637
|
|
-
|
8638
|
|
-
|
8639
|
|
-
|
8640
|
|
-
|
8641
|
|
-
|
8642
|
|
-
|
8643
|
|
-
|
8644
|
|
-
|
8645
|
|
-
|
8646
|
|
-
|
8647
|
|
-
|
8648
|
|
-
|
8649
|
|
-
|
8650
|
|
-
|
8651
|
|
-
|
8652
|
|
-
|
8653
|
|
-
|
8654
|
|
-
|
8655
|
|
-
|
8656
|
|
-
|
8657
|
|
-
|
8658
|
|
-
|
8659
|
|
-
|
8660
|
|
-
|
8661
|
|
-
|
8662
|
|
-
|
8663
|
|
-
|
8664
|
|
-
|
8665
|
|
-
|
8666
|
|
-
|
8667
|
|
-
|
8668
|
|
-
|
8669
|
|
-
|
8670
|
|
-
|
8671
|
|
-
|
8672
|
|
-
|
8673
|
|
-
|
8674
|
|
-
|
8675
|
8573
|
|
8676
|
8574
|
func (c *HisApiController) Refund() {
|
8677
|
8575
|
order_id, _ := c.GetInt64("order_id")
|
|
@@ -8778,6 +8676,24 @@ func (c *HisApiController) Refund() {
|
8778
|
8676
|
infocode, _ := strconv.ParseInt(resSixteen10265.Infcode, 10, 64)
|
8779
|
8677
|
res.Infcode = infocode
|
8780
|
8678
|
|
|
8679
|
+ } else if miConfig.MdtrtareaAdmvs == "350500" {
|
|
8680
|
+ result, src_resquest = service.FJyb2208(order.PsnNo, order.MdtrtId, order.SetlId, miConfig.OrgName, roles.UserName, miConfig.SecretKey, miConfig.Code, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.Url, miConfig.Code, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey)
|
|
8681
|
+ var dat map[string]interface{}
|
|
8682
|
+ if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
8683
|
+ fmt.Println(dat)
|
|
8684
|
+ } else {
|
|
8685
|
+ fmt.Println(err)
|
|
8686
|
+ }
|
|
8687
|
+ saveLog(result, src_resquest, "2208", "退费")
|
|
8688
|
+
|
|
8689
|
+ userJSONBytes, _ := json.Marshal(dat)
|
|
8690
|
+
|
|
8691
|
+ if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
8692
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
8693
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
8694
|
+ return
|
|
8695
|
+ }
|
|
8696
|
+
|
8781
|
8697
|
} else {
|
8782
|
8698
|
|
8783
|
8699
|
if miConfig.Code == "H15049901371" {
|
|
@@ -8915,6 +8831,22 @@ func (c *HisApiController) Refund() {
|
8915
|
8831
|
infocode, _ := strconv.ParseInt(resSix10265.Infcode, 10, 64)
|
8916
|
8832
|
res2.Infcode = infocode
|
8917
|
8833
|
|
|
8834
|
+ } else if miConfig.MdtrtareaAdmvs == "350500" {
|
|
8835
|
+ result2, src_request := service.FJyb2205(order.PsnNo, order.MdtrtId, order.Number, miConfig.OrgName, roles.UserName, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, miConfig.Code, miConfig.Url, miConfig.Code, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey)
|
|
8836
|
+ var dat map[string]interface{}
|
|
8837
|
+ if err := json.Unmarshal([]byte(result2), &dat); err == nil {
|
|
8838
|
+ fmt.Println(dat)
|
|
8839
|
+ } else {
|
|
8840
|
+ fmt.Println(err)
|
|
8841
|
+ }
|
|
8842
|
+
|
|
8843
|
+ saveLog(result2, src_request, "2205", "撤销明细")
|
|
8844
|
+ userJSONBytes, _ := json.Marshal(dat)
|
|
8845
|
+ if err := json.Unmarshal(userJSONBytes, &res2); err != nil {
|
|
8846
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
8847
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
8848
|
+ return
|
|
8849
|
+ }
|
8918
|
8850
|
} else {
|
8919
|
8851
|
|
8920
|
8852
|
if miConfig.Code == "H15049901371" {
|
|
@@ -9116,6 +9048,23 @@ func (c *HisApiController) RefundNumber() {
|
9116
|
9048
|
infocode, _ := strconv.ParseInt(resSix10265.Infcode, 10, 64)
|
9117
|
9049
|
res2.Infcode = infocode
|
9118
|
9050
|
|
|
9051
|
+ } else if miConfig.MdtrtareaAdmvs == "350500" {
|
|
9052
|
+
|
|
9053
|
+ result, request := service.FJyb2202(his.PsnNo, his.Number, his.IptOtpNo, miConfig.OrgName, roles.UserName, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, miConfig.Code, miConfig.Url, miConfig.Code, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey)
|
|
9054
|
+ var dat map[string]interface{}
|
|
9055
|
+ if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
9056
|
+ fmt.Println(dat)
|
|
9057
|
+ } else {
|
|
9058
|
+ fmt.Println(err)
|
|
9059
|
+ }
|
|
9060
|
+ saveLog(result, request, "2202", "退号")
|
|
9061
|
+ userJSONBytes, _ := json.Marshal(dat)
|
|
9062
|
+ if err := json.Unmarshal(userJSONBytes, &res2); err != nil {
|
|
9063
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
9064
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
9065
|
+ return
|
|
9066
|
+ }
|
|
9067
|
+
|
9119
|
9068
|
} else {
|
9120
|
9069
|
var api3 string
|
9121
|
9070
|
|
|
@@ -9211,7 +9160,7 @@ func (c *HisApiController) RefundNumber() {
|
9211
|
9160
|
}
|
9212
|
9161
|
func (c *HisApiController) RefundDetail() {
|
9213
|
9162
|
order_id, _ := c.GetInt64("order_id")
|
9214
|
|
-
|
|
9163
|
+ admin_user_id, _ := c.GetInt64("admin_user_id")
|
9215
|
9164
|
|
9216
|
9165
|
|
9217
|
9166
|
|
|
@@ -9223,7 +9172,7 @@ func (c *HisApiController) RefundDetail() {
|
9223
|
9172
|
timeLayout := "2006-01-02"
|
9224
|
9173
|
loc, _ := time.LoadLocation("Local")
|
9225
|
9174
|
adminUser := c.GetAdminUserInfo()
|
9226
|
|
-
|
|
9175
|
+ roles, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, admin_user_id)
|
9227
|
9176
|
theTime, err := time.ParseInLocation(timeLayout+" 15:04:05", record_time+" 00:00:00", loc)
|
9228
|
9177
|
fmt.Println(err)
|
9229
|
9178
|
if err != nil {
|
|
@@ -9350,9 +9299,43 @@ func (c *HisApiController) RefundDetail() {
|
9350
|
9299
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
9351
|
9300
|
return
|
9352
|
9301
|
}
|
|
9302
|
+ } else if miConfig.MdtrtareaAdmvs == "350500" {
|
|
9303
|
+ result2, src_request := service.FJyb2205(his.PsnNo, his.Number, order.Number, miConfig.OrgName, roles.UserName, his.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, miConfig.Code, miConfig.Url, miConfig.Code, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey)
|
|
9304
|
+ var dat map[string]interface{}
|
|
9305
|
+ if err := json.Unmarshal([]byte(result2), &dat); err == nil {
|
|
9306
|
+ fmt.Println(dat)
|
|
9307
|
+ } else {
|
|
9308
|
+ fmt.Println(err)
|
|
9309
|
+ }
|
|
9310
|
+
|
|
9311
|
+ saveLog(result2, src_request, "2205", "撤销明细")
|
|
9312
|
+ userJSONBytes, _ := json.Marshal(dat)
|
|
9313
|
+ if err := json.Unmarshal(userJSONBytes, &res2); err != nil {
|
|
9314
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
9315
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
9316
|
+ return
|
|
9317
|
+ }
|
|
9318
|
+ if res2.Infcode == 0 {
|
|
9319
|
+ err := service.UpdataOrderStatus(order_id, number, adminUser.CurrentOrgId, "", "")
|
|
9320
|
+ if err == nil {
|
|
9321
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
9322
|
+ "msg": "撤销明细成功",
|
|
9323
|
+ })
|
|
9324
|
+ return
|
|
9325
|
+ } else {
|
|
9326
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
9327
|
+ return
|
|
9328
|
+ }
|
|
9329
|
+ } else {
|
|
9330
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
9331
|
+ "code": -10,
|
|
9332
|
+ "msg": res2.ErrMsg,
|
|
9333
|
+ })
|
|
9334
|
+ }
|
|
9335
|
+
|
9353
|
9336
|
} else {
|
9354
|
9337
|
api2 := "http://127.0.0.1:9532/" + "gdyb/six?psn_no=" + his.PsnNo +
|
9355
|
|
- "&mdtrt_id=" + his.Number + "&chrg_bchno=" + order.Number + "&doctor=" + patientPrescription.Doctor + "&org_name=" + miConfig.OrgName + "&fixmedins_code=" + miConfig.Code +
|
|
9338
|
+ "&mdtrt_id=" + his.Number + "&chrg_bchno=" + order.Number + "&doctor=" + roles.UserName + "&org_name=" + miConfig.OrgName + "&fixmedins_code=" + miConfig.Code +
|
9356
|
9339
|
"&insuplc_admdvs=" + his.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey
|
9357
|
9340
|
resp2, requestErr2 := http.Get(api2)
|
9358
|
9341
|
if requestErr2 != nil {
|
|
@@ -10224,6 +10207,20 @@ func (c *HisApiController) GetSettleAccounts() {
|
10224
|
10207
|
infocode, _ := strconv.ParseInt(resEleven10265.Infcode, 10, 64)
|
10225
|
10208
|
res.Infcode = infocode
|
10226
|
10209
|
|
|
10210
|
+ } else if miConfig.MdtrtareaAdmvs == "350500" {
|
|
10211
|
+ result := service.FJyb5203(baseParams, businessParams, miConfig.Url, miConfig.Code, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey)
|
|
10212
|
+ var dat map[string]interface{}
|
|
10213
|
+ if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
10214
|
+ fmt.Println(dat)
|
|
10215
|
+ } else {
|
|
10216
|
+ fmt.Println(err)
|
|
10217
|
+ }
|
|
10218
|
+ userJSONBytes, _ := json.Marshal(dat)
|
|
10219
|
+ if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
10220
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
10221
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
10222
|
+ return
|
|
10223
|
+ }
|
10227
|
10224
|
} else if miConfig.MdtrtareaAdmvs == "150499" {
|
10228
|
10225
|
fmt.Println("~~~~~~~")
|
10229
|
10226
|
|
|
@@ -12323,3 +12320,37 @@ func Remove0000(s string) string {
|
12323
|
12320
|
}
|
12324
|
12321
|
return string(str)
|
12325
|
12322
|
}
|
|
12323
|
+
|
|
12324
|
+func (c *HisApiController) GetELeCertInfo(code string, operator_id string, operator_name string) (string, string) {
|
|
12325
|
+ DllDef := syscall.MustLoadDLL("HeaSecReadInfo.dll")
|
|
12326
|
+ readCard := DllDef.MustFindProc("EcQuery")
|
|
12327
|
+ pCardInfo := make([]byte, 8192)
|
|
12328
|
+ pBusiCardInfo := make([]byte, 8192)
|
|
12329
|
+
|
|
12330
|
+ data := make(map[string]interface{})
|
|
12331
|
+
|
|
12332
|
+
|
|
12333
|
+ inputData := make(map[string]interface{})
|
|
12334
|
+ inputData["orgId"] = code
|
|
12335
|
+ inputData["businessType"] = "01101"
|
|
12336
|
+ inputData["operatorId"] = operator_id
|
|
12337
|
+ inputData["operatorName"] = operator_name
|
|
12338
|
+ inputData["officeId"] = "001"
|
|
12339
|
+ inputData["officeName"] = "血透室"
|
|
12340
|
+
|
|
12341
|
+ data["data"] = inputData
|
|
12342
|
+ data["transType"] = "ec.query"
|
|
12343
|
+ data["orgId"] = code
|
|
12344
|
+ bytesData, _ := json.Marshal(data)
|
|
12345
|
+ pCardInfo = bytesData
|
|
12346
|
+ ret2, _, _ := readCard.Call((uintptr)(unsafe.Pointer(&pCardInfo[0])), (uintptr)(unsafe.Pointer(&pBusiCardInfo[0])))
|
|
12347
|
+ fmt.Println(ret2)
|
|
12348
|
+
|
|
12349
|
+
|
|
12350
|
+ fmt.Println(":", ConvertToString(DeleteExtraSpace(string(bytesData)), "gbk", "utf-8"))
|
|
12351
|
+ fmt.Println(":", ConvertToString(DeleteExtraSpace(string(pBusiCardInfo)), "gbk", "utf-8"))
|
|
12352
|
+ if ret2 != 0 {
|
|
12353
|
+ return "", ""
|
|
12354
|
+ }
|
|
12355
|
+ return DeleteExtraSpace(string(bytesData)), DeleteExtraSpace(string(pBusiCardInfo))
|
|
12356
|
+}
|