Pārlūkot izejas kodu

Merge branch '20230223_xt_api_new_branch' of http://git.shengws.com/csx/XT_New into 20230223_xt_api_new_branch

28169 4 dienas atpakaļ
vecāks
revīzija
278d1b4b95
1 mainītis faili ar 14 papildinājumiem un 3 dzēšanām
  1. 14 3
      controllers/his_api_controller.go

+ 14 - 3
controllers/his_api_controller.go Parādīt failu

@@ -10922,13 +10922,24 @@ func (c *HisApiController) GetUploadInfo() {
10922 10922
 			fmt.Println(item)
10923 10923
 			if item.Type == 1 { //药品
10924 10924
 				for _, subItem := range item.HisDoctorAdviceInfo {
10925
-					total = total + (subItem.Price * subItem.PrescribingNumber)
10925
+					if subItem.Drug.IsUser != 1 {
10926
+						total = total + (subItem.Price * subItem.PrescribingNumber)
10927
+					}
10926 10928
 				}
10929
+
10927 10930
 			}
10928 10931
 			if item.Type == 2 { //项目
10929 10932
 				for _, subItem := range item.HisPrescriptionProject {
10930
-					cnt, _ := strconv.ParseFloat(subItem.Count, 64)
10931
-					total = total + (subItem.Price * cnt)
10933
+					if subItem.Type == 2 {
10934
+						cnt, _ := strconv.ParseFloat(subItem.Count, 64)
10935
+						total = total + (subItem.Price * cnt)
10936
+
10937
+					} else {
10938
+						if subItem.GoodInfo.IsUser != 1 {
10939
+							cnt, _ := strconv.ParseFloat(subItem.Count, 64)
10940
+							total = total + (subItem.Price * cnt)
10941
+						}
10942
+					}
10932 10943
 				}
10933 10944
 			}
10934 10945