from company.company_impl import find_company_data_scripts, find_financial_index_detail_scripts, get_head_info_impl, \ industry_analysis_impl, esg_analysis_impl class CompanyIndex: """ 企业主页 """ def __init__(self): self.cid = None self.tab = None self.industry = None def get_head_info(self): result = get_head_info_impl(self.cid) return "查询成功", result def get_company_data_obj(self): result = find_company_data_scripts(self.tab, 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.tab, self.cid) if result: return '查询成功', result else: return '无数据', {} def industry_analysis(self): return industry_analysis_impl(self.cid) def esg_analysis(self): return esg_analysis_impl(self.cid)