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

31 lines
829 B
Python
Raw Normal View History

2022-01-27 17:01:38 +08:00
from company.company_impl import find_company_data_scripts, find_financial_index_detail_scripts, get_head_info_impl
2021-12-13 16:04:10 +08:00
class CompanyIndex:
2022-01-27 17:01:38 +08:00
"""
企业主页
"""
2021-12-13 16:04:10 +08:00
def __init__(self):
self.cid = None
2022-01-27 17:01:38 +08:00
self.tab = None
def get_head_info(self):
result = get_head_info_impl(self.cid)
return "查询成功", result
2021-12-13 16:04:10 +08:00
2021-12-21 11:06:58 +08:00
def get_company_data_obj(self):
2022-01-27 17:01:38 +08:00
result = find_company_data_scripts(self.tab, self.cid)
2021-12-17 17:15:20 +08:00
if result:
2021-12-21 11:06:58 +08:00
result[0].pop('企业ID')
2021-12-17 17:15:20 +08:00
return "查询成功", result[0]
else:
return "无数据", {}
2021-12-24 15:24:26 +08:00
def get_index_detail_obj(self):
2022-01-27 17:01:38 +08:00
result = find_financial_index_detail_scripts(self.tab, self.cid)
2021-12-24 15:24:26 +08:00
if result:
return '查询成功', result
else:
return '无数据', {}