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.
37 lines
1.0 KiB
37 lines
1.0 KiB
#!/usr/bin/env python
|
|
# -*- encoding: utf-8 -*-
|
|
'''
|
|
@Da
|
|
te:2022/07/18 16:32:26
|
|
'''
|
|
import sys
|
|
sys.path.append(".")
|
|
import os
|
|
print(os.getcwd())
|
|
from sqlalchemy import asc
|
|
from .db_base import Repository
|
|
from models.client_models import EntityClient
|
|
|
|
|
|
|
|
#用户操作业务逻辑类
|
|
class BllClient(Repository):
|
|
def __init__(self, entityType=EntityClient):
|
|
return super().__init__(entityType)
|
|
|
|
|
|
# 获取客户端列表
|
|
def get_all_client_list(self):
|
|
# return self.findList().order_by(asc(EntityClient.client_code)).all()
|
|
sql_all = """select * from rms_client order by client_code """
|
|
return self.execute(sql_all).fetchall()
|
|
|
|
# 根据条件查询客户端信息
|
|
def get_filter_client(self, client_id, customer_id):
|
|
where_list = []
|
|
if client_id:
|
|
where_list.append(EntityClient.client_id == client_id)
|
|
if customer_id:
|
|
where_list.append(EntityClient.customer_id == customer_id)
|
|
return self.findEntity(tuple(where_list))
|