Przeglądaj źródła

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

28169 11 miesięcy temu
rodzic
commit
dd8cef12e2
1 zmienionych plików z 23 dodań i 24 usunięć
  1. 23 24
      controllers/his_api_controller.go

+ 23 - 24
controllers/his_api_controller.go Wyświetl plik

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
 	if isMidicine == true {
1932
 	if isMidicine == true {
1933
-
1934
 		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeMedicineWrong)
1933
 		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeMedicineWrong)
1935
 		return
1934
 		return
1936
 	}
1935
 	}