修改试剂库-实际详情

duizhaopin
apan_youxiang@163.com 2 years ago
parent 04057bd54e
commit 2585b01dde

@ -131,7 +131,7 @@ class BllMedicament(Repository):
select * from rms_medicament %s select * from rms_medicament %s
""" """
# 分组查询 # 分组查询
group_base = " group by `name`, cas_number, net_weight_unit" group_base = " group by `name`, purity, speci"
# 动态添加查询条件 # 动态添加查询条件
where_base = "" where_base = ""
if client_id: if client_id:
@ -142,7 +142,7 @@ class BllMedicament(Repository):
where_base += " and" where_base += " and"
where_base += f" `name` like '{seach_word}' or english_name like '{seach_word}' " where_base += f" `name` like '{seach_word}' or english_name like '{seach_word}' "
if where_base: if where_base:
where_base = "where" + where_base where_base = f"where {where_base} "
# 组装最终sql # 组装最终sql
run_sql = sql_all % where_base+group_base run_sql = sql_all % where_base+group_base
try: try:

Loading…
Cancel
Save