Browse Source

Merge branch 'master' of http://git.shengws.com/csx/gdyb

csx 3 years ago
parent
commit
97f6321e6b
1 changed files with 35 additions and 15 deletions
  1. 35 15
      controllers/sg/his_api_controller.go

+ 35 - 15
controllers/sg/his_api_controller.go View File

147
 	var rf []*CustomFundPay
147
 	var rf []*CustomFundPay
148
 	json.Unmarshal([]byte(order.SetlDetail), &rf)
148
 	json.Unmarshal([]byte(order.SetlDetail), &rf)
149
 
149
 
150
+	var tempFunPays []*service.CustomStruct
150
 	for _, item := range rf {
151
 	for _, item := range rf {
151
 		var tempFunPay *service.CustomStruct
152
 		var tempFunPay *service.CustomStruct
152
 		tempFunPay.FundPayamt = item.FundPayamt
153
 		tempFunPay.FundPayamt = item.FundPayamt
153
 		tempFunPay.FundPayType = item.FundPayType
154
 		tempFunPay.FundPayType = item.FundPayType
154
-		struct4101.CustomStruct = append(struct4101.CustomStruct, tempFunPay)
155
+		tempFunPays = append(tempFunPays, tempFunPay)
155
 	}
156
 	}
157
+	struct4101.CustomStruct = tempFunPays
158
+
159
+	var tempOpspdiseinfos []*service.OpspdiseinfoStruct
156
 	var tempOpspdiseinfo *service.OpspdiseinfoStruct
160
 	var tempOpspdiseinfo *service.OpspdiseinfoStruct
157
 	var tempOpspdiseinfo2 *service.OpspdiseinfoStruct
161
 	var tempOpspdiseinfo2 *service.OpspdiseinfoStruct
158
-
159
 	sickConfig, _ := service.FindDiagnoseById(his.Diagnosis)
162
 	sickConfig, _ := service.FindDiagnoseById(his.Diagnosis)
160
 	sickConfigTwo, _ := service.FindSickById(his.SickType)
163
 	sickConfigTwo, _ := service.FindSickById(his.SickType)
161
-
162
 	tempOpspdiseinfo.DiagCode = sickConfig.CountryCode
164
 	tempOpspdiseinfo.DiagCode = sickConfig.CountryCode
163
 	tempOpspdiseinfo.DiagName = sickConfig.CountryContentName
165
 	tempOpspdiseinfo.DiagName = sickConfig.CountryContentName
164
 	tempOpspdiseinfo.MaindiagFlag = "1"
166
 	tempOpspdiseinfo.MaindiagFlag = "1"
165
 	tempOpspdiseinfo.OprnOprtCode = ""
167
 	tempOpspdiseinfo.OprnOprtCode = ""
166
 	tempOpspdiseinfo.OprnOprtName = ""
168
 	tempOpspdiseinfo.OprnOprtName = ""
167
-	struct4101.OpspdiseinfoStruct = append(struct4101.OpspdiseinfoStruct, tempOpspdiseinfo)
168
-
169
+	tempOpspdiseinfos = append(tempOpspdiseinfos, tempOpspdiseinfo)
169
 	tempOpspdiseinfo2.DiagCode = sickConfigTwo.CountryCode
170
 	tempOpspdiseinfo2.DiagCode = sickConfigTwo.CountryCode
170
 	tempOpspdiseinfo2.DiagName = sickConfigTwo.CountryContentName
171
 	tempOpspdiseinfo2.DiagName = sickConfigTwo.CountryContentName
171
 	tempOpspdiseinfo2.MaindiagFlag = "2"
172
 	tempOpspdiseinfo2.MaindiagFlag = "2"
172
 	tempOpspdiseinfo2.OprnOprtCode = ""
173
 	tempOpspdiseinfo2.OprnOprtCode = ""
173
 	tempOpspdiseinfo2.OprnOprtName = ""
