陈少旭 před 1 týdnem
rodič
revize
73ebc92c1d
1 změnil soubory, kde provedl 45 přidání a 23 odebrání
  1. 45 23
      controllers/his_api_controller.go

+ 45 - 23
controllers/his_api_controller.go Zobrazit soubor

@@ -10730,35 +10730,57 @@ func (c *HisApiController) GetUploadInfo() {
10730 10730
 		for _, item := range prescriptions {
10731 10731
 			if item.Type == 1 { //药品a
10732 10732
 				for _, subItem := range item.HisDoctorAdviceInfo {
10733
-					cus := &Custom{
10734
-						AdviceId:         subItem.ID,
10735
-						ProjectId:        0,
10736
-						DetItemFeeSumamt: fmt.Sprintf("%.4f", subItem.Price*subItem.PrescribingNumber),
10737
-						Cut:              fmt.Sprintf("%.4f", subItem.PrescribingNumber),
10738
-						FeedetlSn:        subItem.FeedetlSn,
10739
-						Price:            fmt.Sprintf("%.4f", subItem.Price),
10740
-						MedListCodg:      subItem.MedListCodg,
10741
-						Type:             1,
10742
-						CostType:         9,
10733
+					if subItem.Drug.IsUser != 1 {
10734
+						cus := &Custom{
10735
+							AdviceId:         subItem.ID,
10736
+							ProjectId:        0,
10737
+							DetItemFeeSumamt: fmt.Sprintf("%.4f", subItem.Price*subItem.PrescribingNumber),
10738
+							Cut:              fmt.Sprintf("%.4f", subItem.PrescribingNumber),
10739
+							FeedetlSn:        subItem.FeedetlSn,
10740
+							Price:            fmt.Sprintf("%.4f", subItem.Price),
10741
+							MedListCodg:      subItem.MedListCodg,
10742
+							Type:             1,
10743
+							CostType:         9,
10744
+						}
10745
+						customs = append(customs, cus)
10743 10746
 					}
10744
-					customs = append(customs, cus)
10745 10747
 				}
10746 10748
 			}
10747 10749
 			if item.Type == 2 { //项目
10748 10750
 				for _, subItem := range item.HisPrescriptionProject {
10749
-					cnt, _ := strconv.ParseFloat(subItem.Count, 64)
10750
-					cus := &Custom{
10751
-						AdviceId:         0,
10752
-						ProjectId:        subItem.ID,
10753
-						DetItemFeeSumamt: fmt.Sprintf("%.4f", subItem.Price*cnt),
10754
-						Cut:              fmt.Sprintf("%.4f", cnt),
10755
-						FeedetlSn:        subItem.FeedetlSn,
10756
-						Price:            fmt.Sprintf("%.4f", float64(subItem.Price)),
10757
-						MedListCodg:      subItem.MedListCodg,
10758
-						Type:             2,
10759
-						CostType:         subItem.HisProject.CostClassify,
10751
+					if subItem.Type == 2 {
10752
+						cnt, _ := strconv.ParseFloat(subItem.Count, 64)
10753
+						cus := &Custom{
10754
+							AdviceId:         0,
10755
+							ProjectId:        subItem.ID,
10756
+							DetItemFeeSumamt: fmt.Sprintf("%.4f", subItem.Price*cnt),
10757
+							Cut:              fmt.Sprintf("%.4f", cnt),
10758
+							FeedetlSn:        subItem.FeedetlSn,
10759
+							Price:            fmt.Sprintf("%.4f", float64(subItem.Price)),
10760
+							MedListCodg:      subItem.MedListCodg,
10761
+							Type:             2,
10762
+							CostType:         subItem.HisProject.CostClassify,
10763
+						}
10764
+						customs = append(customs, cus)
10765
+					} else {
10766
+						if subItem.GoodInfo.IsUser != 1 {
10767
+							cnt, _ := strconv.ParseFloat(subItem.Count, 64)
10768
+							cus := &Custom{
10769
+								AdviceId:         0,
10770
+								ProjectId:        subItem.ID,
10771
+								DetItemFeeSumamt: fmt.Sprintf("%.4f", subItem.Price*cnt),
10772
+								Cut:              fmt.Sprintf("%.4f", cnt),
10773
+								FeedetlSn:        subItem.FeedetlSn,
10774
+								Price:            fmt.Sprintf("%.4f", float64(subItem.Price)),
10775
+								MedListCodg:      subItem.MedListCodg,
10776
+								Type:             2,
10777
+								CostType:         subItem.HisProject.CostClassify,
10778
+							}
10779
+							customs = append(customs, cus)
10780
+						}
10781
+
10760 10782
 					}
10761
-					customs = append(customs, cus)
10783
+
10762 10784
 				}
10763 10785
 			}
10764 10786
 			for _, item := range item.HisAdditionalCharge {