#!/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): sql_name = 'rms_medicament_extend' def __init__(self, entityType=EntityMedicamentExtend): super().__init__(entityType) def get_list(self, page_param): sql_all = """ select * 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)