174
 	tempOpspdiseinfo2.OprnOprtName = ""
174
-	struct4101.OpspdiseinfoStruct = append(struct4101.OpspdiseinfoStruct, tempOpspdiseinfo2)
175
+	tempOpspdiseinfos = append(tempOpspdiseinfos, tempOpspdiseinfo2)
176
+	struct4101.OpspdiseinfoStruct = tempOpspdiseinfos
175
 
177
 
176
 	var iteminfo *service.IteminfoStruct
178
 	var iteminfo *service.IteminfoStruct
177
 
179
 
432
 
434
 
433
 	}
435
 	}
434
 
436
 
437
+	var iteminfoStructs []*service.IteminfoStruct
438
+
435
 	if bedCostTotal != 0 {
439
 	if bedCostTotal != 0 {
436
 		iteminfo.MedChrgitm = "01"
440
 		iteminfo.MedChrgitm = "01"
437
 		iteminfo.FulamtOwnpayAmt = bed_fulamt_ownpay_amt
441
 		iteminfo.FulamtOwnpayAmt = bed_fulamt_ownpay_amt
439
 		iteminfo.ClaaSumfee = bed_claa_sunmfee
443
 		iteminfo.ClaaSumfee = bed_claa_sunmfee
440
 		iteminfo.ClabAmt = bed_clab_amt
444
 		iteminfo.ClabAmt = bed_clab_amt
441
 		iteminfo.OthAmt = bed_other_amt
445
 		iteminfo.OthAmt = bed_other_amt
442
-		struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
446
+		iteminfoStructs = append(iteminfoStructs, iteminfo)
443
 	}
447
 	}
444
 
448
 
445
 	if checkCostTotal != 0 {
449
 	if checkCostTotal != 0 {
449
 		iteminfo.ClaaSumfee = check_claa_sunmfee
453
 		iteminfo.ClaaSumfee = check_claa_sunmfee
450
 		iteminfo.ClabAmt = check_clab_amt
454
 		iteminfo.ClabAmt = check_clab_amt
451
 		iteminfo.OthAmt = check_other_amt
455
 		iteminfo.OthAmt = check_other_amt
452
-		struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
456
+		iteminfoStructs = append(iteminfoStructs, iteminfo)
453
 
457
 
454
 	}
458
 	}
455
 
459
 
460
 		iteminfo.ClaaSumfee = laboratory_claa_sunmfee
464
 		iteminfo.ClaaSumfee = laboratory_claa_sunmfee
461
 		iteminfo.ClabAmt = laboratory_clab_amt
465
 		iteminfo.ClabAmt = laboratory_clab_amt
462
 		iteminfo.OthAmt = laboratory_other_amt
466
 		iteminfo.OthAmt = laboratory_other_amt
463
-		struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
467
+		iteminfoStructs = append(iteminfoStructs, iteminfo)
468
+
469
+		//struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
464
 
470
 
465
 	}
471
 	}
466
 
472
 
471
 		iteminfo.ClaaSumfee = treat_claa_sunmfee
477
 		iteminfo.ClaaSumfee = treat_claa_sunmfee
472
 		iteminfo.ClabAmt = treat_clab_amt
478
 		iteminfo.ClabAmt = treat_clab_amt
473
 		iteminfo.OthAmt = treat_other_amt
479
 		iteminfo.OthAmt = treat_other_amt
474
-		struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
480
+		iteminfoStructs = append(iteminfoStructs, iteminfo)
481
+
482
+		// (struct4101.IteminfoStruct, iteminfo)
483
+
484
+		//struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
475
 
485
 
476
 	}
486
 	}
477
 
487
 
482
 		iteminfo.ClaaSumfee = operation_claa_sunmfee
492
 		iteminfo.ClaaSumfee = operation_claa_sunmfee
483
 		iteminfo.ClabAmt = operation_clab_amt
493
 		iteminfo.ClabAmt = operation_clab_amt
