添加获取自定义表单列表

duizhaopin
apan_youxiang@163.com 2 years ago
parent e0f541184c
commit 1e5de7b488

@ -79,3 +79,10 @@ def del_drug_form():
return jsonify(Utils.true_return(msg="删除成功")) return jsonify(Utils.true_return(msg="删除成功"))
else: else:
return jsonify(Utils.false_return(msg="该表单不存在")) return jsonify(Utils.false_return(msg="该表单不存在"))
@drug_form_router.route("/get_use", methods=["GET"])
# @token_auth.login_required
def get_use_drug_form():
data_list = BllMedicamentExtend().get_use_list()
return jsonify(Utils.true_return(data=Utils.msyql_table_model(data_list)))

@ -30,4 +30,10 @@ class BllMedicamentExtend(Repository):
page_param.totalRecords=count_number page_param.totalRecords=count_number
page_sql = Utils.sql_paging_assemble(sql_all, page_param) page_sql = Utils.sql_paging_assemble(sql_all, page_param)
return self.execute(page_sql) return self.execute(page_sql).fetchall()
def get_use_list(self):
sql_all = """
select id, name, description,key_lenth, sort_index, is_use from rms_medicament_extend where is_del=0 and is_use=1 order by sort_index
"""
return self.execute(sql_all).fetchall()
Loading…
Cancel
Save