duizhaopin
13507605001 2 years ago
parent 22df8b03b9
commit bafcd72481

@ -144,7 +144,7 @@ def drug_use_retur_list():
page = int(request.values.get("page", 1))
page_size = int(request.values.get("page_size", 10))
page_param = PageParam(page, page_size)
data = BllMedicament().drug_use_return(status=status, func_type=func_type, page_param=page_param)
data = BllMedicament().drug_use_return(status=status, func_type=func_type, user=g.current_user, page_param=page_param)
return jsonify(Utils.true_return(data={"total_count": page_param.totalRecords, "data": Utils.msyql_table_model(data)}))

@ -375,9 +375,9 @@ class BllMedicament(Repository):
self.commitTrans()
# 获取领用和归还页面列表
def drug_use_return(self, status, func_type, page_param):
def drug_use_return(self, status, func_type, user, page_param):
sql_all = f"""
select * from rms_medicament where status={status} and func_type='{func_type}' and status != 3 order by by_user_date desc
select * from rms_medicament where status={status} and func_type='{func_type}' and by_user_id='{user.user_id}' order by by_user_date desc
"""
try:
count_number = len(self.execute(sql_all).fetchall())

Loading…
Cancel
Save