deepfos 1.1.60__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. deepfos/__init__.py +6 -0
  2. deepfos/_version.py +21 -0
  3. deepfos/algo/__init__.py +0 -0
  4. deepfos/algo/graph.py +171 -0
  5. deepfos/algo/segtree.py +31 -0
  6. deepfos/api/V1_1/__init__.py +0 -0
  7. deepfos/api/V1_1/business_model.py +119 -0
  8. deepfos/api/V1_1/dimension.py +599 -0
  9. deepfos/api/V1_1/models/__init__.py +0 -0
  10. deepfos/api/V1_1/models/business_model.py +1033 -0
  11. deepfos/api/V1_1/models/dimension.py +2768 -0
  12. deepfos/api/V1_2/__init__.py +0 -0
  13. deepfos/api/V1_2/dimension.py +285 -0
  14. deepfos/api/V1_2/models/__init__.py +0 -0
  15. deepfos/api/V1_2/models/dimension.py +2923 -0
  16. deepfos/api/__init__.py +0 -0
  17. deepfos/api/account.py +167 -0
  18. deepfos/api/accounting_engines.py +147 -0
  19. deepfos/api/app.py +626 -0
  20. deepfos/api/approval_process.py +198 -0
  21. deepfos/api/base.py +983 -0
  22. deepfos/api/business_model.py +160 -0
  23. deepfos/api/consolidation.py +129 -0
  24. deepfos/api/consolidation_process.py +106 -0
  25. deepfos/api/datatable.py +341 -0
  26. deepfos/api/deep_pipeline.py +61 -0
  27. deepfos/api/deepconnector.py +36 -0
  28. deepfos/api/deepfos_task.py +92 -0
  29. deepfos/api/deepmodel.py +188 -0
  30. deepfos/api/dimension.py +486 -0
  31. deepfos/api/financial_model.py +319 -0
  32. deepfos/api/journal_model.py +119 -0
  33. deepfos/api/journal_template.py +132 -0
  34. deepfos/api/memory_financial_model.py +98 -0
  35. deepfos/api/models/__init__.py +3 -0
  36. deepfos/api/models/account.py +483 -0
  37. deepfos/api/models/accounting_engines.py +756 -0
  38. deepfos/api/models/app.py +1338 -0
  39. deepfos/api/models/approval_process.py +1043 -0
  40. deepfos/api/models/base.py +234 -0
  41. deepfos/api/models/business_model.py +805 -0
  42. deepfos/api/models/consolidation.py +711 -0
  43. deepfos/api/models/consolidation_process.py +248 -0
  44. deepfos/api/models/datatable_mysql.py +427 -0
  45. deepfos/api/models/deep_pipeline.py +55 -0
  46. deepfos/api/models/deepconnector.py +28 -0
  47. deepfos/api/models/deepfos_task.py +386 -0
  48. deepfos/api/models/deepmodel.py +308 -0
  49. deepfos/api/models/dimension.py +1576 -0
  50. deepfos/api/models/financial_model.py +1796 -0
  51. deepfos/api/models/journal_model.py +341 -0
  52. deepfos/api/models/journal_template.py +854 -0
  53. deepfos/api/models/memory_financial_model.py +478 -0
  54. deepfos/api/models/platform.py +178 -0
  55. deepfos/api/models/python.py +221 -0
  56. deepfos/api/models/reconciliation_engine.py +411 -0
  57. deepfos/api/models/reconciliation_report.py +161 -0
  58. deepfos/api/models/role_strategy.py +884 -0
  59. deepfos/api/models/smartlist.py +237 -0
  60. deepfos/api/models/space.py +1137 -0
  61. deepfos/api/models/system.py +1065 -0
  62. deepfos/api/models/variable.py +463 -0
  63. deepfos/api/models/workflow.py +946 -0
  64. deepfos/api/platform.py +199 -0
  65. deepfos/api/python.py +90 -0
  66. deepfos/api/reconciliation_engine.py +181 -0
  67. deepfos/api/reconciliation_report.py +64 -0
  68. deepfos/api/role_strategy.py +234 -0
  69. deepfos/api/smartlist.py +69 -0
  70. deepfos/api/space.py +582 -0
  71. deepfos/api/system.py +372 -0
  72. deepfos/api/variable.py +154 -0
  73. deepfos/api/workflow.py +264 -0
  74. deepfos/boost/__init__.py +6 -0
  75. deepfos/boost/py_jstream.py +89 -0
  76. deepfos/boost/py_pandas.py +20 -0
  77. deepfos/cache.py +121 -0
  78. deepfos/config.py +6 -0
  79. deepfos/core/__init__.py +27 -0
  80. deepfos/core/cube/__init__.py +10 -0
  81. deepfos/core/cube/_base.py +462 -0
  82. deepfos/core/cube/constants.py +21 -0
  83. deepfos/core/cube/cube.py +408 -0
  84. deepfos/core/cube/formula.py +707 -0
  85. deepfos/core/cube/syscube.py +532 -0
  86. deepfos/core/cube/typing.py +7 -0
  87. deepfos/core/cube/utils.py +238 -0
  88. deepfos/core/dimension/__init__.py +11 -0
  89. deepfos/core/dimension/_base.py +506 -0
  90. deepfos/core/dimension/dimcreator.py +184 -0
  91. deepfos/core/dimension/dimension.py +472 -0
  92. deepfos/core/dimension/dimexpr.py +271 -0
  93. deepfos/core/dimension/dimmember.py +155 -0
  94. deepfos/core/dimension/eledimension.py +22 -0
  95. deepfos/core/dimension/filters.py +99 -0
  96. deepfos/core/dimension/sysdimension.py +168 -0
  97. deepfos/core/logictable/__init__.py +5 -0
  98. deepfos/core/logictable/_cache.py +141 -0
  99. deepfos/core/logictable/_operator.py +663 -0
  100. deepfos/core/logictable/nodemixin.py +673 -0
  101. deepfos/core/logictable/sqlcondition.py +609 -0
  102. deepfos/core/logictable/tablemodel.py +497 -0
  103. deepfos/db/__init__.py +36 -0
  104. deepfos/db/cipher.py +660 -0
  105. deepfos/db/clickhouse.py +191 -0
  106. deepfos/db/connector.py +195 -0
  107. deepfos/db/daclickhouse.py +171 -0
  108. deepfos/db/dameng.py +101 -0
  109. deepfos/db/damysql.py +189 -0
  110. deepfos/db/dbkits.py +358 -0
  111. deepfos/db/deepengine.py +99 -0
  112. deepfos/db/deepmodel.py +82 -0
  113. deepfos/db/deepmodel_kingbase.py +83 -0
  114. deepfos/db/edb.py +214 -0
  115. deepfos/db/gauss.py +83 -0
  116. deepfos/db/kingbase.py +83 -0
  117. deepfos/db/mysql.py +184 -0
  118. deepfos/db/oracle.py +131 -0
  119. deepfos/db/postgresql.py +192 -0
  120. deepfos/db/sqlserver.py +99 -0
  121. deepfos/db/utils.py +135 -0
  122. deepfos/element/__init__.py +89 -0
  123. deepfos/element/accounting.py +348 -0
  124. deepfos/element/apvlprocess.py +215 -0
  125. deepfos/element/base.py +398 -0
  126. deepfos/element/bizmodel.py +1269 -0
  127. deepfos/element/datatable.py +2467 -0
  128. deepfos/element/deep_pipeline.py +186 -0
  129. deepfos/element/deepconnector.py +59 -0
  130. deepfos/element/deepmodel.py +1806 -0
  131. deepfos/element/dimension.py +1254 -0
  132. deepfos/element/fact_table.py +427 -0
  133. deepfos/element/finmodel.py +1485 -0
  134. deepfos/element/journal.py +840 -0
  135. deepfos/element/journal_template.py +943 -0
  136. deepfos/element/pyscript.py +412 -0
  137. deepfos/element/reconciliation.py +553 -0
  138. deepfos/element/rolestrategy.py +243 -0
  139. deepfos/element/smartlist.py +457 -0
  140. deepfos/element/variable.py +756 -0
  141. deepfos/element/workflow.py +560 -0
  142. deepfos/exceptions/__init__.py +239 -0
  143. deepfos/exceptions/hook.py +86 -0
  144. deepfos/lazy.py +104 -0
  145. deepfos/lazy_import.py +84 -0
  146. deepfos/lib/__init__.py +0 -0
  147. deepfos/lib/_javaobj.py +366 -0
  148. deepfos/lib/asynchronous.py +879 -0
  149. deepfos/lib/concurrency.py +107 -0
  150. deepfos/lib/constant.py +39 -0
  151. deepfos/lib/decorator.py +310 -0
  152. deepfos/lib/deepchart.py +778 -0
  153. deepfos/lib/deepux.py +477 -0
  154. deepfos/lib/discovery.py +273 -0
  155. deepfos/lib/edb_lexer.py +789 -0
  156. deepfos/lib/eureka.py +156 -0
  157. deepfos/lib/filterparser.py +751 -0
  158. deepfos/lib/httpcli.py +106 -0
  159. deepfos/lib/jsonstreamer.py +80 -0
  160. deepfos/lib/msg.py +394 -0
  161. deepfos/lib/nacos.py +225 -0
  162. deepfos/lib/patch.py +92 -0
  163. deepfos/lib/redis.py +241 -0
  164. deepfos/lib/serutils.py +181 -0
  165. deepfos/lib/stopwatch.py +99 -0
  166. deepfos/lib/subtask.py +572 -0
  167. deepfos/lib/sysutils.py +703 -0
  168. deepfos/lib/utils.py +1003 -0
  169. deepfos/local.py +160 -0
  170. deepfos/options.py +670 -0
  171. deepfos/translation.py +237 -0
  172. deepfos-1.1.60.dist-info/METADATA +33 -0
  173. deepfos-1.1.60.dist-info/RECORD +175 -0
  174. deepfos-1.1.60.dist-info/WHEEL +5 -0
  175. deepfos-1.1.60.dist-info/top_level.txt +1 -0
