陈少旭 3 weeks ago
parent
commit
93f9c35f34
1 changed files with 9 additions and 24 deletions
  1. 9 24
      controllers/sg/his_api_controller.go

+ 9 - 24
controllers/sg/his_api_controller.go View File

34
 	"syscall"
34
 	"syscall"
35
 	"time"
35
 	"time"
36
 	"unsafe"
36
 	"unsafe"
37
-	"github.com/go-ole/go-ole"
38
-
39
 )
37
 )
40
 
38
 
41
 type HisApiController struct {
39
 type HisApiController struct {
32453
 							result3101 := Checkgd3101(c, id, his_patient_id, admin_user_id, "2", record_time, prescriptions)
32451
 							result3101 := Checkgd3101(c, id, his_patient_id, admin_user_id, "2", record_time, prescriptions)
32454
 							if result3101.Infcode == 0 {
32452
 							if result3101.Infcode == 0 {
32455
 								if len(result3101.Output.Result) > 0 {
32453
 								if len(result3101.Output.Result) > 0 {
32456
-									var errMsgs []string
32457
-									for _, item := range result3101.Output.Result {
32458
-										errMsgs = append(errMsgs, item.VolaCont)
32459
-
32460
-									}
32461
 									c.ServeSuccessJSON(map[string]interface{}{
32454
 									c.ServeSuccessJSON(map[string]interface{}{
32462
 										"failed_code": -10,
32455
 										"failed_code": -10,
32463
-										"msg":         errMsgs,
32456
+										"failed_type": 100,
32457
+										"msg":         result3101.Output.Result,
32464
 									})
32458
 									})
32465
 									return
32459
 									return
32466
 								} else {
32460
 								} else {
33715
 							result3101 := Checkgd3102(c, id, his_patient_id, admin_user_id, "6", order.ID)
33709
 							result3101 := Checkgd3102(c, id, his_patient_id, admin_user_id, "6", order.ID)
33716
 							if result3101.Infcode == 0 {
33710
 							if result3101.Infcode == 0 {
33717
 								if len(result3101.Output.Result) > 0 {
33711
 								if len(result3101.Output.Result) > 0 {
33718
-									var errMsgs []string
33719
-									for _, item := range result3101.Output.Result {
33720
-										errMsgs = append(errMsgs, item.VolaCont)
33721
-
33722
-									}
33723
 									c.ServeSuccessJSON(map[string]interface{}{
33712
 									c.ServeSuccessJSON(map[string]interface{}{
33724
 										"failed_code": -10,
33713
 										"failed_code": -10,
33725
-										"msg":         errMsgs,
33714
+										"failed_type": 100,
33715
+										"msg":         result3101.Output.Result,
33726
 									})
33716
 									})
33717
+
33727
 									return
33718
 									return
33728
 								} else {
33719
 								} else {
33729
 									var result string
33720
 									var result string
33869
 								result3101 := Checkgd3102(c, id, his_patient_id, admin_user_id, "6", order.ID)
33860
 								result3101 := Checkgd3102(c, id, his_patient_id, admin_user_id, "6", order.ID)
33870
 								if result3101.Infcode == 0 {
33861
 								if result3101.Infcode == 0 {
33871
 									if len(result3101.Output.Result) > 0 {
33862
 									if len(result3101.Output.Result) > 0 {
33872
-										var errMsgs []string
33873
-										for _, item := range result3101.Output.Result {
33874
-											errMsgs = append(errMsgs, item.VolaCont)
33875
-
33876
-										}
33877
 										c.ServeSuccessJSON(map[string]interface{}{
33863
 										c.ServeSuccessJSON(map[string]interface{}{
33878
 											"failed_code": -10,
33864
 											"failed_code": -10,
33879
-											"msg":         errMsgs,
33865
+											"failed_type": 100,
33866
+											"msg":         result3101.Output.Result,
33880
 										})
33867
 										})
33881
 										return
33868
 										return
33882
 									} else {
33869
 									} else {
36762
 	for _, item := range orders {
36749
 	for _, item := range orders {
36763
 		medfee_sumamt = medfee_sumamt + item.MedfeeSumamt
36750
 		medfee_sumamt = medfee_sumamt + item.MedfeeSumamt
36764
 		acct_pay = acct_pay + item.AcctPay
36751
 		acct_pay = acct_pay + item.AcctPay
36765
-		if miConfig.MdtrtareaAdmvs == "361025"{
36752
+		if miConfig.MdtrtareaAdmvs == "361025" {
36766
 			fund_pay_sumamt = fund_pay_sumamt + item.HifpPay + item.HifmiPay + item.MafPay + item.HifobPay + item.HifesPay
36753
 			fund_pay_sumamt = fund_pay_sumamt + item.HifpPay + item.HifmiPay + item.MafPay + item.HifobPay + item.HifesPay
36767
 
36754
 
36768
-
36769
-		}else{
36755
+		} else {
36770
 
36756
 
36771
 			fund_pay_sumamt = fund_pay_sumamt + item.FundPaySumamt
36757
 			fund_pay_sumamt = fund_pay_sumamt + item.FundPaySumamt
36772
 
36758
 
36773
-
36774
 		}
36759
 		}
36775
 	}
36760
 	}
36776
 
36761