484
 		iteminfo.OthAmt = operation_other_amt
494
 		iteminfo.OthAmt = operation_other_amt
485
-		struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
495
+		//struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
496
+		iteminfoStructs = append(iteminfoStructs, iteminfo)
486
 
497
 
487
 	}
498
 	}
488
 
499
 
493
 		iteminfo.ClaaSumfee = material_claa_sunmfee
504
 		iteminfo.ClaaSumfee = material_claa_sunmfee
494
 		iteminfo.ClabAmt = material_clab_amt
505
 		iteminfo.ClabAmt = material_clab_amt
495
 		iteminfo.OthAmt = material_other_amt
506
 		iteminfo.OthAmt = material_other_amt
496
-		struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
507
+		//struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
508
+		iteminfoStructs = append(iteminfoStructs, iteminfo)
509
+
497
 	}
510
 	}
498
 	if westernMedicineCostTotal != 0 {
511
 	if westernMedicineCostTotal != 0 {
499
 		iteminfo.MedChrgitm = "09"
512
 		iteminfo.MedChrgitm = "09"
502
 		iteminfo.ClaaSumfee = westernMedicine_claa_sunmfee
515
 		iteminfo.ClaaSumfee = westernMedicine_claa_sunmfee
503
 		iteminfo.ClabAmt = westernMedicine_clab_amt
516
 		iteminfo.ClabAmt = westernMedicine_clab_amt
504
 		iteminfo.OthAmt = westernMedicine_other_amt
517
 		iteminfo.OthAmt = westernMedicine_other_amt
505
-		struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
518
+		//struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
519
+		iteminfoStructs = append(iteminfoStructs, iteminfo)
520
+
506
 	}
521
 	}
507
 	if chineseTraditionalMedicineCostTotal != 0 {
522
 	if chineseTraditionalMedicineCostTotal != 0 {
508
 		iteminfo.MedChrgitm = "11"
523
 		iteminfo.MedChrgitm = "11"
511
 		iteminfo.ClaaSumfee = westernMedicine_claa_sunmfee
526
 		iteminfo.ClaaSumfee = westernMedicine_claa_sunmfee
512
 		iteminfo.ClabAmt = westernMedicine_clab_amt
527
 		iteminfo.ClabAmt = westernMedicine_clab_amt
513
 		iteminfo.OthAmt = westernMedicine_other_amt
528
 		iteminfo.OthAmt = westernMedicine_other_amt
514
-		struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
529
+		//struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
530
+		iteminfoStructs = append(iteminfoStructs, iteminfo)
531
+
515
 	}
532
 	}
516
 	if otherCostTotal != 0 {
533
 	if otherCostTotal != 0 {
517
 		iteminfo.MedChrgitm = "14"
534
 		iteminfo.MedChrgitm = "14"
520
 		iteminfo.ClaaSumfee = other_claa_sunmfee
537
 		iteminfo.ClaaSumfee = other_claa_sunmfee
521
 		iteminfo.ClabAmt = other_clab_amt
538
 		iteminfo.ClabAmt = other_clab_amt
522
 		iteminfo.OthAmt = other_other_amt
539
 		iteminfo.OthAmt = other_other_amt
523
-		struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
540
+		//struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
541
+		iteminfoStructs = append(iteminfoStructs, iteminfo)
542
+
524
 	}
543
 	}
544
+	struct4101.IteminfoStruct = iteminfoStructs
525
 	struct4101.Ntly = "中国"
545
 	struct4101.Ntly = "中国"
526
 	struct4101.AdmCaty = "A03.06"
546
 	struct4101.AdmCaty = "A03.06"
527
 	result := service.Gdyb4101(struct4101, miConfig.SecretKey, miConfig.OrgName, curRoles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs)
547
 	result := service.Gdyb4101(struct4101, miConfig.SecretKey, miConfig.OrgName, curRoles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs)