├── test
└── test.py
├── img
└── taomi.png
├── input
└── 模板.xlsx
├── output
└── 模板.docx
├── templates
├── 样品.docx
├── 模板.xlsx
├── index.html
└── text.html
├── far
├── __pycache__
│ ├── _config.cpython-39.pyc
│ ├── _para.cpython-39.pyc
│ ├── _text.cpython-39.pyc
│ ├── __init__.cpython-39.pyc
│ └── _formula.cpython-39.pyc
├── __init__.py
├── _config.py
├── _gpt.py
├── _formula.py
├── core.py
├── _text.py
├── main.py
└── _para.py
├── requirements.txt
├── LICENSE
├── start.py
├── start_aigc.py
├── README.md
├── webapp.py
├── .gitignore
└── db
└── 模板.json
/test/test.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/img/taomi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/watalo/safa/HEAD/img/taomi.png
--------------------------------------------------------------------------------
/input/模板.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/watalo/safa/HEAD/input/模板.xlsx
--------------------------------------------------------------------------------
/output/模板.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/watalo/safa/HEAD/output/模板.docx
--------------------------------------------------------------------------------
/templates/样品.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/watalo/safa/HEAD/templates/样品.docx
--------------------------------------------------------------------------------
/templates/模板.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/watalo/safa/HEAD/templates/模板.xlsx
--------------------------------------------------------------------------------
/far/__pycache__/_config.cpython-39.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/watalo/safa/HEAD/far/__pycache__/_config.cpython-39.pyc
--------------------------------------------------------------------------------
/far/__pycache__/_para.cpython-39.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/watalo/safa/HEAD/far/__pycache__/_para.cpython-39.pyc
--------------------------------------------------------------------------------
/far/__pycache__/_text.cpython-39.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/watalo/safa/HEAD/far/__pycache__/_text.cpython-39.pyc
--------------------------------------------------------------------------------
/far/__pycache__/__init__.cpython-39.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/watalo/safa/HEAD/far/__pycache__/__init__.cpython-39.pyc
--------------------------------------------------------------------------------
/far/__pycache__/_formula.cpython-39.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/watalo/safa/HEAD/far/__pycache__/_formula.cpython-39.pyc
--------------------------------------------------------------------------------
/far/__init__.py:
--------------------------------------------------------------------------------
1 |
2 | # from _text import normal,no_year1,no_year2,no_year3,all_years,header
3 |
4 | __all__ = ['_config', '_formula','_para', '_text',
5 | # '_gpt'
6 | ]
7 |
8 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | blinker==1.8.2
2 | click==8.1.7
3 | et-xmlfile==1.1.0
4 | Flask==3.0.3
5 | itsdangerous==2.2.0
6 | Jinja2==3.1.4
7 | lxml==5.2.2
8 | MarkupSafe==2.1.5
9 | openpyxl==3.1.4
10 | python-docx==1.1.2
11 | tinydb==4.8.0
12 | typing_extensions==4.12.2
13 | Werkzeug==3.0.3
14 |
--------------------------------------------------------------------------------
/far/_config.py:
--------------------------------------------------------------------------------
1 |
2 | '''路径配置文件'''
3 |
4 | import os
5 |
6 | ROOT_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
7 | INPUT_PATH = os.path.join(ROOT_PATH, 'input')
8 | OUTPUT_PATH = os.path.join(ROOT_PATH, 'output')
9 | IMG_PATH = os.path.join(ROOT_PATH, 'img')
10 | DB_PATH = os.path.join(ROOT_PATH, 'db')
11 | # MODEL_PATH = os.path.join(ROOT_PATH, 'THUDM', 'chatglm-6b')
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 watalo
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/start.py:
--------------------------------------------------------------------------------
1 |
2 | # -*- coding: utf-8 -*-
3 | #__author__:"watalo"
4 | # @Time: 2020/3/27 1:51
5 | # @Site :
6 | # @File : start.py
7 | # @Software:
8 |
9 | '''
10 | 经典方法执行文件
11 | '''
12 | import os
13 | from far._config import INPUT_PATH, OUTPUT_PATH, DB_PATH
14 | from far.core import getDB
15 | from far.main import get_docx
16 |
17 | def init_dir():
18 | for path in [OUTPUT_PATH, DB_PATH]:
19 | files = os.listdir(path)
20 | for file in files:
21 | os.remove(os.path.join(path, file))
22 |
23 | def get_template_filename():
24 | return os.listdir(''.join(INPUT_PATH))[0].split('.')[0]
25 |
26 | def start():
27 | name = get_template_filename()
28 | output_path = os.path.join(OUTPUT_PATH, f'{name}.docx')
29 | db = getDB(name = name)
30 | get_docx(name=name, output_path=output_path)
31 | return output_path
32 |
33 | def get_all_file_paths():
34 | file_paths = []
35 | for root, directories, files in os.walk("."):
36 | for filename in files:
37 | filepath = os.path.join(root, filename)
38 | file_paths.append(filepath)
39 | return file_paths
40 |
41 | if __name__ == "__main__":
42 | init_dir()
43 | start()
44 |
45 |
46 |
--------------------------------------------------------------------------------
/far/_gpt.py:
--------------------------------------------------------------------------------
1 | # here put the import lib
2 | from transformers import AutoTokenizer, AutoModel
3 | from . import _config
4 | import re
5 |
6 |
7 | '''
8 | Glm类
9 | 用来调用ChatGLM的返回信息
10 | - 属性
11 | .model_path 指定存放模型的文件夹路径
12 | - 方法
13 | .response() 唯一的,用来接受prompt列表,并返回‘回复’列表
14 | 调整_text.py内容,
15 | '''
16 |
17 | class Glm():
18 | def __init__(self):
19 | self.model_path = _config.Path.model
20 | self.tokenizer = AutoTokenizer.from_pretrained(self.model_path, trust_remote_code=True)
21 |
22 | def __model(self,type='GPU'):
23 | model = AutoModel.from_pretrained(self.model_path, trust_remote_code=True)
24 | if type == 'GPU':
25 | model = model.half().cuda()
26 | elif type == 'CPU':
27 | model = model.float()
28 | model = model.eval()
29 | return model
30 |
31 | def response(self,prompt):
32 | res,his = self.__model('CPU').chat(self.tokenizer, prompt, history=[])
33 | # res = res.strip(r'\r').strip(r'\n').strip(r'\t')
34 | res = res.strip(r'\r').strip(r'\n').strip('\t').strip('^l')
35 | return res
36 |
37 | # 清楚字符串中的‘\r'、'\n’和‘\t’
38 |
39 |
40 |
41 |
42 | class Prompt(object):
43 | p2 = '请分析申请人的资本结构。'
44 | p3 = '请分析申请人的盈利能力。'
45 | p4 = '请分析申请人的现金流量。'
46 | p5 = '请分析申请人的资产质量。'
47 | p6 = '请分析申请人的流动性。'
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/start_aigc.py:
--------------------------------------------------------------------------------
1 | # # AIstudio运行取消以下注释
2 |
3 | # # import sys
4 | # # sys.path.append('/home/aistudio/work/external-libraries')
5 | # # sys.path.append('/home/aistudio/external-libraries')
6 |
7 |
8 | # import os
9 | # from far import _config
10 | # from far.core import getDB
11 | # # from far.main import get_docx_with_ChatGLM
12 |
13 |
14 | # def init_dir():
15 | # for i in ['/safa/db', '/safa/output']:
16 | # dirpath = ''.join([_config.Path.root, "/%s" % i])
17 | # namelist = os.listdir(dirpath)
18 | # for filename in namelist:
19 | # os.remove(os.path.join(dirpath, filename))
20 |
21 | # def get_template_filename():
22 | # return os.listdir(''.join(_config.Path.input))[0].split('.')[0]
23 |
24 | # def get_start():
25 | # name = get_template_filename()
26 | # output_path = '/'.join([_config.Path.output, name +'.docx'])
27 | # db_path = ''.join([_config.Path.db, name + '.json'])
28 | # db = getDB(name = name)
29 | # get_docx(name=name, output_path=output_path)
30 | # return output_path
31 |
32 |
33 | # def get_all_file_paths():
34 | # file_paths = []
35 | # for root, directories, files in os.walk("."):
36 | # for filename in files:
37 | # filepath = os.path.join(root, filename)
38 | # file_paths.append(filepath)
39 | # return file_paths
40 |
41 | # if __name__ == "__main__":
42 | # init_dir()
43 | # name = os.listdir(''.join(_config.Path.input))[0].split('.')[0]
44 | # output_path = '/'.join([_config.Path.output, name +'.docx'])
45 | # print(output_path)
46 | # db_path = '/'.join([_config.Path.db, name + '.json'])
47 | # db = getDB(name = name)
48 | # get_docx_with_ChatGLM(name=name,output_path=output_path)
49 |
50 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
Semi-Automatic Financial Analysis(safa)
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | 只用填好财务数据表格,就可以直接生成报告
14 |
15 | 财务报表.xlsx ➡️ 分析报告.docx
16 |
17 |
18 | ## 使用环境
19 |
20 | ### 安装
21 |
22 | 语言:python >= 3.8
23 |
24 | 1. 打开Win系统中的终端: Win + R ,输入 `cmd`,按下ENTER
25 | 2. 进入准备保存项目的目录,比如:`cd E:\`
26 | 3. 下载项目文件,输入: `git clone https://github.com/watalo/safa.git`,等待下载完成。
27 | 4. 进入项目目录,输入: `cd safa`
28 | 5. 创建虚拟环境,输入: `python -m venv .venv`
29 | 6. 激活虚拟环境,输入: `.venv\Scripts\activate`
30 | 7. 安装依赖,输入: `pip install -r requirements.txt`
31 |
32 | ### 数据准备
33 |
34 | - 按下表企业财务报表数据完整情况填写数据
35 |
36 | | 缺失情况 |对应`_text.py`中的模版|填入标记为1的列|备注|
37 | |:--:|:-:|:-:|-|
38 | |数据完整| normal|1-1-1-1|成立超3年|
39 | |缺少第1年数据 | no_year3|0-1-1-1|成立不足3年|
40 | |缺少第2年数据 | no_year2|0-0-1-1|成立不足2年|
41 | |缺少第3年数据 | no_year1|0-0-0-1|成立不足1年|
42 | |当期为年末数据 | all_years|1-1-1-0|报告时间还没出1月报|
43 |
44 | - 在input文件夹中找到`***.xlsx`,填写财务数据
45 | - 总共4列(例如:2021 | 2022 | 2023 | 2023M3 )
46 |
47 | ### 使用
48 |
49 | #### 普通版
50 |
51 | - 运行py文件
52 | - 运行`start.py`
53 | - 在`\output`中找到生成的`***.docx`,名字与`***.xlsx`文件一样。
54 |
55 |
56 | #### 网页版
57 | - 运行`webapp.py`启动本地网页后台
58 | - 浏览器访问:http://127.0.0.1:5000
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/webapp.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- encoding: utf-8 -*-
3 | '''
4 | @File : chatfar.py
5 | @Time : 2023/04/11 13:15:26
6 | @Author : watalo
7 | @Version : 1.0
8 | @Contact : watalo@163.com
9 | '''
10 |
11 | from flask import Flask, render_template, request, send_file
12 | import os
13 | from start import *
14 | from far import _config
15 |
16 | app = Flask(__name__)
17 |
18 | # 文件下载功能
19 | @app.route('/download')
20 | def download_file():
21 | filename = './templates/模板.xlsx' # 要下载的文件名
22 | directory = os.getcwd() # 获取当前目录
23 | path = os.path.join(directory, filename) # 获取文件完整路径
24 | return send_file(path, as_attachment=True) # 返回文件下载
25 |
26 | @app.route('/download2')
27 | def download_file2():
28 | filename = './templates/样品.docx' # 要下载的文件名
29 | directory = os.getcwd() # 获取当前目录
30 | path = os.path.join(directory, filename) # 获取文件完整路径
31 | return send_file(path, as_attachment=True) # 返回文件下载
32 |
33 | # 文件上传功能
34 | @app.route('/upload', methods=['get','POST'])
35 | def upload_file():
36 | for i in ['/safa/db', '/safa/output', '/safa/input']:
37 | dirpath = ''.join([_config.Path.root, r"/%s" % i])
38 | namelist = os.listdir(dirpath)
39 | for file_name in namelist:
40 | os.remove(dirpath+'/' + file_name)
41 |
42 | if request.method == 'POST':
43 | file = request.files['file'] # 获取上传的文件
44 | filename = file.filename # 获取文件名
45 | file.save('./input/'+filename) # 将上传的文件保存到当前目录下
46 | return render_template('index.html',success=True)
47 | return render_template('index.html')
48 |
49 | # 生成报告功能
50 | @app.route('/generate_report')
51 | def generate_report():
52 |
53 | # 进行后台程序的处理,生成新的报告文件
54 | init_dir()
55 | new_filename = get_start()
56 |
57 | return send_file(new_filename, as_attachment=True) # 返回生成的报告文件下载
58 |
59 | # 页面渲染
60 | @app.route('/')
61 | def index():
62 | return render_template('index.html')
63 |
64 | if __name__ == '__main__':
65 | app.run(debug=True)
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | far/__pycache__/
4 | *.py[cod]
5 | *$py.class
6 |
7 | # C extensions
8 | *.so
9 |
10 | # Distribution / packaging
11 | .Python
12 | build/
13 | develop-eggs/
14 | dist/
15 | downloads/
16 | eggs/
17 | .eggs/
18 | lib/
19 | lib64/
20 | parts/
21 | sdist/
22 | var/
23 | wheels/
24 | share/python-wheels/
25 | *.egg-info/
26 | .installed.cfg
27 | *.egg
28 | MANIFEST
29 |
30 | # PyInstaller
31 | # Usually these files are written by a python script from a template
32 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
33 | *.manifest
34 | *.spec
35 |
36 | # Installer logs
37 | pip-log.txt
38 | pip-delete-this-directory.txt
39 |
40 | # Unit test / coverage reports
41 | htmlcov/
42 | .tox/
43 | .nox/
44 | .coverage
45 | .coverage.*
46 | .cache
47 | nosetests.xml
48 | coverage.xml
49 | *.cover
50 | *.py,cover
51 | .hypothesis/
52 | .pytest_cache/
53 | cover/
54 |
55 | # Translations
56 | *.mo
57 | *.pot
58 |
59 | # Django stuff:
60 | *.log
61 | local_settings.py
62 | db.sqlite3
63 | db.sqlite3-journal
64 |
65 | # Flask stuff:
66 | instance/
67 | .webassets-cache
68 |
69 | # Scrapy stuff:
70 | .scrapy
71 |
72 | # Sphinx documentation
73 | docs/_build/
74 |
75 | # PyBuilder
76 | .pybuilder/
77 | target/
78 |
79 | # Jupyter Notebook
80 | .ipynb_checkpoints
81 |
82 | # IPython
83 | profile_default/
84 | ipython_config.py
85 |
86 | # pyenv
87 | # For a library or package, you might want to ignore these files since the code is
88 | # intended to run in multiple environments; otherwise, check them in:
89 | # .python-version
90 |
91 | # pipenv
92 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93 | # However, in case of collaboration, if having platform-specific dependencies or dependencies
94 | # having no cross-platform support, pipenv may install dependencies that don't work, or not
95 | # install all needed dependencies.
96 | #Pipfile.lock
97 |
98 | # poetry
99 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
100 | # This is especially recommended for binary packages to ensure reproducibility, and is more
101 | # commonly ignored for libraries.
102 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
103 | #poetry.lock
104 |
105 | # pdm
106 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
107 | #pdm.lock
108 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
109 | # in version control.
110 | # https://pdm.fming.dev/#use-with-ide
111 | .pdm.toml
112 |
113 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
114 | __pypackages__/
115 |
116 | # Celery stuff
117 | celerybeat-schedule
118 | celerybeat.pid
119 |
120 | # SageMath parsed files
121 | *.sage.py
122 |
123 | # Environments
124 | .env
125 | .venv
126 | env/
127 | venv/
128 | ENV/
129 | env.bak/
130 | venv.bak/
131 |
132 | # Spyder project settings
133 | .spyderproject
134 | .spyproject
135 |
136 | # Rope project settings
137 | .ropeproject
138 |
139 | # mkdocs documentation
140 | /site
141 |
142 | # mypy
143 | .mypy_cache/
144 | .dmypy.json
145 | dmypy.json
146 |
147 | # Pyre type checker
148 | .pyre/
149 |
150 | # pytype static type analyzer
151 | .pytype/
152 |
153 | # Cython debug symbols
154 | cython_debug/
155 |
156 |
157 | # Vscode
158 | .vscode/
159 | *.code-workspace
160 |
161 |
162 | # PyCharm
163 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
164 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
165 | # and can be added to the global gitignore or merged into this file. For a more nuclear
166 | # option (not recommended) you can uncomment the following to ignore the entire idea folder.
167 | #.idea/
--------------------------------------------------------------------------------
/templates/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | SAFA
10 |
92 |
93 |
94 |
95 |
98 |
99 |
100 |
101 |
在一个月黑风高的夜晚......
102 |
你的行长又打来了催命连环call,“你的调查报告到底写完了没有,刷个数据要这么半天吗?”
103 |
104 |
你看了看时间,已经刷了3个小时的剧,是该干点正事了...
105 |
106 |
107 | 第1步
108 | 把财务数据填到下载模板的【模板.xlsx】里面,记得按保存,不要改文件名。或者你可以先下载样品来看看
109 |
113 | 第2步
114 | 点下面的选择文件,把你填好的报表传上来上传报表
115 |
119 |
124 | 第3步
125 | 一手交钱,一手交货,点完生成报告后耐心等待10秒钟
126 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
--------------------------------------------------------------------------------
/templates/text.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | ReportGPT
11 |
169 |
170 |
171 |
172 |
175 |
176 |
177 |
178 |
在一个月黑风高的夜晚......
179 |
你的行长又打来了催命连环call,“你的调查报告到底写完了没有,刷个数据要这么半天吗?”
180 |
181 |
你看了看时间,已经刷了3个小时的剧,是该干点正事了...
182 |
183 | 第1步
184 | 把财务数据填到的【模板.xlsx】里面,记得按保存,不要改文件名。或者你可以先来看看
185 |
189 | 第2步
190 | 点下面的,把你填好的报表传上来
191 |
195 |
196 | {% if success %}
197 |
198 | 上传成功!
199 |
200 | {% endif %}
201 |
202 | 第3步
203 | 一手交钱,一手交货,点完后耐心等待10秒钟
204 |
207 |
208 |
209 |
210 |
211 |
--------------------------------------------------------------------------------
/far/_formula.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | # -*- coding: utf-8 -*-
3 | #__author__:"watalo"
4 | # @Time: 2020/3/30 22:04
5 | # @Site :
6 | # @File : _formula.py
7 | # @Software: PyCharm
8 |
9 | from tinydb import Query
10 |
11 | def formula(db, year, findex):
12 |
13 | db.all()
14 | Q = Query()
15 |
16 | def divd_(year, a, b):
17 | '''
18 | 除法计算
19 | @param year:明确数据是哪年的
20 | @param a: 浮点数,直接调用db中的数据/ 其他公式的计算结果
21 | @param b: 浮点数,直接调用db中的数据/ 其他公式的计算结果
22 | @return: 结果
23 | '''
24 | if db.get(Q.items == a) in db.all():
25 | if db.get(Q.items == b) in db.all():
26 | return db.get(Q.items == a)[year] / db.get(Q.items == b)[year]
27 | else:
28 | return db.get(Q.items == a)[year] / b
29 | else:
30 | if db.get(Q.items == b) in db.all():
31 | return a / db.get(Q.items == b)[year]
32 | else:
33 | if b == 0:
34 | return 0
35 | else:
36 | return a / b
37 |
38 | def plus_(year, a, b):
39 | if db.get(Q.items == a) in db.all():
40 | if db.get(Q.items == b) in db.all():
41 | return db.get(Q.items == a)[year] + db.get(Q.items == b)[year]
42 | else:
43 | return db.get(Q.items == a)[year] + b
44 | else:
45 | if db.get(Q.items == b) in db.all():
46 | return a + db.get(Q.items == b)[year]
47 | else:
48 | return a + b
49 |
50 | def minu_(year, a, b):
51 | if db.get(Q.items == a) in db.all():
52 | if db.get(Q.items == b) in db.all():
53 | return db.get(Q.items == a)[year] - db.get(Q.items == b)[year]
54 | else:
55 | return db.get(Q.items == a)[year] - b
56 | else:
57 | if db.get(Q.items == b) in db.all():
58 | return a - db.get(Q.items == b)[year]
59 | else:
60 | return a - b
61 |
62 | if findex == '资产负债率':
63 | return divd_(year,
64 | '负债合计',
65 | '资产总计'
66 | )
67 |
68 | elif findex == '流动比率':
69 | return divd_(year,
70 | '流动资产合计',
71 | '流动负债合计'
72 | )
73 |
74 | elif findex == '速动比率':
75 | return divd_(year,
76 | minu_(year,
77 | '流动资产合计',
78 | '存货'
79 | ),
80 | '流动负债合计'
81 | )
82 |
83 | elif findex == 'EBIT':
84 | return plus_(year,
85 | plus_(year,
86 | '长期待摊费用',
87 | '财务费用'
88 | ),
89 | '利润总额')
90 |
91 | elif findex == '利息保障倍数':
92 | return divd_(year,
93 | plus_(year,
94 | plus_(year,
95 | '长期待摊费用',
96 | '财务费用'),
97 | '利润总额'
98 | ),
99 | '财务费用')
100 |
101 | elif findex == '营运资产':
102 | return plus_(year,
103 | plus_(year,
104 | '预付账款',
105 | '其他应收款'
106 | ),
107 | '其他流动资产'
108 | )
109 |
110 | elif findex == '营运负债':
111 | return plus_(year,
112 | plus_(year, '预收账款', '应付账款'),
113 | plus_(year, '应付职工薪酬', '应交税费')
114 | )
115 |
116 | elif findex == '营运资金需求':
117 | return minu_(year,
118 | plus_(year,
119 | plus_(year, '预付账款', '其他应收款'), '其他流动资产'),
120 | plus_(year,
121 | plus_(year, '预收账款', '应付账款'),
122 | plus_(year, '应付职工薪酬', '应交税费')
123 | )
124 | )
125 |
126 | elif findex == '营运资本':
127 | return minu_(year, '流动资产合计', '流动负债合计')
128 |
129 | elif findex == '存货周转天数':
130 | return 360 * divd_(year,
131 | '存货',
132 | '营业成本'
133 | )
134 |
135 | elif findex == '应收账款周转天数':
136 | return 360 * divd_(year,
137 | '应收账款',
138 | '营业收入'
139 | )
140 |
141 | elif findex == '毛利率':
142 | return divd_(year,
143 | '营业利润',
144 | '营业收入'
145 | )
146 |
147 | elif findex == '净利润率':
148 | return divd_(year,
149 | '净利润',
150 | '营业收入'
151 | )
152 |
153 | elif findex == '总资产收益率(ROA)':
154 | return divd_(year,
155 | '净利润',
156 | '资产总计'
157 | )
158 |
159 | elif findex == '净资产收益率(ROE)':
160 | return divd_(year,
161 | '净利润',
162 | '所有者权益合计'
163 | )
164 |
165 | elif findex == '短债占比':
166 | return divd_(year,
167 | '流动负债合计',
168 | '负债合计'
169 | )
170 |
171 | elif findex == '刚性负债':
172 | return plus_(year,
173 | plus_(year, '短期借款', '一年内到期的非流动负债'),
174 | plus_(year, '长期借款', '应付债券',)
175 | )
176 |
177 | elif findex == '刚兑占比':
178 | return divd_(year,
179 | plus_(year,
180 | plus_(year, '短期借款', '一年内到期的非流动负债'),
181 | plus_(year, '长期借款', '应付债券', )
182 | ),
183 | '负债合计'
184 | )
185 |
186 | elif findex == '短期刚兑':
187 | return plus_(year,
188 | '短期借款',
189 | '一年内到期的非流动负债'
190 | )
191 |
192 | elif findex == '期间费用':
193 | return plus_(year,
194 | plus_(year, '销售费用', '研发费用'),
195 | plus_(year, '管理费用', '财务费用',)
196 | )
197 |
198 | elif findex == '费用收入比':
199 | return divd_(year,
200 | plus_(year,
201 | plus_(year, '销售费用', '研发费用'),
202 | plus_(year, '管理费用', '财务费用', )
203 | ),
204 | '营业收入'
205 | )
206 |
207 | elif findex == '流动资产占比':
208 | return divd_(year,
209 | '流动资产合计',
210 | '资产总计'
211 | )
--------------------------------------------------------------------------------
/far/core.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding:utf-8 -*-
3 | # author:Administrator
4 | # datetime:2020/2/20 20:21
5 | # software: PyCharm
6 |
7 |
8 | '''
9 | 读取xlsx表的数据,形成数据库,形成分析报告Report类
10 | '''
11 | import os
12 | from tinydb import TinyDB
13 | from tinydb import Query
14 | from openpyxl import load_workbook
15 | from . import _config, _formula
16 |
17 |
18 | class getDB(object):
19 | '''
20 | 直接实例化后即可使用
21 | '''
22 | def __init__(self, name):
23 | '''
24 | getDB类的功能:
25 | 1、获取用户发送的数据文件(xlsx文件)
26 | 2、形成和调用过程数据库(json文件)
27 | 3、形成报告,需要导入(text和para模块)
28 | 属性:
29 | name:企业名称(xlsx文件名称),被index模块调用,index模块获取name传入
30 | 方法:
31 | xls_db(): 形成初始数据库
32 | :param name: 企业名称(xlsx文件名称)
33 | '''
34 | self.name = name
35 | self.initPath()
36 | self.db = self.xlsx_db()
37 | self.table_without_nodata = self.db.table('without_nodata')
38 | self.table_for_print = self.db.table('for_print')
39 | self.initDB()
40 |
41 | def initPath(self):
42 | # xlsx文件名
43 | self.xls_file_name = f'{self.name}.xlsx'
44 | # xlsx文件根目录
45 | self.root_path = os.path.join(_config.ROOT_PATH, 'safa')
46 | # xlsx文件路径
47 | self.xls_file_path = os.path.join(_config.INPUT_PATH, f'{self.name}.xlsx')
48 | # 读取xlsx文件
49 | self.ws = load_workbook(
50 | filename=self.xls_file_path,
51 | data_only=True)["Sheet1"]
52 |
53 | def initDB(self):
54 | '''
55 | 还需要对for_print表进行初始化
56 | :return:
57 | '''
58 | self.__remove_zore_year()
59 | self.calc_f_index('without_nodata')
60 | self.calc_m_index('without_nodata')
61 | self.calc_f_index('for_print')
62 | # self.calc_m_index('for_print')
63 | self.__remove_zore_item()
64 |
65 | def xlsx_db(self):
66 | '''
67 | 数据读取/存储
68 | :param output: xlsx文件数据形成tinydb数据库对象
69 | :return: tinydb数据库对象
70 | '''
71 | self.db_path = os.path.join(_config.DB_PATH, f'{self.name}.json')
72 | db = TinyDB(self.db_path)
73 | # 清洗数据中因复制粘贴带有的‘\u202c’和数字中含有‘,’的问题
74 | def clear_data(data):
75 | if isinstance(data, str):
76 | data = data.replace('\u202c', '').replace(',', '')
77 | # ['前3年','前2年','前1年','当期']:
78 | if data in ['前3年', '前2年', '前1年', '当期']:
79 | return data
80 | else:
81 | return float(data)
82 | else:
83 | return data
84 | # 写入数据库
85 | for row in self.ws.iter_rows(min_row=1,
86 | max_col=self.ws.max_column,
87 | max_row=self.ws.max_row
88 | ):
89 | for cell in row:
90 | if cell.value is None or cell.value == ' ' or cell.value == '-':
91 | cell.value = 0
92 | db.insert({
93 | 'items': row[0].value.strip(),
94 | 'year3': clear_data(row[1].value),
95 | 'year2': clear_data(row[2].value),
96 | 'year1': clear_data(row[3].value),
97 | 'month': clear_data(row[4].value),
98 | })
99 | return db
100 |
101 | def check_complete(self):
102 | """
103 | 判断原始数据库db中,没有数据的年份或月份
104 | :param db: 原始数据库,tinydb类
105 | :return: 无数据年份列表
106 | """
107 | def get_data(db, a, b):
108 | return db.get(Q.items == a)[b]
109 | self.db.all()
110 | Q = Query()
111 | nodata_years_list = []
112 | for year in ['year3', 'year2', 'year1', 'month']:
113 | if get_data(self.db, '资产总计', year) == 0 and \
114 | get_data(self.db, '负债合计', year) == 0 and \
115 | get_data(self.db, '所有者权益合计', year) == 0:
116 | nodata_years_list.append(year)
117 | else:
118 | pass
119 | return nodata_years_list
120 |
121 | def __remove_zore_year(self):
122 | '''
123 | 前置步骤:
124 | cal_f_index() ---> table('without_nodata')
125 | 清除无数据年份
126 | row_dict类型为字典,删除无数据年份对应的键值对
127 | '''
128 | table_w = self.db.table('without_nodata')
129 | table_p = self.db.table('for_print')
130 | row_dict = self.db.all()
131 | for row in row_dict:
132 | for year in self.check_complete():
133 | del row[year]
134 | table_w.insert(row)
135 | table_p.insert(row)
136 |
137 | def __remove_zore_item(self):
138 | '''
139 | 仅对table_for_print使用
140 | :return:
141 | '''
142 | Q = Query()
143 | self.table_for_print.remove(Q.year3 == 0 and
144 | Q.year2 == 0 and
145 | Q.year1 == 0 and
146 | Q.month == 0)
147 |
148 | def calc_f_index(self, table_name):
149 | """
150 | '''纵向扩展 使用insert'''
151 | 1、根据同年数据计算财务指标
152 | 2、存货周转天数、应收账款周转天数 应使用前值与当前值的均值,暂未处理
153 | 3、指标增加需在
154 | (1)index_list中新增指标名称,
155 | (2)__formula模块中新增指标计算公式
156 | :param table: tinydb.table类实例
157 | :return: tinydb.table类实例
158 | """
159 | table = self.db.table(table_name)
160 | table_ = table.all()
161 | # Q = Query()
162 | index_list = [
163 | '资产负债率', '流动比率', '速动比率', 'EBIT', '利息保障倍数', # 偿债能力指标
164 | '营运资产', '营运负债', '营运资金需求', '营运资本', '存货周转天数', '应收账款周转天数', # 营运能力指标
165 | '毛利率', '净利润率', '总资产收益率(ROA)', '净资产收益率(ROE)', # 盈利能力指标
166 | '短债占比', '刚性负债', '刚兑占比', '短期刚兑', '期间费用', '费用收入比', '流动资产占比', # 报告需要数据
167 | ]
168 | years = [
169 | 'year3', 'year2', 'year1', 'month'
170 | ]
171 | exsit_data_list = []
172 | for year in years:
173 | if year in table_[2].keys():
174 | exsit_data_list.append(year)
175 |
176 | for index in index_list:
177 | index_dict = {}
178 | index_dict.setdefault('items', index)
179 | for i in exsit_data_list:
180 | index_dict.setdefault(i, _formula.formula(table, i, index))
181 | table.insert(index_dict)
182 |
183 | # return table
184 |
185 | def calc_m_index(self, table_name):
186 | """
187 | '''横向扩展,使用update'''
188 | 1、增加平均值、求和数、增长率、平均增长率
189 | 2、科目进行分类,更新type标签
190 | @param table:xlsx转换的tinydb里的table类
191 | @return: 格式化的数据
192 | """
193 | table = self.db.table(table_name)
194 | table.all()
195 | Q = Query()
196 |
197 | # 平均值、求和数、增长率、平均增长率
198 | for row_dict in table.all():
199 | if row_dict['items'] == '项目':
200 | pass
201 | else:
202 | # 累积值求和
203 | sum = 0
204 | exsit_data_list = []
205 | for year in ['year3', 'year2', 'year1', 'month']:
206 | if year in row_dict.keys():
207 | sum += row_dict[year]
208 | exsit_data_list.append(row_dict[year])
209 | # 平均值
210 | averg = sum / len(exsit_data_list)
211 | # 当期比前值的变化
212 | if len(exsit_data_list) >= 2:
213 | delta = exsit_data_list[-1] - exsit_data_list[-2]
214 | else:
215 | delta = exsit_data_list[-1]
216 | # 当期比前值的变化幅度
217 | if exsit_data_list[-2] == 0:
218 | ratio = '净新增'
219 | else:
220 | ratio = delta / exsit_data_list[-2]
221 |
222 | table.update(
223 | {
224 | 'averg': averg,
225 | 'sum': sum,
226 | 'ratio': ratio,
227 | 'delta': delta,
228 | },
229 | Q.items == row_dict['items']
230 | )
231 | # 分类标签
232 | type = [
233 | '流动资产', '非流动资产', '流动负债', '非流动负债', '权益', '利润表', '现金流量', '财务指标',
234 | ] # 数据类型列表
235 | li_a = [
236 | '货币资金', '交易性金融资产', '衍生金融资产 ', '应收票据', '应收账款', '应收款项融资 ', '预付账款',
237 | '其他应收款', '存货', '合同资产', '持有待售资产', '一年到期的非流动资产', '其他流动资产',
238 | ] # 流动资产科目
239 | fi_a = [
240 | '债权投资', '其他债权投资', '长期应收款', '长期股权投资', '其他权益工具投资', '其他非流动金融资产',
241 | '投资性房地产', '固定资产', '在建工程', '生产性生物资产', '油气资产', '使用权资产', '无形资产',
242 | '开发支出', '商誉', '长期待摊费用', '递延所得税资产', '其他非流动资产',
243 | ] # 非流动资产科目
244 | li_d = [
245 | '短期借款', '交易性金融负债', '衍生金融负债', '应付票据', '应付账款', '预收账款', '合同负债',
246 | '应付职工薪酬','应交税费', '其他应付款', '持有待售负债', '一年内到期的非流动负债', '其他流动负债',
247 | ] # 流动负债科目
248 | fi_d = [
249 | '长期借款', '应付债券', '租赁负债', '长期应付款', '预计负债', '递延收益', '递延所得税负债', '其他非流动负债',
250 | ] # 非流动负债科目
251 | equi = [
252 | '实收资本', '其他权益工具', '资本公积', '其他综合收益', '专项储备', '盈余公积', '未分配利润',
253 | ] # 所有者权益科目
254 | reve = [
255 | '营业收入', '营业成本', '税金及附加', '销售费用', '管理费用', '研发费用', '财务费用', '投资收益',
256 | '净敞口套期收益', '公允价值变动收益', '信用减值损失', '资产减值损失', '资产处置收益', '营业利润',
257 | '营业外收入', '营业外支出', '利润总额', '所得税费用', '净利润',
258 | ] # 利润表科目
259 | csfl = [
260 | '经营活动现金流入', '销售带来的现金流入', '经营活动现金流出', '经营活动净现金流',
261 | '投资活动现金流入', '投资活动现金流出', '投资活动现金净流',
262 | '筹资活动现金流入', '筹资活动现金流出', '筹资活动现金净流入', '现金净流入',
263 | ] # 现金流量表科目
264 | inde = [
265 | '资产负债率', '流动比率', '速动比率', 'EBIT', '利息保障倍数',
266 | '营运资产', '营运负债', '营运资金需求', '营运资本', '存货周转天数', '应收账款周转天数',
267 | '毛利率', '净利润率', '总资产收益率(ROA)', '净资产收益率(ROE)',
268 | ] # 财务指标列表
269 | type_list = [li_a, fi_a, li_d, fi_d, equi, reve, csfl, inde]
270 | for ty in type_list:
271 | for it in ty:
272 | for i in range(len(type_list)):
273 | if it in type_list[i]:
274 | table.update({'type': type[i]}, Q.items == str(it))
275 | return table
276 |
277 | def clear_all_data(self):
278 | self.db.purge()
279 |
280 |
--------------------------------------------------------------------------------
/far/_text.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | # -*- coding: utf-8 -*-
3 | # __author__:"watalo"
4 | # @Time: 2020/3/19 0:33
5 | # @Site :
6 | # @File : _text.py
7 | # @Software: PyCharm
8 | '''
9 | 使用self.normal.s2d1.format(**self.normal.s2d1_dict)给模版传入数据
10 | 财务分析的文字模版
11 | 1.数据完整: normal
12 | 2. 缺少第一年数据 no_year3
13 | 3. 缺少第二年数据 no_year2
14 | 4. 缺少第三年数据 no_year1
15 | 5. 当期为年末数据 all_years
16 | '''
17 |
18 | class normal:
19 |
20 | def __init__(self):
21 | self.table1 = None
22 | # 1、审计情况分析
23 | self.s1d1 = \
24 | "【XXX会计师事务所】对申请人前三年的财务数据出具了编号为【】、【】、【】的审计报告,均出具了无保留意见。" \
25 | "其中,【年】对【科目】进行了如下调整:【请仔细阅读审计报告后填写】。"
26 | # 2、资本结构
27 | self.s2d1 = \
28 | "申请人近三年及最近一期的" \
29 | "总资产分别为{总资产3:,.2f}万元、{总资产2:,.2f}万元、{总资产1:,.2f}万元和{总资产m:,.2f}万元;" \
30 | "总负债分别为{总负债3:,.2f}万元、{总负债2:,.2f}万元、{总负债1:,.2f}万元和{总负债m:,.2f}万元;" \
31 | "资产负债率分别为{资产负债率3:.2%}、{资产负债率2:.2%}、{资产负债率1:.2%}和{资产负债率m:.2%}。" \
32 | "整体来看,申请人资产负债率{分析s2d1}" # 13个变量
33 |
34 | self.s2d2 = \
35 | '从债务期限结构看,申请人债务{分析s2d2},' \
36 | '流动负债分别为{流动负债3:,.2f}万元、{流动负债2:,.2f}万元、{流动负债1:,.2f}万元和{流动负债m:,.2f}万元,' \
37 | '短期负债占比分别为{短债占比3:.2%}、{短债占比2:.2%}、{短债占比1:.2%}和{短债占比m:.2%}。' \
38 | '刚性负债(短期借款+一年内到期的长期负债+应付债券+长期借款)分别为{刚性负债3:,.2f}万元、{刚性负债2:,.2f}万元、{刚性负债1:,.2f}万元和{刚性负债m:,.2f}万元。' \
39 | '刚性负债占比分别为{刚性兑付占比3:.2%}、{刚性兑付占比2:.2%}、{刚性兑付占比1:.2%}和{刚性兑付占比m:.2%}。' \
40 | '短期内需要刚性兑付的债务为{短期刚兑m:,.2f}万元,主要为短期借款{短期借款m:,.2f}万元,一年内到期的非流动负债{一年内非流m:,.2f}万元。' \
41 | #'总体来看,公司刚性债务带来的偿债压力【较大\在合理范围内\较小,根据实际情况自行评价】。' # 21个变量
42 |
43 | # 3、盈利能力
44 | self.s2d3 = \
45 | "申请人{分析s2d3},前三年分别实现营业收入{营业收入3:,.2f}万元、{营业收入2:,.2f}万元和{营业收入1:,.2f}万元," \
46 | "营业成本{营业成本3:,.2f}万元、{营业成本2:,.2f}万元和{营业成本1:,.2f}万元,毛利率分别为{毛利率3:.2%}、{毛利率2:.2%}和{毛利率1:.2%}," \
47 | "期间费用分别为{期间费用3:,.2f}万元、{期间费用2:,.2f}万元和{期间费用1:,.2f}万元,费用收入比分别为{费用收入比3:.2%}、{费用收入比2:.2%}和{费用收入比1:.2%}," \
48 | "实现净利润{净利润3:,.2f}万元、{净利润2:,.2f}万元和{净利润1:,.2f}万元,净利润率分别为{净利润率3:.2%}、{净利润率2:.2%}和{净利润率1:.2%}。" \
49 | "最近一期,申请人实现营业收入{营业收入m:,.2f}万元,营业成本{营业成本m:,.2f}万元,毛利率{毛利率m:.2%}," \
50 | "期间费用合计{期间费用m:,.2f}万元,投资收益{投资收益m:,.2f}万元,净利润率{净利润率m:.2%}。" \
51 | #"总体来看,申请人盈利能力【相对较好/稳定/较弱,根据实际情况自行评价】" # 28个变量
52 |
53 | # 4、现金流量
54 | self.s2d4 = \
55 | "申请人前三年分别实现净现金流入{净现金流入3:,.2f}万元、{净现金流入2:,.2f}万元和{净现金流入1:,.2f}万元。其中:" \
56 | "经营活动现金净流入{经营活动现金净流入3:,.2f}万元、{经营活动现金净流入2:,.2f}万元和{经营活动现金净流入1:,.2f}万元;" \
57 | "投资活动现金净流入{投资活动现金净流入3:,.2f}万元、{投资活动现金净流入2:,.2f}万元和{投资活动现金净流入1:,.2f}万元;" \
58 | "筹资活动现金净流入{筹资活动现金净流入3:,.2f}万元、{筹资活动现金净流入2:,.2f}万元和{筹资活动现金净流入1:,.2f}万元。" \
59 | #"总体来看,申请人盈利能力【请根据实际情况自行评价】" # 16个变量
60 |
61 | # 5、资产质量
62 | self.s2d5 = \
63 | "申请人近三年流动资产分别为{流动资产3:,.2f}万元、{流动资产2:,.2f}万元、{流动资产1:,.2f}万元和{流动资产m:,.2f}万元," \
64 | "在总资产构成中流动资产占比分别{流动资产占比3:.2%}、{流动资产占比2:.2%}、{流动资产占比1:.2%}和{流动资产占比m:.2%}。"\
65 | "上年末,主要资产构成为{分析s2d5}。"
66 | # "【请根据实际情况自行评价】。" # 9个变量
67 |
68 | # 6、流动性分析
69 | self.s2d6 = \
70 | "申请人近三年及最近一期流动比率分别为{流动比率3:.2f}、{流动比率2:.2f}、{流动比率1:.2f}和{流动比率m:.2f},三年平均值为{流动比率av:.2f}," \
71 | "较年初变化{流动比率delta:.2f};" \
72 | "申请人近三年及最近一期速动比率分别为{速动比率3:.2f}、{速动比率2:.2f}、{速动比率1:.2f}和{速动比率m:.2f},三年平均值为{速动比率av:.2f}," \
73 | "较年初变化{速动比率delta:.2f}。"
74 | # "【请根据实际情况自行评价】。" # 12个变量
75 |
76 | # 7、当期科目变化情况(变化超过30%)
77 | # 直接在core中调用
78 |
79 | class no_year3:
80 | def __init__(self):
81 | self.table1 =float()
82 | # 1、审计情况分析
83 | self.s1d1 = \
84 | "【XXX会计师事务所】对申请人前三年的财务数据出具了编号为【】、【】的审计报告,均出具了无保留意见。" \
85 | "其中,【年】对【科目 】进行了如下调整:【请仔细阅读审计报告后填写】。"
86 | # 2、资本结构
87 | self.s2d1 = \
88 | "申请人近两年及最近一期的" \
89 | "总资产分别为{总资产2:,.2f}万元、{总资产1:,.2f}万元和{总资产m:,.2f}万元;" \
90 | "总负债分别为{总负债2:,.2f}万元、{总负债1:,.2f}万元和{总负债m:,.2f}万元;" \
91 | "资产负债率分别为{资产负债率2:.2%}、{资产负债率1:.2%}和{资产负债率m:.2%}。" \
92 | "整体来看,申请人资产负债率{分析s2d1}" # 10个变量
93 |
94 | self.s2d2 = \
95 | "从债务期限结构看,申请人债务{分析s2d2}," \
96 | "流动负债分别为{流动负债2:,.2f}万元、{流动负债1:,.2f}万元和{流动负债m:,.2f}万元," \
97 | "短期负债占比分别为{短债占比2:.2%}、{短债占比1:.2%}和{短债占比m:.2%}。" \
98 | "刚性负债(短期借款+一年内到期的长期负债+应付债券+长期借款)分别为{刚性负债2:,.2f}、{刚性负债1:,.2f}和{刚性负债m:,.2f}," \
99 | "刚性负债占比分别为{刚性兑付占比2:.2%}、{刚性兑付占比1:.2%}和{刚性兑付占比m:.2%}。" \
100 | "短期内需要刚性兑付的债务为{短期刚兑m:.2f}万元,主要为短期借款{短期借款m:,.2f}万元,一年内到期的非流动负债{一年内非流m:,.2f}万元。"
101 | #"总体来看,公司刚性债务带来的偿债压力【较大\在合理范围内\较小,根据实际情况自行评价】。" # 16个变量
102 |
103 | # 3、盈利能力
104 | self.s2d3 = \
105 | "申请人前两年分别实现营业收入{营业收入2:,.2f}万元和{营业收入1:,.2f}万元,{分析s2d3}。" \
106 | "营业成本{营业成本2}万元和{营业成本1:,.2f}万元,毛利率分别为{毛利率2:.2%}和{毛利率1:.2%}," \
107 | "期间费用分别为{期间费用2:,.2f}万元和{期间费用1:,.2f}万元,费用收入比分别为{费用收入比2:.2%}和{费用收入比1:.2%}," \
108 | "实现净利润{净利润2:,.2f}万元和{净利润1:,.2f}万元,净利润率分别为{净利润率2:.2%}和{净利润率1:.2%}。" \
109 | "最近一期,申请人实现营业收入{营业收入m:,.2f}万元,营业成本{营业成本m:,.2f}万元,毛利率{毛利率m:.2%}," \
110 | "期间费用合计{期间费用m:,.2f}万元,投资收益{投资收益m:,.2f}万元,净利润率{净利润率m:.2%}。"
111 | #"总体来看,申请人盈利能力【相对较好/稳定/较弱,根据实际情况自行评价】" # 21个变量
112 |
113 | # 4、现金流量
114 | self.s2d4 = \
115 | "申请人前两年分别实现净现金流入{净现金流入2:,.2f}万元和{净现金流入1:,.2f}万元。其中:" \
116 | "经营活动现金净流入{经营活动现金净流入2:,.2f}万元和{经营活动现金净流入1:,.2f}万元;" \
117 | "投资活动现金净流入{投资活动现金净流入2:,.2f}万元和{投资活动现金净流入1:,.2f}万元;" \
118 | "筹资活动现金净流入{筹资活动现金净流入2:,.2f}万元和{筹资活动现金净流入1:,.2f}万元。" \
119 | #"总体来看,申请人盈利能力【请根据实际情况自行评价】" # 16个变量
120 |
121 | # 5、资产质量
122 | self.s2d5 = \
123 | "申请人近两年流动资产分别为{流动资产2:,.2f}万元、{流动资产1:,.2f}万元和{流动资产m:,.2f}万元," \
124 | "在总资产构成中流动资产占比分别{流动资产占比2:.2%}、{流动资产占比1:.2%}和{流动资产占比m:.2%},【>>>简要分析<<<】。" \
125 | "上年末,主要资产构成为{分析s2d5}。"
126 | # ”【请根据实际情况自行评价】。" # 9个变量
127 |
128 | # 6、流动性分析
129 | self.s2d6 = \
130 | "申请人近两年及最近一期流动比率分别为{流动比率2:.2f}、{流动比率1:.2f}和{流动比率m:.2f},平均值为{流动比率av:.2f}," \
131 | "较年初变化{流动比率delta:.2f};" \
132 | "申请人近两年及最近一期速动比率分别为{速动比率2:.2f}、{速动比率1:.2f}和{速动比率m:.2f},平均值为{速动比率av:.2f}," \
133 | "较年初变化{速动比率delta:.2f}。"
134 | #"【请根据实际情况自行评价】。" # 12个变量
135 |
136 | # 7、当期科目变化情况(变化超过30%)
137 | # 直接在core中调用
138 |
139 | class no_year2:
140 | def __init__(self):
141 | self.table1 =float()
142 | # 1、审计情况分析
143 | self.s1d1 = \
144 | "【XXX会计师事务所】出具了编号为【】的无保留意见的审计报告。" \
145 | "其中,【年】对【科目 】进行了如下调整:【请仔细阅读审计报告后填写】。"
146 | # 2、资本结构
147 | self.s2d1 = \
148 | "申请人上一年及最近一期的" \
149 | "总资产分别为{总资产1:,.2f}万元和{总资产m:,.2f}万元;" \
150 | "总负债分别为{总负债1:,.2f}万元和{总负债m:,.2f}万元;" \
151 | "资产负债率分别为{资产负债率1:.2%}和{资产负债率m:.2%}。" \
152 | "整体来看,申请人资产负债率{分析s2d1}" # 7个变量
153 |
154 | self.s2d2 = \
155 | "从债务期限结构看,申请人债务{分析s2d2}," \
156 | "流动负债分别为{流动负债1:,.2f}万元和{流动负债m:,.2f}万元," \
157 | "短期负债占比分别为{短债占比1:.2%}和{短债占比m:.2%}。" \
158 | "刚性负债(短期借款+一年内到期的长期负债+应付债券+长期借款)分别为{刚性负债1:,.2f}和{刚性负债m:,.2f}," \
159 | "刚性负债占比分别为{刚性兑付占比1:.2%}和{刚性兑付占比m:.2%}。" \
160 | "短期内需要刚性兑付的债务为{短期刚兑m:,.2f}万元,主要为短期借款{短期借款m:,.2f}万元,一年内到期的非流动负债{一年内非流m:,.2f}万元。" \
161 | # "总体来看,公司刚性债务带来的偿债压力【较大\在合理范围内\较小,根据实际情况自行评价】。" # 12个变量
162 |
163 | # 3、盈利能力
164 | self.s2d3 = \
165 | "申请人上一年实现营业收入{营业收入1:,.2f}万元,{营业成本1:,.2f}万元,毛利率{毛利率1:,.2%}," \
166 | "期间费用分别为{期间费用1:,.2f}万元,费用收入比分别为{费用收入比1:,.2f}万元," \
167 | "实现净利润{净利润1:,.2f}万元,净利润率{净利润率1:.2%}。" \
168 | "最近一期,申请人实现营业收入{营业收入m:,.2f}万元,营业成本{营业成本m:,.2f}万元,毛利率{毛利率m:.2%}," \
169 | "期间费用合计{期间费用m:,.2f}万元,投资收益{投资收益m:,.2f}万元,净利润率{净利润率m:.2%}。" \
170 | #"总体来看,申请人盈利能力【相对较好/稳定/较弱,根据实际情况自行评价】" # 13个变量
171 |
172 | # 4、现金流量
173 | self.s2d4 = \
174 | "申请人上一年实现净现金流入{净现金流入1:,.2f}万元,其中:" \
175 | "经营活动现金净流入{经营活动现金净流入1:,.2f}万元," \
176 | "投资活动现金净流入{投资活动现金净流入1:,.2f}万元," \
177 | "筹资活动现金净流入{筹资活动现金净流入1:,.2f}万元,。" \
178 | "最近一期实现净现金流入{净现金流入m:,.2f}万元,其中:" \
179 | "经营活动现金净流入{经营活动现金净流入m:,.2f}万元," \
180 | "投资活动现金净流入{投资活动现金净流入m:,.2f}万元," \
181 | "筹资活动现金净流入{筹资活动现金净流入m:,.2f}万元,。" \
182 | #"总体来看,申请人盈利能力【请根据实际情况自行评价】" # 8个变量
183 |
184 | # 5、资产质量
185 | self.s2d5 = \
186 | "申请人上一年流动资产分别为{流动资产1:,.2f}万元和{流动资产m:,.2f}万元,在总资产中流动资产占比分别{流动资产占比1:.2%}和{流动资产占比m:.2%}," \
187 | "【>>>简要分析<<<】。上年末,主要资产构成为{分析s2d5}。"
188 | # "【请根据实际情况自行评价】。" # 5个变量
189 |
190 | # 6、流动性分析
191 | self.s2d6 = \
192 | "申请人上一年及最近一期流动比率分别为{流动比率1:.2f}和{流动比率m:.2f},较年初变化{流动比率delta:.2f};" \
193 | "申请人上一年及最近一期速动比率分别为{速动比率1:.2f}和{速动比率m:.2f},较年初变化{速动比率delta:.2f}。" \
194 | #"【请根据实际情况自行评价】。" # 6个变量
195 |
196 | # 7、当期科目变化情况(变化超过30%)
197 | # 直接在core中调用
198 |
199 | class no_year1:
200 | def __init__(self):
201 | self.table1 =float()
202 | # 1、审计情况分析
203 | self.s1d1 = \
204 | "申请人成立不足一年,无审计报告。仅针对现有数据进行分析。"
205 | # 2、资本结构
206 | self.s2d1 = \
207 | "申请人目前总资产为{总资产m:,.2f}万元,总负债为{总负债m:,.2f}万元,资产负债率分别为{资产负债率m:.2%}。" \
208 | "整体来看,申请人资产负债率{分析s2d1}" # 13个变量
209 |
210 | self.s2d2 = \
211 | "从债务期限结构看,申请人债务{分析s2d2}," \
212 | "流动负债为{流动负债m:,.2f}万元," \
213 | "短期负债占比为{短债占比m:,.2f}。" \
214 | "刚性负债(短期借款+一年内到期的长期负债+应付债券+长期借款)为{刚性负债m:,.2f}," \
215 | "刚性负债占比分别为{刚性兑付占比m:,.2f}。" \
216 | "短期内需要刚性兑付的债务为{短期刚兑m:,.2f}万元,主要为短期借款{短期借款m:,.2f}万元,一年内到期的非流动负债{一年内非流m:,.2f}万元。" \
217 | #"总体来看,公司刚性债务带来的偿债压力【较大\在合理范围内\较小,根据实际情况自行评价】。" # 21个变量
218 |
219 | # 3、盈利能力
220 | self.s2d3 = \
221 | "最近一期,申请人实现营业收入{营业收入m:,.2f}万元,营业成本{营业成本m:,.2f}万元,毛利率{毛利率m:.2%}," \
222 | "期间费用合计{期间费用m:,.2f}万元,投资收益{投资收益m:,.2f}万元,净利润率{净利润率m:.2%}。" \
223 | #"总体来看,申请人盈利能力【相对较好/稳定/较弱,根据实际情况自行评价】" # 28个变量
224 |
225 | # 4、现金流量
226 | self.s2d4 = \
227 | "最近一期实现净现金流入{净现金流入m:,.2f}万元,其中:" \
228 | "经营活动现金净流入{经营活动现金净流入m:,.2f}万元," \
229 | "投资活动现金净流入{投资活动现金净流入m:,.2f}万元," \
230 | "筹资活动现金净流入{筹资活动现金净流入m:,.2f}万元。" \
231 | #"总体来看,申请人盈利能力【请根据实际情况自行评价】" # 4个变量
232 |
233 | # 5、资产质量
234 | self.s2d5 = \
235 | "申请人流动资产为{流动资产m:,.2f}万元,在总资产中流动资产占比{流动资产占比m:.2%},【>>>简要分析<<<】。" \
236 | "主要资产构成为{分析s2d5}。"
237 | #【请根据实际情况自行评价】。" # 9个变量
238 |
239 | # 6、流动性分析
240 | self.s2d6 = \
241 | "申请人最近一期流动比率为{流动比率m:.2f},较年初变化{流动比率delta:.2f};" \
242 | "申请人最近一期速动比率为{速动比率m:.2f},较年初变化{速动比率delta:.2f}。" \
243 | #"【请根据实际情况自行评价】。" # 12个变量
244 |
245 | # 7、当期科目变化情况(变化超过30%)
246 | # 直接在core中调用
247 |
248 | class all_years:
249 | def __init__(self):
250 | self.table1 =float()
251 | # 1、审计情况分析
252 | self.s1d1 = \
253 | "【XXX会计师事务所】对申请人前三年的财务数据出具了编号为【】、【】、【】的审计报告,均出具了无保留意见。" \
254 | "其中,【年】对【科目 】进行了如下调整:【请仔细阅读审计报告后填写】。"
255 | # 2、资本结构
256 | self.s2d1 = \
257 | "申请人近三年的" \
258 | "总资产分别为{总资产3:,.2f}万元、{总资产2:,.2f}万元和{总资产1:,.2f}万元;" \
259 | "总负债分别为{总负债3:,.2f}万元、{总负债2:,.2f}万元和{总负债1:,.2f}万元;" \
260 | "资产负债率分别为{资产负债率3:.2%}、{资产负债率2:.2%}和{资产负债率1:.2%}。" \
261 | "整体来看,申请人资产负债率{分析s2d1}" # 10个变量
262 |
263 | self.s2d2 = \
264 | "从债务期限结构看,申请人债务{分析s2d2}" \
265 | "流动负债分别为{流动负债3:,.2f}万元、{流动负债2:,.2f}万元和{流动负债1:,.2f}万元," \
266 | "短期负债占比分别为{短债占比3:.2%}、{短债占比2:.2%}和{短债占比1:.2%}。" \
267 | "刚性负债(短期借款+一年内到期的长期负债+应付债券+长期借款)分别为{刚性负债3:,.2f}万元、{刚性负债2:,.2f}万元和{刚性负债1:,.2f}万元," \
268 | "刚性负债占比分别为{刚性兑付占比3:.2%}、{刚性兑付占比2:.2%}和{刚性兑付占比1:.2%}。" \
269 | "短期内需要刚性兑付的债务为{短期刚兑1:,.2f}万元,主要为短期借款{短期借款1:,.2f}万元,一年内到期的非流动负债{一年内非流1:,.2f}万元。" \
270 | #"总体来看,公司刚性债务带来的偿债压力【较大\在合理范围内\较小,根据实际情况自行评价】。" # 21个变量
271 |
272 | # 3、盈利能力
273 | self.s2d3 = \
274 | "申请人前三年分别实现营业收入{营业收入3:,.2f}万元、{营业收入2:,.2f}万元和{营业收入1:,.2f}万元,{分析s2d3}。" \
275 | "营业成本{营业成本3:,.2f}万元、{营业成本2:,.2f}万元和{营业成本1:,.2f}万元,毛利率分别为{毛利率3:.2%}、{毛利率2:.2%}和{毛利率1:.2%}," \
276 | "期间费用分别为{期间费用3:,.2f}万元、{期间费用2:,.2f}万元和{期间费用1:,.2f}万元,费用收入比分别为{费用收入比3:.2%}、{费用收入比2:.2%}和{费用收入比1:.2%}," \
277 | "实现净利润{净利润3:,.2f}万元、{净利润2:,.2f}万元和{净利润1:,.2f}万元,净利润率分别为{净利润率3:.2%}、{净利润率2:.2%}和{净利润率1:.2%}," \
278 | #"总体来看,申请人盈利能力【相对较好/稳定/较弱,根据实际情况自行评价】" # 28个变量
279 |
280 | # 4、现金流量
281 | self.s2d4 = \
282 | "申请人前三年分别实现净现金流入{净现金流入3:,.2f}万元、{净现金流入2:,.2f}万元和{净现金流入1:,.2f}万元。其中:" \
283 | "经营活动现金净流入{经营活动现金净流入3:,.2f}万元、{经营活动现金净流入2:,.2f}万元和{经营活动现金净流入1:,.2f}万元;" \
284 | "投资活动现金净流入{投资活动现金净流入3:,.2f}万元、{投资活动现金净流入2:,.2f}万元和{投资活动现金净流入1:,.2f}万元;" \
285 | "筹资活动现金净流入{筹资活动现金净流入3:,.2f}万元、{筹资活动现金净流入2:,.2f}万元和{筹资活动现金净流入1:,.2f}万元。" \
286 | #"总体来看,申请人盈利能力【请根据实际情况自行评价】" # 16个变量
287 |
288 | # 5、资产质量
289 | self.s2d5 = \
290 | "申请人近三年流动资产分别为{流动资产3:,.2f}万元、{流动资产2:,.2f}万元和{流动资产1:,.2f}万元," \
291 | "在总资产构成中流动资产占比分别{流动资产占比3:.2%}、{流动资产占比2:.2%}和{流动资产占比1:.2%},【>>>简要分析<<<】。" \
292 | "上年末,主要资产构成为{分析s2d5}。"
293 | #"【请根据实际情况自行评价】。" # 9个变量
294 |
295 | # 6、流动性分析
296 | self.s2d6 = \
297 | "申请人近三年流动比率分别为{流动比率3:.2f}、{流动比率2:.2f}和{流动比率1:.2f},三年平均值为{流动比率av:.2f}," \
298 | "较年初变化{流动比率delta:.2f};" \
299 | "申请人近三年速动比率分别为{速动比率3:.2%}、{速动比率2:.2%}和{速动比率1:.2%},三年平均值为{速动比率av:.2%}," \
300 | "较年初变化{速动比率delta:.2f}。" \
301 | #"【请根据实际情况自行评价】。" # 12个变量
302 |
303 | # 7、当期科目变化情况(变化超过30%)
304 | # 直接在core中调用
305 |
306 | class two_years:
307 | def __init__(self):
308 | self.table1 =float()
309 | # 1、审计情况分析
310 | self.s1d1 = \
311 | "【XXX会计师事务所】对申请人前两年的财务数据出具了编号为【】、【】的审计报告,均出具了无保留意见。" \
312 | "其中,【年】对【科目 】进行了如下调整:【请仔细阅读审计报告后填写】。"
313 | # 2、资本结构
314 | self.s2d1 = \
315 | "申请人近两年的" \
316 | "总资产分别为{总资产2:,.2f}万元和{总资产1:,.2f}万元;" \
317 | "总负债分别为{总负债2:,.2f}万元和{总负债1:,.2f}万元;" \
318 | "资产负债率分别为{资产负债率2:.2%}和{资产负债率1:.2%}。" \
319 | "整体来看,申请人资产负债率{分析s2d1}" # 10个变量
320 |
321 | self.s2d2 = \
322 | "从债务期限结构看,申请人债务{分析s2d2}" \
323 | "流动负债分别为{流动负债2:,.2f}万元和{流动负债1:,.2f}万元," \
324 | "短期负债占比分别为{短债占比2:.2%}和{短债占比1:.2%}。" \
325 | "刚性负债(短期借款+一年内到期的长期负债+应付债券+长期借款)分别为{刚性负债2:,.2f}万元和{刚性负债1:,.2f}万元," \
326 | "刚性负债占比分别为{刚性兑付占比2:.2%}和{刚性兑付占比1:.2%}。" \
327 | "短期内需要刚性兑付的债务为{短期刚兑1:,.2f}万元,主要为短期借款{短期借款1:,.2f}万元,一年内到期的非流动负债{一年内非流1:,.2f}万元。"
328 | #"总体来看,公司刚性债务带来的偿债压力【较大\在合理范围内\较小,根据实际情况自行评价】。" # 21个变量
329 |
330 | # 3、盈利能力
331 | self.s2d3 = \
332 | "申请人前两年分别实现营业收入{营业收入2:,.2f}万元和{营业收入1:,.2f}万元,{分析s2d3}。" \
333 | "营业成本{营业成本2:,.2f}万元和{营业成本1:,.2f}万元,毛利率分别为{毛利率2:.2%}和{毛利率1:.2%}," \
334 | "期间费用分别为{期间费用2:,.2f}万元和{期间费用1:,.2f}万元,费用收入比分别为{费用收入比2:.2%}和{费用收入比1:.2%}," \
335 | "实现净利润{净利润2:,.2f}万元和{净利润1:,.2f}万元,净利润率分别为{净利润率2:.2%}和{净利润率1:.2%},"
336 | #"总体来看,申请人盈利能力【相对较好/稳定/较弱,根据实际情况自行评价】" # 28个变量
337 |
338 | # 4、现金流量
339 | self.s2d4 = \
340 | "申请人前三年分别实现净现金流入{净现金流入2:,.2f}万元和{净现金流入1:,.2f}万元。其中:" \
341 | "经营活动现金净流入{经营活动现金净流入2:,.2f}万元和{经营活动现金净流入1:,.2f}万元;" \
342 | "投资活动现金净流入{投资活动现金净流入2:,.2f}万元和{投资活动现金净流入1:,.2f}万元;" \
343 | "筹资活动现金净流入{筹资活动现金净流入2:,.2f}万元和{筹资活动现金净流入1:,.2f}万元。"
344 | #"总体来看,申请人盈利能力【请根据实际情况自行评价】" # 16个变量
345 |
346 | # 5、资产质量
347 | self.s2d5 = \
348 | "申请人近三年流动资产分别为{流动资产2:,.2f}万元和{流动资产1:,.2f}万元," \
349 | "在总资产构成中流动资产占比分别{流动资产占比2:.2%}和{流动资产占比1:.2%},【>>>简要分析<<<】。" \
350 | "上年末,主要资产构成为{分析s2d5}。"
351 | #”【请根据实际情况自行评价】。" # 9个变量
352 |
353 | # 6、流动性分析
354 | self.s2d6 = \
355 | "申请人近三年流动比率分别为{流动比率2:.2f}和{流动比率1:.2f},三年平均值为{流动比率av:.2f}," \
356 | "较年初变化{流动比率delta:.2f};" \
357 | "申请人近三年速动比率分别为{速动比率2:.2%}和{速动比率1:.2%},三年平均值为{速动比率av:.2%}," \
358 | "较年初变化{速动比率delta:.2f}。"
359 | #"【请根据实际情况自行评价】。" # 12个变量
360 |
361 | # 7、当期科目变化情况(变化超过30%)
362 | # 直接在core中调用
363 |
364 | class header:
365 | def __init__(self):
366 | self.h1 = "一、财务报表"
367 | self.h2 = "二、财务分析"
368 | self.h2s1 = "(一)审计情况分析"
369 | self.h2s2 = "(二)资本结构分析"
370 | self.h2s3 = "(三)盈利能力分析"
371 | self.h2s4 = "(四)现金流量分析"
372 | self.h2s5 = "(五)资产质量分析"
373 | self.h2s6 = "(六)流动性分析"
374 | self.h2s7 = "(七)科目变化情况"
375 | self.h3 = "三、科目明细分析"
--------------------------------------------------------------------------------
/far/main.py:
--------------------------------------------------------------------------------
1 | '''
2 | 直接使用get_docx()生成docx文件
3 | '''
4 |
5 | import os
6 | from tinydb import TinyDB, Query
7 | from docx.shared import Inches
8 | from docx import Document
9 | from docx.oxml.ns import qn
10 | from docx.shared import Pt, Length
11 | from docx.enum.text import WD_PARAGRAPH_ALIGNMENT
12 | from far import *
13 | from far._config import IMG_PATH
14 |
15 |
16 |
17 | #-----------------------------------------------------------------------
18 | def get_docx(name, output_path):
19 | conf = Conf(name)
20 | doc = Document()
21 |
22 | doc.styles['Normal'].font.name = 'Times New Roman'
23 | doc.styles['Normal']._element.rPr.rFonts.set(qn('w:eastAsia'), u'宋体')
24 |
25 | # 文档标题
26 | title = doc.add_heading('',level=0).add_run('{}财务分析'.format(conf.name))
27 | title.font.name = 'Times New Roman'
28 | title._element.rPr.rFonts.set(qn('w:eastAsia'), u'黑体')
29 | # 1.数据
30 | bold(doc, conf.header.h1,2)
31 | financial_sheet(conf, doc)
32 | # 2.分析
33 | para_analysis(doc,conf)
34 | # 3.讨米文案
35 | doc.add_picture(os.path.join(IMG_PATH, 'taomi.png'), width=Inches(2.25))
36 | p = doc.add_paragraph()
37 | run = p.add_run('如果本项目有点帮助, U can buy me a coffee.')
38 | run.bold = True
39 | # 4.保存
40 | doc.save(output_path)
41 |
42 | # def get_docx_with_ChatGLM(name, output_path):
43 | # conf = Conf(name)
44 | # doc = Document()
45 |
46 | # doc.styles['Normal'].font.name = 'Times New Roman'
47 | # doc.styles['Normal']._element.rPr.rFonts.set(qn('w:eastAsia'), u'宋体')
48 |
49 | # # 文档标题
50 | # title = doc.add_heading('',level=0).add_run(f'{conf.name}财务分析报告')
51 | # title.font.name = 'Times New Roman'
52 | # title._element.rPr.rFonts.set(qn('w:eastAsia'), u'黑体')
53 | # # 1.数据
54 | # bold(doc, conf.header.h1,2)
55 | # financial_sheet(conf, doc)
56 | # # 2.分析
57 | # para_analysis_with_GLM(doc,conf)
58 | # # 3.讨米文案
59 | # doc.add_picture(os.path.join(IMG_PATH, 'taomi.png'), width=Inches(2.25))
60 | # p = doc.add_paragraph()
61 | # run = p.add_run('如果本项目有点帮助, U can buy me a coffee.')
62 | # run.bold = True
63 | # # 4.保存
64 | # doc.save(output_path)
65 |
66 |
67 | #配置类:调用其他类
68 | class Conf(object):
69 |
70 | def __init__(self, name):
71 | self.name = name
72 | self.db_path = _config.DB_PATH
73 | self.db_file_path = os.path.join(self.db_path, os.listdir(self.db_path)[0])
74 | self.db = TinyDB(self.db_file_path)
75 | self.table = self.db.table('without_nodata')
76 | self.table_for_print = self.db.table('for_print')
77 | # para类的实例初始化
78 | self.data_type = _para.dict_().data_type
79 | self.para = _para.dict_()
80 | self.init_para()
81 | self.header = _text.header()
82 |
83 | def normal(self):
84 | return _text.normal()
85 |
86 | def no_years3(self):
87 | return _text.no_year3()
88 |
89 | def no_years2(self):
90 | return _text.no_year2()
91 |
92 | def no_years1(self):
93 | return _text.no_year1()
94 |
95 | def all_years(self):
96 | return _text.all_years()
97 |
98 | def two_years(self):
99 | return _text.two_years()
100 |
101 | def init_para(self):
102 | self.para.set()
103 | self.para.analysis_s2d1()
104 | self.para.analysis_s2d2()
105 | self.para.analysis_s2d3()
106 | self.para.analysis_s2d5()
107 |
108 | # -----------------------------需要用到的函数-----------------------------
109 | def bold(doc, text, level):
110 | run = doc.add_heading('', level=level).add_run(text)
111 | run.font.name = 'Times Nwe Roman'
112 | run._element.rPr.rFonts.set(qn('w:eastAsia'), u'宋体')
113 |
114 | # -----------------------------------------------------------------------
115 | def data(conf_obj,item, key):
116 | Q = Query()
117 | return conf_obj.table.get(Q.items == item)[key]
118 |
119 | # -----------------------------------------------------------------------
120 | def para_analysis(doc,conf):
121 | para = getattr(conf,conf.data_type)
122 | print(para)
123 | bold(doc, conf.header.h2, 2)
124 | bold(doc, conf.header.h2s1, 3)
125 | p1 = doc.add_paragraph(para().s1d1)
126 | bold(doc, conf.header.h2s2, 3)
127 | p2_1 = doc.add_paragraph(para().s2d1.format(**conf.para.s2d1))
128 | p2_2 = doc.add_paragraph(para().s2d2.format(**conf.para.s2d2))
129 | bold(doc, conf.header.h2s3, 3)
130 | p3 = doc.add_paragraph(para().s2d3.format(**conf.para.s2d3))
131 | bold(doc, conf.header.h2s4, 3)
132 | p4 = doc.add_paragraph(para().s2d4.format(**conf.para.s2d4))
133 | bold(doc, conf.header.h2s5, 3)
134 | p5 = doc.add_paragraph(para().s2d5.format(**conf.para.s2d5))
135 | bold(doc, conf.header.h2s6, 3)
136 | p6 = doc.add_paragraph(para().s2d6.format(**conf.para.s2d6))
137 | bold(doc, conf.header.h2s7,3)
138 | big_change_sheet(conf, doc)
139 | bold(doc, conf.header.h3,3)
140 | if conf.data_type == 'no_year1':
141 | items_detail(conf, doc, 'month')
142 | else:
143 | items_detail(conf, doc, 'year1')
144 |
145 | for para_ in [p1, p2_1, p2_2, p3, p4, p5, p6]:
146 | para_.paragraph_format.alignment = WD_PARAGRAPH_ALIGNMENT.JUSTIFY
147 | para_.paragraph_format.first_line_indent = Pt(24)
148 |
149 | # -----------------------------------------------------------------------
150 | # def para_analysis_with_GLM(doc,conf):
151 | # para = getattr(conf,conf.data_type)
152 | # print(para)
153 | # bold(doc, conf.header.h2, 2)
154 | # bold(doc, conf.header.h2s1, 3)
155 | # p1 = doc.add_paragraph(para().s1d1)
156 |
157 | # bold(doc, conf.header.h2s2, 3)
158 | # p2_1 = doc.add_paragraph(para().s2d1.format(**conf.para.s2d1))
159 | # p2_2 = doc.add_paragraph(para().s2d2.format(**conf.para.s2d2))
160 | # # 引入ChatGLM的分析结果
161 | # res_p2 =_gpt.Glm().response(",".join([para().s2d1.format(**conf.para.s2d1), para().s2d2.format(**conf.para.s2d2), _gpt.Prompt.p2]))
162 | # p2_res = doc.add_paragraph(res_p2)
163 |
164 | # bold(doc, conf.header.h2s3, 3)
165 | # p3 = doc.add_paragraph(para().s2d3.format(**conf.para.s2d3))
166 | # # 引入ChatGLM的分析结果
167 | # res_p3 =_gpt.Glm().response(",".join([para().s2d3.format(**conf.para.s2d3),_gpt.Prompt.p3]))
168 | # p3_res = doc.add_paragraph(res_p3)
169 |
170 | # bold(doc, conf.header.h2s4, 3)
171 | # p4 = doc.add_paragraph(para().s2d4.format(**conf.para.s2d4))
172 | # # 引入ChatGLM的分析结果
173 | # res_p4 =_gpt.Glm().response(",".join([para().s2d4.format(**conf.para.s2d4),_gpt.Prompt.p4]))
174 | # p4_res = doc.add_paragraph(res_p4)
175 |
176 | # bold(doc, conf.header.h2s5, 3)
177 | # p5 = doc.add_paragraph(para().s2d5.format(**conf.para.s2d5))
178 | # # 引入ChatGLM的分析结果
179 | # res_p5 =_gpt.Glm().response(",".join([para().s2d5.format(**conf.para.s2d5),_gpt.Prompt.p5]))
180 | # p5_res = doc.add_paragraph(res_p5)
181 |
182 | # bold(doc, conf.header.h2s6, 3)
183 | # p6 = doc.add_paragraph(para().s2d6.format(**conf.para.s2d6))
184 | # # 引入ChatGLM的分析结果
185 | # res_p6 =_gpt.Glm().response(",".join([para().s2d6.format(**conf.para.s2d6),_gpt.Prompt.p6]))
186 | # p6_res = doc.add_paragraph(res_p6)
187 |
188 | # bold(doc, conf.header.h2s7,3)
189 | # big_change_sheet(conf, doc)
190 |
191 | # bold(doc, conf.header.h3,3)
192 | # if conf.data_type == 'no_year1':
193 | # items_detail(conf, doc, 'month')
194 | # else:
195 | # items_detail(conf, doc, 'year1')
196 |
197 | # for para_ in [p1,p2_1, p2_2, p2_res, p3, p3_res ,p4, p4_res ,p5, p5_res, p6, p6_res]:
198 | # para_.paragraph_format.alignment = WD_PARAGRAPH_ALIGNMENT.JUSTIFY
199 | # para_.paragraph_format.first_line_indent = Pt(24)
200 |
201 | # -----------------------------------------------------------------------
202 | def financial_sheet(conf_obj,doc):
203 | Q = Query()
204 | item_list = [] # 表头列表
205 | for item in conf_obj.table_for_print.all():
206 | item_list.append(item['items'])
207 | data_list = [] # 数据列表
208 | for data in conf_obj.table_for_print.search(Q.items == '项目'):
209 | for i, it in enumerate(data):
210 | if type(it) == str:
211 | data_list.append(it)
212 | data_list = data_list[:5]
213 |
214 | # ------------------------------------------------------------------------
215 | xratio = [
216 | '资产负债率', '费用收入比', '流动资产占比',
217 | '毛利率', '净利润率', '刚兑占比', '短债占比',
218 | '总资产收益率(ROA)', '净资产收益率(ROE)',
219 | ] # 百分数形式的财务指标 eg:‘11.11%’
220 | table = doc.add_table(rows=len(conf_obj.table_for_print.all()),
221 | cols=5,
222 | style="Light Grid")
223 | # ------------------------------------------------------------------------
224 | for irows, item in enumerate(item_list):
225 | for icols, data in enumerate(data_list):
226 | num = conf_obj.table_for_print.get(Q.items == item)[data]
227 | if isinstance(num, float):
228 | if item in xratio:
229 | table.cell(irows, icols).text = '{:.2%}'.format(num)
230 | else:
231 | table.cell(irows, icols).text = '{:,.2f}'.format(num)
232 | else:
233 | table.cell(irows, icols).text = str(num)
234 | # ------------------------------------------------------------------------
235 |
236 | def big_change_items(conf_obj):
237 | '''
238 | 不直接使用,只在big_change_sheet()中被调用。
239 | conf.data_type == 'no_year1'时不能是使用本函数
240 | 找出最近一期比上一期变化超过30%的科目
241 | :return:
242 | '''
243 | Q = Query()
244 | Item = conf_obj.table.search((Q.type == '流动资产') | (Q.type == '非流动资产') | (Q.type == '流动负债') | (Q.type == '非流动负债'))
245 | list1 = []
246 | list2 = []
247 | big_change_items = []
248 | if conf_obj.data_type == 'all_years':
249 | for dict in Item:
250 | if dict['year1'] == 0 and dict['month'] != 0:
251 | list1.append(dict)
252 | elif dict['year1'] == 0 and dict['month'] == 0:
253 | pass
254 | else:
255 | if (dict['month'] - dict['year1']) / dict['year1'] < 0.3 \
256 | and (dict['month'] - dict['year1']) / dict['year1'] > -0.3:
257 | pass
258 | else:
259 | list2.append(dict)
260 | list_sorted_dict = sorted(list2, key=lambda x: x['month'] - x['year1'], reverse=True)
261 | # 组成当期纯变化和超过30%变化的列表
262 | for dict in list_sorted_dict:
263 | list1.append(dict)
264 | # 形成科目名称列表
265 | for dict in list1:
266 | big_change_items.append(dict['items'])
267 | return big_change_items
268 | else:
269 | for dict in Item:
270 | if dict['year1'] == 0 and dict['year2'] != 0:
271 | list1.append(dict)
272 | elif dict['year1'] == 0 and dict['year2'] == 0:
273 | pass
274 | else:
275 | if (dict['year1']-dict['year2'])/dict['year2'] < 0.3 \
276 | and (dict['year1']-dict['year2'])/dict['year2'] > -0.3:
277 | pass
278 | else:
279 | list2.append(dict)
280 | list_sorted_dict = sorted(list2, key=lambda x: x['year1']-x['year2'], reverse=True)
281 | #组成当期纯变化和超过30%变化的列表
282 | for dict in list_sorted_dict:
283 | list1.append(dict)
284 | # 形成科目名称列表
285 | for dict in list1:
286 | big_change_items.append(dict['items'])
287 | return big_change_items
288 |
289 | def big_change_sheet(conf_obj,doc):
290 | table_change_item = ['科目名称', '当期值', '较年初变化', '变化率', '变化情况']
291 | table_change = doc.add_table(rows=len(big_change_items(conf_obj)) + 1,
292 | cols=5,
293 | style='Light Grid')
294 | for i in range(5):
295 | cell = table_change.cell(0, i)
296 | cell.text = table_change_item[i]
297 | if conf_obj.data_type == 'all_years':
298 | for i, item in enumerate(big_change_items(conf_obj)):
299 | table_change.cell(i + 1, 0).text = data(conf_obj,item,'items') # 科目名称
300 | table_change.cell(i + 1, 1).text = '{:,.2f}'.format(data(conf_obj,item,'year1')) # 当期值
301 | table_change.cell(i + 1, 2).text = '{:,.2f}'.format(
302 | data(conf_obj,item,'year1') - data(conf_obj,item,'year2')) # 变化值
303 | if data(conf_obj,item,'year2') != 0:
304 | ratio = data(conf_obj,item,'year1') - data(conf_obj, item, 'year2') / data(conf_obj, item, 'year2')
305 | table_change.cell(i + 1, 3).text = '{:.2%}'.format(ratio) # 变化率
306 | else:
307 | if data(conf_obj, item, 'year1') > 0:
308 | table_change.cell(i + 1, 3).text = '当期净增加'
309 | else:
310 | table_change.cell(i + 1, 3).text = '当期净减少'
311 | else:
312 | for i, item in enumerate(big_change_items(conf_obj)):
313 | table_change.cell(i + 1, 0).text = data(conf_obj,item,'items') # 科目名称
314 | table_change.cell(i + 1, 1).text = '{:,.2f}'.format(data(conf_obj,item,'month')) # 当期值
315 | table_change.cell(i + 1, 2).text = '{:,.2f}'.format(data(conf_obj,item,'month') - data(conf_obj,item, 'year1')) # 变化值
316 | if data(conf_obj,item,'year1') != 0:
317 | ratio = (data(conf_obj,item,'month') - data(conf_obj,item,'year1')) / data(conf_obj,item,'year1')
318 | table_change.cell(i + 1, 3).text = '{:.2%}'.format(ratio) # 变化率
319 | else:
320 | if data(conf_obj,item,'month') > 0:
321 | table_change.cell(i + 1, 3).text = '当期净增加'
322 | else:
323 | table_change.cell(i + 1, 3).text = '当期净减少'
324 |
325 | # -----------------------------------------------------------------------
326 | def item_table(doc, col1, col2, col3, col4):
327 | """
328 | 生成固定格式的表格
329 | 1.科目明细
330 | 2.账龄明细
331 | 3.等等
332 | @param col1: 序号
333 | @param col2: 名称
334 | @param col3: 金额
335 | @param col4: 等等
336 | @return: 空白表格
337 | """
338 | table_regular = [col1, col2, col3, col4]
339 | b_c_table = doc.add_table(rows=7,
340 | cols=4,
341 | style='Light Grid')
342 | for i in range(4):
343 | cell = b_c_table.cell(0, i)
344 | cell.text = table_regular[i]
345 | for i in range(5):
346 | cell = b_c_table.cell(i + 1, 0)
347 | cell.text = str(i + 1)
348 |
349 | # -----------------------------------------------------------------------
350 | def para_add(doc, item_para, item):
351 | if item == "货币资金":
352 | item_para.add_run("其中现金【】万元,银行存款【】万元、其他货币资金【】万元。")
353 | elif item == "应收票据":
354 | item_para.add_run("其中银行承兑汇票【】万元,商业承兑汇票【】万元。")
355 | elif item == "应收账款":
356 | item_para.add_run("账面余额【】万元、计提坏账准备【】万元,账龄1年以内占比【】%,3年以上占比【】%。其中,应收账款前五位:")
357 | item_table(doc, "序号", "名称", "余额(万元)", "占比")
358 | elif item == "预付账款":
359 | item_para.add_run("账龄1年以内占比【】%,3年以上占比【】%。其中,预收账款前五位:")
360 | item_table(doc, "序号", "名称", "余额(万元)", "占比")
361 | elif item == "其他应收款":
362 | item_para.add_run("账面余额【】万元、计提坏账准备【】万元。其中,其他应付款前五位:")
363 | item_table(doc, "序号", "名称", "余额(万元)", "款项性质")
364 | elif item == "存货":
365 | item_para.add_run("其中,原材料【】万元、库存商品【】万元、周转材料【】万元、工程施工【】万元、开发成本【】万元。")
366 | elif item == "其他流动资产":
367 | item_para.add_run("其中【添加明细】。")
368 | elif item == "长期股权投资":
369 | item_para.add_run("系对【N】家企业的投资,本期主要新增【哪家公司】;对外投资前五位如下:")
370 | item_table(doc, "序号", "名称", "投资额", "投资性质")
371 | elif item == "固定资产":
372 | item_para.add_run("固定资产原值【】万元,累计折旧【】万元,其中房屋及建筑物【】万元、机器设备【】万元、办公设备【】万元、【其他】【】万元。")
373 | elif item == "在建工程":
374 | item_para.add_run("主要为【项目1】【】万元、【项目2】【】万元、【项目3】【】万元……")
375 | elif item == "无形资产":
376 | item_para.add_run("主要为土地使用权【】万元、采矿权【】万元、专利权【】万元、软件【】万元,其他【】万元。")
377 | elif item == "短期借款":
378 | item_para.add_run("主要为【XX银行】【】万元、【XX银行】【】万元、【XX银行】【】万元、【xx银行】【】万元、【xx银行】【】万元。【其他需要说明的内容】")
379 | elif item == "应付票据":
380 | item_para.add_run("主要为银行承兑汇票【】万元,商业承兑汇票【】万元。")
381 | elif item == "应付账款":
382 | item_para.add_run("其中应付材料款【】万元,应付工程款【】万元。其中前五名如下:")
383 | item_table(doc, "序号", "名称", "余额", "性质")
384 | elif item == "预收账款":
385 | item_para.add_run("其中前5名如下:")
386 | item_table(doc, "序号", "名称", "余额", "账龄")
387 | elif item == "其他应付款":
388 | item_para.add_run("应付利息【】万元,往来款【】万元,押金和保证金【】万元,其中前5名如下:")
389 | item_table(doc, "序号", "名称", "余额", "账龄")
390 | elif item == "其他流动负债":
391 | item_para.add_run("主要为【】")
392 | elif item == "长期借款":
393 | item_para.add_run("主要为【XX银行】【】万元、【XX银行】【】万元、【XX银行】【】万元、【xx银行】【】万元、【xx银行】【】万元。【其他需要说明的内容】")
394 | elif item == "应付债券":
395 | item_para.add_run("主要为【】")
396 | item_table(doc, "序号", "债券名称", "余额", "到期日")
397 | elif item == "长期应付款":
398 | item_para.add_run("其中专项应付款【】万元、【】【】万元、其他【】万元。")
399 |
400 | # -----------------------------------------------------------------------
401 | def items_detail(conf_obj, doc, date):
402 |
403 | #变量声明
404 | list_dict = []
405 | item_text = ''
406 | type_in_all = ''
407 | total_ = float()
408 | # 形成科目列表
409 | for dict in conf_obj.table_for_print:
410 | try:
411 | if data(conf_obj,dict['items'],'type') in ['流动资产', '非流动资产', '流动负债', '非流动负债']:
412 | list_dict.append(dict['items'])
413 | else:
414 | pass
415 | except Exception as Er:
416 | pass
417 | # 科目分析
418 | for item in list_dict: # 第一行是表头,里面有字符串,必须剔除
419 | # 设置科目分析的文字模版
420 | if data(conf_obj, item, date) != 0:
421 | if conf_obj.data_type == 'no_1year':
422 | item_text = '【{}】:当期余额{:,.2f}万元,在{}中占比{:.2%}。'
423 | else:
424 | item_text = '【{}】:当期余额{:,.2f}万元,在{}中占比{:.2%},较上年增加{:.2f}万元,{}。'
425 |
426 | if data(conf_obj, item, 'type') in ['流动资产', '非流动资产']:
427 | type_in_all = '总资产'
428 | total_ = data(conf_obj, '资产总计', date)
429 | elif data(conf_obj, item, 'type') in ['流动负债', '非流动负债']:
430 | type_in_all = '总负债'
431 | total_ = data(conf_obj, '负债合计', date)
432 | else:
433 | pass
434 | else:
435 | pass
436 | # “较上年增加后”的文字部分
437 | if isinstance(data(conf_obj, item, 'ratio'), str):
438 | text_ratio = '为' + data(conf_obj, item, 'ratio')
439 | else:
440 | text_ratio = '当年增幅为{:.2%}'.format(data(conf_obj, item, 'ratio'))
441 | # 模版的格式化输出
442 | if conf_obj.data_type == 'no_1year':
443 | para_ = doc.add_paragraph(
444 | item_text.format(
445 | data(conf_obj, item,'items'),
446 | data(conf_obj, item, date),
447 | type_in_all,
448 | data(conf_obj, item, date) / total_
449 | )
450 | )
451 | para_.paragraph_format.alignment = WD_PARAGRAPH_ALIGNMENT.JUSTIFY
452 | para_.paragraph_format.first_line_indent = Pt(24)
453 | para_add(doc, para_, data(conf_obj, item, date)) # 根据不同的科目在文字模版后新增文字
454 | else:
455 | para_ = doc.add_paragraph(
456 | item_text.format(
457 | data(conf_obj, item, 'items'),
458 | data(conf_obj, item, date),
459 | type_in_all,
460 | data(conf_obj, item, date) / total_,
461 | data(conf_obj, item, 'delta'),
462 | text_ratio
463 | )
464 | )
465 | para_.paragraph_format.alignment = WD_PARAGRAPH_ALIGNMENT.JUSTIFY
466 | para_.paragraph_format.first_line_indent = Pt(24)
467 | para_add(doc, para_, data(conf_obj, item, 'items')) #根据不同的科目在文字模版后新增文字
468 |
--------------------------------------------------------------------------------
/far/_para.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | # -*- coding: utf-8 -*-
3 | #__author__:"watalo"
4 | # @Time: 2020/3/22 22:59
5 | # @Site :
6 | # @File : _para.py
7 | # @Software: PyCharm
8 |
9 |
10 | import os
11 | from tinydb import TinyDB ,Query
12 | from far import _text ,_config
13 |
14 |
15 |
16 | '''
17 | 1 判断数据结构的年份构成
18 | normal
19 | no_3year
20 | no_2year
21 | no_1year
22 | all_years
23 | two_years
24 | 2 对text类中的text进行匹配
25 |
26 | 2.1 可直接读取的数据
27 | 从数据中读取
28 | 2.2 需进行分析的文字
29 | 直接形成分析结果,按字符串形式存储
30 |
31 |
32 | '''
33 |
34 | class dict_:
35 | '''
36 | 设定变量字典
37 | '''
38 | def __init__(self):
39 | self.db_path = _config.DB_PATH
40 | self.db_file_path = '/'.join([self.db_path, os.listdir(self.db_path)[0]])
41 | # print(db_file_path)
42 | self.db = TinyDB(self.db_file_path)
43 | self.table = self.db.table('without_nodata')
44 | self.Q = Query()
45 | self.s2d1 = {'总资产3': ['资产总计','year3'], '总资产2': ['资产总计','year2'],
46 | '总资产1': ['资产总计','year1'], '总资产m': ['资产总计','month'],
47 | '总负债3': ['负债合计','year3'], '总负债2': ['负债合计','year2'],
48 | '总负债1': ['负债合计','year1'], '总负债m': ['负债合计','month'],
49 | '资产负债率3': ['资产负债率','year3'], '资产负债率2': ['资产负债率','year2'],
50 | '资产负债率1': ['资产负债率','year1'], '资产负债率m': ['资产负债率','month'],
51 | '分析s2d1':str(),
52 | }
53 | self.s2d2 = {'分析s2d2': str(),
54 | '流动负债3': ['流动负债合计','year3'], '流动负债2': ['流动负债合计','year2'],
55 | '流动负债1': ['流动负债合计','year1'], '流动负债m': ['流动负债合计','month'],
56 | '短债占比3': ['短债占比','year3'], '短债占比2': ['短债占比','year2'],
57 | '短债占比1': ['短债占比','year1'], '短债占比m': ['短债占比','month'],
58 | '刚性负债3': ['刚性负债','year3'], '刚性负债2': ['刚性负债','year2'],
59 | '刚性负债1': ['刚性负债','year1'], '刚性负债m': ['刚性负债','month'],
60 | '刚性兑付占比3': ['刚兑占比','year3'], '刚性兑付占比2': ['刚兑占比','year2'],
61 | '刚性兑付占比1': ['刚兑占比','year1'], '刚性兑付占比m': ['刚兑占比','month'],
62 | '短期刚兑m': ['短期刚兑','month'],'短期刚兑1':['短期刚兑','year1'],
63 | '短期借款m': ['短期借款','month'],'短期借款1':['短期借款','year1'],
64 | '一年内非流m': ['一年内到期的非流动负债','month'],'一年内非流1': ['一年内到期的非流动负债','year1'],
65 | }
66 | self.s2d3 = {'营业收入3': ['营业收入','year3'], '营业收入2': ['营业收入','year2'],
67 | '营业收入1': ['营业收入','year1'], '分析s2d3':str(),
68 | '营业成本3': ['营业成本','year3'], '营业成本2': ['营业成本','year2'],
69 | '营业成本1': ['营业成本','year1'],
70 | '毛利率3': ['毛利率','year3'], '毛利率2':['毛利率','year2'], '毛利率1':['毛利率','year1'],
71 | '期间费用3': ['期间费用','year3'], '期间费用2': ['期间费用','year2'], '期间费用1': ['期间费用','year1'],
72 | '费用收入比3': ['费用收入比','year3'], '费用收入比2': ['费用收入比','year2'],
73 | '费用收入比1': ['费用收入比','year1'],
74 | '净利润3': ['净利润','year3'], '净利润2': ['净利润','year2'], '净利润1': ['净利润','year1'],
75 | '净利润率3': ['净利润率','year3'], '净利润率2': ['净利润率','year2'], '净利润率1': ['净利润率','year1'],
76 | '营业收入m':['营业收入','month'], '营业成本m':['营业成本','month'], '毛利率m':['毛利率','month'],
77 | '期间费用m':['期间费用','month'], '投资收益m':['投资收益','month'], '净利润率m':['净利润率','month'],
78 | }
79 | self.s2d4 = {'净现金流入3':['现金净流入','year3'], '净现金流入2':['现金净流入','year2'],
80 | '净现金流入1':['现金净流入','year1'],
81 | '经营活动现金净流入3':['经营活动净现金流入','year3'], '经营活动现金净流入2':['经营活动净现金流入','year2'],
82 | '经营活动现金净流入1':['经营活动净现金流入','year1'],
83 | '投资活动现金净流入3':['投资活动现金净流入','year3'], '投资活动现金净流入2':['投资活动现金净流入','year2'],
84 | '投资活动现金净流入1':['投资活动现金净流入','year1'],
85 | '筹资活动现金净流入3':['筹资活动现金净流入','year3'], '筹资活动现金净流入2':['筹资活动现金净流入','year2'],
86 | '筹资活动现金净流入1':['筹资活动现金净流入','year1'],
87 | }
88 | self.s2d5 = {'流动资产3':['流动资产合计','year3'], '流动资产2':['流动资产合计','year2'],
89 | '流动资产1':['流动资产合计','year1'], '流动资产m':['流动资产合计','month'],
90 | '流动资产占比3':['流动资产占比','year3'], '流动资产占比2':['流动资产占比','year2'],
91 | '流动资产占比1':['流动资产占比','year1'], '流动资产占比m':['流动资产占比','month'],
92 | '分析s2d5':str(),
93 | }
94 | self.s2d6 = {'流动比率3':['流动比率','year3'], '流动比率2':['流动比率','year2'],
95 | '流动比率1':['流动比率','year1'], '流动比率m':['流动比率','month'],
96 | '流动比率av':['流动比率','averg'], '流动比率delta':['流动比率','delta'],
97 | '速动比率3':['速动比率','year3'], '速动比率2':['速动比率','year2'],
98 | '速动比率1':['速动比率','year1'], '速动比率m':['速动比率','month'],
99 | '速动比率av':['速动比率','averg'], '速动比率delta':['速动比率','delta'],
100 | }
101 |
102 | @property
103 | def data_type(self):
104 | '''
105 | 判断数据类型
106 | :return: 数据结构的类型[normal,no_3year,no_2year,no_1year,all_years,two_years]
107 | '''
108 | Q = Query()
109 | table = self.db.table('without_nodata')
110 | dict_years = table.search(Q.items == '项目')
111 | type_list = list(dict_years[0].keys())
112 | if ('year3' in type_list and 'year2' in type_list and
113 | 'year1' in type_list and 'month' in type_list):
114 | return 'normal'
115 | elif ('year3' not in type_list and 'year2' in type_list and
116 | 'year1' in type_list and 'month' in type_list):
117 | return 'no_3year'
118 | elif ('year3' not in type_list and 'year2' not in type_list and
119 | 'year1' in type_list and 'month' in type_list):
120 | return 'no_2year'
121 | elif ('year3' not in type_list and 'year2' not in type_list and
122 | 'year1' not in type_list and 'month' in type_list):
123 | return 'no_1year'
124 | elif ('year3' in type_list and 'year2' in type_list and
125 | 'year1' in type_list and 'month' not in type_list):
126 | return 'all_years'
127 | elif ('year3' not in type_list and 'year2' in type_list and
128 | 'year1' in type_list and 'month' not in type_list):
129 | return 'two_years'
130 | else:
131 | return '无法识别'
132 |
133 | def data(self,para_dict,text_key,item,key): # 在set函数中用来读取数据
134 | try:
135 | para_dict[text_key] = self.table.get(self.Q.items == item)[key]
136 | except Exception as error:
137 | para_dict[text_key] = 0
138 |
139 | def set(self):
140 | '''
141 | 给变量赋值,不考虑智能分析文件的问题。
142 | :return: 变量赋值后的字典
143 | '''
144 | #第一段
145 | for key in self.s2d1:
146 | if key == '分析s2d1':
147 | pass
148 | else:
149 | self.data(self.s2d1, key,self.s2d1[key][0], self.s2d1[key][1])
150 | #第二段
151 | for key in self.s2d2:
152 | if key == '分析s2d2':
153 | pass
154 | else:
155 | self.data(self.s2d2, key,self.s2d2[key][0], self.s2d2[key][1])
156 | #第三段
157 | for key in self.s2d3:
158 | if key == '分析s2d3':
159 | pass
160 | else:
161 | self.data(self.s2d3, key,self.s2d3[key][0], self.s2d3[key][1])
162 | #第四段
163 | for key in self.s2d4:
164 | if key == '分析s2d4':
165 | pass
166 | elif key == '分析s2d4_经营':
167 | pass
168 | elif key == '分析s2d4_投资':
169 | pass
170 | elif key == '分析s2d4_筹资':
171 | pass
172 | else:
173 | self.data(self.s2d4, key,self.s2d4[key][0], self.s2d4[key][1])
174 | #第五段
175 | for key in self.s2d5:
176 | if key == '分析s2d5':
177 | pass
178 | else:
179 | self.data(self.s2d5, key,self.s2d5[key][0], self.s2d5[key][1])
180 | #第六段
181 | for key in self.s2d6:
182 | self.data(self.s2d6, key,self.s2d6[key][0], self.s2d6[key][1])
183 |
184 | def db_data(self,item , key): #从数据库读取值 在analysis系列函数中使用
185 | return self.table.get(self.Q.items == item)[key]
186 |
187 | # analysis系列函数对text中的需要做简单分析的部分进行处理
188 | def analysis_s2d1(self):
189 | commit = ''
190 | if self.data_type == 'normal':
191 | if (self.db_data('资产负债率','year3')self.db_data('资产负债率','year2')>self.db_data('资产负债率', 'year1')
195 | >self.db_data('资产负债率','month') ):
196 | commit = '持续下降,资产负债结构有所改善。'
197 | elif (self.db_data('资产负债率','year3')==self.db_data('资产负债率','year2')==self.db_data('资产负债率', 'year1')
198 | ==self.db_data('资产负债率','month')==0 ):
199 | commit = '一直为0,近三年及最近一期均无负债。'
200 | else:
201 | num = self.db_data('资产负债率','averg')
202 | commit = '在{:.2f}上下波动,资产负债结构相对稳定。'.format(num)
203 | elif self.data_type == 'no_3year':
204 | if (self.db_data('资产负债率','year2')self.db_data('资产负债率', 'year1')>self.db_data('资产负债率','month')):
207 | commit = '持续下降,资产负债结构有所改善。'
208 | elif (self.db_data('资产负债率','year2')==self.db_data('资产负债率', 'year1')==self.db_data('资产负债率','month')==0 ):
209 | commit = '一直为0%,申请人近两年及最近一期均无负债。'
210 | else:
211 | num = self.db_data('资产负债率','averg')
212 | commit = '在{:.2f}}上下波动,资产负债结构相对稳定。'.format(num)
213 | elif self.data_type == 'no_2year':
214 | if (self.db_data('资产负债率', 'year1') < self.db_data('资产负债率', 'month')):
215 | commit = '有所增加,有加大资本杠杆的趋势。'
216 | elif (self.db_data('资产负债率', 'year1') > self.db_data('资产负债率', 'month')):
217 | commit = '有所下降,资产负债结构有所改善。'
218 | elif (self.db_data('资产负债率', 'year1') == self.db_data('资产负债率','month') == 0):
219 | commit = '一直为0,处于无负债状态。'
220 | else:
221 | pass
222 | elif self.data_type == 'no_1year':
223 | if self.db_data('资产负债率','month') >= 0.5:
224 | commit = '超过了50%。'
225 | else:
226 | commit = '低于50%,资产负债率相对较低。'
227 | elif self.data_type == 'all_years':
228 | if (self.db_data('资产负债率','year3')self.db_data('资产负债率','year2')>self.db_data('资产负债率', 'year1')):
231 | commit = '持续下降,资产负债结构有所改善。'
232 | elif (self.db_data('资产负债率','year3')==self.db_data('资产负债率','year2')==self.db_data('资产负债率','year1')==0 ):
233 | commit = '申请人近三年均无负债。'
234 | else:
235 | num = self.db_data('资产负债率','averg')
236 | commit = '在{:.2f}}%上下波动,资产负债结构相对稳定。'.format(num)
237 | elif self.data_type == 'two_years':
238 | if (self.db_data('资产负债率','year2')self.db_data('资产负债率', 'year1')):
241 | commit = '持续下降,资产负债结构有所改善。'
242 | elif self.db_data('资产负债率','year2')==self.db_data('资产负债率','year1')==0:
243 | commit = '申请人近两年均无负债。'
244 | else:
245 | num = self.db_data('资产负债率','averg')
246 | commit = '在{:.2f}}%上下波动,资产负债结构相对稳定。'.format(num)
247 | else:
248 | pass
249 | self.s2d1['分析s2d1'] = commit
250 |
251 | def analysis_s2d2(self):
252 | commit = ''
253 | if self.data_type == 'normal':
254 | # 极端情况:资产负债率始终为0
255 | if (self.db_data('资产负债率','year3')==self.db_data('资产负债率','year2')==self.db_data('资产负债率', 'year1')
256 | ==self.db_data('资产负债率','month')==0 ):
257 | commit = '为零>>>请删除本段文字<<<'
258 | else:
259 | if self.db_data('短债占比','month') > 0.5:
260 | commit = '以短期债务为主,流动负债占比高于50%。近三年及最新一期'
261 | elif self.db_data('短债占比','month') < 0.5:
262 | commit = '以长期负债为主,非流动负债占比高于50%。近三年及最新一期'
263 | else:
264 | commit = '期限结构均衡,流动负债占比等于50%。'
265 | elif self.data_type == 'no_3year':
266 | # 极端情况:资产负债率始终为0
267 | if (self.db_data('资产负债率','year2')==self.db_data('资产负债率', 'year1')
268 | ==self.db_data('资产负债率','month')==0 ):
269 | commit = '为零>>>请删除本段文字<<<'
270 | else:
271 | if self.db_data('短债占比','month') > 0.5:
272 | commit = '以短期债务为主,流动负债占比高于50%。近两年及最新一期'
273 | elif self.db_data('短债占比','month') < 0.5:
274 | commit = '以长期负债为主,非流动负债占比高于50%。近两年及最新一期'
275 | else:
276 | commit = '期限结构均衡,流动负债占比等于50%。'
277 | elif self.data_type == 'no_2year':
278 | # 极端情况:资产负债率始终为0
279 | if (self.db_data('资产负债率', 'year1') == self.db_data('资产负债率', 'month') == 0):
280 | commit = '为零>>>请删除本段文字<<<'
281 | else:
282 | if self.db_data('短债占比', 'month') > 0.5:
283 | commit = '以短期债务为主,流动负债占比高于50%。上一年及最新一期'
284 | elif self.db_data('短债占比', 'month') < 0.5:
285 | commit = '以长期负债为主,非流动负债占比高于50%。上一年及最新一期'
286 | else:
287 | commit = '期限结构均衡,流动负债占比等于50%。'
288 | elif self.data_type == 'no_1year':
289 | # 极端情况:资产负债率始终为0
290 | if self.db_data('资产负债率', 'month') == 0:
291 | commit = '为零>>>请删除本段文字<<<'
292 | else:
293 | if self.db_data('短债占比', 'month') > 0.5:
294 | commit = '以短期债务为主,流动负债占比高于50%。'
295 | elif self.db_data('短债占比', 'month') < 0.5:
296 | commit = '以长期负债为主,非流动负债占比高于50%。'
297 | else:
298 | commit = '期限结构均衡,流动负债占比等于50%。'
299 | elif self.data_type == 'all_years':
300 | # 极端情况:资产负债率始终为0
301 | if (self.db_data('资产负债率','year3')==self.db_data('资产负债率','year2')
302 | ==self.db_data('资产负债率', 'year1')==0 ):
303 | commit = '为零>>>请删除本段文字<<<'
304 | else:
305 | if self.db_data('短债占比','year1') > 0.5:
306 | commit = '以短期债务为主,流动负债占比高于50%。近三年'
307 | elif self.db_data('短债占比','year1') < 0.5:
308 | commit = '以长期负债为主,非流动负债占比高于50%。近三年'
309 | else:
310 | commit = '期限结构均衡,流动负债占比等于50%。'
311 | elif self.data_type == 'two_years':
312 | # 极端情况:资产负债率始终为0
313 | if (self.db_data('资产负债率', 'year2') == self.db_data('资产负债率', 'year1') == 0):
314 | commit = '为零>>>请删除本段文字<<<'
315 | else:
316 | if self.db_data('短债占比', 'year1') > 0.5:
317 | commit = '以短期债务为主,流动负债占比高于50%。近两年'
318 | elif self.db_data('短债占比', 'year1') < 0.5:
319 | commit = '以长期负债为主,非流动负债占比高于50%。近两年'
320 | else:
321 | commit = '期限结构均衡,流动负债占比等于50%。'
322 |
323 | else:
324 | pass
325 | self.s2d2['分析s2d2'] = commit
326 |
327 | def analysis_s2d3(self):
328 | commit = '营业收入{com1},盈利能力{com2}'
329 |
330 | if self.data_type == 'normal':
331 | # com1
332 | com1 = ''
333 | if self.db_data('营业收入','year3') == self.db_data('营业收入','year2') == self.db_data('营业收入','year1') == 0:
334 | commit = '连续三年未实现销售收入。'
335 | else:
336 | if 0 < self.db_data('营业收入','year3') < self.db_data('营业收入','year2'):
337 | if self.db_data('营业收入','year2') < self.db_data('营业收入','year1'):
338 | tag = (self.db_data('营业收入','year1') - self.db_data('营业收入','year3'))/self.db_data('营业收入','year3')
339 | ave = tag/2
340 | com1 = '持续三年增长,平均增长率为{:,.2%}'.format(ave)
341 | elif self.db_data('营业收入','year2') > self.db_data('营业收入','year1'):
342 | com1 = '出现波动,最近一年营收出现回落'
343 | else:
344 | com1 = '近来年相对稳定,相比前三年营收有所提升'
345 | elif self.db_data('营业收入','year3') > self.db_data('营业收入','year2'):
346 | if self.db_data('营业收入','year2') > self.db_data('营业收入','year1'):
347 | tag = (self.db_data('营业收入','year3') - self.db_data('营业收入','year1'))/self.db_data('营业收入','year1')
348 | ave = tag/2
349 | com1 = '持续三年下降,平均降幅为{:,.2%}'.format(ave)
350 | elif self.db_data('营业收入','year2') < self.db_data('营业收入','year1'):
351 | com1 = '出现波动,但最近一年营收有所回升'
352 | else:
353 | com1 = '近来年相对稳定,相比前三年营收有所回落'
354 | # com2
355 | if self.db_data('净利润','month') > 0:
356 | if (self.db_data('净利润','year3') < self.db_data('净利润','year2')
357 | < self.db_data('净利润','year1') < self.db_data('净利润','month')):
358 | com2 = '逐年提升'
359 | elif (self.db_data('净利润','year3') > self.db_data('净利润','year2')
360 | > self.db_data('净利润','year1') > self.db_data('净利润','month')):
361 | com2 = '逐年下降'
362 | else:
363 | com2 = '有所波动'
364 | else:
365 | com2 = '较弱,出现亏损情况'
366 |
367 | elif self.data_type == 'no_3year':
368 | # com1
369 | if self.db_data('营业收入', 'year2') == self.db_data('营业收入', 'year1') == 0:
370 | commit = '连续两年未实现销售收入。'
371 | else:
372 | if 0 < self.db_data('营业收入', 'year2'):
373 | if self.db_data('营业收入', 'year2') < self.db_data('营业收入', 'year1'):
374 | tag = (self.db_data('营业收入', 'year1') - self.db_data('营业收入', 'year2')) / self.db_data('营业收入','year2')
375 | ave = tag
376 | com1 = '持续两年增长,增长率为{:,.2%}'.format(ave)
377 | elif self.db_data('营业收入', 'year2') > self.db_data('营业收入', 'year1'):
378 | com1 = '出现波动,最近一年营收出现回落'
379 | else:
380 | com1 = '近来年相对稳定'
381 | # com2
382 | if self.db_data('净利润', 'month') >= 0:
383 | if (self.db_data('净利润', 'year2') < self.db_data('净利润', 'year1') < self.db_data('净利润', 'month')):
384 | com2 = '逐年提升'
385 | elif (self.db_data('净利润', 'year2') > self.db_data('净利润', 'year1') > self.db_data('净利润', 'month')):
386 | com2 = '逐年下降'
387 | else:
388 | com2 = '有所波动'
389 | else:
390 | com2 = '较弱,出现亏损情况'
391 |
392 | elif self.data_type == 'no_2year':
393 | # com1
394 | if self.db_data('营业收入', 'year1') > 0:
395 | com1 = '已实现销售收入'
396 | else:
397 | if self.db_data('营业收入', 'month') > 0:
398 | com1 = '连续实现销售收入'
399 | else:
400 | com1 = '不稳定,较难判断'
401 | # com2
402 | if self.db_data('净利润', 'month') >= 0:
403 | if self.db_data('净利润', 'year1') <= self.db_data('净利润', 'month'):
404 | com2 = '逐渐提升'
405 | else:
406 | com2 = '有所下降'
407 | else:
408 | com2 = '较弱,出现亏损情况'
409 |
410 | elif self.data_type == 'no_1year':
411 | com1 = '{:,.f}'.format(self.db_data('营业收入','month'))
412 | com2 = '{:,.f}'.format(self.db_data('净利润','month'))
413 |
414 | elif self.data_type == 'all_years':
415 | # com1
416 | com1 = ''
417 | if self.db_data('营业收入','year3') == self.db_data('营业收入','year2') == self.db_data('营业收入','year1') == 0:
418 | commit = '连续三年未实现销售收入。'
419 | else:
420 | if 0 < self.db_data('营业收入','year3') < self.db_data('营业收入','year2'):
421 | if self.db_data('营业收入','year2') < self.db_data('营业收入','year1'):
422 | tag = (self.db_data('营业收入','year1') - self.db_data('营业收入','year3'))/self.db_data('营业收入','year3')
423 | ave = tag/2
424 | com1 = '持续三年增长,平均增长率为{:,.2%}'.format(ave)
425 | elif self.db_data('营业收入','year2') > self.db_data('营业收入','year1'):
426 | com1 = '出现波动,最近一年营收出现回落'
427 | else:
428 | com1 = '近来年相对稳定,相比前三年营收有所提升'
429 | elif self.db_data('营业收入','year3') > self.db_data('营业收入','year2'):
430 | if self.db_data('营业收入','year2') > self.db_data('营业收入','year1'):
431 | tag = (self.db_data('营业收入','year3') - self.db_data('营业收入','year1'))/self.db_data('营业收入','year1')
432 | ave = tag/2
433 | com1 = '持续三年下降,平均降幅为{:,.2%}'.format(ave)
434 | elif self.db_data('营业收入','year2') < self.db_data('营业收入','year1'):
435 | com1 = '出现波动,但最近一年营收有所回升'
436 | else:
437 | com1 = '近来年相对稳定,相比前三年营收有所回落'
438 | # com2
439 | if self.db_data('净利润','year1') >= 0:
440 | if (self.db_data('净利润','year3') < self.db_data('净利润','year2')
441 | < self.db_data('净利润','year1')):
442 | com2 = '逐年提升'
443 | elif (self.db_data('净利润','year3') > self.db_data('净利润','year2')
444 | > self.db_data('净利润','year1')):
445 | com2 = '逐年下降'
446 | else:
447 | com2 = '有所波动'
448 | else:
449 | com2 = '较弱,出现亏损情况'
450 |
451 | elif self.data_type == 'two_years':
452 | # com1
453 | com1 = ''
454 | if self.db_data('营业收入','year2') == self.db_data('营业收入','year1') == 0:
455 | commit = '连续两年未实现销售收入。'
456 | elif self.db_data('营业收入','year2') < self.db_data('营业收入','year1'):
457 | pass
458 | elif self.db_data('营业收入','year2') > self.db_data('营业收入','year1'):
459 | pass
460 | # com2
461 | if self.db_data('净利润','year1') >= 0:
462 | if self.db_data('净利润','year2') < self.db_data('净利润','year1'):
463 | com2 = '较上年有所提升'
464 | elif self.db_data('净利润','year2') > self.db_data('净利润','year1'):
465 | com2 = '较上年有所下降'
466 | else:
467 | com2 = '保持不变'
468 | else:
469 | com2 = '较弱,出现亏损情况'
470 |
471 | self.s2d3['分析s2d3'] = commit.format(com1=com1,com2=com2)
472 |
473 | def analysis_s2d5(self):
474 | commit = '%s,在总资产构成中的占比分别为%s'
475 | text_sorted_asset = ''
476 | text_sorted_ratio = ''
477 | if (self.data_type == 'normal' or self.data_type == 'no_3year' or self.data_type == 'no_2year' or
478 | self.data_type == 'all_years' or self.data_type == 'two_years'):
479 | text_sorted_asset = '、'.join(self.sort_asset('year1', 'items')[:5])
480 | sorted_ratio = []
481 | for value in self.sort_asset('year1', 'year1')[:5]:
482 | ratio = 100 * value / self.db_data('资产总计', 'year1')
483 | sorted_ratio.append('%.2f%%' % ratio)
484 | text_sorted_ratio = '、'.join(sorted_ratio)
485 | elif self.data_type == 'no_1year':
486 | text_sorted_asset = '、'.join(self.sort_asset('month', 'items')[:5])
487 | sorted_ratio = []
488 | for value in self.sort_asset('month', 'month')[:5]:
489 | ratio = 100 * value / self.db_data('资产总计', 'month')
490 | sorted_ratio.append('%.2f%%' % ratio)
491 | text_sorted_ratio = '、'.join(sorted_ratio)
492 | else:
493 | pass
494 | self.s2d5['分析s2d5'] = commit%(text_sorted_asset,text_sorted_ratio)
495 |
496 | def sort_asset(self, year, output):
497 | Item = self.table.search((self.Q.type == '流动资产') | (self.Q.type == '非流动资产'))
498 | list_sorted_dict = sorted(Item, key=lambda Item: Item[year], reverse=True)
499 | list_item = []
500 | for sorted_dict in list_sorted_dict:
501 | list_item.append(sorted_dict[output])
502 | return list_item
503 |
504 |
505 |
506 |
507 |
508 |
509 |
--------------------------------------------------------------------------------
/db/模板.json:
--------------------------------------------------------------------------------
1 | {"_default": {"1": {"items": "\u9879\u76ee", "year3": "\u524d3\u5e74", "year2": "\u524d2\u5e74", "year1": "\u524d1\u5e74", "month": "\u5f53\u671f"}, "2": {"items": "\u8d27\u5e01\u8d44\u91d1", "year3": 1905.306261, "year2": 692.370683, "year1": 34.386676, "month": 513.192363}, "3": {"items": "\u4ea4\u6613\u6027\u91d1\u878d\u8d44\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "4": {"items": "\u884d\u751f\u91d1\u878d\u8d44\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "5": {"items": "\u5e94\u6536\u7968\u636e", "year3": 3532.339238, "year2": 1646.5932, "year1": 675.8, "month": 0}, "6": {"items": "\u5e94\u6536\u8d26\u6b3e", "year3": 0, "year2": 3994.602363, "year1": 3233.39388, "month": 3708.096704}, "7": {"items": "\u5e94\u6536\u6b3e\u9879\u878d\u8d44", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "8": {"items": "\u9884\u4ed8\u8d26\u6b3e", "year3": 398.485836, "year2": 440.174981, "year1": 280.871295, "month": 1746.124304}, "9": {"items": "\u5176\u4ed6\u5e94\u6536\u6b3e", "year3": 59.399029, "year2": 229.054086, "year1": 553.472384, "month": 357.948932}, "10": {"items": "\u5b58\u8d27", "year3": 2315.600329, "year2": 2109.804261, "year1": 3208.385089, "month": 7685.625998}, "11": {"items": "\u5408\u540c\u8d44\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "12": {"items": "\u6301\u6709\u5f85\u552e\u8d44\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "13": {"items": "\u4e00\u5e74\u5185\u5230\u671f\u7684\u975e\u6d41\u52a8\u8d44\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "14": {"items": "\u5176\u4ed6\u6d41\u52a8\u8d44\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "15": {"items": "\u6d41\u52a8\u8d44\u4ea7\u5408\u8ba1", "year3": 8211.130693, "year2": 9112.599574, "year1": 7986.309324, "month": 14010.988301}, "16": {"items": "\u503a\u6743\u6295\u8d44", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "17": {"items": "\u5176\u4ed6\u503a\u6743\u6295\u8d44", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "18": {"items": "\u957f\u671f\u5e94\u6536\u6b3e", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "19": {"items": "\u957f\u671f\u80a1\u6743\u6295\u8d44", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "20": {"items": "\u5176\u4ed6\u6743\u76ca\u5de5\u5177\u6295\u8d44", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "21": {"items": "\u5176\u4ed6\u975e\u6d41\u52a8\u91d1\u878d\u8d44\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "22": {"items": "\u6295\u8d44\u6027\u623f\u5730\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "23": {"items": "\u56fa\u5b9a\u8d44\u4ea7", "year3": 5052.756509, "year2": 4602.739732, "year1": 11922.901795, "month": 12269.773097}, "24": {"items": "\u5728\u5efa\u5de5\u7a0b", "year3": 2027.825395, "year2": 5996.073625, "year1": 9.303755, "month": 608.440889}, "25": {"items": "\u751f\u4ea7\u6027\u751f\u7269\u8d44\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "26": {"items": "\u6cb9\u6c14\u8d44\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "27": {"items": "\u4f7f\u7528\u6743\u8d44\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "28": {"items": "\u65e0\u5f62\u8d44\u4ea7", "year3": 3232.073987, "year2": 3094.327397, "year1": 2971.687112, "month": 2849.265296}, "29": {"items": "\u5f00\u53d1\u652f\u51fa", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "30": {"items": "\u5546\u8a89", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "31": {"items": "\u957f\u671f\u5f85\u644a\u8d39\u7528", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "32": {"items": "\u9012\u5ef6\u6240\u5f97\u7a0e\u8d44\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 119.893476}, "33": {"items": "\u5176\u4ed6\u975e\u6d41\u52a8\u8d44\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "34": {"items": "\u975e\u6d41\u52a8\u8d44\u4ea7\u5408\u8ba1", "year3": 10312.655891, "year2": 13693.140754, "year1": 14903.892662, "month": 15847.372758}, "35": {"items": "\u8d44\u4ea7\u603b\u8ba1", "year3": 18523.786584, "year2": 22805.740328, "year1": 22890.201986, "month": 29858.361059}, "36": {"items": "\u77ed\u671f\u501f\u6b3e", "year3": 0, "year2": 0, "year1": 0, "month": 3000}, "37": {"items": "\u4ea4\u6613\u6027\u91d1\u878d\u8d1f\u503a", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "38": {"items": "\u884d\u751f\u91d1\u878d\u8d1f\u503a", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "39": {"items": "\u5e94\u4ed8\u7968\u636e", "year3": 0, "year2": 510, "year1": 0, "month": 0}, "40": {"items": "\u5e94\u4ed8\u8d26\u6b3e", "year3": 1220.965529, "year2": 2098.730311, "year1": 1418.553882, "month": 2347.611576}, "41": {"items": "\u9884\u6536\u8d26\u6b3e", "year3": 51.58147, "year2": 1093.922604, "year1": 2234.642292, "month": 6616.524756}, "42": {"items": "\u5408\u540c\u8d1f\u503a", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "43": {"items": "\u5e94\u4ed8\u804c\u5de5\u85aa\u916c", "year3": 94.799994, "year2": 280.630193, "year1": 232.827075, "month": 291.309686}, "44": {"items": "\u5e94\u4ea4\u7a0e\u8d39", "year3": 163.023681, "year2": 302.886776, "year1": 236.383015, "month": 192.43361}, "45": {"items": "\u5176\u4ed6\u5e94\u4ed8\u6b3e", "year3": 84.354983, "year2": 1954.915679, "year1": 2226.331387, "month": 3789.911382}, "46": {"items": "\u6301\u6709\u5f85\u552e\u8d1f\u503a", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "47": {"items": "\u4e00\u5e74\u5185\u5230\u671f\u7684\u975e\u6d41\u52a8\u8d1f\u503a", "year3": 0, "year2": 2100, "year1": 0, "month": 0}, "48": {"items": "\u5176\u4ed6\u6d41\u52a8\u8d1f\u503a", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "49": {"items": "\u6d41\u52a8\u8d1f\u503a\u5408\u8ba1", "year3": 1614.725657, "year2": 8341.085563, "year1": 6348.737651, "month": 16237.79101}, "50": {"items": "\u957f\u671f\u501f\u6b3e", "year3": 6375, "year2": 2500, "year1": 3350, "month": 2500}, "51": {"items": "\u5e94\u4ed8\u503a\u5238", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "52": {"items": "\u79df\u8d41\u8d1f\u503a", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "53": {"items": "\u957f\u671f\u5e94\u4ed8\u6b3e", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "54": {"items": "\u9884\u8ba1\u8d1f\u503a", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "55": {"items": "\u9012\u5ef6\u6536\u76ca", "year3": 608.66667, "year2": 1139.250007, "year1": 1926.990007, "month": 1781.730007}, "56": {"items": "\u9012\u5ef6\u6240\u5f97\u7a0e\u8d1f\u503a", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "57": {"items": "\u5176\u4ed6\u975e\u6d41\u52a8\u8d1f\u503a", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "58": {"items": "\u975e\u6d41\u52a8\u8d1f\u503a\u5408\u8ba1", "year3": 6983.66667, "year2": 3639.250007, "year1": 5276.990007, "month": 4281.730007}, "59": {"items": "\u8d1f\u503a\u5408\u8ba1", "year3": 8598.392327, "year2": 11980.33557, "year1": 11625.727658, "month": 20519.521017}, "60": {"items": "\u5b9e\u6536\u8d44\u672c", "year3": 7500, "year2": 7500, "year1": 7500, "month": 6000}, "61": {"items": "\u5176\u4ed6\u6743\u76ca\u5de5\u5177", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "62": {"items": "\u8d44\u672c\u516c\u79ef", "year3": 1500, "year2": 1500, "year1": 1500, "month": 0}, "63": {"items": "\u5176\u4ed6\u7efc\u5408\u6536\u76ca", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "64": {"items": "\u4e13\u9879\u50a8\u5907", "year3": 0, "year2": 0, "year1": 0, "month": 32.29068}, "65": {"items": "\u76c8\u4f59\u516c\u79ef", "year3": 99.539425, "year2": 189.540475, "year1": 240.229016, "month": 344.436519}, "66": {"items": "\u672a\u5206\u914d\u5229\u6da6", "year3": 825.854832, "year2": 1635.864283, "year1": 2024.245312, "month": 2962.112843}, "67": {"items": "\u6240\u6709\u8005\u6743\u76ca\u5408\u8ba1", "year3": 9925.394257, "year2": 10825.404758, "year1": 11264.474328, "month": 9338.840042}, "68": {"items": "\u8425\u4e1a\u6536\u5165", "year3": 8538.764683, "year2": 18367.588221, "year1": 9870.207112, "month": 10572.493315}, "69": {"items": "\u8425\u4e1a\u6210\u672c", "year3": 6405.835435, "year2": 14079.187242, "year1": 7522.109522, "month": 7593.081193}, "70": {"items": "\u7a0e\u91d1\u53ca\u9644\u52a0", "year3": 72.526882, "year2": 86.855571, "year1": 59.399621, "month": 43.114888}, "71": {"items": "\u9500\u552e\u8d39\u7528", "year3": 174.354225, "year2": 423.934872, "year1": 52.694812, "month": 190.129292}, "72": {"items": "\u7ba1\u7406\u8d39\u7528", "year3": 311.095766, "year2": 271.785355, "year1": 397.637051, "month": 388.06617}, "73": {"items": "\u7814\u53d1\u8d39\u7528", "year3": 621.617397, "year2": 1136.298858, "year1": 1016.677712, "month": 371.111628}, "74": {"items": "\u8d22\u52a1\u8d39\u7528", "year3": 424.679109, "year2": 484.575537, "year1": 351.729128, "month": 453.802689}, "75": {"items": "\u5176\u4ed6\u6536\u76ca", "year3": 70.33333, "year2": 78.842512, "year1": 145.26, "month": 145.26}, "76": {"items": "\u6295\u8d44\u6536\u76ca", "year3": 16.795434, "year2": 0, "year1": 0, "month": 0}, "77": {"items": "\u51c0\u655e\u53e3\u5957\u671f\u6536\u76ca", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "78": {"items": "\u516c\u5141\u4ef7\u503c\u53d8\u52a8\u6536\u76ca", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "79": {"items": "\u4fe1\u7528\u51cf\u503c\u635f\u5931", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "80": {"items": "\u8d44\u4ea7\u51cf\u503c\u635f\u5931", "year3": 0, "year2": 0, "year1": 242.626643, "month": 461.585274}, "81": {"items": "\u8d44\u4ea7\u5904\u7f6e\u6536\u76ca", "year3": 0, "year2": 0, "year1": 0, "month": 0}, "82": {"items": "\u8425\u4e1a\u5229\u6da6", "year3": 615.784633, "year2": 1963.793298, "year1": 372.592623, "month": 1216.862181}, "83": {"items": "\u8425\u4e1a\u5916\u6536\u5165", "year3": 1.7348, "year2": 6.185, "year1": 48.552035, "month": 57.992223}, "84": {"items": "\u8425\u4e1a\u5916\u652f\u51fa", "year3": 5, "year2": 1005.59229, "year1": 29.091297, "month": 0.070032}, "85": {"items": "\u5229\u6da6\u603b\u989d", "year3": 612.519433, "year2": 964.386008000003, "year1": 392.053361, "month": 1274.784372}, "86": {"items": "\u6240\u5f97\u7a0e\u8d39\u7528", "year3": 53.060083, "year2": 42.335537, "year1": 58.808004, "month": 0}, "87": {"items": "\u51c0\u5229\u6da6", "year3": 559.45935, "year2": 922.050471000003, "year1": 333.245357, "month": 1274.784372}, "88": {"items": "\u7ecf\u8425\u6d3b\u52a8\u73b0\u91d1\u6d41\u5165", "year3": 6204.542458, "year2": 18915.584941, "year1": 11401.434267, "month": 17125.243317}, "89": {"items": "\u9500\u552e\u5e26\u6765\u7684\u73b0\u91d1\u6d41\u5165", "year3": 3489.340723, "year2": 8899.456011, "year1": 4658.072268, "month": 17009.999387}, "90": {"items": "\u7ecf\u8425\u6d3b\u52a8\u73b0\u91d1\u6d41\u51fa", "year3": 7453.949626, "year2": 16668.716231, "year1": 10362.226368, "month": 16000.765616}, "91": {"items": "\u7ecf\u8425\u6d3b\u52a8\u73b0\u91d1\u51c0\u6d41\u5165", "year3": -1249.407168, "year2": 2246.86871, "year1": 1039.207899, "month": 1124.477701}, "92": {"items": "\u6295\u8d44\u6d3b\u52a8\u73b0\u91d1\u6d41\u5165", "year3": 7116.795434, "year2": 0, "year1": 0, "month": 0}, "93": {"items": "\u6295\u8d44\u6d3b\u52a8\u73b0\u91d1\u6d41\u51fa", "year3": 7181.330421, "year2": 767.084209, "year1": 81.124895, "month": 2433.993015}, "94": {"items": "\u6295\u8d44\u6d3b\u52a8\u73b0\u91d1\u51c0\u6d41\u5165", "year3": -64.534986999999, "year2": -767.084209, "year1": -81.124895, "month": -2433.993015}, "95": {"items": "\u7b79\u8d44\u6d3b\u52a8\u73b0\u91d1\u6d41\u5165", "year3": 7200, "year2": 499.8, "year1": 2500, "month": 3000}, "96": {"items": "\u7b79\u8d44\u6d3b\u52a8\u73b0\u91d1\u6d41\u51fa", "year3": 5300.870517, "year2": 3192.520079, "year1": 4116.067011, "month": 1211.679059}, "97": {"items": "\u7b79\u8d44\u6d3b\u52a8\u73b0\u91d1\u51c0\u6d41\u5165", "year3": 1899.129483, "year2": -2692.720079, "year1": -1616.067011, "month": 1788.320941}, "98": {"items": "\u73b0\u91d1\u51c0\u6d41\u5165", "year3": 585.187328, "year2": -1212.935578, "year1": -657.984007, "month": 478.805626999999}}, "without_nodata": {"1": {"items": "\u9879\u76ee", "year3": "\u524d3\u5e74", "year2": "\u524d2\u5e74", "year1": "\u524d1\u5e74", "month": "\u5f53\u671f"}, "2": {"items": "\u8d27\u5e01\u8d44\u91d1", "year3": 1905.306261, "year2": 692.370683, "year1": 34.386676, "month": 513.192363, "averg": 786.31399575, "sum": 3145.255983, "ratio": 13.924163155519887, "delta": 478.805687, "type": "\u6d41\u52a8\u8d44\u4ea7"}, "3": {"items": "\u4ea4\u6613\u6027\u91d1\u878d\u8d44\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u6d41\u52a8\u8d44\u4ea7"}, "4": {"items": "\u884d\u751f\u91d1\u878d\u8d44\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0}, "5": {"items": "\u5e94\u6536\u7968\u636e", "year3": 3532.339238, "year2": 1646.5932, "year1": 675.8, "month": 0, "averg": 1463.6831095, "sum": 5854.732438, "ratio": -1.0, "delta": -675.8, "type": "\u6d41\u52a8\u8d44\u4ea7"}, "6": {"items": "\u5e94\u6536\u8d26\u6b3e", "year3": 0, "year2": 3994.602363, "year1": 3233.39388, "month": 3708.096704, "averg": 2734.02323675, "sum": 10936.092947, "ratio": 0.14681255721310388, "delta": 474.70282399999996, "type": "\u6d41\u52a8\u8d44\u4ea7"}, "7": {"items": "\u5e94\u6536\u6b3e\u9879\u878d\u8d44", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0}, "8": {"items": "\u9884\u4ed8\u8d26\u6b3e", "year3": 398.485836, "year2": 440.174981, "year1": 280.871295, "month": 1746.124304, "averg": 716.414104, "sum": 2865.656416, "ratio": 5.216812949860184, "delta": 1465.253009, "type": "\u6d41\u52a8\u8d44\u4ea7"}, "9": {"items": "\u5176\u4ed6\u5e94\u6536\u6b3e", "year3": 59.399029, "year2": 229.054086, "year1": 553.472384, "month": 357.948932, "averg": 299.96860775000005, "sum": 1199.8744310000002, "ratio": -0.3532668614591618, "delta": -195.52345200000002, "type": "\u6d41\u52a8\u8d44\u4ea7"}, "10": {"items": "\u5b58\u8d27", "year3": 2315.600329, "year2": 2109.804261, "year1": 3208.385089, "month": 7685.625998, "averg": 3829.85391925, "sum": 15319.415677, "ratio": 1.3954811485536112, "delta": 4477.240909, "type": "\u6d41\u52a8\u8d44\u4ea7"}, "11": {"items": "\u5408\u540c\u8d44\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u6d41\u52a8\u8d44\u4ea7"}, "12": {"items": "\u6301\u6709\u5f85\u552e\u8d44\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u6d41\u52a8\u8d44\u4ea7"}, "13": {"items": "\u4e00\u5e74\u5185\u5230\u671f\u7684\u975e\u6d41\u52a8\u8d44\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0}, "14": {"items": "\u5176\u4ed6\u6d41\u52a8\u8d44\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u6d41\u52a8\u8d44\u4ea7"}, "15": {"items": "\u6d41\u52a8\u8d44\u4ea7\u5408\u8ba1", "year3": 8211.130693, "year2": 9112.599574, "year1": 7986.309324, "month": 14010.988301, "averg": 9830.256973, "sum": 39321.027892, "ratio": 0.7543758615628597, "delta": 6024.678977}, "16": {"items": "\u503a\u6743\u6295\u8d44", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u975e\u6d41\u52a8\u8d44\u4ea7"}, "17": {"items": "\u5176\u4ed6\u503a\u6743\u6295\u8d44", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u975e\u6d41\u52a8\u8d44\u4ea7"}, "18": {"items": "\u957f\u671f\u5e94\u6536\u6b3e", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u975e\u6d41\u52a8\u8d44\u4ea7"}, "19": {"items": "\u957f\u671f\u80a1\u6743\u6295\u8d44", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u975e\u6d41\u52a8\u8d44\u4ea7"}, "20": {"items": "\u5176\u4ed6\u6743\u76ca\u5de5\u5177\u6295\u8d44", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u975e\u6d41\u52a8\u8d44\u4ea7"}, "21": {"items": "\u5176\u4ed6\u975e\u6d41\u52a8\u91d1\u878d\u8d44\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u975e\u6d41\u52a8\u8d44\u4ea7"}, "22": {"items": "\u6295\u8d44\u6027\u623f\u5730\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u975e\u6d41\u52a8\u8d44\u4ea7"}, "23": {"items": "\u56fa\u5b9a\u8d44\u4ea7", "year3": 5052.756509, "year2": 4602.739732, "year1": 11922.901795, "month": 12269.773097, "averg": 8462.042783249999, "sum": 33848.171132999996, "ratio": 0.029092859101252002, "delta": 346.87130199999956, "type": "\u975e\u6d41\u52a8\u8d44\u4ea7"}, "24": {"items": "\u5728\u5efa\u5de5\u7a0b", "year3": 2027.825395, "year2": 5996.073625, "year1": 9.303755, "month": 608.440889, "averg": 2160.410916, "sum": 8641.643664, "ratio": 64.39734644775146, "delta": 599.137134, "type": "\u975e\u6d41\u52a8\u8d44\u4ea7"}, "25": {"items": "\u751f\u4ea7\u6027\u751f\u7269\u8d44\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u975e\u6d41\u52a8\u8d44\u4ea7"}, "26": {"items": "\u6cb9\u6c14\u8d44\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u975e\u6d41\u52a8\u8d44\u4ea7"}, "27": {"items": "\u4f7f\u7528\u6743\u8d44\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u975e\u6d41\u52a8\u8d44\u4ea7"}, "28": {"items": "\u65e0\u5f62\u8d44\u4ea7", "year3": 3232.073987, "year2": 3094.327397, "year1": 2971.687112, "month": 2849.265296, "averg": 3036.838448, "sum": 12147.353792, "ratio": -0.04119606519328608, "delta": -122.42181600000004, "type": "\u975e\u6d41\u52a8\u8d44\u4ea7"}, "29": {"items": "\u5f00\u53d1\u652f\u51fa", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u975e\u6d41\u52a8\u8d44\u4ea7"}, "30": {"items": "\u5546\u8a89", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u975e\u6d41\u52a8\u8d44\u4ea7"}, "31": {"items": "\u957f\u671f\u5f85\u644a\u8d39\u7528", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u975e\u6d41\u52a8\u8d44\u4ea7"}, "32": {"items": "\u9012\u5ef6\u6240\u5f97\u7a0e\u8d44\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 119.893476, "averg": 29.973369, "sum": 119.893476, "ratio": "\u51c0\u65b0\u589e", "delta": 119.893476, "type": "\u975e\u6d41\u52a8\u8d44\u4ea7"}, "33": {"items": "\u5176\u4ed6\u975e\u6d41\u52a8\u8d44\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u975e\u6d41\u52a8\u8d44\u4ea7"}, "34": {"items": "\u975e\u6d41\u52a8\u8d44\u4ea7\u5408\u8ba1", "year3": 10312.655891, "year2": 13693.140754, "year1": 14903.892662, "month": 15847.372758, "averg": 13689.26551625, "sum": 54757.062065, "ratio": 0.0633042734134527, "delta": 943.4800959999993}, "35": {"items": "\u8d44\u4ea7\u603b\u8ba1", "year3": 18523.786584, "year2": 22805.740328, "year1": 22890.201986, "month": 29858.361059, "averg": 23519.52248925, "sum": 94078.089957, "ratio": 0.30441667038420334, "delta": 6968.159072999999}, "36": {"items": "\u77ed\u671f\u501f\u6b3e", "year3": 0, "year2": 0, "year1": 0, "month": 3000, "averg": 750.0, "sum": 3000, "ratio": "\u51c0\u65b0\u589e", "delta": 3000, "type": "\u6d41\u52a8\u8d1f\u503a"}, "37": {"items": "\u4ea4\u6613\u6027\u91d1\u878d\u8d1f\u503a", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u6d41\u52a8\u8d1f\u503a"}, "38": {"items": "\u884d\u751f\u91d1\u878d\u8d1f\u503a", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u6d41\u52a8\u8d1f\u503a"}, "39": {"items": "\u5e94\u4ed8\u7968\u636e", "year3": 0, "year2": 510, "year1": 0, "month": 0, "averg": 127.5, "sum": 510, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u6d41\u52a8\u8d1f\u503a"}, "40": {"items": "\u5e94\u4ed8\u8d26\u6b3e", "year3": 1220.965529, "year2": 2098.730311, "year1": 1418.553882, "month": 2347.611576, "averg": 1771.4653245, "sum": 7085.861298, "ratio": 0.6549329608052209, "delta": 929.0576939999999, "type": "\u6d41\u52a8\u8d1f\u503a"}, "41": {"items": "\u9884\u6536\u8d26\u6b3e", "year3": 51.58147, "year2": 1093.922604, "year1": 2234.642292, "month": 6616.524756, "averg": 2499.1677805, "sum": 9996.671122, "ratio": 1.9608876461736635, "delta": 4381.882464, "type": "\u6d41\u52a8\u8d1f\u503a"}, "42": {"items": "\u5408\u540c\u8d1f\u503a", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u6d41\u52a8\u8d1f\u503a"}, "43": {"items": "\u5e94\u4ed8\u804c\u5de5\u85aa\u916c", "year3": 94.799994, "year2": 280.630193, "year1": 232.827075, "month": 291.309686, "averg": 224.89173700000003, "sum": 899.5669480000001, "ratio": 0.251184751601591, "delta": 58.48261099999999, "type": "\u6d41\u52a8\u8d1f\u503a"}, "44": {"items": "\u5e94\u4ea4\u7a0e\u8d39", "year3": 163.023681, "year2": 302.886776, "year1": 236.383015, "month": 192.43361, "averg": 223.68177050000003, "sum": 894.7270820000001, "ratio": -0.18592454707458578, "delta": -43.94940500000001, "type": "\u6d41\u52a8\u8d1f\u503a"}, "45": {"items": "\u5176\u4ed6\u5e94\u4ed8\u6b3e", "year3": 84.354983, "year2": 1954.915679, "year1": 2226.331387, "month": 3789.911382, "averg": 2013.8783577499999, "sum": 8055.513430999999, "ratio": 0.7023123350504151, "delta": 1563.5799949999996, "type": "\u6d41\u52a8\u8d1f\u503a"}, "46": {"items": "\u6301\u6709\u5f85\u552e\u8d1f\u503a", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u6d41\u52a8\u8d1f\u503a"}, "47": {"items": "\u4e00\u5e74\u5185\u5230\u671f\u7684\u975e\u6d41\u52a8\u8d1f\u503a", "year3": 0, "year2": 2100, "year1": 0, "month": 0, "averg": 525.0, "sum": 2100, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u6d41\u52a8\u8d1f\u503a"}, "48": {"items": "\u5176\u4ed6\u6d41\u52a8\u8d1f\u503a", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u6d41\u52a8\u8d1f\u503a"}, "49": {"items": "\u6d41\u52a8\u8d1f\u503a\u5408\u8ba1", "year3": 1614.725657, "year2": 8341.085563, "year1": 6348.737651, "month": 16237.79101, "averg": 8135.58497025, "sum": 32542.339881, "ratio": 1.557640889042306, "delta": 9889.053359000001}, "50": {"items": "\u957f\u671f\u501f\u6b3e", "year3": 6375, "year2": 2500, "year1": 3350, "month": 2500, "averg": 3681.25, "sum": 14725, "ratio": -0.2537313432835821, "delta": -850, "type": "\u975e\u6d41\u52a8\u8d1f\u503a"}, "51": {"items": "\u5e94\u4ed8\u503a\u5238", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u975e\u6d41\u52a8\u8d1f\u503a"}, "52": {"items": "\u79df\u8d41\u8d1f\u503a", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u975e\u6d41\u52a8\u8d1f\u503a"}, "53": {"items": "\u957f\u671f\u5e94\u4ed8\u6b3e", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u975e\u6d41\u52a8\u8d1f\u503a"}, "54": {"items": "\u9884\u8ba1\u8d1f\u503a", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u975e\u6d41\u52a8\u8d1f\u503a"}, "55": {"items": "\u9012\u5ef6\u6536\u76ca", "year3": 608.66667, "year2": 1139.250007, "year1": 1926.990007, "month": 1781.730007, "averg": 1364.1591727500002, "sum": 5456.636691000001, "ratio": -0.07538181281289863, "delta": -145.26000000000022, "type": "\u975e\u6d41\u52a8\u8d1f\u503a"}, "56": {"items": "\u9012\u5ef6\u6240\u5f97\u7a0e\u8d1f\u503a", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u975e\u6d41\u52a8\u8d1f\u503a"}, "57": {"items": "\u5176\u4ed6\u975e\u6d41\u52a8\u8d1f\u503a", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u975e\u6d41\u52a8\u8d1f\u503a"}, "58": {"items": "\u975e\u6d41\u52a8\u8d1f\u503a\u5408\u8ba1", "year3": 6983.66667, "year2": 3639.250007, "year1": 5276.990007, "month": 4281.730007, "averg": 5045.40917275, "sum": 20181.636691, "ratio": -0.1886037302855935, "delta": -995.2600000000002}, "59": {"items": "\u8d1f\u503a\u5408\u8ba1", "year3": 8598.392327, "year2": 11980.33557, "year1": 11625.727658, "month": 20519.521017, "averg": 13180.994143, "sum": 52723.976572, "ratio": 0.7650096080549352, "delta": 8893.793359}, "60": {"items": "\u5b9e\u6536\u8d44\u672c", "year3": 7500, "year2": 7500, "year1": 7500, "month": 6000, "averg": 7125.0, "sum": 28500, "ratio": -0.2, "delta": -1500, "type": "\u6743\u76ca"}, "61": {"items": "\u5176\u4ed6\u6743\u76ca\u5de5\u5177", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u6743\u76ca"}, "62": {"items": "\u8d44\u672c\u516c\u79ef", "year3": 1500, "year2": 1500, "year1": 1500, "month": 0, "averg": 1125.0, "sum": 4500, "ratio": -1.0, "delta": -1500, "type": "\u6743\u76ca"}, "63": {"items": "\u5176\u4ed6\u7efc\u5408\u6536\u76ca", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u6743\u76ca"}, "64": {"items": "\u4e13\u9879\u50a8\u5907", "year3": 0, "year2": 0, "year1": 0, "month": 32.29068, "averg": 8.07267, "sum": 32.29068, "ratio": "\u51c0\u65b0\u589e", "delta": 32.29068, "type": "\u6743\u76ca"}, "65": {"items": "\u76c8\u4f59\u516c\u79ef", "year3": 99.539425, "year2": 189.540475, "year1": 240.229016, "month": 344.436519, "averg": 218.43635874999998, "sum": 873.7454349999999, "ratio": 0.4337839980162928, "delta": 104.20750299999997, "type": "\u6743\u76ca"}, "66": {"items": "\u672a\u5206\u914d\u5229\u6da6", "year3": 825.854832, "year2": 1635.864283, "year1": 2024.245312, "month": 2962.112843, "averg": 1862.0193175, "sum": 7448.07727, "ratio": 0.46331713129836305, "delta": 937.8675309999999, "type": "\u6743\u76ca"}, "67": {"items": "\u6240\u6709\u8005\u6743\u76ca\u5408\u8ba1", "year3": 9925.394257, "year2": 10825.404758, "year1": 11264.474328, "month": 9338.840042, "averg": 10338.528346250001, "sum": 41354.113385000004, "ratio": -0.17094754978609777, "delta": -1925.6342860000004}, "68": {"items": "\u8425\u4e1a\u6536\u5165", "year3": 8538.764683, "year2": 18367.588221, "year1": 9870.207112, "month": 10572.493315, "averg": 11837.26333275, "sum": 47349.053331, "ratio": 0.07115212426962897, "delta": 702.2862029999997, "type": "\u5229\u6da6\u8868"}, "69": {"items": "\u8425\u4e1a\u6210\u672c", "year3": 6405.835435, "year2": 14079.187242, "year1": 7522.109522, "month": 7593.081193, "averg": 8900.053348, "sum": 35600.213392, "ratio": 0.009435075465523147, "delta": 70.97167100000024, "type": "\u5229\u6da6\u8868"}, "70": {"items": "\u7a0e\u91d1\u53ca\u9644\u52a0", "year3": 72.526882, "year2": 86.855571, "year1": 59.399621, "month": 43.114888, "averg": 65.4742405, "sum": 261.896962, "ratio": -0.2741555034500978, "delta": -16.284733000000003, "type": "\u5229\u6da6\u8868"}, "71": {"items": "\u9500\u552e\u8d39\u7528", "year3": 174.354225, "year2": 423.934872, "year1": 52.694812, "month": 190.129292, "averg": 210.27830024999997, "sum": 841.1132009999999, "ratio": 2.608121649622737, "delta": 137.43448, "type": "\u5229\u6da6\u8868"}, "72": {"items": "\u7ba1\u7406\u8d39\u7528", "year3": 311.095766, "year2": 271.785355, "year1": 397.637051, "month": 388.06617, "averg": 342.1460855, "sum": 1368.584342, "ratio": -0.024069389348730447, "delta": -9.570880999999986, "type": "\u5229\u6da6\u8868"}, "73": {"items": "\u7814\u53d1\u8d39\u7528", "year3": 621.617397, "year2": 1136.298858, "year1": 1016.677712, "month": 371.111628, "averg": 786.4263987500001, "sum": 3145.7055950000004, "ratio": -0.6349761348953423, "delta": -645.566084, "type": "\u5229\u6da6\u8868"}, "74": {"items": "\u8d22\u52a1\u8d39\u7528", "year3": 424.679109, "year2": 484.575537, "year1": 351.729128, "month": 453.802689, "averg": 428.69661575, "sum": 1714.786463, "ratio": 0.2902050267500165, "delta": 102.07356099999998, "type": "\u5229\u6da6\u8868"}, "75": {"items": "\u5176\u4ed6\u6536\u76ca", "year3": 70.33333, "year2": 78.842512, "year1": 145.26, "month": 145.26, "averg": 109.92396049999999, "sum": 439.69584199999997, "ratio": 0.0, "delta": 0.0}, "76": {"items": "\u6295\u8d44\u6536\u76ca", "year3": 16.795434, "year2": 0, "year1": 0, "month": 0, "averg": 4.1988585, "sum": 16.795434, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u5229\u6da6\u8868"}, "77": {"items": "\u51c0\u655e\u53e3\u5957\u671f\u6536\u76ca", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u5229\u6da6\u8868"}, "78": {"items": "\u516c\u5141\u4ef7\u503c\u53d8\u52a8\u6536\u76ca", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u5229\u6da6\u8868"}, "79": {"items": "\u4fe1\u7528\u51cf\u503c\u635f\u5931", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u5229\u6da6\u8868"}, "80": {"items": "\u8d44\u4ea7\u51cf\u503c\u635f\u5931", "year3": 0, "year2": 0, "year1": 242.626643, "month": 461.585274, "averg": 176.05297925000002, "sum": 704.2119170000001, "ratio": 0.902450894479878, "delta": 218.95863100000003, "type": "\u5229\u6da6\u8868"}, "81": {"items": "\u8d44\u4ea7\u5904\u7f6e\u6536\u76ca", "year3": 0, "year2": 0, "year1": 0, "month": 0, "averg": 0.0, "sum": 0, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u5229\u6da6\u8868"}, "82": {"items": "\u8425\u4e1a\u5229\u6da6", "year3": 615.784633, "year2": 1963.793298, "year1": 372.592623, "month": 1216.862181, "averg": 1042.25818375, "sum": 4169.032735, "ratio": 2.265932028396601, "delta": 844.269558, "type": "\u5229\u6da6\u8868"}, "83": {"items": "\u8425\u4e1a\u5916\u6536\u5165", "year3": 1.7348, "year2": 6.185, "year1": 48.552035, "month": 57.992223, "averg": 28.6160145, "sum": 114.464058, "ratio": 0.1944344454357064, "delta": 9.440188000000006, "type": "\u5229\u6da6\u8868"}, "84": {"items": "\u8425\u4e1a\u5916\u652f\u51fa", "year3": 5, "year2": 1005.59229, "year1": 29.091297, "month": 0.070032, "averg": 259.93840475, "sum": 1039.753619, "ratio": -0.9975926821000796, "delta": -29.021265, "type": "\u5229\u6da6\u8868"}, "85": {"items": "\u5229\u6da6\u603b\u989d", "year3": 612.519433, "year2": 964.386008000003, "year1": 392.053361, "month": 1274.784372, "averg": 810.9357935000007, "sum": 3243.743174000003, "ratio": 2.251558330601839, "delta": 882.7310110000001, "type": "\u5229\u6da6\u8868"}, "86": {"items": "\u6240\u5f97\u7a0e\u8d39\u7528", "year3": 53.060083, "year2": 42.335537, "year1": 58.808004, "month": 0, "averg": 38.550906, "sum": 154.203624, "ratio": -1.0, "delta": -58.808004, "type": "\u5229\u6da6\u8868"}, "87": {"items": "\u51c0\u5229\u6da6", "year3": 559.45935, "year2": 922.050471000003, "year1": 333.245357, "month": 1274.784372, "averg": 772.3848875000008, "sum": 3089.539550000003, "ratio": 2.8253627401626487, "delta": 941.5390150000001, "type": "\u5229\u6da6\u8868"}, "88": {"items": "\u7ecf\u8425\u6d3b\u52a8\u73b0\u91d1\u6d41\u5165", "year3": 6204.542458, "year2": 18915.584941, "year1": 11401.434267, "month": 17125.243317, "averg": 13411.70124575, "sum": 53646.804983, "ratio": 0.5020253518951415, "delta": 5723.80905, "type": "\u73b0\u91d1\u6d41\u91cf"}, "89": {"items": "\u9500\u552e\u5e26\u6765\u7684\u73b0\u91d1\u6d41\u5165", "year3": 3489.340723, "year2": 8899.456011, "year1": 4658.072268, "month": 17009.999387, "averg": 8514.217097249999, "sum": 34056.868388999996, "ratio": 2.6517250932011516, "delta": 12351.927119, "type": "\u73b0\u91d1\u6d41\u91cf"}, "90": {"items": "\u7ecf\u8425\u6d3b\u52a8\u73b0\u91d1\u6d41\u51fa", "year3": 7453.949626, "year2": 16668.716231, "year1": 10362.226368, "month": 16000.765616, "averg": 12621.414460250002, "sum": 50485.65784100001, "ratio": 0.5441436085021841, "delta": 5638.539248000001, "type": "\u73b0\u91d1\u6d41\u91cf"}, "91": {"items": "\u7ecf\u8425\u6d3b\u52a8\u73b0\u91d1\u51c0\u6d41\u5165", "year3": -1249.407168, "year2": 2246.86871, "year1": 1039.207899, "month": 1124.477701, "averg": 790.2867855000001, "sum": 3161.1471420000003, "ratio": 0.0820526884774959, "delta": 85.26980200000003}, "92": {"items": "\u6295\u8d44\u6d3b\u52a8\u73b0\u91d1\u6d41\u5165", "year3": 7116.795434, "year2": 0, "year1": 0, "month": 0, "averg": 1779.1988585, "sum": 7116.795434, "ratio": "\u51c0\u65b0\u589e", "delta": 0, "type": "\u73b0\u91d1\u6d41\u91cf"}, "93": {"items": "\u6295\u8d44\u6d3b\u52a8\u73b0\u91d1\u6d41\u51fa", "year3": 7181.330421, "year2": 767.084209, "year1": 81.124895, "month": 2433.993015, "averg": 2615.883135, "sum": 10463.53254, "ratio": 29.00303439529876, "delta": 2352.86812, "type": "\u73b0\u91d1\u6d41\u91cf"}, "94": {"items": "\u6295\u8d44\u6d3b\u52a8\u73b0\u91d1\u51c0\u6d41\u5165", "year3": -64.534986999999, "year2": -767.084209, "year1": -81.124895, "month": -2433.993015, "averg": -836.6842764999998, "sum": -3346.737105999999, "ratio": 29.00303439529876, "delta": -2352.86812}, "95": {"items": "\u7b79\u8d44\u6d3b\u52a8\u73b0\u91d1\u6d41\u5165", "year3": 7200, "year2": 499.8, "year1": 2500, "month": 3000, "averg": 3299.95, "sum": 13199.8, "ratio": 0.2, "delta": 500, "type": "\u73b0\u91d1\u6d41\u91cf"}, "96": {"items": "\u7b79\u8d44\u6d3b\u52a8\u73b0\u91d1\u6d41\u51fa", "year3": 5300.870517, "year2": 3192.520079, "year1": 4116.067011, "month": 1211.679059, "averg": 3455.2841665, "sum": 13821.136666, "ratio": -0.7056221252565025, "delta": -2904.387952, "type": "\u73b0\u91d1\u6d41\u91cf"}, "97": {"items": "\u7b79\u8d44\u6d3b\u52a8\u73b0\u91d1\u51c0\u6d41\u5165", "year3": 1899.129483, "year2": -2692.720079, "year1": -1616.067011, "month": 1788.320941, "averg": -155.33416650000004, "sum": -621.3366660000002, "ratio": -2.1065883585442484, "delta": 3404.387952, "type": "\u73b0\u91d1\u6d41\u91cf"}, "98": {"items": "\u73b0\u91d1\u51c0\u6d41\u5165", "year3": 585.187328, "year2": -1212.935578, "year1": -657.984007, "month": 478.805626999999, "averg": -201.73165750000027, "sum": -806.9266300000011, "ratio": -1.727685812886329, "delta": 1136.789633999999, "type": "\u73b0\u91d1\u6d41\u91cf"}, "99": {"items": "\u8d44\u4ea7\u8d1f\u503a\u7387", "year3": 0.4641811374801142, "year2": 0.5253210550367887, "year1": 0.5078910035442445, "month": 0.6872286451508008, "averg": 0.5461554603029871, "sum": 2.1846218412119485, "ratio": 0.35310261523648634, "delta": 0.1793376416065563, "type": "\u8d22\u52a1\u6307\u6807"}, "100": {"items": "\u6d41\u52a8\u6bd4\u7387", "year3": 5.0851552753892975, "year2": 1.0924956356307312, "year1": 1.2579365793674058, "month": 0.8628629529947374, "averg": 2.074612610845543, "sum": 8.298450443382173, "ratio": -0.3140648207967241, "delta": -0.3950736263726684, "type": "\u8d22\u52a1\u6307\u6807"}, "101": {"items": "\u901f\u52a8\u6bd4\u7387", "year3": 3.6511034171298857, "year2": 0.8395544273114177, "year1": 0.7525786223419425, "month": 0.38954573926370534, "averg": 1.4081955515117377, "sum": 5.632782206046951, "ratio": -0.48238532467015666, "delta": -0.36303288307823717, "type": "\u8d22\u52a1\u6307\u6807"}, "102": {"items": "EBIT", "year3": 1037.198542, "year2": 1448.961545000003, "year1": 743.7824889999999, "month": 1728.5870610000002, "averg": 1239.6324092500008, "sum": 4958.529637000003, "ratio": 1.3240491495357056, "delta": 984.8045720000002, "type": "\u8d22\u52a1\u6307\u6807"}, "103": {"items": "\u5229\u606f\u4fdd\u969c\u500d\u6570", "year3": 2.4423111945447737, "year2": 2.9901665155663917, "year1": 2.1146457025873615, "month": 3.8091159503905017, "averg": 2.839059840772257, "sum": 11.356239363089028, "ratio": 0.8013021972096231, "delta": 1.6944702478031402, "type": "\u8d22\u52a1\u6307\u6807"}, "104": {"items": "\u8425\u8fd0\u8d44\u4ea7", "year3": 457.884865, "year2": 669.229067, "year1": 834.3436790000001, "month": 2104.073236, "averg": 1016.38271175, "sum": 4065.530847, "ratio": 1.5218303787257432, "delta": 1269.729557, "type": "\u8d22\u52a1\u6307\u6807"}, "105": {"items": "\u8425\u8fd0\u8d1f\u503a", "year3": 1530.3706740000002, "year2": 3776.169884, "year1": 4122.406263999999, "month": 9447.879628, "averg": 4719.2066125, "sum": 18876.82645, "ratio": 1.2918361323351615, "delta": 5325.473364000001, "type": "\u8d22\u52a1\u6307\u6807"}, "106": {"items": "\u8425\u8fd0\u8d44\u91d1\u9700\u6c42", "year3": -1072.4858090000002, "year2": -3106.9408169999997, "year1": -3288.062584999999, "month": -7343.806392, "averg": -3702.82390075, "sum": -14811.295603, "ratio": 1.2334752463356784, "delta": -4055.743807000001, "type": "\u8d22\u52a1\u6307\u6807"}, "107": {"items": "\u8425\u8fd0\u8d44\u672c", "year3": 6596.405035999999, "year2": 771.5140109999993, "year1": 1637.5716729999995, "month": -2226.8027090000014, "averg": 1694.6720027499991, "sum": 6778.688010999997, "ratio": -2.3598199979366656, "delta": -3864.374382000001, "type": "\u8d22\u52a1\u6307\u6807"}, "108": {"items": "\u5b58\u8d27\u5468\u8f6c\u5929\u6570", "year3": 130.1338641772336, "year2": 53.946972996724355, "year1": 153.54982916187325, "month": 364.38769571313344, "averg": 175.50459051224115, "sum": 702.0183620489646, "ratio": 1.3730908572291116, "delta": 210.8378665512602, "type": "\u8d22\u52a1\u6307\u6807"}, "109": {"items": "\u5e94\u6536\u8d26\u6b3e\u5468\u8f6c\u5929\u6570", "year3": 0.0, "year2": 78.29317781829643, "year1": 117.9328643858755, "month": 126.26300851342748, "averg": 80.62226267939985, "sum": 322.4890507175994, "ratio": 0.07063462904026313, "delta": 8.330144127551975, "type": "\u8d22\u52a1\u6307\u6807"}, "110": {"items": "\u6bdb\u5229\u7387", "year3": 0.07211636060494536, "year2": 0.10691623061076462, "year1": 0.03774922033267259, "month": 0.11509699223678346, "averg": 0.0829697009462915, "sum": 0.331878803785166, "ratio": 2.048989918797477, "delta": 0.07734777190411088, "type": "\u8d22\u52a1\u6307\u6807"}, "111": {"items": "\u51c0\u5229\u6da6\u7387", "year3": 0.06551994003463275, "year2": 0.050199866193962564, "year1": 0.03376275221163769, "month": 0.12057556661600027, "averg": 0.06751453126405832, "sum": 0.2700581250562333, "ratio": 2.5712600045217604, "delta": 0.08681281440436259, "type": "\u8d22\u52a1\u6307\u6807"}, "112": {"items": "\u603b\u8d44\u4ea7\u6536\u76ca\u7387(ROA)", "year3": 0.03020221310923736, "year2": 0.04043063096127361, "year1": 0.014558427977342359, "month": 0.04269438531743358, "averg": 0.031971414341321724, "sum": 0.1278856573652869, "ratio": 1.9326233150914307, "delta": 0.028135957340091222, "type": "\u8d22\u52a1\u6307\u6807"}, "113": {"items": "\u51c0\u8d44\u4ea7\u6536\u76ca\u7387(ROE)", "year3": 0.056366461171598777, "year2": 0.08517468783960298, "year1": 0.02958374685729054, "month": 0.1365035021765929, "averg": 0.07690709951127131, "sum": 0.30762839804508524, "ratio": 3.614138392782838, "delta": 0.10691975531930237, "type": "\u8d22\u52a1\u6307\u6807"}, "114": {"items": "\u77ed\u503a\u5360\u6bd4", "year3": 0.18779390327765863, "year2": 0.696231379685803, "year1": 0.5460937876547667, "month": 0.7913338228776065, "averg": 0.5553632233739587, "sum": 2.221452893495835, "ratio": 0.449080434106453, "delta": 0.24524003522283977}, "115": {"items": "\u521a\u6027\u8d1f\u503a", "year3": 6375, "year2": 4600, "year1": 3350, "month": 5500, "averg": 4956.25, "sum": 19825, "ratio": 0.6417910447761194, "delta": 2150}, "116": {"items": "\u521a\u5151\u5360\u6bd4", "year3": 0.7414176694382417, "year2": 0.3839625336972093, "year1": 0.28815400623072124, "month": 0.268037445681279, "averg": 0.42039291376186283, "sum": 1.6815716550474513, "ratio": -0.06981183712342748, "delta": -0.02011656054944222}, "117": {"items": "\u77ed\u671f\u521a\u5151", "year3": 0, "year2": 2100, "year1": 0, "month": 3000, "averg": 1275.0, "sum": 5100, "ratio": "\u51c0\u65b0\u589e", "delta": 3000}, "118": {"items": "\u671f\u95f4\u8d39\u7528", "year3": 1531.746497, "year2": 2316.594622, "year1": 1818.738703, "month": 1403.109779, "averg": 1767.54740025, "sum": 7070.189601, "ratio": -0.22852591376343526, "delta": -415.6289240000001}, "119": {"items": "\u8d39\u7528\u6536\u5165\u6bd4", "year3": 0.17938736501892194, "year2": 0.12612405037213295, "year1": 0.18426550551191717, "month": 0.13271323397379703, "averg": 0.15562253871919227, "sum": 0.6224901548767691, "ratio": -0.27977168811330266, "delta": -0.05155227153812014}, "120": {"items": "\u6d41\u52a8\u8d44\u4ea7\u5360\u6bd4", "year3": 0.4432749565411425, "year2": 0.3995748194506935, "year1": 0.34889641117560033, "month": 0.4692484049380455, "averg": 0.41524864802637046, "sum": 1.6609945921054818, "ratio": 0.34495050653264453, "delta": 0.12035199376244515}}, "for_print": {"1": {"items": "\u9879\u76ee", "year3": "\u524d3\u5e74", "year2": "\u524d2\u5e74", "year1": "\u524d1\u5e74", "month": "\u5f53\u671f"}, "2": {"items": "\u8d27\u5e01\u8d44\u91d1", "year3": 1905.306261, "year2": 692.370683, "year1": 34.386676, "month": 513.192363}, "6": {"items": "\u5e94\u6536\u8d26\u6b3e", "year3": 0, "year2": 3994.602363, "year1": 3233.39388, "month": 3708.096704}, "8": {"items": "\u9884\u4ed8\u8d26\u6b3e", "year3": 398.485836, "year2": 440.174981, "year1": 280.871295, "month": 1746.124304}, "9": {"items": "\u5176\u4ed6\u5e94\u6536\u6b3e", "year3": 59.399029, "year2": 229.054086, "year1": 553.472384, "month": 357.948932}, "10": {"items": "\u5b58\u8d27", "year3": 2315.600329, "year2": 2109.804261, "year1": 3208.385089, "month": 7685.625998}, "15": {"items": "\u6d41\u52a8\u8d44\u4ea7\u5408\u8ba1", "year3": 8211.130693, "year2": 9112.599574, "year1": 7986.309324, "month": 14010.988301}, "23": {"items": "\u56fa\u5b9a\u8d44\u4ea7", "year3": 5052.756509, "year2": 4602.739732, "year1": 11922.901795, "month": 12269.773097}, "24": {"items": "\u5728\u5efa\u5de5\u7a0b", "year3": 2027.825395, "year2": 5996.073625, "year1": 9.303755, "month": 608.440889}, "28": {"items": "\u65e0\u5f62\u8d44\u4ea7", "year3": 3232.073987, "year2": 3094.327397, "year1": 2971.687112, "month": 2849.265296}, "32": {"items": "\u9012\u5ef6\u6240\u5f97\u7a0e\u8d44\u4ea7", "year3": 0, "year2": 0, "year1": 0, "month": 119.893476}, "34": {"items": "\u975e\u6d41\u52a8\u8d44\u4ea7\u5408\u8ba1", "year3": 10312.655891, "year2": 13693.140754, "year1": 14903.892662, "month": 15847.372758}, "35": {"items": "\u8d44\u4ea7\u603b\u8ba1", "year3": 18523.786584, "year2": 22805.740328, "year1": 22890.201986, "month": 29858.361059}, "36": {"items": "\u77ed\u671f\u501f\u6b3e", "year3": 0, "year2": 0, "year1": 0, "month": 3000}, "40": {"items": "\u5e94\u4ed8\u8d26\u6b3e", "year3": 1220.965529, "year2": 2098.730311, "year1": 1418.553882, "month": 2347.611576}, "41": {"items": "\u9884\u6536\u8d26\u6b3e", "year3": 51.58147, "year2": 1093.922604, "year1": 2234.642292, "month": 6616.524756}, "43": {"items": "\u5e94\u4ed8\u804c\u5de5\u85aa\u916c", "year3": 94.799994, "year2": 280.630193, "year1": 232.827075, "month": 291.309686}, "44": {"items": "\u5e94\u4ea4\u7a0e\u8d39", "year3": 163.023681, "year2": 302.886776, "year1": 236.383015, "month": 192.43361}, "45": {"items": "\u5176\u4ed6\u5e94\u4ed8\u6b3e", "year3": 84.354983, "year2": 1954.915679, "year1": 2226.331387, "month": 3789.911382}, "49": {"items": "\u6d41\u52a8\u8d1f\u503a\u5408\u8ba1", "year3": 1614.725657, "year2": 8341.085563, "year1": 6348.737651, "month": 16237.79101}, "50": {"items": "\u957f\u671f\u501f\u6b3e", "year3": 6375, "year2": 2500, "year1": 3350, "month": 2500}, "55": {"items": "\u9012\u5ef6\u6536\u76ca", "year3": 608.66667, "year2": 1139.250007, "year1": 1926.990007, "month": 1781.730007}, "58": {"items": "\u975e\u6d41\u52a8\u8d1f\u503a\u5408\u8ba1", "year3": 6983.66667, "year2": 3639.250007, "year1": 5276.990007, "month": 4281.730007}, "59": {"items": "\u8d1f\u503a\u5408\u8ba1", "year3": 8598.392327, "year2": 11980.33557, "year1": 11625.727658, "month": 20519.521017}, "60": {"items": "\u5b9e\u6536\u8d44\u672c", "year3": 7500, "year2": 7500, "year1": 7500, "month": 6000}, "64": {"items": "\u4e13\u9879\u50a8\u5907", "year3": 0, "year2": 0, "year1": 0, "month": 32.29068}, "65": {"items": "\u76c8\u4f59\u516c\u79ef", "year3": 99.539425, "year2": 189.540475, "year1": 240.229016, "month": 344.436519}, "66": {"items": "\u672a\u5206\u914d\u5229\u6da6", "year3": 825.854832, "year2": 1635.864283, "year1": 2024.245312, "month": 2962.112843}, "67": {"items": "\u6240\u6709\u8005\u6743\u76ca\u5408\u8ba1", "year3": 9925.394257, "year2": 10825.404758, "year1": 11264.474328, "month": 9338.840042}, "68": {"items": "\u8425\u4e1a\u6536\u5165", "year3": 8538.764683, "year2": 18367.588221, "year1": 9870.207112, "month": 10572.493315}, "69": {"items": "\u8425\u4e1a\u6210\u672c", "year3": 6405.835435, "year2": 14079.187242, "year1": 7522.109522, "month": 7593.081193}, "70": {"items": "\u7a0e\u91d1\u53ca\u9644\u52a0", "year3": 72.526882, "year2": 86.855571, "year1": 59.399621, "month": 43.114888}, "71": {"items": "\u9500\u552e\u8d39\u7528", "year3": 174.354225, "year2": 423.934872, "year1": 52.694812, "month": 190.129292}, "72": {"items": "\u7ba1\u7406\u8d39\u7528", "year3": 311.095766, "year2": 271.785355, "year1": 397.637051, "month": 388.06617}, "73": {"items": "\u7814\u53d1\u8d39\u7528", "year3": 621.617397, "year2": 1136.298858, "year1": 1016.677712, "month": 371.111628}, "74": {"items": "\u8d22\u52a1\u8d39\u7528", "year3": 424.679109, "year2": 484.575537, "year1": 351.729128, "month": 453.802689}, "75": {"items": "\u5176\u4ed6\u6536\u76ca", "year3": 70.33333, "year2": 78.842512, "year1": 145.26, "month": 145.26}, "80": {"items": "\u8d44\u4ea7\u51cf\u503c\u635f\u5931", "year3": 0, "year2": 0, "year1": 242.626643, "month": 461.585274}, "82": {"items": "\u8425\u4e1a\u5229\u6da6", "year3": 615.784633, "year2": 1963.793298, "year1": 372.592623, "month": 1216.862181}, "83": {"items": "\u8425\u4e1a\u5916\u6536\u5165", "year3": 1.7348, "year2": 6.185, "year1": 48.552035, "month": 57.992223}, "84": {"items": "\u8425\u4e1a\u5916\u652f\u51fa", "year3": 5, "year2": 1005.59229, "year1": 29.091297, "month": 0.070032}, "85": {"items": "\u5229\u6da6\u603b\u989d", "year3": 612.519433, "year2": 964.386008000003, "year1": 392.053361, "month": 1274.784372}, "87": {"items": "\u51c0\u5229\u6da6", "year3": 559.45935, "year2": 922.050471000003, "year1": 333.245357, "month": 1274.784372}, "88": {"items": "\u7ecf\u8425\u6d3b\u52a8\u73b0\u91d1\u6d41\u5165", "year3": 6204.542458, "year2": 18915.584941, "year1": 11401.434267, "month": 17125.243317}, "89": {"items": "\u9500\u552e\u5e26\u6765\u7684\u73b0\u91d1\u6d41\u5165", "year3": 3489.340723, "year2": 8899.456011, "year1": 4658.072268, "month": 17009.999387}, "90": {"items": "\u7ecf\u8425\u6d3b\u52a8\u73b0\u91d1\u6d41\u51fa", "year3": 7453.949626, "year2": 16668.716231, "year1": 10362.226368, "month": 16000.765616}, "91": {"items": "\u7ecf\u8425\u6d3b\u52a8\u73b0\u91d1\u51c0\u6d41\u5165", "year3": -1249.407168, "year2": 2246.86871, "year1": 1039.207899, "month": 1124.477701}, "93": {"items": "\u6295\u8d44\u6d3b\u52a8\u73b0\u91d1\u6d41\u51fa", "year3": 7181.330421, "year2": 767.084209, "year1": 81.124895, "month": 2433.993015}, "94": {"items": "\u6295\u8d44\u6d3b\u52a8\u73b0\u91d1\u51c0\u6d41\u5165", "year3": -64.534986999999, "year2": -767.084209, "year1": -81.124895, "month": -2433.993015}, "95": {"items": "\u7b79\u8d44\u6d3b\u52a8\u73b0\u91d1\u6d41\u5165", "year3": 7200, "year2": 499.8, "year1": 2500, "month": 3000}, "96": {"items": "\u7b79\u8d44\u6d3b\u52a8\u73b0\u91d1\u6d41\u51fa", "year3": 5300.870517, "year2": 3192.520079, "year1": 4116.067011, "month": 1211.679059}, "97": {"items": "\u7b79\u8d44\u6d3b\u52a8\u73b0\u91d1\u51c0\u6d41\u5165", "year3": 1899.129483, "year2": -2692.720079, "year1": -1616.067011, "month": 1788.320941}, "98": {"items": "\u73b0\u91d1\u51c0\u6d41\u5165", "year3": 585.187328, "year2": -1212.935578, "year1": -657.984007, "month": 478.805626999999}, "99": {"items": "\u8d44\u4ea7\u8d1f\u503a\u7387", "year3": 0.4641811374801142, "year2": 0.5253210550367887, "year1": 0.5078910035442445, "month": 0.6872286451508008}, "100": {"items": "\u6d41\u52a8\u6bd4\u7387", "year3": 5.0851552753892975, "year2": 1.0924956356307312, "year1": 1.2579365793674058, "month": 0.8628629529947374}, "101": {"items": "\u901f\u52a8\u6bd4\u7387", "year3": 3.6511034171298857, "year2": 0.8395544273114177, "year1": 0.7525786223419425, "month": 0.38954573926370534}, "102": {"items": "EBIT", "year3": 1037.198542, "year2": 1448.961545000003, "year1": 743.7824889999999, "month": 1728.5870610000002}, "103": {"items": "\u5229\u606f\u4fdd\u969c\u500d\u6570", "year3": 2.4423111945447737, "year2": 2.9901665155663917, "year1": 2.1146457025873615, "month": 3.8091159503905017}, "104": {"items": "\u8425\u8fd0\u8d44\u4ea7", "year3": 457.884865, "year2": 669.229067, "year1": 834.3436790000001, "month": 2104.073236}, "105": {"items": "\u8425\u8fd0\u8d1f\u503a", "year3": 1530.3706740000002, "year2": 3776.169884, "year1": 4122.406263999999, "month": 9447.879628}, "106": {"items": "\u8425\u8fd0\u8d44\u91d1\u9700\u6c42", "year3": -1072.4858090000002, "year2": -3106.9408169999997, "year1": -3288.062584999999, "month": -7343.806392}, "107": {"items": "\u8425\u8fd0\u8d44\u672c", "year3": 6596.405035999999, "year2": 771.5140109999993, "year1": 1637.5716729999995, "month": -2226.8027090000014}, "108": {"items": "\u5b58\u8d27\u5468\u8f6c\u5929\u6570", "year3": 130.1338641772336, "year2": 53.946972996724355, "year1": 153.54982916187325, "month": 364.38769571313344}, "109": {"items": "\u5e94\u6536\u8d26\u6b3e\u5468\u8f6c\u5929\u6570", "year3": 0.0, "year2": 78.29317781829643, "year1": 117.9328643858755, "month": 126.26300851342748}, "110": {"items": "\u6bdb\u5229\u7387", "year3": 0.07211636060494536, "year2": 0.10691623061076462, "year1": 0.03774922033267259, "month": 0.11509699223678346}, "111": {"items": "\u51c0\u5229\u6da6\u7387", "year3": 0.06551994003463275, "year2": 0.050199866193962564, "year1": 0.03376275221163769, "month": 0.12057556661600027}, "112": {"items": "\u603b\u8d44\u4ea7\u6536\u76ca\u7387(ROA)", "year3": 0.03020221310923736, "year2": 0.04043063096127361, "year1": 0.014558427977342359, "month": 0.04269438531743358}, "113": {"items": "\u51c0\u8d44\u4ea7\u6536\u76ca\u7387(ROE)", "year3": 0.056366461171598777, "year2": 0.08517468783960298, "year1": 0.02958374685729054, "month": 0.1365035021765929}, "114": {"items": "\u77ed\u503a\u5360\u6bd4", "year3": 0.18779390327765863, "year2": 0.696231379685803, "year1": 0.5460937876547667, "month": 0.7913338228776065}, "115": {"items": "\u521a\u6027\u8d1f\u503a", "year3": 6375, "year2": 4600, "year1": 3350, "month": 5500}, "116": {"items": "\u521a\u5151\u5360\u6bd4", "year3": 0.7414176694382417, "year2": 0.3839625336972093, "year1": 0.28815400623072124, "month": 0.268037445681279}, "117": {"items": "\u77ed\u671f\u521a\u5151", "year3": 0, "year2": 2100, "year1": 0, "month": 3000}, "118": {"items": "\u671f\u95f4\u8d39\u7528", "year3": 1531.746497, "year2": 2316.594622, "year1": 1818.738703, "month": 1403.109779}, "119": {"items": "\u8d39\u7528\u6536\u5165\u6bd4", "year3": 0.17938736501892194, "year2": 0.12612405037213295, "year1": 0.18426550551191717, "month": 0.13271323397379703}, "120": {"items": "\u6d41\u52a8\u8d44\u4ea7\u5360\u6bd4", "year3": 0.4432749565411425, "year2": 0.3995748194506935, "year1": 0.34889641117560033, "month": 0.4692484049380455}}}
--------------------------------------------------------------------------------