@@ -0,0 +1,199 @@
1
+ """
2
+ APIs provided by platform-file-server
3
+
4
+ generated by model_code_gen.py
5
+ - **filename** : ``platform.py``
6
+ - **json timestamp** : ``2022-08-08 13:39:19``
7
+ """
8
+ from .base import RootAPI, ChildAPI, get, post
9
+ from .models.platform import *
10
+ from deepfos.options import OPTION
11
+ from deepfos.lib.decorator import cached_property
12
+ from typing import List, Dict, Union, Any, Awaitable
13
+ from aiohttp import FormData
14
+
15
+ __all__ = ['PlatformAPI']
16
+
17
+
18
+ class StdFileAPI(ChildAPI):
19
+ endpoint = '/files'
20
+
21
+ @post('delete/file')
22
+ def delete_file(self, fileUplod: FileDelete) -> Union[int, Awaitable[int]]:
23
+ """
24
+ 文件删除接口
25
+
26
+ 根据文件路径删除文件信息
27
+ """
28
+ return {'body': fileUplod}
29
+
30
+ @get('download')
31
+ def download(self, id: str, sendLog: bool = None) -> Union[Any, Awaitable[Any]]:
32
+ """
33
+ 文件下载接口
34
+
35
+ 文件id必填,通过id获取文件路径,获取文件内容
36
+ """
37
+ return {'param': {'id': id, 'sendLog': sendLog}}
38
+
39
+ @get('download-for-system')
40
+ def download_for_system(self, ) -> Union[Any, Awaitable[Any]]:
41
+ """
42
+ 文件下载接口-文件信息来源:system
43
+
44
+ 文件id必填,通过id获取文件路径,获取文件内容
45
+ """
46
+ return {}
47
+
48
+ @post('upload')
49
+ def upload(self, file_type: str, file_name: str, file: Union[str, bytes]) -> Union[
50
+ FileUplodRes, Awaitable[FileUplodRes]]:
51
+ """
52
+ 文件上传接口
53
+
54
+ Args:
55
+ file_type: 文件类型,可用值: ATT(用户上传附件), DL(下载数据时生成的文件), INF(接口导入数据时生成的文件), LOG(日志中的附件), UPL(用户上传数据时的文件)
56
+ file_name: 文件名
57
+ file: 文件内容
58
+
59
+
60
+ .. admonition:: 上传文件至下载中心示例
61
+
62
+ .. code-block:: python
63
+
64
+ from datetime import datetime
65
+
66
+ from deepfos.api.platform import PlatformAPI
67
+ from deepfos.api.space import SpaceAPI
68
+ from deepfos.api.models.space import SpFileBusinessRecordSaveDto
69
+ from deepfos.options import OPTION
70
+
71
+ # . 准备文件上传接口
72
+ file_cli = PlatformAPI().file
73
+
74
+ # . 准备空间下载中心记录接口
75
+ business_record_cli = SpaceAPI().business
76
+
77
+ # . 上传文件后,在下载中心生成一条可供下载的记录
78
+ with open('t.txt', 'rb') as fp:
79
+ res = file_cli.upload(file_type='DL', file_name='t.txt', file=fp.read())
80
+
81
+ business_record_cli.save(
82
+ SpFileBusinessRecordSaveDto(
83
+ app=OPTION.api.header['app'],
84
+ space=OPTION.api.header['space'],
85
+ fileName='t.txt',
86
+ createTime=datetime.now().strftime('%Y-%m-%d %H:%M:%S'),
87
+ fileId=res.id,
88
+ unit='B',
89
+ fileSize=res.fileSize,
90
+ status='SUCCESS'
91
+ )
92
+ )
93
+
94
+
95
+ """
96
+ data = FormData()
97
+ data.add_field('file', file, filename=file_name)
98
+ return {'body': data,
99
+ 'param': {
100
+ 'fileType': file_type
101
+ },
102
+ 'header': {'Content-Type': 'multipart/form-data', **data._writer.headers}
103
+ }
104
+
105
+ @post('upload/content')
106
+ def upload_content(self, form: UploadBodyForm) -> Union[FileUplodRes, Awaitable[FileUplodRes]]:
107
+ """
108
+ 以内容方式上传文件
109
+
110
+ 以内容方式上传文件:相同文件名不可重复上传
111
+ """
112
+ return {'body': form}
113
+
114
+
115
+ class FileJsAPI(ChildAPI):
116
+ endpoint = '/js'
117
+
118
+ @post('upload')
119
+ def upload(self, param: McUploadDTO) -> Union[Result, Awaitable[Result]]:
120
+ """
121
+ 自定义js文件上传接口
122
+
123
+ 文件上传,针对前端自定义js
124
+ """
125
+ return {'body': param}
126
+
127
+
128
+ class FilePyAPI(ChildAPI):
129
+ endpoint = '/python'
130
+
131
+ @post('python-file/delete')
132
+ def python_file_delete(self, deleteFileDTOList: List[DeleteFileDTO]) -> Union[List[FileDeleteResultVO], Awaitable[List[FileDeleteResultVO]]]:
133
+ """
134
+ python文件删除接口
135
+
136
+ 文件名称和路径都必填
137
+ """
138
+ return {'body': deleteFileDTOList}
139
+
140
+ @post('read-file')
141
+ def read_file(self, readFileDto: ReadFileDTO) -> Union[FileReadResultVO, Awaitable[FileReadResultVO]]:
142
+ """
143
+ python文件读取内容接口
144
+
145
+ 文件名称和路径都必填
146
+ """
147
+ return {'body': readFileDto}
148
+
149
+ @post('upload')
150
+ def upload_file(self, file_upload: FileReadResultVO) -> Union[FileUploadResultVO, Awaitable[FileUploadResultVO]]:
151
+ """
152
+ python文件上传更新接口
153
+
154
+ 上传新的python文件的内容参数不能为空,文件与文件内容不可同时为空
155
+ """
156
+ # todo 文件内容过长时,content传参调不通,暂且这样处理
157
+ if len(file_upload.fileContent) < 1024:
158
+ return {'param': file_upload}
159
+
160
+ forms = file_upload.dict()
161
+ data = FormData()
162
+ file = forms.pop('fileContent')
163
+ data.add_field('multipartFile', file, filename=file_upload.fileName)
164
+ for k, v in forms.items():
165
+ if v is not None:
166
+ data.add_field(k, v)
167
+ # noinspection PyProtectedMember
168
+ return {
169
+ 'body': data,
170
+ 'header': {'Content-Type': 'multipart/form-data', **data._writer.headers}
171
+ }
172
+
173
+
174
+ class PlatformAPI(RootAPI):
175
+ """文件上传服务接口"""
176
+ prefix = lambda: OPTION.server.platform_file
177
+
178
+ @cached_property
179
+ def file(self) -> StdFileAPI:
180
+ """
181
+ 标准文件管理相关接口
182
+ """
183
+ return StdFileAPI(self)
184
+
185
+ @cached_property
186
+ def js(self) -> FileJsAPI:
187
+ """
188
+ 自定义js文件上传相关接口
189
+ """
190
+ return FileJsAPI(self)
191
+
192
+ @cached_property
193
+ def python(self) -> FilePyAPI:
194
+ """
195
+ python文件管理相关接口
196
+ """
197
+ return FilePyAPI(self)
198
+
199
+
deepfos/api/python.py ADDED
@@ -0,0 +1,90 @@
1
+ from .base import DynamicRootAPI, ChildAPI, get, post
2
+ from .models.python import *
3
+ from deepfos.lib.decorator import cached_property
4
+ from typing import List, Dict, Union, Any, Awaitable
5
+
6
+ __all__ = ['PythonAPI']
7
+
8
+
9
+ class WorkerAPI(ChildAPI):
10
+ """python工作进程相关接口"""
11
+ endpoint = '/worker'
12
+
13
+ @post('register')
14
+ def register(self, worker_info: WorkerRegistry) -> Union[bool, Awaitable[bool]]:
15
+ return {'body': worker_info}
16
+
17
+ @get('metrics')
18
+ def metrics(self, ) -> Union[List[WorkerMetrics], Awaitable[List[WorkerMetrics]]]:
19
+ return {}
20
+
21
+
22
+ class ScriptAPI(ChildAPI):
23
+ """python脚本的运行,关闭,进度查询等逻辑"""
24
+ endpoint = '/script'
25
+
26
+ @post('run')
27
+ def run(self, run_info: PyRunInfo) -> Union[str, Awaitable[str]]:
28
+ return {'body': run_info}
29
+
30
+ @get('result')
31
+ def result(self, task_id: str, timeout: int = None) -> Union[Any, Awaitable[Any]]:
32
+ return {'param': {'timeout': timeout}, 'path': task_id}
33
+
34
+ @post('terminate')
35
+ def terminate(self, task_id: str) -> Union[Any, Awaitable[Any]]:
36
+ return {'body': {"taskId": task_id}}
37
+
38
+
39
+ class FileAPI(ChildAPI):
40
+ """python文件的新建,上传,更新逻辑"""
41
+ endpoint = '/file'
42
+
43
+ @post('add')
44
+ def add(self, file: PyNewFile) -> Union[bool, Awaitable[bool]]:
45
+ """
46
+ 新建python文件
47
+
48
+ """
49
+ return {'body': file}
50
+
51
+ @post('update')
52
+ def update(self, file: PyNewFile) -> Union[bool, Awaitable[bool]]:
53
+ """
54
+ 更新文件内容
55
+
56
+ """
57
+ return {'body': file}
58
+
59
+ @get('read')
60
+ def read(self, info: PyBaseInfo) -> Union[PyNewFileWithError, Awaitable[PyNewFileWithError]]:
61
+ """
62
+ 读取文件内容
63
+
64
+ """
65
+ return {'param': info}
66
+
67
+
68
+ class PythonAPI(DynamicRootAPI, builtin=True):
69
+ """Python组件"""
70
+ module_type = 'PY'
71
+ default_version = (2, 0)
72
+ multi_version = False
73
+ cls_name = 'PythonAPI'
74
+ module_name = 'deepfos.api.python'
75
+ api_version = (2, 0)
76
+
77
+ @cached_property
78
+ def worker(self) -> WorkerAPI:
79
+ """python工作进程相关接口"""
80
+ return WorkerAPI(self)
81
+
82
+ @cached_property
83
+ def script(self) -> ScriptAPI:
84
+ """python脚本的运行,关闭,进度查询等逻辑"""
85
+ return ScriptAPI(self)
86
+
87
+ @cached_property
88
+ def file(self) -> FileAPI:
89
+ """python文件的新建,上传,更新逻辑"""
90
+ return FileAPI(self)
@@ -0,0 +1,181 @@
1
+ """
2
+ APIs provided by reconciliation-engine-server1-0
3
+
4
+ generated by api_code_gen.py
5
+ - **filename** : ``reconciliation_engine.py``
6
+ - **json timestamp** : ``2022-12-26 11:11:22``
7
+ """
8
+ from deepfos.api.base import get, post, DynamicRootAPI, ChildAPI
9
+ from .models.reconciliation_engine import *
10
+ from deepfos.lib.decorator import cached_property
11
+ from typing import List, Dict, Union, Any, Awaitable
12
+
13
+
14
+ __all__ = ['ReconcilationAPI', 'ReconcilationmsAPI']
15
+
16
+
17
+ class DataGetAPI(ChildAPI):
18
+ endpoint = '/data_get'
19
+
20
+ @post('cancel_ds')
21
+ def cancel_ds(self, cancelItem: CancelItem) -> Union[Any, Awaitable[Any]]:
22
+ """
23
+ 取消批次
24
+
25
+ """
26
+ return {'body': cancelItem}
27
+
28
+ @post('confirm_ds_batch')
29
+ def confirm_ds_batch(self, confirmItem: ConfirmItem) -> Union[Any, Awaitable[Any]]:
30
+ """
31
+ 确认批次
32
+
33
+ """
34
+ return {'body': confirmItem}
35
+
36
+ @post('delete_ds_batch')
37
+ def delete_ds_batch(self, deleteDsItem: DeleteDsItem) -> Union[Any, Awaitable[Any]]:
38
+ """
39
+ 批量删除批次
40
+
41
+ """
42
+ return {'body': deleteDsItem}
43
+
44
+ @post('get_column_data')
45
+ def get_column_data(self, queryColumnDataItem: QueryColumnDataItem) -> Union[int, Awaitable[int]]:
46
+ """
47
+ 获取列信息和数据
48
+
49
+ 数据抽取
50
+ """
51
+ return {'body': queryColumnDataItem}
52
+
53
+
54
+ class BalanceAPI(ChildAPI):
55
+ endpoint = '/recon-cfg'
56
+
57
+ @post('cancel-by-hand')
58
+ def cancel_by_hand(self, cancelSignByHand: CancelSignByHand) -> Union[int, Awaitable[int]]:
59
+ """
60
+ 手工取消暂挂或者不参与匹配
61
+
62
+ 手工取消暂挂或者不参与匹配 0.取消暂挂 1.取消不参与匹配
63
+ """
64
+ return {'body': cancelSignByHand}
65
+
66
+ @post('cancel_recon_match')
67
+ def cancel_recon_match(self, cancelReconMatch: CancelReconMatch) -> Union[int, Awaitable[int]]:
68
+ """
69
+ 取消匹配
70
+
71
+ """
72
+ return {'body': cancelReconMatch}
73
+
74
+ @post('mark-by-hand')
75
+ def mark_by_hand(self, reconMatchByHand: ReconSignByHand) -> Union[bool, Awaitable[bool]]:
76
+ """
77
+ 手动标记对账集 4.手工匹配 6.暂挂 5.不参与匹配
78
+
79
+ """
80
+ return {'body': reconMatchByHand}
81
+
82
+
83
+ class ReconcilAPI(ChildAPI):
84
+ endpoint = '/'
85
+
86
+ @post('reconciliation/delete_task')
87
+ def delete_task(self, deleteTaskItem: DeleteTaskItem) -> Union[Any, Awaitable[Any]]:
88
+ """
89
+ 删除任务
90
+
91
+ """
92
+ return {'body': deleteTaskItem}
93
+
94
+ @post('reconciliation/get_task_list')
95
+ def get_task_list(self, queryTaskListItem: QueryTaskListItem) -> Union[PageInfoRctDO, Awaitable[PageInfoRctDO]]:
96
+ """
97
+ 获取任务列表
98
+
99
+ """
100
+ return {'body': queryTaskListItem}
101
+
102
+ @post('reconciliation/off_task')
103
+ def off_task(self, offTaskItem: OffTaskItem) -> Union[Any, Awaitable[Any]]:
104
+ """
105
+ 关闭任务
106
+
107
+ """
108
+ return {'body': offTaskItem}
109
+
110
+ @post('reconciliation/on_task')
111
+ def on_task(self, onTaskItem: OnTaskItem) -> Union[Any, Awaitable[Any]]:
112
+ """
113
+ 打开任务
114
+
115
+ """
116
+ return {'body': onTaskItem}
117
+
118
+ @post('reconciliationExecution/reconciliation')
119
+ def reconciliation(self, reconciliationExecDto: ReconciliationExecDto) -> Union[int, Awaitable[int]]:
120
+ """
121
+ 执行对账任务
122
+
123
+ """
124
+ return {'body': reconciliationExecDto}
125
+
126
+ @post('reconciliationExecution/create')
127
+ def create_task(self, reconciliationExecDto: ReconciliationExecCreate) -> Union[int, Awaitable[int]]:
128
+ """
129
+ 创建对账任务
130
+
131
+ """
132
+ return {'body': reconciliationExecDto}
133
+
134
+ @post('reconciliationExecution/exec')
135
+ def exec_task(self, reconciliationExecDto: ReconciliationExecDto) -> Union[int, Awaitable[int]]:
136
+ """
137
+ 执行对账任务(只执行)
138
+
139
+ """
140
+ return {'body': reconciliationExecDto}
141
+
142
+
143
+ class ReconcilationAPI(DynamicRootAPI, builtin=True):
144
+ """对账组件——数据集接口"""
145
+ module_type = 'DS'
146
+ default_version = (1, 0)
147
+ multi_version = False
148
+ cls_name = 'ReconcilationAPI'
149
+ module_name = 'deepfos.api.reconciliation_engine'
150
+ api_version = (1, 0)
151
+
152
+ @cached_property
153
+ def data_get(self) -> DataGetAPI:
154
+ """
155
+ 数据抽取
156
+ """
157
+ return DataGetAPI(self)
158
+
159
+
160
+ class ReconcilationmsAPI(DynamicRootAPI, builtin=True):
161
+ """对账组件——对账集接口"""
162
+ module_type = 'MS'
163
+ default_version = (1, 0)
164
+ multi_version = False
165
+ cls_name = 'ReconcilationAPI'
166
+ module_name = 'deepfos.api.reconciliation_engine'
167
+ api_version = (1, 0)
168
+
169
+ @cached_property
170
+ def balance(self) -> BalanceAPI:
171
+ """
172
+ 对账操作
173
+ """
174
+ return BalanceAPI(self)
175
+
176
+ @cached_property
177
+ def reconcil(self) -> ReconcilAPI:
178
+ """
179
+ 对账
180
+ """
181
+ return ReconcilAPI(self)
@@ -0,0 +1,64 @@
1
+ """
2
+ APIs provided by reconciliation-report-server1-0
3
+
4
+ generated by model_code_gen.py
5
+ - **filename** : ``reconciliation_report.py``
6
+ - **json timestamp** : ``2022-01-07 11:09:47``
7
+ """
8
+ from .base import get, post, DynamicRootAPI, ChildAPI
9
+ from .models.reconciliation_report import *
10
+ from deepfos.lib.decorator import cached_property
11
+ from typing import List, Dict, Union, Any, Awaitable
12
+
13
+
14
+ __all__ = ['ReconciliationReportAPI']
15
+
16
+
17
+ class Reconciliation(ChildAPI):
18
+ endpoint = '/reconciliation'
19
+
20
+ @get('reconciliation-report-info')
21
+ def reconciliation_report_info(self, folderId: str, code: str) -> Union[ReconciliationReportInfo, Awaitable[ReconciliationReportInfo]]:
22
+ """
23
+ 查询对账报告编辑态信息
24
+
25
+ """
26
+ return {'param': {'code': code, 'folderId': folderId}}
27
+
28
+
29
+ class Extra(ChildAPI):
30
+ endpoint = '/'
31
+
32
+ @post('transaction-datas')
33
+ def transaction_datas(self, transactionParam: TransactionParamDto) -> Union[List[dict], Awaitable[List[dict]]]:
34
+ """
35
+ 交易数据
36
+
37
+ """
38
+ return {'body': transactionParam}
39
+
40
+
41
+ class ReconciliationReportAPI(DynamicRootAPI, builtin=True):
42
+ """对账报告组件接口"""
43
+ module_type = 'RR'
44
+ default_version = (1, 0)
45
+ multi_version = False
46
+ cls_name = 'ReconciliationReportAPI'
47
+ module_name = 'deepfos.api.reconciliation_report'
48
+ api_version = (1, 0)
49
+
50
+ @cached_property
51
+ def reconciliation(self) -> Reconciliation:
52
+ """
53
+ 对账报告
54
+ """
55
+ return Reconciliation(self)
56
+
57
+ @cached_property
58
+ def extra(self) -> Extra:
59
+ """
60
+ 对账报告对外提供的接口(例如合并算法、外挂的python等)
61
+ """
62
+ return Extra(self)
63
+
64
+