add project files
Browse files- src/gr_func.py +5 -3
src/gr_func.py
CHANGED
@@ -151,9 +151,11 @@ def get_possible_material(medicine_select, first_material:str="无", second_mate
|
|
151 |
def get_num(x):
|
152 |
name = x["name"]
|
153 |
phar_temp = x["phar_temp"]
|
154 |
-
num = -main_temp
|
155 |
-
|
156 |
-
|
|
|
|
|
157 |
|
158 |
a = list(map(get_num,a))
|
159 |
a = list(filter(lambda x:x[1]<=material_max_num, a))
|
|
|
151 |
def get_num(x):
|
152 |
name = x["name"]
|
153 |
phar_temp = x["phar_temp"]
|
154 |
+
num = -main_temp/phar_temp
|
155 |
+
if not num.is_integer():
|
156 |
+
num = 9999999
|
157 |
+
# num = 1 if num==0 else num
|
158 |
+
return (name,int(num))
|
159 |
|
160 |
a = list(map(get_num,a))
|
161 |
a = list(filter(lambda x:x[1]<=material_max_num, a))
|