You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
690 B
Python
31 lines
690 B
Python
1 year ago
|
from website.handler import BaseHandler
|
||
|
from sqlalchemy import text
|
||
|
|
||
|
# 获取企业模型数量
|
||
|
def get_enterprise_model_count(id):
|
||
|
|
||
|
return 0
|
||
|
|
||
|
|
||
|
# 获取企业设备数量
|
||
|
def get_enterprise_device_count(id):
|
||
|
return 0
|
||
|
|
||
|
|
||
|
# 获取所有企业实体数量
|
||
|
def get_enterprise_entity_count(engine):
|
||
|
with engine.connect() as conn:
|
||
|
count_sql_text = "select count(id) from enterprise "
|
||
|
count = conn.execute(text(count_sql_text)).fetchone()
|
||
|
if count:
|
||
|
return count[0]
|
||
|
|
||
|
return 0
|
||
|
|
||
|
# 获取所有企业模型数量
|
||
|
def get_enterprise_model_count():
|
||
|
return 0
|
||
|
|
||
|
# 获取所有企业设备数量
|
||
|
def get_enterprise_device_count():
|
||
|
return 0
|