2022-02-09 17:34:42 +08:00
|
|
|
from company.company_impl import find_company_data_scripts, find_financial_index_detail_scripts, get_head_info_impl, \
|
2022-02-24 16:15:04 +08:00
|
|
|
industry_analysis_impl, esg_analysis_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
|
2022-02-09 17:34:42 +08:00
|
|
|
self.industry = None
|
2022-01-27 17:01:38 +08:00
|
|
|
|
|
|
|
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 '无数据', {}
|
2022-02-09 17:34:42 +08:00
|
|
|
|
|
|
|
def industry_analysis(self):
|
2022-02-14 17:28:52 +08:00
|
|
|
return industry_analysis_impl(self.cid)
|
2022-02-24 16:15:04 +08:00
|
|
|
|
|
|
|
def esg_analysis(self):
|
|
|
|
return esg_analysis_impl(self.cid)
|