You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yy_rms_39zhiyao_duizhao/db_logic/medicament_extend.py

33 lines
909 B

#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@Date:2022/08/12 15:12:42
'''
import sys
sys.path.append('.')
from db_logic.db_base import Repository
from models.medicament_models import EntityMedicamentExtend
from Common.Utils import Utils
#药剂品种业务逻辑类
class BllMedicamentExtend(Repository):
def __init__(self, entityType=EntityMedicamentExtend):
super().__init__(entityType)
def get_list(self, page_param):
sql_all = """
select id, name, description,key_lenth, sort_index, is_use from rms_medicament_extend where is_del=0 order by sort_index
"""
try:
count_number = len(self.execute(sql_all).fetchall())
except Exception:
count_number = 0
page_param.totalRecords=count_number
page_sql = Utils.sql_paging_assemble(sql_all, page_param)
return self.execute(page_sql)