Browse Source

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

28169 4 days ago
parent
commit
278d1b4b95
1 changed files with 14 additions and 3 deletions
  1. 14 3
      controllers/his_api_controller.go

+ 14 - 3
controllers/his_api_controller.go View File

10922
 			fmt.Println(item)
10922
 			fmt.Println(item)
10923
 			if item.Type == 1 { //药品
10923
 			if item.Type == 1 { //药品
10924
 				for _, subItem := range item.HisDoctorAdviceInfo {
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
 			if item.Type == 2 { //项目
10931
 			if item.Type == 2 { //项目
10929
 				for _, subItem := range item.HisPrescriptionProject {
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