from flask import Blueprint, request, Response from common.scripts import verify_token from company.scripts import * company_route = Blueprint('company', __name__) @company_route.route('/init_company_data', methods=['POST']) @verify_token def basic_info(): """ 初始化企业数据 包括 天眼查数据库、企业基本信息 Parameters: cid 企业ID company_name 企业名称 Returns: res: desc """ cid = json.loads(request.data)['cid'] company_name = json.loads(request.data)['company_name'] # 拉取企业数据 info1 = drag_company_data_request(company_name) if info1 != "企业数据拉取成功": return {"info": "数据拉取失败"}, 210 # 清洗基本信息数据 basic_info_etl(cid, company_name) return {"info": "企业基本信息初始化成功"} @company_route.route('/general_rating', methods=['POST']) @verify_token def general_rating(): """ 准备综合评价信息数据 Parameters: - Returns: - """ @company_route.route('/financial_analysis', methods=['POST']) @verify_token def financial_analysis(): """ 准备财务要素信息 Parameters: - Returns: - """ @company_route.route('/risk_analysis', methods=['POST']) @verify_token def risk_analysis(): """ 准备风险要素信息 Parameters: - Returns: - """ @company_route.route('/index_detail', methods=['POST']) @verify_token def index_detail(): """ 准备指标明细数据 Parameters: - Returns: - """