陈少旭 il y a 9 mois
Parent
révision
0093701d22
1 fichiers modifiés avec 23 ajouts et 24 suppressions
  1. 23 24
      controllers/his_api_controller.go

+ 23 - 24
controllers/his_api_controller.go Voir le fichier

@@ -1903,34 +1903,33 @@ func (c *HisApiController) CreateHisPrescription() {
1903 1903
 					}
1904 1904
 				}
1905 1905
 
1906
-				if items["advices"] != nil && reflect.TypeOf(items["advices"]).String() == "[]interface {}" {
1907
-					advices := items["advices"].([]interface{})
1908
-
1909
-					if len(advices) > 0 {
1910
-						for _, advice := range advices {
1911
-
1912
-							var adviceId int64
1913
-							if advice.(map[string]interface{})["advice_id"] != nil || reflect.TypeOf(advice.(map[string]interface{})["advice_id"]).String() == "float64" {
1914
-								adviceId = int64(advice.(map[string]interface{})["advice_id"].(float64))
1915
-							}
1916
-							if adviceId > 0 {
1917
-								his_advice_info, err := service.GetHisDoctorAdviceInfo(adviceId)
1918
-
1919
-								if err == nil {
1920
-									if his_advice_info.IsMedicine == 1 {
1921
-
1922
-										isMidicine = true
1923
-									}
1924
-								}
1925
-							}
1926
-						}
1927
-					}
1928
-				}
1906
+				//if items["advices"] != nil && reflect.TypeOf(items["advices"]).String() == "[]interface {}" {
1907
+				//	advices := items["advices"].([]interface{})
1908
+				//
1909
+				//	if len(advices) > 0 {
1910
+				//		for _, advice := range advices {
1911
+				//
1912
+				//			var adviceId int64
1913
+				//			if advice.(map[string]interface{})["advice_id"] != nil || reflect.TypeOf(advice.(map[string]interface{})["advice_id"]).String() == "float64" {
1914
+				//				adviceId = int64(advice.(map[string]interface{})["advice_id"].(float64))
1915
+				//			}
1916
+				//			if adviceId > 0 {
1917
+				//				his_advice_info, err := service.GetHisDoctorAdviceInfo(adviceId)
1918
+				//
1919
+				//				if err == nil {
1920
+				//					if his_advice_info.IsMedicine == 1 {
1921
+				//
1922
+				//						isMidicine = true
1923
+				//					}
1924
+				//				}
1925
+				//			}
1926
+				//		}
1927
+				//	}
1928
+				//}
1929 1929
 			}
1930 1930
 		}
1931 1931
 	}
1932 1932
 	if isMidicine == true {
1933
-
1934 1933
 		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeMedicineWrong)
1935 1934
 		return
1936 1935
 	}