Przeglądaj źródła

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

csx 3 lat temu
rodzic
commit
97f6321e6b
1 zmienionych plików z 35 dodań i 15 usunięć
  1. 35 15
      controllers/sg/his_api_controller.go

+ 35 - 15
controllers/sg/his_api_controller.go Wyświetl plik

@@ -147,31 +147,33 @@ func (c *HisApiController) GetSettleList() {
147 147
 	var rf []*CustomFundPay
148 148
 	json.Unmarshal([]byte(order.SetlDetail), &rf)
149 149
 
150
+	var tempFunPays []*service.CustomStruct
150 151
 	for _, item := range rf {
151 152
 		var tempFunPay *service.CustomStruct
152 153
 		tempFunPay.FundPayamt = item.FundPayamt
153 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 160
 	var tempOpspdiseinfo *service.OpspdiseinfoStruct
157 161
 	var tempOpspdiseinfo2 *service.OpspdiseinfoStruct
158
-
159 162
 	sickConfig, _ := service.FindDiagnoseById(his.Diagnosis)
160 163
 	sickConfigTwo, _ := service.FindSickById(his.SickType)
161
-
162 164
 	tempOpspdiseinfo.DiagCode = sickConfig.CountryCode
163 165
 	tempOpspdiseinfo.DiagName = sickConfig.CountryContentName
164 166
 	tempOpspdiseinfo.MaindiagFlag = "1"
165 167
 	tempOpspdiseinfo.OprnOprtCode = ""
166 168
 	tempOpspdiseinfo.OprnOprtName = ""
167
-	struct4101.OpspdiseinfoStruct = append(struct4101.OpspdiseinfoStruct, tempOpspdiseinfo)
168
-
169
+	tempOpspdiseinfos = append(tempOpspdiseinfos, tempOpspdiseinfo)
169 170
 	tempOpspdiseinfo2.DiagCode = sickConfigTwo.CountryCode
170 171
 	tempOpspdiseinfo2.DiagName = sickConfigTwo.CountryContentName
171 172
 	tempOpspdiseinfo2.MaindiagFlag = "2"
172 173
 	tempOpspdiseinfo2.OprnOprtCode = ""
173 174
 	tempOpspdiseinfo2.OprnOprtName = ""
174
-	struct4101.OpspdiseinfoStruct = append(struct4101.OpspdiseinfoStruct, tempOpspdiseinfo2)
175
+	tempOpspdiseinfos = append(tempOpspdiseinfos, tempOpspdiseinfo2)
176
+	struct4101.OpspdiseinfoStruct = tempOpspdiseinfos
175 177
 
176 178
 	var iteminfo *service.IteminfoStruct
177 179
 
@@ -432,6 +434,8 @@ func (c *HisApiController) GetSettleList() {
432 434
 
433 435
 	}
434 436
 
437
+	var iteminfoStructs []*service.IteminfoStruct
438
+
435 439
 	if bedCostTotal != 0 {
436 440
 		iteminfo.MedChrgitm = "01"
437 441
 		iteminfo.FulamtOwnpayAmt = bed_fulamt_ownpay_amt
@@ -439,7 +443,7 @@ func (c *HisApiController) GetSettleList() {
439 443
 		iteminfo.ClaaSumfee = bed_claa_sunmfee
440 444
 		iteminfo.ClabAmt = bed_clab_amt
441 445
 		iteminfo.OthAmt = bed_other_amt
442
-		struct4101.IteminfoStruct = append(struct4101.IteminfoStruct, iteminfo)
446
+		iteminfoStructs = append(iteminfoStructs, iteminfo)
443 447
 	}
444 448
 
445 449
 	if checkCostTotal != 0 {
@@ -449,7 +453,7 @@ func (c *HisApiController) GetSettleList() {
449 453
 		iteminfo.ClaaSumfee = check_claa_sunmfee
450 454
 		iteminfo.ClabAmt = check_clab_amt
451 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,7 +464,9 @@ func (c *HisApiController) GetSettleList() {
460 464
 		iteminfo.ClaaSumfee = laboratory_claa_sunmfee
461 465
 		iteminfo.ClabAmt = laboratory_clab_amt
462 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,7 +477,11 @@ func (c *HisApiController) GetSettleList() {
471 477
 		iteminfo.ClaaSumfee = treat_claa_sunmfee
472 478
 		iteminfo.ClabAmt = treat_clab_amt
473 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,7 +492,8 @@ func (c *HisApiController) GetSettleList() {
482 492
 		iteminfo.ClaaSumfee = operation_claa_sunmfee
483 493
 		iteminfo.ClabAmt = operation_clab_amt
484 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,7 +504,9 @@ func (c *HisApiController) GetSettleList() {
493 504
 		iteminfo.ClaaSumfee = material_claa_sunmfee
494 505
 		iteminfo.ClabAmt = material_clab_amt
495 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 511
 	if westernMedicineCostTotal != 0 {
499 512
 		iteminfo.MedChrgitm = "09"
@@ -502,7 +515,9 @@ func (c *HisApiController) GetSettleList() {
502 515
 		iteminfo.ClaaSumfee = westernMedicine_claa_sunmfee
503 516
 		iteminfo.ClabAmt = westernMedicine_clab_amt
504 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 522
 	if chineseTraditionalMedicineCostTotal != 0 {
508 523
 		iteminfo.MedChrgitm = "11"
@@ -511,7 +526,9 @@ func (c *HisApiController) GetSettleList() {
511 526
 		iteminfo.ClaaSumfee = westernMedicine_claa_sunmfee
512 527
 		iteminfo.ClabAmt = westernMedicine_clab_amt
513 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 533
 	if otherCostTotal != 0 {
517 534
 		iteminfo.MedChrgitm = "14"
@@ -520,8 +537,11 @@ func (c *HisApiController) GetSettleList() {
520 537
 		iteminfo.ClaaSumfee = other_claa_sunmfee
521 538
 		iteminfo.ClabAmt = other_clab_amt
522 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 545
 	struct4101.Ntly = "中国"
526 546
 	struct4101.AdmCaty = "A03.06"
527 547
 	result := service.Gdyb4101(struct4101, miConfig.SecretKey, miConfig.OrgName, curRoles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs)