|
|
|
@ -22,14 +22,17 @@ class BllMedicamentTemplate(Repository):
|
|
|
|
|
|
|
|
|
|
# 获取所有模板列表
|
|
|
|
|
def getAllTemplateList(self, client_id, page_param):
|
|
|
|
|
sql_all = "select %s from rms_medicament_template where is_wait_export=1 "
|
|
|
|
|
sql_all = "select * from rms_medicament_template where is_wait_export=1 "
|
|
|
|
|
end_sql = "order by create_date desc"
|
|
|
|
|
if client_id:
|
|
|
|
|
sql_all = sql_all + f"and client_id='{client_id}'"
|
|
|
|
|
|
|
|
|
|
page_param.totalRecords = self.execute(sql_all% ("count(*)")).fetchone()[0]
|
|
|
|
|
sql_all = Utils.sql_paging_assemble(sql_all % "*" + end_sql, page_param)
|
|
|
|
|
data = self.execute(sql_all % "*").fetchall()
|
|
|
|
|
try:
|
|
|
|
|
count_number = len(self.execute(sql_all).fetchall())
|
|
|
|
|
except Exception:
|
|
|
|
|
count_number = 0
|
|
|
|
|
page_param.totalRecords = count_number
|
|
|
|
|
sql_all = Utils.sql_paging_assemble(sql_all + end_sql, page_param)
|
|
|
|
|
data = self.execute(sql_all).fetchall()
|
|
|
|
|
return data
|
|
|
|
|
|
|
|
|
|
# 批量或删除单个模板
|
|
|
|
|