From 2e84cbea2258d82bee0b7dcf6923d2ad0e2157a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=9D=E5=B7=9D?= Date: Fri, 17 Dec 2021 15:31:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=A2=E5=8A=A1=E5=BE=97?= =?UTF-8?q?=E5=88=86=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rating/RatingModel.py | 2 +- Rating/scripts/financial_score.py | 6 +++--- static/test_data/demo01.json | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Rating/RatingModel.py b/Rating/RatingModel.py index 9801cbb..fcb9370 100644 --- a/Rating/RatingModel.py +++ b/Rating/RatingModel.py @@ -213,4 +213,4 @@ class RatingModel: if __name__ == '__main__': data = read_json_file(file_path('/static/test_data/demo01.json')) model = RatingModel(data) - # model.save_result() + model.save_result() diff --git a/Rating/scripts/financial_score.py b/Rating/scripts/financial_score.py index 3b8c106..fe012b3 100644 --- a/Rating/scripts/financial_score.py +++ b/Rating/scripts/financial_score.py @@ -54,9 +54,9 @@ def financial_score(level_1_industry, param2): fin4 = ['营业增长率', '总资产增长率', '技术投入比率'] result['盈利能力'] = dict((key, value) for key, value in scores.items() if key in fin1) - result['资产质量'] = dict((key, value) for key, value in scores.items() if key in fin1) - result['债务风险'] = dict((key, value) for key, value in scores.items() if key in fin1) - result['经营增长'] = dict((key, value) for key, value in scores.items() if key in fin1) + result['资产质量'] = dict((key, value) for key, value in scores.items() if key in fin2) + result['债务风险'] = dict((key, value) for key, value in scores.items() if key in fin3) + result['经营增长'] = dict((key, value) for key, value in scores.items() if key in fin4) df_scores = pd.DataFrame([scores]) result['盈利能力']['合计'] = float(df_scores[fin1].sum(axis=1).values[0]) diff --git a/static/test_data/demo01.json b/static/test_data/demo01.json index 27d55b1..600ede4 100644 --- a/static/test_data/demo01.json +++ b/static/test_data/demo01.json @@ -1,6 +1,6 @@ { - "评价ID": "bR2n0mV0", - "企业ID": "cqqHE80f", + "评价ID": "kSVoCeJ1", + "企业ID": "mKJreZRw", "企业名称": "远东资信评估有限公司", "行业选择": ["制造业", "电子工业"], "评价年度": "2021年",