2021-12-27 16:30:57 +08:00
|
|
|
from company.scripts import find_company_data_scripts, find_financial_index_detail_scripts, find_head_info_scripts
|
2021-12-13 16:04:10 +08:00
|
|
|
|
|
|
|
|
|
|
|
class CompanyIndex:
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
self.cid = None
|
2021-12-21 11:06:58 +08:00
|
|
|
self.table = None
|
2021-12-13 16:04:10 +08:00
|
|
|
|
2021-12-21 11:06:58 +08:00
|
|
|
def get_company_data_obj(self):
|
|
|
|
result = find_company_data_scripts(self.table, 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):
|
|
|
|
result = find_financial_index_detail_scripts(self.table, self.cid)
|
|
|
|
if result:
|
|
|
|
return '查询成功', result
|
|
|
|
else:
|
|
|
|
return '无数据', {}
|
2021-12-27 16:30:57 +08:00
|
|
|
|
|
|
|
def head_info_obj(self):
|
|
|
|
result = find_head_info_scripts(self.cid)
|
|
|
|
return "查询成功", result
|