tfse-app-api-v0.2/company/CompanyIndex.py

28 lines
805 B
Python

from company.scripts import find_company_data_scripts, find_financial_index_detail_scripts, find_head_info_scripts
class CompanyIndex:
def __init__(self):
self.cid = None
self.table = None
def get_company_data_obj(self):
result = find_company_data_scripts(self.table, self.cid)
if result:
result[0].pop('企业ID')
return "查询成功", result[0]
else:
return "无数据", {}
def get_index_detail_obj(self):
result = find_financial_index_detail_scripts(self.table, self.cid)
if result:
return '查询成功', result
else:
return '无数据', {}
def head_info_obj(self):
result = find_head_info_scripts(self.cid)
return "查询成功", result