add comparsion offline result upload interface & swagger document
Showing
9 changed files
with
1117 additions
and
673 deletions
docs/compare_offline.yaml
0 → 100644
1 | swagger: '2.0' | ||
2 | info: | ||
3 | title: 接口文档 | ||
4 | description: 宝马ocr/biz_logic接口文档 | ||
5 | version: 1.0.0 | ||
6 | host: li19dkocruat01vm.bmwgroup.net | ||
7 | basePath: / | ||
8 | tags: | ||
9 | - name: info | ||
10 | description: 比对结果 | ||
11 | schemes: | ||
12 | - https | ||
13 | security: | ||
14 | - OAuth2: [] | ||
15 | paths: | ||
16 | /api/compare/offline/v1: | ||
17 | post: | ||
18 | tags: | ||
19 | - info | ||
20 | summary: 线下文件夹比对结果上传 | ||
21 | consumes: | ||
22 | - application/json | ||
23 | produces: | ||
24 | - application/json | ||
25 | parameters: | ||
26 | - in: body | ||
27 | name: body | ||
28 | required: true | ||
29 | schema: | ||
30 | $ref: '#/definitions/ComparisonOffline' | ||
31 | responses: | ||
32 | 200: | ||
33 | description: ok | ||
34 | schema: | ||
35 | $ref: '#/definitions/ApiResponse' | ||
36 | securityDefinitions: | ||
37 | OAuth2: | ||
38 | type: oauth2 | ||
39 | flow: application | ||
40 | description: 'This API uses OAuth 2 with the application(clientCredentials) grant | ||
41 | flow. | ||
42 | |||
43 | client_id=sMlciTkppsMzARwHpCVarm5q7DP2Vucj3ny8JFhw | ||
44 | |||
45 | client_secret=WNoOilDx140ZLcenDKfsnikv7S2LIFs60DciYoqnrZaYLqYsKpcmt7mJIL69o9AEf84uQvRnS3K2UioxfjNyImjR4UOyXbDcF6qYgTLC4KDVByKFdVhKfrn2Lc4q4BNW | ||
46 | |||
47 | scopes=write | ||
48 | |||
49 | ' | ||
50 | tokenUrl: https://li19dkocruat01vm.bmwgroup.net/api/oauth/token/ | ||
51 | scopes: | ||
52 | write: Grants write access | ||
53 | responses: | ||
54 | ErrorResponse: | ||
55 | description: 调用异常, 具体情况请参考`HTTP`状态码和`code`字段 | ||
56 | schema: | ||
57 | $ref: '#/definitions/ApiResponse' | ||
58 | NoContent: | ||
59 | description: 后台接收请求,但是没有响应内容 | ||
60 | schema: | ||
61 | $ref: '#/definitions/ApiResponse' | ||
62 | definitions: | ||
63 | ComparisonOffline: | ||
64 | type: object | ||
65 | required: | ||
66 | - is_hil | ||
67 | - case_number | ||
68 | - request_team | ||
69 | - request_trigger | ||
70 | - input_file | ||
71 | - transaction_start | ||
72 | - transaction_end | ||
73 | - successful_at_this_level | ||
74 | - process_name | ||
75 | - total_fields | ||
76 | - workflow_name | ||
77 | properties: | ||
78 | is_hil: | ||
79 | description: is_hil | ||
80 | type: boolean | ||
81 | example: false | ||
82 | case_number: | ||
83 | description: case_number | ||
84 | type: string | ||
85 | example: VAT Invoice Number | ||
86 | request_team: | ||
87 | description: request_team | ||
88 | type: string | ||
89 | example: Accounting | ||
90 | request_trigger: | ||
91 | description: request_trigger | ||
92 | type: string | ||
93 | example: Attended RPA (Q-Account + Machine Number) | ||
94 | input_file: | ||
95 | description: input_file | ||
96 | type: string | ||
97 | example: CH-B1000000身份证.jpeg | ||
98 | transaction_start: | ||
99 | description: transaction_start | ||
100 | type: string | ||
101 | format: date-time | ||
102 | example: '2027-04-30 19:22:29' | ||
103 | transaction_end: | ||
104 | description: transaction_end | ||
105 | type: string | ||
106 | format: date-time | ||
107 | example: '2027-04-30 19:22:29' | ||
108 | successful_at_this_level: | ||
109 | description: successful_at_this_level | ||
110 | type: boolean | ||
111 | example: false | ||
112 | failure_reason: | ||
113 | description: failure_reason | ||
114 | type: string | ||
115 | example: Fileds Name which doesn’t pass verification | ||
116 | process_name: | ||
117 | description: process_name | ||
118 | type: string | ||
119 | example: F1_VATInvoiceMapping | ||
120 | total_fields: | ||
121 | description: total_fields | ||
122 | type: integer | ||
123 | example: 0 | ||
124 | workflow_name: | ||
125 | description: workflow_name | ||
126 | type: string | ||
127 | example: Normal invoice or Special invoice | ||
128 | ApiResponse: | ||
129 | description: 响应对象,code字段用于表示响应的状态; data字段用于存放响应内容 | ||
130 | type: object | ||
131 | required: | ||
132 | - code | ||
133 | - msg | ||
134 | properties: | ||
135 | code: | ||
136 | type: integer | ||
137 | format: uint8 | ||
138 | description: '0: success 1: need login 2: invalid params 3: internal error | ||
139 | 4: object not exist 5: async wait 6: no permission 7: illegal operation' | ||
140 | example: 0 | ||
141 | enum: | ||
142 | - 0 | ||
143 | - 1 | ||
144 | - 2 | ||
145 | - 3 | ||
146 | - 4 | ||
147 | - 5 | ||
148 | - 6 | ||
149 | - 7 | ||
150 | msg: | ||
151 | type: string | ||
152 | example: success | ||
153 | data: | ||
154 | type: object |
... | @@ -5,4 +5,5 @@ from . import views | ... | @@ -5,4 +5,5 @@ from . import views |
5 | urlpatterns = [ | 5 | urlpatterns = [ |
6 | path(r'v1', views.CompareView.as_view()), | 6 | path(r'v1', views.CompareView.as_view()), |
7 | path(r'settlement/v1', views.SECompareView.as_view()), | 7 | path(r'settlement/v1', views.SECompareView.as_view()), |
8 | path(r'offline/v1', views.CompareOfflineView.as_view()), | ||
8 | ] | 9 | ] | ... | ... |
... | @@ -275,8 +275,8 @@ class HILOCRReport(models.Model): | ... | @@ -275,8 +275,8 @@ class HILOCRReport(models.Model): |
275 | request_team = models.SmallIntegerField(default=RequestTeam.ACCEPTANCE.value, verbose_name="来源") | 275 | request_team = models.SmallIntegerField(default=RequestTeam.ACCEPTANCE.value, verbose_name="来源") |
276 | request_trigger = models.SmallIntegerField(default=RequestTrigger.POS.value, verbose_name="触发者") | 276 | request_trigger = models.SmallIntegerField(default=RequestTrigger.POS.value, verbose_name="触发者") |
277 | input_file = models.CharField(max_length=255, verbose_name="文件名") | 277 | input_file = models.CharField(max_length=255, verbose_name="文件名") |
278 | transaction_start = models.DateTimeField(null=True, verbose_name='开始时间') # 索引 | 278 | transaction_start = models.DateTimeField(verbose_name='开始时间') # 索引 |
279 | transaction_end = models.DateTimeField(null=True, verbose_name='结束时间') | 279 | transaction_end = models.DateTimeField(verbose_name='结束时间') |
280 | successful_at_this_level = models.BooleanField(default=True, verbose_name="是否成功") | 280 | successful_at_this_level = models.BooleanField(default=True, verbose_name="是否成功") |
281 | failure_reason = models.SmallIntegerField(null=True, verbose_name="失败原因") | 281 | failure_reason = models.SmallIntegerField(null=True, verbose_name="失败原因") |
282 | process_name = models.SmallIntegerField(default=ProcessName.ALL.value, verbose_name="流程名称") | 282 | process_name = models.SmallIntegerField(default=ProcessName.ALL.value, verbose_name="流程名称") |
... | @@ -294,8 +294,8 @@ class AFCOCRReport(models.Model): | ... | @@ -294,8 +294,8 @@ class AFCOCRReport(models.Model): |
294 | request_team = models.SmallIntegerField(default=RequestTeam.ACCEPTANCE.value, verbose_name="来源") | 294 | request_team = models.SmallIntegerField(default=RequestTeam.ACCEPTANCE.value, verbose_name="来源") |
295 | request_trigger = models.SmallIntegerField(default=RequestTrigger.POS.value, verbose_name="触发者") | 295 | request_trigger = models.SmallIntegerField(default=RequestTrigger.POS.value, verbose_name="触发者") |
296 | input_file = models.CharField(max_length=255, verbose_name="文件名") | 296 | input_file = models.CharField(max_length=255, verbose_name="文件名") |
297 | transaction_start = models.DateTimeField(null=True, verbose_name='开始时间') # 索引 | 297 | transaction_start = models.DateTimeField(verbose_name='开始时间') # 索引 |
298 | transaction_end = models.DateTimeField(null=True, verbose_name='结束时间') | 298 | transaction_end = models.DateTimeField(verbose_name='结束时间') |
299 | successful_at_this_level = models.BooleanField(default=True, verbose_name="是否成功") | 299 | successful_at_this_level = models.BooleanField(default=True, verbose_name="是否成功") |
300 | failure_reason = models.SmallIntegerField(null=True, verbose_name="失败原因") | 300 | failure_reason = models.SmallIntegerField(null=True, verbose_name="失败原因") |
301 | process_name = models.SmallIntegerField(default=ProcessName.ALL.value, verbose_name="流程名称") | 301 | process_name = models.SmallIntegerField(default=ProcessName.ALL.value, verbose_name="流程名称") |
... | @@ -308,4 +308,81 @@ class AFCOCRReport(models.Model): | ... | @@ -308,4 +308,81 @@ class AFCOCRReport(models.Model): |
308 | situ_db_label = 'afc' | 308 | situ_db_label = 'afc' |
309 | 309 | ||
310 | 310 | ||
311 | class HILCompareReport(models.Model): | ||
312 | id = models.AutoField(primary_key=True, verbose_name="id") # 主键 | ||
313 | case_number = models.CharField(max_length=64, verbose_name="申请id") | ||
314 | request_team = models.SmallIntegerField(default=RequestTeam.ACCEPTANCE.value, verbose_name="来源") | ||
315 | request_trigger = models.SmallIntegerField(default=RequestTrigger.POS.value, verbose_name="触发者") | ||
316 | input_file = models.CharField(max_length=255, verbose_name="文件名", null=True) | ||
317 | transaction_start = models.DateTimeField(verbose_name='开始时间') # 索引 | ||
318 | transaction_end = models.DateTimeField(verbose_name='结束时间') | ||
319 | successful_at_this_level = models.BooleanField(default=True, verbose_name="是否成功") | ||
320 | failure_reason = models.TextField(null=True, verbose_name="失败原因") | ||
321 | process_name = models.SmallIntegerField(default=ProcessName.ALL.value, verbose_name="流程名称") | ||
322 | total_fields = models.IntegerField(null=True, verbose_name='比对字段数目') | ||
323 | workflow_name = models.SmallIntegerField(null=True, verbose_name="工作流程") | ||
324 | |||
325 | class Meta: | ||
326 | managed = False | ||
327 | db_table = 'hil_compare_report' | ||
328 | |||
329 | |||
330 | class AFCCompareReport(models.Model): | ||
331 | id = models.AutoField(primary_key=True, verbose_name="id") # 主键 | ||
332 | case_number = models.CharField(max_length=64, verbose_name="申请id") | ||
333 | request_team = models.SmallIntegerField(default=RequestTeam.ACCEPTANCE.value, verbose_name="来源") | ||
334 | request_trigger = models.SmallIntegerField(default=RequestTrigger.POS.value, verbose_name="触发者") | ||
335 | input_file = models.CharField(max_length=255, verbose_name="文件名", null=True) | ||
336 | transaction_start = models.DateTimeField(verbose_name='开始时间') # 索引 | ||
337 | transaction_end = models.DateTimeField(verbose_name='结束时间') | ||
338 | successful_at_this_level = models.BooleanField(default=True, verbose_name="是否成功") | ||
339 | failure_reason = models.TextField(null=True, verbose_name="失败原因") | ||
340 | process_name = models.SmallIntegerField(default=ProcessName.ALL.value, verbose_name="流程名称") | ||
341 | total_fields = models.IntegerField(null=True, verbose_name='比对字段数目') | ||
342 | workflow_name = models.SmallIntegerField(null=True, verbose_name="工作流程") | ||
343 | |||
344 | class Meta: | ||
345 | managed = False | ||
346 | db_table = 'afc_compare_report' | ||
347 | situ_db_label = 'afc' | ||
348 | |||
349 | |||
350 | class HILCompareOfflineReport(models.Model): | ||
351 | id = models.AutoField(primary_key=True, verbose_name="id") # 主键 | ||
352 | case_number = models.CharField(max_length=255, verbose_name="申请id") | ||
353 | request_team = models.CharField(max_length=255, verbose_name="来源") | ||
354 | request_trigger = models.CharField(max_length=1024, verbose_name="触发者") | ||
355 | input_file = models.CharField(max_length=2048, verbose_name="文件名", null=True) | ||
356 | transaction_start = models.DateTimeField(verbose_name='开始时间') # 索引 | ||
357 | transaction_end = models.DateTimeField(verbose_name='结束时间') | ||
358 | successful_at_this_level = models.BooleanField(default=True, verbose_name="是否成功") | ||
359 | failure_reason = models.TextField(null=True, verbose_name="失败原因") | ||
360 | process_name = models.CharField(max_length=1024, verbose_name="流程名称") | ||
361 | total_fields = models.IntegerField(verbose_name='比对字段数目') | ||
362 | workflow_name = models.CharField(max_length=1024, verbose_name="工作流程") | ||
363 | |||
364 | class Meta: | ||
365 | managed = False | ||
366 | db_table = 'hil_compare_offline_report' | ||
367 | |||
368 | |||
369 | class AFCCompareOfflineReport(models.Model): | ||
370 | id = models.AutoField(primary_key=True, verbose_name="id") # 主键 | ||
371 | case_number = models.CharField(max_length=255, verbose_name="申请id") | ||
372 | request_team = models.CharField(max_length=255, verbose_name="来源") | ||
373 | request_trigger = models.CharField(max_length=1024, verbose_name="触发者") | ||
374 | input_file = models.CharField(max_length=2048, verbose_name="文件名", null=True) | ||
375 | transaction_start = models.DateTimeField(verbose_name='开始时间') # 索引 | ||
376 | transaction_end = models.DateTimeField(verbose_name='结束时间') | ||
377 | successful_at_this_level = models.BooleanField(default=True, verbose_name="是否成功") | ||
378 | failure_reason = models.TextField(null=True, verbose_name="失败原因") | ||
379 | process_name = models.CharField(max_length=1024, verbose_name="流程名称") | ||
380 | total_fields = models.IntegerField(verbose_name='比对字段数目') | ||
381 | workflow_name = models.CharField(max_length=1024, verbose_name="工作流程") | ||
382 | |||
383 | class Meta: | ||
384 | managed = False | ||
385 | db_table = 'afc_compare_offline_report' | ||
386 | situ_db_label = 'afc' | ||
387 | |||
311 | 388 | ... | ... |
... | @@ -16,7 +16,7 @@ from common import response | ... | @@ -16,7 +16,7 @@ from common import response |
16 | from common.mixins import GenericView | 16 | from common.mixins import GenericView |
17 | from common.tools.file_tools import file_write | 17 | from common.tools.file_tools import file_write |
18 | from common.redis_cache import redis_handler as rh | 18 | from common.redis_cache import redis_handler as rh |
19 | from .models import DocStatus, PriorityApplication, GCAPRecords, AFCComparisonInfo, HILComparisonInfo | 19 | from .models import DocStatus, PriorityApplication, GCAPRecords, AFCComparisonInfo, HILComparisonInfo, AFCCompareOfflineReport, HILCompareOfflineReport |
20 | from .mixins import DocHandler | 20 | from .mixins import DocHandler |
21 | from . import consts | 21 | from . import consts |
22 | from apps.account.authentication import OAuth2AuthenticationWithUser | 22 | from apps.account.authentication import OAuth2AuthenticationWithUser |
... | @@ -276,6 +276,21 @@ priority_doc_args = { | ... | @@ -276,6 +276,21 @@ priority_doc_args = { |
276 | 276 | ||
277 | } | 277 | } |
278 | 278 | ||
279 | compare_offline_args = { | ||
280 | 'is_hil': fields.Boolean(required=True), | ||
281 | 'case_number': fields.Str(required=True, validate=validate.Length(max=255)), | ||
282 | 'request_team': fields.Str(required=True, validate=validate.Length(max=255)), | ||
283 | 'request_trigger': fields.Str(required=True, validate=validate.Length(max=1024)), | ||
284 | 'input_file': fields.Str(required=True, validate=validate.Length(max=2048)), | ||
285 | 'transaction_start': fields.DateTime(required=True), | ||
286 | 'transaction_end': fields.DateTime(required=True), | ||
287 | 'successful_at_this_level': fields.Boolean(required=True), | ||
288 | 'failure_reason': fields.Str(required=False), | ||
289 | 'process_name': fields.Str(required=True, validate=validate.Length(max=1024)), | ||
290 | 'total_fields': fields.Int(required=True), | ||
291 | 'workflow_name': fields.Str(required=True, validate=validate.Length(max=1024)), | ||
292 | } | ||
293 | |||
279 | 294 | ||
280 | class UploadDocView(GenericView, DocHandler): | 295 | class UploadDocView(GenericView, DocHandler): |
281 | # permission_classes = [] | 296 | # permission_classes = [] |
... | @@ -435,7 +450,7 @@ class CompareView(GenericView): | ... | @@ -435,7 +450,7 @@ class CompareView(GenericView): |
435 | permission_classes = [IsAuthenticated] | 450 | permission_classes = [IsAuthenticated] |
436 | authentication_classes = [OAuth2AuthenticationWithUser] | 451 | authentication_classes = [OAuth2AuthenticationWithUser] |
437 | 452 | ||
438 | # pos上传比对信息接口 | 453 | # pos上传比对信息接口 CA |
439 | @use_args(compare_args, location='data') | 454 | @use_args(compare_args, location='data') |
440 | def post(self, request, args): | 455 | def post(self, request, args): |
441 | # 存库 | 456 | # 存库 |
... | @@ -486,7 +501,7 @@ class SECompareView(GenericView): | ... | @@ -486,7 +501,7 @@ class SECompareView(GenericView): |
486 | permission_classes = [IsAuthenticated] | 501 | permission_classes = [IsAuthenticated] |
487 | authentication_classes = [OAuth2AuthenticationWithUser] | 502 | authentication_classes = [OAuth2AuthenticationWithUser] |
488 | 503 | ||
489 | # pos上传比对信息接口 | 504 | # pos上传比对信息接口 SE |
490 | @use_args(se_compare_args, location='data') | 505 | @use_args(se_compare_args, location='data') |
491 | def post(self, request, args): | 506 | def post(self, request, args): |
492 | self.running_log.info('se compare in') | 507 | self.running_log.info('se compare in') |
... | @@ -512,6 +527,50 @@ class SECompareView(GenericView): | ... | @@ -512,6 +527,50 @@ class SECompareView(GenericView): |
512 | ''' | 527 | ''' |
513 | 528 | ||
514 | 529 | ||
530 | class CompareOfflineView(GenericView): | ||
531 | permission_classes = [IsAuthenticated] | ||
532 | authentication_classes = [OAuth2AuthenticationWithUser] | ||
533 | |||
534 | # 线下文件夹比对结果上传接口 | ||
535 | @use_args(compare_offline_args, location='data') | ||
536 | def post(self, request, args): | ||
537 | is_hil = args.get('is_hil', False) | ||
538 | table = HILCompareOfflineReport if is_hil else AFCCompareOfflineReport | ||
539 | table.objects.create( | ||
540 | case_number=args.get('case_number'), | ||
541 | request_team=args.get('request_team'), | ||
542 | request_trigger=args.get('request_trigger'), | ||
543 | input_file=args.get('input_file'), | ||
544 | transaction_start=args.get('transaction_start'), | ||
545 | transaction_end=args.get('transaction_end'), | ||
546 | successful_at_this_level=args.get('successful_at_this_level'), | ||
547 | failure_reason=args.get('failure_reason', ''), | ||
548 | process_name=args.get('process_name'), | ||
549 | total_fields=args.get('total_fields', 0), | ||
550 | workflow_name=args.get('workflow_name'), | ||
551 | ) | ||
552 | return response.ok() | ||
553 | |||
554 | post.openapi_doc = ''' | ||
555 | tags: [info] | ||
556 | summary: 线下文件夹比对结果上传 | ||
557 | consumes: [application/json] | ||
558 | produces: [application/json] | ||
559 | parameters: | ||
560 | - in: body | ||
561 | name: body | ||
562 | required: true | ||
563 | schema: | ||
564 | $ref: "#/definitions/ComparisonOffline" | ||
565 | |||
566 | responses: | ||
567 | 200: | ||
568 | description: ok | ||
569 | schema: | ||
570 | $ref: '#/definitions/ApiResponse' | ||
571 | ''' | ||
572 | |||
573 | |||
515 | class DocView(GenericView, DocHandler): | 574 | class DocView(GenericView, DocHandler): |
516 | 575 | ||
517 | # 文件列表页 | 576 | # 文件列表页 | ... | ... |
... | @@ -8,7 +8,7 @@ host: "li19dkocruat01vm.bmwgroup.net" | ... | @@ -8,7 +8,7 @@ host: "li19dkocruat01vm.bmwgroup.net" |
8 | basePath: "/" | 8 | basePath: "/" |
9 | tags: | 9 | tags: |
10 | - name: info | 10 | - name: info |
11 | description: 比对信息 | 11 | description: 比对结果 |
12 | schemes: | 12 | schemes: |
13 | - "https" | 13 | - "https" |
14 | security: | 14 | security: |
... | @@ -47,555 +47,60 @@ NoContent: | ... | @@ -47,555 +47,60 @@ NoContent: |
47 | parameters = '' | 47 | parameters = '' |
48 | 48 | ||
49 | definitions = ''' | 49 | definitions = ''' |
50 | individualCusInfo: | 50 | ComparisonOffline: |
51 | type: object | 51 | type: object |
52 | required: [applicantType, idType, customerChineseName, idNum, idExpiryDate, dateOfBirth, companyName, registeredCapital, selfEmployedSubType] | 52 | required: [is_hil, case_number, request_team, request_trigger, input_file, transaction_start, transaction_end, successful_at_this_level, process_name, total_fields, workflow_name] |
53 | properties: | 53 | properties: |
54 | applicantType: | 54 | is_hil: |
55 | description: applicantType | 55 | description: is_hil |
56 | type: string | 56 | type: boolean |
57 | example: COAPP | 57 | example: false |
58 | enum: [COAPP, CUSTR, GAUTR1, GAUTR2] | 58 | case_number: |
59 | idType: | 59 | description: case_number |
60 | description: idType | 60 | type: string |
61 | type: string | 61 | example: VAT Invoice Number |
62 | example: ITARI | 62 | request_team: |
63 | enum: [ITARI, ITHKM, ITPRC, ITPSP, ITRES, ITTID, ITUSC, ITCCU] | 63 | description: request_team |
64 | secondIdType: | 64 | type: string |
65 | description: secondIdType | 65 | example: Accounting |
66 | type: string | 66 | request_trigger: |
67 | example: ITARI | 67 | description: request_trigger |
68 | enum: [ITARI, ITHKM, ITPRC, ITPSP, ITRES, ITTID] | 68 | type: string |
69 | customerChineseName: | 69 | example: Attended RPA (Q-Account + Machine Number) |
70 | description: customerChineseName | 70 | input_file: |
71 | type: string | 71 | description: input_file |
72 | example: 李四 | 72 | type: string |
73 | idNum: | 73 | example: CH-B1000000身份证.jpeg |
74 | description: idNum | 74 | transaction_start: |
75 | type: string | 75 | description: transaction_start |
76 | example: 111111199404251111 | 76 | type: string |
77 | secondIdNum: | 77 | format: date-time |
78 | description: secondIdNum | 78 | example: "2027-04-30 19:22:29" |
79 | type: string | 79 | transaction_end: |
80 | example: 111111199404251111 | 80 | description: transaction_end |
81 | idExpiryDate: | 81 | type: string |
82 | description: idExpiryDate | 82 | format: date-time |
83 | type: string | 83 | example: "2027-04-30 19:22:29" |
84 | format: date | 84 | successful_at_this_level: |
85 | example: "2027-04-30" | 85 | description: successful_at_this_level |
86 | dateOfBirth: | 86 | type: boolean |
87 | description: dateOfBirth | 87 | example: false |
88 | type: string | 88 | failure_reason: |
89 | format: date | 89 | description: failure_reason |
90 | example: "2027-04-30" | 90 | type: string |
91 | companyName: | 91 | example: Fileds Name which doesn’t pass verification |
92 | description: companyName | 92 | process_name: |
93 | type: string | 93 | description: process_name |
94 | example: 北京思图场景数据科技服务有限公司 | 94 | type: string |
95 | registeredCapital: | 95 | example: F1_VATInvoiceMapping |
96 | description: registeredCapital | 96 | total_fields: |
97 | type: number | 97 | description: total_fields |
98 | format: float | 98 | type: integer |
99 | example: 1234.56 | 99 | example: 0 |
100 | selfEmployedSubType: | 100 | workflow_name: |
101 | description: selfEmployedSubType | 101 | description: workflow_name |
102 | type: string | ||
103 | example: CSIBM | ||
104 | enum: [CSIBM, CSOTH, CSSME] | ||
105 | |||
106 | SEindividualCusInfo: | ||
107 | type: object | ||
108 | required: [customerType, applicantType, customerName, idType, idNum, dateOfBirth, idExpiryDate, hukouProvince, hukouCity] | ||
109 | properties: | ||
110 | customerType: | ||
111 | description: customerType | ||
112 | type: string | ||
113 | example: TCCOR | ||
114 | enum: [TCCOR, TCDAS, TCFRE, TCIAS, TCIND, TCSEP, TCURE] | ||
115 | applicantType: | ||
116 | description: applicantType | ||
117 | type: string | ||
118 | example: COAPP | ||
119 | enum: [COAPP, CUSTR, GAUTR1, GAUTR2] | ||
120 | customerName: | ||
121 | description: customerName | ||
122 | type: string | ||
123 | example: 李四 | ||
124 | idType: | ||
125 | description: idType | ||
126 | type: string | ||
127 | example: ITARI | ||
128 | enum: [ITARI, ITHKM, ITPRC, ITPSP, ITRES, ITTID, ITUSC, ITCCU] | ||
129 | idNum: | ||
130 | description: idNum | ||
131 | type: string | ||
132 | example: 111111199404251111 | ||
133 | secondIdType: | ||
134 | description: secondIdType | ||
135 | type: string | ||
136 | example: ITARI | ||
137 | enum: [ITARI, ITHKM, ITPRC, ITPSP, ITRES, ITTID] | ||
138 | secondIdNum: | ||
139 | description: secondIdNum | ||
140 | type: string | ||
141 | example: 111111199404251111 | ||
142 | dateOfBirth: | ||
143 | description: dateOfBirth | ||
144 | type: string | ||
145 | format: date | ||
146 | example: "2027-04-30" | ||
147 | idExpiryDate: | ||
148 | description: idExpiryDate | ||
149 | type: string | ||
150 | format: date | ||
151 | example: "2027-04-30" | ||
152 | nationality: | ||
153 | description: nationality | ||
154 | type: string | ||
155 | example: 中国 | ||
156 | countryregion: | ||
157 | description: countryregion | ||
158 | type: string | ||
159 | example: 中国 | ||
160 | hukouProvince: | ||
161 | description: hukouProvince | ||
162 | type: string | ||
163 | example: 山东省 | ||
164 | hukouCity: | ||
165 | description: hukouCity | ||
166 | type: string | ||
167 | example: 日照市 | ||
168 | residentialProvince: | ||
169 | description: residentialProvince | ||
170 | type: string | ||
171 | example: 江苏省 | ||
172 | residentialCity: | ||
173 | description: residentialCity | ||
174 | type: string | ||
175 | example: 连云港市 | ||
176 | propertyDocumentPolicy: | ||
177 | description: propertyDocumentPolicy | ||
178 | type: string | ||
179 | example: DOAOB | ||
180 | enum: [DOAOB, DOHDP, DOAMP, DOHED, DOAGQ, DOSME, DOLHK, DORET, DOPCQ, DOSNF, DOYES, DOGRC, DOLLR, DOVDL] | ||
181 | companyName: | ||
182 | description: companyName | ||
183 | type: string | ||
184 | example: 北京思图场景数据科技服务有限公司 | ||
185 | registeredCapital: | ||
186 | description: registeredCapital | ||
187 | type: number | ||
188 | format: float | ||
189 | example: 1234.56 | ||
190 | selfEmployedSubType: | ||
191 | description: selfEmployedSubType | ||
192 | type: string | 102 | type: string |
193 | example: CSIBM | 103 | example: Normal invoice or Special invoice |
194 | enum: [CSIBM, CSOTH, CSSME] | ||
195 | |||
196 | associatedServiceInfo: | ||
197 | type: object | ||
198 | required: [service, amount, financedAmount] | ||
199 | properties: | ||
200 | service: | ||
201 | description: service | ||
202 | type: number | ||
203 | example: 1 | ||
204 | amount: | ||
205 | description: amount | ||
206 | type: number | ||
207 | format: float | ||
208 | example: 1234.56 | ||
209 | financedAmount: | ||
210 | description: financedAmount | ||
211 | type: number | ||
212 | format: float | ||
213 | example: 1234.56 | ||
214 | |||
215 | monthlyPaymentInfo: | ||
216 | type: object | ||
217 | required: [term, amount] | ||
218 | properties: | ||
219 | term: | ||
220 | description: term | ||
221 | type: number | ||
222 | example: 12 | ||
223 | amount: | ||
224 | description: amount | ||
225 | type: number | ||
226 | format: float | ||
227 | example: 1234.56 | ||
228 | |||
229 | SEComparison: | ||
230 | type: object | ||
231 | required: [content] | ||
232 | properties: | ||
233 | content: | ||
234 | description: SE比对内容信息 | ||
235 | type: object | ||
236 | required: [uniqSeq, applicationId, applicationVersion, applicationEntity, customerType, firstSubmmisonDate, individualCusInfo, vehicleInfo, insuranceInfo, bankInfo, quotationtInfo] | ||
237 | properties: | ||
238 | uniqSeq: | ||
239 | description: uniqSeq | ||
240 | type: string | ||
241 | example: 201809301905121000 | ||
242 | applicationId: | ||
243 | description: applicationId | ||
244 | type: string | ||
245 | example: CH-B100000123 | ||
246 | applicationVersion: | ||
247 | description: applicationVersion | ||
248 | type: integer | ||
249 | example: 0 | ||
250 | applicationEntity: | ||
251 | description: applicationEntity | ||
252 | type: string | ||
253 | example: HIL | ||
254 | enum: [AFC, HIL] | ||
255 | customerType: | ||
256 | description: customerType | ||
257 | type: string | ||
258 | example: TCCOR | ||
259 | enum: [TCCOR, TCDAS, TCFRE, TCIAS, TCIND, TCSEP, TCURE] | ||
260 | firstSubmmisonDate: | ||
261 | description: firstSubmmisonDate | ||
262 | type: string | ||
263 | format: date | ||
264 | example: "2027-04-30" | ||
265 | |||
266 | individualCusInfo: | ||
267 | description: individualCusInfo | ||
268 | type: array | ||
269 | items: | ||
270 | $ref: "#/definitions/SEindividualCusInfo" | ||
271 | |||
272 | |||
273 | |||
274 | corporateCusInfo: | ||
275 | description: corporateCusInfo | ||
276 | type: object | ||
277 | required: [customerType, companyName, firstIdType, firstIdNo, businessLicenseNo, organizationCreditCode, taxRegistrationCertificateNo, establishmentDate, incorporationDate, businessLicenseDueDate, legalRepName, organizationType] | ||
278 | properties: | ||
279 | customerType: | ||
280 | description: customerType | ||
281 | type: string | ||
282 | example: TCCOR | ||
283 | enum: [TCCOR, TCDAS, TCFRE, TCIAS, TCIND, TCSEP, TCURE] | ||
284 | companyName: | ||
285 | description: companyName | ||
286 | type: string | ||
287 | example: 北京思图场景数据科技服务有限公司 | ||
288 | firstIdType: | ||
289 | description: firstIdType | ||
290 | type: string | ||
291 | example: ITPRC | ||
292 | enum: [ITARI, ITHKM, ITPRC, ITPSP, ITRES, ITTID, ITUSC, ITCCU] | ||
293 | firstIdNo: | ||
294 | description: firstIdNo | ||
295 | type: string | ||
296 | example: MA007438143XJ1P | ||
297 | businessLicenseNo: | ||
298 | description: businessLicenseNo | ||
299 | type: string | ||
300 | example: MA007438143XJ1P | ||
301 | organizationCreditCode: | ||
302 | description: organizationCreditCode | ||
303 | type: string | ||
304 | example: MA007438143XJ1P | ||
305 | taxRegistrationCertificateNo: | ||
306 | description: taxRegistrationCertificateNo | ||
307 | type: string | ||
308 | example: MA007438143XJ1P | ||
309 | establishmentDate: | ||
310 | description: establishmentDate | ||
311 | type: string | ||
312 | format: date | ||
313 | example: "2027-04-30" | ||
314 | incorporationDate: | ||
315 | description: incorporationDate | ||
316 | type: string | ||
317 | format: date | ||
318 | example: "2027-04-30" | ||
319 | businessLicenseDueDate: | ||
320 | description: businessLicenseDueDate | ||
321 | type: string | ||
322 | format: date | ||
323 | example: "2027-04-30" | ||
324 | legalRepName: | ||
325 | description: legalRepName | ||
326 | type: string | ||
327 | example: 王五 | ||
328 | organizationType: | ||
329 | description: organizationType | ||
330 | type: string | ||
331 | example: OTINS | ||
332 | enum: [OTINS, OTUNI, OTOTH, OTIND, OTCOR] | ||
333 | fleetCustomer: | ||
334 | description: fleetCustomer | ||
335 | type: boolean | ||
336 | example: false | ||
337 | beneficialOwnerName: | ||
338 | description: beneficialOwnerName | ||
339 | type: string | ||
340 | example: 王五 | ||
341 | beneficialOwnerIdType: | ||
342 | description: beneficialOwnerIdType | ||
343 | type: string | ||
344 | example: ITPRC | ||
345 | enum: [ITARI, ITHKM, ITPRC, ITPSP, ITRES, ITTID, ITUSC, ITCCU] | ||
346 | beneficialOwnerIdNo: | ||
347 | description: beneficialOwnerIdNo | ||
348 | type: string | ||
349 | example: 324124534534 | ||
350 | beneficialOwnerIdExpiryDate: | ||
351 | description: beneficialOwnerIdExpiryDate | ||
352 | type: string | ||
353 | format: date | ||
354 | example: "2027-04-30" | ||
355 | |||
356 | |||
357 | vehicleInfo: | ||
358 | description: vehicleInfo | ||
359 | type: object | ||
360 | required: [vehicleStatus, vehicleTransactionAmount, vinNo, dealer] | ||
361 | properties: | ||
362 | vehicleStatus: | ||
363 | description: vehicleStatus | ||
364 | type: string | ||
365 | example: Usedcar | ||
366 | vehicleTransactionAmount: | ||
367 | description: vehicleTransactionAmount | ||
368 | type: number | ||
369 | format: float | ||
370 | example: 1234.56 | ||
371 | vinNo: | ||
372 | description: vinNo | ||
373 | type: string | ||
374 | example: DFS2341JK23 | ||
375 | dealer: | ||
376 | description: dealer | ||
377 | type: string | ||
378 | example: TestDealer | ||
379 | option: | ||
380 | description: option | ||
381 | type: string | ||
382 | example: TestOption | ||
383 | msrp: | ||
384 | description: msrp | ||
385 | type: number | ||
386 | format: float | ||
387 | example: 1234.56 | ||
388 | totalAmount: | ||
389 | description: totalAmount | ||
390 | type: number | ||
391 | format: float | ||
392 | example: 1234.56 | ||
393 | |||
394 | insuranceInfo: | ||
395 | description: insuranceInfo | ||
396 | type: object | ||
397 | required: [insuredAmount, insuranceType, startDate, endDate] | ||
398 | properties: | ||
399 | insuredAmount: | ||
400 | description: insuredAmount | ||
401 | type: number | ||
402 | format: float | ||
403 | example: 1234.56 | ||
404 | insuranceType: | ||
405 | description: insuranceType | ||
406 | type: string | ||
407 | example: ITCOM | ||
408 | enum: [ITCOM, ITCOS] | ||
409 | startDate: | ||
410 | description: startDate | ||
411 | type: string | ||
412 | format: date | ||
413 | example: "2027-04-30" | ||
414 | endDate: | ||
415 | description: endDate | ||
416 | type: string | ||
417 | format: date | ||
418 | example: "2027-04-30" | ||
419 | |||
420 | bankInfo: | ||
421 | description: bankInfo | ||
422 | type: object | ||
423 | required: [bankName, branchName, applicantType, accountHolderName, accountNo] | ||
424 | properties: | ||
425 | bankName: | ||
426 | description: bankName | ||
427 | type: string | ||
428 | example: 农业银行 | ||
429 | branchName: | ||
430 | description: branchName | ||
431 | type: string | ||
432 | example: 回龙观支行 | ||
433 | applicantType: | ||
434 | description: applicantType | ||
435 | type: string | ||
436 | example: COAPP | ||
437 | enum: [COAPP, CUSTR, GAUTR1, GAUTR2] | ||
438 | accountHolderName: | ||
439 | description: accountHolderName | ||
440 | type: string | ||
441 | example: 张三 | ||
442 | accountNo: | ||
443 | description: accountNo | ||
444 | type: string | ||
445 | example: 634523426756756 | ||
446 | bankVerificationStatus: | ||
447 | description: bankVerificationStatus | ||
448 | type: string | ||
449 | example: PASS | ||
450 | enum: [PASS, FAIL, N/A] | ||
451 | isAllDocUploaded: | ||
452 | description: isAllDocUploaded | ||
453 | type: boolean | ||
454 | example: false | ||
455 | |||
456 | quotationtInfo: | ||
457 | description: quotationtInfo | ||
458 | type: object | ||
459 | required: [totalLoanAmount, loanTerm, vehiclePrincipal, associatedServicePrincipal, associatedServiceInfo, monthlyPaymentInfo] | ||
460 | properties: | ||
461 | totalLoanAmount: | ||
462 | description: totalLoanAmount | ||
463 | type: number | ||
464 | format: float | ||
465 | example: 1234.56 | ||
466 | loanTerm: | ||
467 | description: loanTerm | ||
468 | type: number | ||
469 | example: 12 | ||
470 | vehiclePrincipal: | ||
471 | description: vehiclePrincipal | ||
472 | type: number | ||
473 | format: float | ||
474 | example: 1234.56 | ||
475 | associatedServicePrincipal: | ||
476 | description: associatedServicePrincipal | ||
477 | type: number | ||
478 | format: float | ||
479 | example: 1234.56 | ||
480 | associatedServiceInfo: | ||
481 | description: associatedServiceInfo | ||
482 | type: array | ||
483 | items: | ||
484 | $ref: "#/definitions/associatedServiceInfo" | ||
485 | monthlyPaymentInfo: | ||
486 | description: monthlyPaymentInfo | ||
487 | type: array | ||
488 | items: | ||
489 | $ref: "#/definitions/monthlyPaymentInfo" | ||
490 | |||
491 | |||
492 | Comparison: | ||
493 | type: object | ||
494 | required: [content] | ||
495 | properties: | ||
496 | content: | ||
497 | description: 比对内容信息 | ||
498 | type: object | ||
499 | required: [uniqSeq, applicationId, applicationEntity, customerType, applicationVersion, vehicleStatus, comments, individualCusInfo] | ||
500 | properties: | ||
501 | uniqSeq: | ||
502 | description: uniqSeq | ||
503 | type: string | ||
504 | example: 201809301905121000 | ||
505 | applicationId: | ||
506 | description: applicationId | ||
507 | type: string | ||
508 | example: CH-B100000123 | ||
509 | applicationEntity: | ||
510 | description: applicationEntity | ||
511 | type: string | ||
512 | example: HIL | ||
513 | enum: [AFC, HIL] | ||
514 | customerType: | ||
515 | description: customerType | ||
516 | type: string | ||
517 | example: TCCOR | ||
518 | enum: [TCCOR, TCDAS, TCFRE, TCIAS, TCIND, TCSEP, TCURE] | ||
519 | applicationVersion: | ||
520 | description: applicationVersion | ||
521 | type: integer | ||
522 | example: 0 | ||
523 | vehicleStatus: | ||
524 | description: vehicleStatus | ||
525 | type: string | ||
526 | example: PCUSD | ||
527 | enum: [PCUSD, PCNEW] | ||
528 | comments: | ||
529 | description: comments | ||
530 | type: array | ||
531 | items: | ||
532 | type: string | ||
533 | individualCusInfo: | ||
534 | description: individualCusInfo | ||
535 | type: array | ||
536 | items: | ||
537 | $ref: "#/definitions/individualCusInfo" | ||
538 | |||
539 | usedCarInfo: | ||
540 | description: usedCarInfo | ||
541 | type: object | ||
542 | required: [vinNo, manufactureDate, firstRegistrationDate] | ||
543 | properties: | ||
544 | vinNo: | ||
545 | description: vinNo | ||
546 | type: string | ||
547 | example: LBVSFJSDLFJLSDJF | ||
548 | manufactureDate: | ||
549 | description: manufactureDate | ||
550 | type: string | ||
551 | format: date | ||
552 | example: "2027-04-30" | ||
553 | firstRegistrationDate: | ||
554 | description: firstRegistrationDate | ||
555 | type: string | ||
556 | format: date | ||
557 | example: "2027-04-30" | ||
558 | |||
559 | corporateCusInfo: | ||
560 | description: corporateCusInfo | ||
561 | type: object | ||
562 | required: [customerChineseName, legalRepName, idNum, businessLicenseNo, taxRegistrationCode, incorporationDate, businessLicenseDueDate, capitalRegAmount] | ||
563 | properties: | ||
564 | customerChineseName: | ||
565 | description: customerChineseName | ||
566 | type: string | ||
567 | example: 北京思图场景数据科技服务有限公司 | ||
568 | legalRepName: | ||
569 | description: legalRepName | ||
570 | type: string | ||
571 | example: 李六 | ||
572 | idNum: | ||
573 | description: idNum | ||
574 | type: string | ||
575 | example: MA007438143XJ1P | ||
576 | businessLicenseNo: | ||
577 | description: businessLicenseNo | ||
578 | type: string | ||
579 | example: MA007438143XJ1P | ||
580 | taxRegistrationCode: | ||
581 | description: taxRegistrationCode | ||
582 | type: string | ||
583 | example: MA007438143XJ1P | ||
584 | incorporationDate: | ||
585 | description: incorporationDate | ||
586 | type: string | ||
587 | format: date | ||
588 | example: "2027-04-30" | ||
589 | businessLicenseDueDate: | ||
590 | description: businessLicenseDueDate | ||
591 | type: string | ||
592 | format: date | ||
593 | example: "2027-04-30" | ||
594 | capitalRegAmount: | ||
595 | description: capitalRegAmount | ||
596 | type: number | ||
597 | format: float | ||
598 | example: 1234.56 | ||
599 | 104 | ||
600 | ApiResponse: | 105 | ApiResponse: |
601 | description: 响应对象,code字段用于表示响应的状态; data字段用于存放响应内容 | 106 | description: 响应对象,code字段用于表示响应的状态; data字段用于存放响应内容 | ... | ... |
... | @@ -4,11 +4,11 @@ info: | ... | @@ -4,11 +4,11 @@ info: |
4 | title: 接口文档 | 4 | title: 接口文档 |
5 | description: 宝马ocr/biz_logic接口文档 | 5 | description: 宝马ocr/biz_logic接口文档 |
6 | version: 1.0.0 | 6 | version: 1.0.0 |
7 | host: "staging-bmw-ocr.situdata.com" | 7 | host: "li19dkocruat01vm.bmwgroup.net" |
8 | basePath: "/" | 8 | basePath: "/" |
9 | tags: | 9 | tags: |
10 | - name: doc | 10 | - name: info |
11 | description: 文件 | 11 | description: 比对信息 |
12 | schemes: | 12 | schemes: |
13 | - "https" | 13 | - "https" |
14 | security: | 14 | security: |
... | @@ -28,7 +28,7 @@ OAuth2: | ... | @@ -28,7 +28,7 @@ OAuth2: |
28 | client_secret=WNoOilDx140ZLcenDKfsnikv7S2LIFs60DciYoqnrZaYLqYsKpcmt7mJIL69o9AEf84uQvRnS3K2UioxfjNyImjR4UOyXbDcF6qYgTLC4KDVByKFdVhKfrn2Lc4q4BNW | 28 | client_secret=WNoOilDx140ZLcenDKfsnikv7S2LIFs60DciYoqnrZaYLqYsKpcmt7mJIL69o9AEf84uQvRnS3K2UioxfjNyImjR4UOyXbDcF6qYgTLC4KDVByKFdVhKfrn2Lc4q4BNW |
29 | 29 | ||
30 | scopes=write | 30 | scopes=write |
31 | tokenUrl: https://staging-bmw-ocr.situdata.com/api/oauth/token/ | 31 | tokenUrl: https://li19dkocruat01vm.bmwgroup.net/api/oauth/token/ |
32 | scopes: | 32 | scopes: |
33 | write: Grants write access | 33 | write: Grants write access |
34 | ''' | 34 | ''' |
... | @@ -47,115 +47,9 @@ NoContent: | ... | @@ -47,115 +47,9 @@ NoContent: |
47 | parameters = '' | 47 | parameters = '' |
48 | 48 | ||
49 | definitions = ''' | 49 | definitions = ''' |
50 | Doc: | ||
51 | type: object | ||
52 | required: [applicationData, applicantData, document] | ||
53 | properties: | ||
54 | applicationData: | ||
55 | description: 申请信息 | ||
56 | type: object | ||
57 | required: [applicationId] | ||
58 | properties: | ||
59 | applicationId: | ||
60 | description: 申请id | ||
61 | type: string | ||
62 | example: CH-B0011010101 | ||
63 | applicantData: | ||
64 | description: 申请人信息 | ||
65 | type: object | ||
66 | required: [mainApplicantName, coApplicantName, guarantor1Name, guarantor2Name] | ||
67 | properties: | ||
68 | mainApplicantName: | ||
69 | description: 主申请人 | ||
70 | type: string | ||
71 | example: 王明阳 | ||
72 | coApplicantName: | ||
73 | description: 共同申请人 | ||
74 | type: string | ||
75 | example: 王明月 | ||
76 | guarantor1Name: | ||
77 | description: 担保人1 | ||
78 | type: string | ||
79 | example: 王明日 | ||
80 | guarantor2Name: | ||
81 | description: 担保人2 | ||
82 | type: string | ||
83 | example: 王明雨 | ||
84 | document: | ||
85 | description: 文件信息 | ||
86 | type: object | ||
87 | required: [documentName, documentScheme, businessType, uploadFinishTime, dataSource, metadataVersionId] | ||
88 | properties: | ||
89 | documentName: | ||
90 | description: 文件名 | ||
91 | type: string | ||
92 | example: CH-B0011010101王明阳申请表 | ||
93 | documentScheme: | ||
94 | description: 文件方案 | ||
95 | type: string | ||
96 | example: Acceptance | ||
97 | enum: [Acceptance, Settlement, Contract Management] | ||
98 | businessType: | ||
99 | description: 业务类型 | ||
100 | type: string | ||
101 | example: CO00001 | ||
102 | enum: [CO00001, CO00002] | ||
103 | uploadFinishTime: | ||
104 | description: 上传完成时间 | ||
105 | type: string | ||
106 | example: '2020-09-01 12:21:11' | ||
107 | dataSource: | ||
108 | description: 数据源 | ||
109 | type: string | ||
110 | example: POS | ||
111 | enum: [POS, EAPP, Econtract] | ||
112 | metadataVersionId: | ||
113 | description: 元数据版本ID | ||
114 | type: string | ||
115 | example: '8410480' | ||
116 | |||
117 | Application: | ||
118 | type: object | ||
119 | required: [APPLICATION_INFORMATION] | ||
120 | properties: | ||
121 | APPLICATION_INFORMATION: | ||
122 | description: 申请单信息 | ||
123 | type: object | ||
124 | required: [SUBMIT_DATETIME, STATUS, ENTITY, RATING, APPLICATION_ID, APPLICATION_VERSION, INTERMEDIATE_DECISION] | ||
125 | properties: | ||
126 | SUBMIT_DATETIME: | ||
127 | description: 提交时间 | ||
128 | type: string | ||
129 | example: 2020-07-08T18:33:31.000+08:00 | ||
130 | STATUS: | ||
131 | description: 状态 | ||
132 | type: integer | ||
133 | example: 42 | ||
134 | ENTITY: | ||
135 | description: 业务类型 | ||
136 | type: string | ||
137 | example: CO00001 | ||
138 | enum: [CO00001, CO00002] | ||
139 | RATING: | ||
140 | description: 排名 | ||
141 | type: integer | ||
142 | example: 4 | ||
143 | APPLICATION_ID: | ||
144 | description: 申请id | ||
145 | type: string | ||
146 | example: CH-B0011010101 | ||
147 | APPLICATION_VERSION: | ||
148 | description: 申请版本 | ||
149 | type: integer | ||
150 | example: 1 | ||
151 | INTERMEDIATE_DECISION: | ||
152 | description: '' | ||
153 | type: string | ||
154 | example: MUW | ||
155 | |||
156 | individualCusInfo: | 50 | individualCusInfo: |
157 | type: object | 51 | type: object |
158 | required: [applicantType, idType, customerChineseName, idNum, idExpiryDate, dateOfBirth, selfEmployedSubType] | 52 | required: [applicantType, idType, customerChineseName, idNum, idExpiryDate, dateOfBirth, companyName, registeredCapital, selfEmployedSubType] |
159 | properties: | 53 | properties: |
160 | applicantType: | 54 | applicantType: |
161 | description: applicantType | 55 | description: applicantType |
... | @@ -187,17 +81,414 @@ individualCusInfo: | ... | @@ -187,17 +81,414 @@ individualCusInfo: |
187 | idExpiryDate: | 81 | idExpiryDate: |
188 | description: idExpiryDate | 82 | description: idExpiryDate |
189 | type: string | 83 | type: string |
190 | example: 2027-04-30 | 84 | format: date |
85 | example: "2027-04-30" | ||
86 | dateOfBirth: | ||
87 | description: dateOfBirth | ||
88 | type: string | ||
89 | format: date | ||
90 | example: "2027-04-30" | ||
91 | companyName: | ||
92 | description: companyName | ||
93 | type: string | ||
94 | example: 北京思图场景数据科技服务有限公司 | ||
95 | registeredCapital: | ||
96 | description: registeredCapital | ||
97 | type: number | ||
98 | format: float | ||
99 | example: 1234.56 | ||
100 | selfEmployedSubType: | ||
101 | description: selfEmployedSubType | ||
102 | type: string | ||
103 | example: CSIBM | ||
104 | enum: [CSIBM, CSOTH, CSSME] | ||
105 | |||
106 | SEindividualCusInfo: | ||
107 | type: object | ||
108 | required: [customerType, applicantType, customerName, idType, idNum, dateOfBirth, idExpiryDate, hukouProvince, hukouCity] | ||
109 | properties: | ||
110 | customerType: | ||
111 | description: customerType | ||
112 | type: string | ||
113 | example: TCCOR | ||
114 | enum: [TCCOR, TCDAS, TCFRE, TCIAS, TCIND, TCSEP, TCURE] | ||
115 | applicantType: | ||
116 | description: applicantType | ||
117 | type: string | ||
118 | example: COAPP | ||
119 | enum: [COAPP, CUSTR, GAUTR1, GAUTR2] | ||
120 | customerName: | ||
121 | description: customerName | ||
122 | type: string | ||
123 | example: 李四 | ||
124 | idType: | ||
125 | description: idType | ||
126 | type: string | ||
127 | example: ITARI | ||
128 | enum: [ITARI, ITHKM, ITPRC, ITPSP, ITRES, ITTID, ITUSC, ITCCU] | ||
129 | idNum: | ||
130 | description: idNum | ||
131 | type: string | ||
132 | example: 111111199404251111 | ||
133 | secondIdType: | ||
134 | description: secondIdType | ||
135 | type: string | ||
136 | example: ITARI | ||
137 | enum: [ITARI, ITHKM, ITPRC, ITPSP, ITRES, ITTID] | ||
138 | secondIdNum: | ||
139 | description: secondIdNum | ||
140 | type: string | ||
141 | example: 111111199404251111 | ||
191 | dateOfBirth: | 142 | dateOfBirth: |
192 | description: dateOfBirth | 143 | description: dateOfBirth |
193 | type: string | 144 | type: string |
194 | example: 2027-04-30 | 145 | format: date |
146 | example: "2027-04-30" | ||
147 | idExpiryDate: | ||
148 | description: idExpiryDate | ||
149 | type: string | ||
150 | format: date | ||
151 | example: "2027-04-30" | ||
152 | nationality: | ||
153 | description: nationality | ||
154 | type: string | ||
155 | example: 中国 | ||
156 | countryregion: | ||
157 | description: countryregion | ||
158 | type: string | ||
159 | example: 中国 | ||
160 | hukouProvince: | ||
161 | description: hukouProvince | ||
162 | type: string | ||
163 | example: 山东省 | ||
164 | hukouCity: | ||
165 | description: hukouCity | ||
166 | type: string | ||
167 | example: 日照市 | ||
168 | residentialProvince: | ||
169 | description: residentialProvince | ||
170 | type: string | ||
171 | example: 江苏省 | ||
172 | residentialCity: | ||
173 | description: residentialCity | ||
174 | type: string | ||
175 | example: 连云港市 | ||
176 | propertyDocumentPolicy: | ||
177 | description: propertyDocumentPolicy | ||
178 | type: string | ||
179 | example: DOAOB | ||
180 | enum: [DOAOB, DOHDP, DOAMP, DOHED, DOAGQ, DOSME, DOLHK, DORET, DOPCQ, DOSNF, DOYES, DOGRC, DOLLR, DOVDL] | ||
181 | companyName: | ||
182 | description: companyName | ||
183 | type: string | ||
184 | example: 北京思图场景数据科技服务有限公司 | ||
185 | registeredCapital: | ||
186 | description: registeredCapital | ||
187 | type: number | ||
188 | format: float | ||
189 | example: 1234.56 | ||
195 | selfEmployedSubType: | 190 | selfEmployedSubType: |
196 | description: selfEmployedSubType | 191 | description: selfEmployedSubType |
197 | type: string | 192 | type: string |
198 | example: CSIBM | 193 | example: CSIBM |
199 | enum: [CSIBM, CSOTH, CSSME] | 194 | enum: [CSIBM, CSOTH, CSSME] |
195 | |||
196 | associatedServiceInfo: | ||
197 | type: object | ||
198 | required: [service, amount, financedAmount] | ||
199 | properties: | ||
200 | service: | ||
201 | description: service | ||
202 | type: number | ||
203 | example: 1 | ||
204 | amount: | ||
205 | description: amount | ||
206 | type: number | ||
207 | format: float | ||
208 | example: 1234.56 | ||
209 | financedAmount: | ||
210 | description: financedAmount | ||
211 | type: number | ||
212 | format: float | ||
213 | example: 1234.56 | ||
214 | |||
215 | monthlyPaymentInfo: | ||
216 | type: object | ||
217 | required: [term, amount] | ||
218 | properties: | ||
219 | term: | ||
220 | description: term | ||
221 | type: number | ||
222 | example: 12 | ||
223 | amount: | ||
224 | description: amount | ||
225 | type: number | ||
226 | format: float | ||
227 | example: 1234.56 | ||
228 | |||
229 | SEComparison: | ||
230 | type: object | ||
231 | required: [content] | ||
232 | properties: | ||
233 | content: | ||
234 | description: SE比对内容信息 | ||
235 | type: object | ||
236 | required: [uniqSeq, applicationId, applicationVersion, applicationEntity, customerType, firstSubmmisonDate, individualCusInfo, vehicleInfo, insuranceInfo, bankInfo, quotationtInfo] | ||
237 | properties: | ||
238 | uniqSeq: | ||
239 | description: uniqSeq | ||
240 | type: string | ||
241 | example: 201809301905121000 | ||
242 | applicationId: | ||
243 | description: applicationId | ||
244 | type: string | ||
245 | example: CH-B100000123 | ||
246 | applicationVersion: | ||
247 | description: applicationVersion | ||
248 | type: integer | ||
249 | example: 0 | ||
250 | applicationEntity: | ||
251 | description: applicationEntity | ||
252 | type: string | ||
253 | example: HIL | ||
254 | enum: [AFC, HIL] | ||
255 | customerType: | ||
256 | description: customerType | ||
257 | type: string | ||
258 | example: TCCOR | ||
259 | enum: [TCCOR, TCDAS, TCFRE, TCIAS, TCIND, TCSEP, TCURE] | ||
260 | firstSubmmisonDate: | ||
261 | description: firstSubmmisonDate | ||
262 | type: string | ||
263 | format: date | ||
264 | example: "2027-04-30" | ||
200 | 265 | ||
266 | individualCusInfo: | ||
267 | description: individualCusInfo | ||
268 | type: array | ||
269 | items: | ||
270 | $ref: "#/definitions/SEindividualCusInfo" | ||
271 | |||
272 | |||
273 | |||
274 | corporateCusInfo: | ||
275 | description: corporateCusInfo | ||
276 | type: object | ||
277 | required: [customerType, companyName, firstIdType, firstIdNo, businessLicenseNo, organizationCreditCode, taxRegistrationCertificateNo, establishmentDate, incorporationDate, businessLicenseDueDate, legalRepName, organizationType] | ||
278 | properties: | ||
279 | customerType: | ||
280 | description: customerType | ||
281 | type: string | ||
282 | example: TCCOR | ||
283 | enum: [TCCOR, TCDAS, TCFRE, TCIAS, TCIND, TCSEP, TCURE] | ||
284 | companyName: | ||
285 | description: companyName | ||
286 | type: string | ||
287 | example: 北京思图场景数据科技服务有限公司 | ||
288 | firstIdType: | ||
289 | description: firstIdType | ||
290 | type: string | ||
291 | example: ITPRC | ||
292 | enum: [ITARI, ITHKM, ITPRC, ITPSP, ITRES, ITTID, ITUSC, ITCCU] | ||
293 | firstIdNo: | ||
294 | description: firstIdNo | ||
295 | type: string | ||
296 | example: MA007438143XJ1P | ||
297 | businessLicenseNo: | ||
298 | description: businessLicenseNo | ||
299 | type: string | ||
300 | example: MA007438143XJ1P | ||
301 | organizationCreditCode: | ||
302 | description: organizationCreditCode | ||
303 | type: string | ||
304 | example: MA007438143XJ1P | ||
305 | taxRegistrationCertificateNo: | ||
306 | description: taxRegistrationCertificateNo | ||
307 | type: string | ||
308 | example: MA007438143XJ1P | ||
309 | establishmentDate: | ||
310 | description: establishmentDate | ||
311 | type: string | ||
312 | format: date | ||
313 | example: "2027-04-30" | ||
314 | incorporationDate: | ||
315 | description: incorporationDate | ||
316 | type: string | ||
317 | format: date | ||
318 | example: "2027-04-30" | ||
319 | businessLicenseDueDate: | ||
320 | description: businessLicenseDueDate | ||
321 | type: string | ||
322 | format: date | ||
323 | example: "2027-04-30" | ||
324 | legalRepName: | ||
325 | description: legalRepName | ||
326 | type: string | ||
327 | example: 王五 | ||
328 | organizationType: | ||
329 | description: organizationType | ||
330 | type: string | ||
331 | example: OTINS | ||
332 | enum: [OTINS, OTUNI, OTOTH, OTIND, OTCOR] | ||
333 | fleetCustomer: | ||
334 | description: fleetCustomer | ||
335 | type: boolean | ||
336 | example: false | ||
337 | beneficialOwnerName: | ||
338 | description: beneficialOwnerName | ||
339 | type: string | ||
340 | example: 王五 | ||
341 | beneficialOwnerIdType: | ||
342 | description: beneficialOwnerIdType | ||
343 | type: string | ||
344 | example: ITPRC | ||
345 | enum: [ITARI, ITHKM, ITPRC, ITPSP, ITRES, ITTID, ITUSC, ITCCU] | ||
346 | beneficialOwnerIdNo: | ||
347 | description: beneficialOwnerIdNo | ||
348 | type: string | ||
349 | example: 324124534534 | ||
350 | beneficialOwnerIdExpiryDate: | ||
351 | description: beneficialOwnerIdExpiryDate | ||
352 | type: string | ||
353 | format: date | ||
354 | example: "2027-04-30" | ||
355 | |||
356 | |||
357 | vehicleInfo: | ||
358 | description: vehicleInfo | ||
359 | type: object | ||
360 | required: [vehicleStatus, vehicleTransactionAmount, vinNo, dealer] | ||
361 | properties: | ||
362 | vehicleStatus: | ||
363 | description: vehicleStatus | ||
364 | type: string | ||
365 | example: Usedcar | ||
366 | vehicleTransactionAmount: | ||
367 | description: vehicleTransactionAmount | ||
368 | type: number | ||
369 | format: float | ||
370 | example: 1234.56 | ||
371 | vinNo: | ||
372 | description: vinNo | ||
373 | type: string | ||
374 | example: DFS2341JK23 | ||
375 | dealer: | ||
376 | description: dealer | ||
377 | type: string | ||
378 | example: TestDealer | ||
379 | option: | ||
380 | description: option | ||
381 | type: string | ||
382 | example: TestOption | ||
383 | msrp: | ||
384 | description: msrp | ||
385 | type: number | ||
386 | format: float | ||
387 | example: 1234.56 | ||
388 | totalAmount: | ||
389 | description: totalAmount | ||
390 | type: number | ||
391 | format: float | ||
392 | example: 1234.56 | ||
393 | |||
394 | insuranceInfo: | ||
395 | description: insuranceInfo | ||
396 | type: object | ||
397 | required: [insuredAmount, insuranceType, startDate, endDate] | ||
398 | properties: | ||
399 | insuredAmount: | ||
400 | description: insuredAmount | ||
401 | type: number | ||
402 | format: float | ||
403 | example: 1234.56 | ||
404 | insuranceType: | ||
405 | description: insuranceType | ||
406 | type: string | ||
407 | example: ITCOM | ||
408 | enum: [ITCOM, ITCOS] | ||
409 | startDate: | ||
410 | description: startDate | ||
411 | type: string | ||
412 | format: date | ||
413 | example: "2027-04-30" | ||
414 | endDate: | ||
415 | description: endDate | ||
416 | type: string | ||
417 | format: date | ||
418 | example: "2027-04-30" | ||
419 | |||
420 | bankInfo: | ||
421 | description: bankInfo | ||
422 | type: object | ||
423 | required: [bankName, branchName, applicantType, accountHolderName, accountNo] | ||
424 | properties: | ||
425 | bankName: | ||
426 | description: bankName | ||
427 | type: string | ||
428 | example: 农业银行 | ||
429 | branchName: | ||
430 | description: branchName | ||
431 | type: string | ||
432 | example: 回龙观支行 | ||
433 | applicantType: | ||
434 | description: applicantType | ||
435 | type: string | ||
436 | example: COAPP | ||
437 | enum: [COAPP, CUSTR, GAUTR1, GAUTR2] | ||
438 | accountHolderName: | ||
439 | description: accountHolderName | ||
440 | type: string | ||
441 | example: 张三 | ||
442 | accountNo: | ||
443 | description: accountNo | ||
444 | type: string | ||
445 | example: 634523426756756 | ||
446 | bankVerificationStatus: | ||
447 | description: bankVerificationStatus | ||
448 | type: string | ||
449 | example: PASS | ||
450 | enum: [PASS, FAIL, N/A] | ||
451 | isAllDocUploaded: | ||
452 | description: isAllDocUploaded | ||
453 | type: boolean | ||
454 | example: false | ||
455 | |||
456 | quotationtInfo: | ||
457 | description: quotationtInfo | ||
458 | type: object | ||
459 | required: [totalLoanAmount, loanTerm, vehiclePrincipal, associatedServicePrincipal, associatedServiceInfo, monthlyPaymentInfo] | ||
460 | properties: | ||
461 | totalLoanAmount: | ||
462 | description: totalLoanAmount | ||
463 | type: number | ||
464 | format: float | ||
465 | example: 1234.56 | ||
466 | loanTerm: | ||
467 | description: loanTerm | ||
468 | type: number | ||
469 | example: 12 | ||
470 | vehiclePrincipal: | ||
471 | description: vehiclePrincipal | ||
472 | type: number | ||
473 | format: float | ||
474 | example: 1234.56 | ||
475 | associatedServicePrincipal: | ||
476 | description: associatedServicePrincipal | ||
477 | type: number | ||
478 | format: float | ||
479 | example: 1234.56 | ||
480 | associatedServiceInfo: | ||
481 | description: associatedServiceInfo | ||
482 | type: array | ||
483 | items: | ||
484 | $ref: "#/definitions/associatedServiceInfo" | ||
485 | monthlyPaymentInfo: | ||
486 | description: monthlyPaymentInfo | ||
487 | type: array | ||
488 | items: | ||
489 | $ref: "#/definitions/monthlyPaymentInfo" | ||
490 | |||
491 | |||
201 | Comparison: | 492 | Comparison: |
202 | type: object | 493 | type: object |
203 | required: [content] | 494 | required: [content] |
... | @@ -257,16 +548,18 @@ Comparison: | ... | @@ -257,16 +548,18 @@ Comparison: |
257 | manufactureDate: | 548 | manufactureDate: |
258 | description: manufactureDate | 549 | description: manufactureDate |
259 | type: string | 550 | type: string |
260 | example: 2027-04-30 | 551 | format: date |
552 | example: "2027-04-30" | ||
261 | firstRegistrationDate: | 553 | firstRegistrationDate: |
262 | description: firstRegistrationDate | 554 | description: firstRegistrationDate |
263 | type: string | 555 | type: string |
264 | example: 2027-04-30 | 556 | format: date |
557 | example: "2027-04-30" | ||
265 | 558 | ||
266 | corporateCusInfo: | 559 | corporateCusInfo: |
267 | description: corporateCusInfo | 560 | description: corporateCusInfo |
268 | type: object | 561 | type: object |
269 | required: [customerChineseName, legalRepName, idNum, businessLicenseNo, taxRegistrationCode, incorporationDate, businessLicenseDueDate] | 562 | required: [customerChineseName, legalRepName, idNum, businessLicenseNo, taxRegistrationCode, incorporationDate, businessLicenseDueDate, capitalRegAmount] |
270 | properties: | 563 | properties: |
271 | customerChineseName: | 564 | customerChineseName: |
272 | description: customerChineseName | 565 | description: customerChineseName |
... | @@ -291,11 +584,18 @@ Comparison: | ... | @@ -291,11 +584,18 @@ Comparison: |
291 | incorporationDate: | 584 | incorporationDate: |
292 | description: incorporationDate | 585 | description: incorporationDate |
293 | type: string | 586 | type: string |
294 | example: 2027-04-30 | 587 | format: date |
588 | example: "2027-04-30" | ||
295 | businessLicenseDueDate: | 589 | businessLicenseDueDate: |
296 | description: businessLicenseDueDate | 590 | description: businessLicenseDueDate |
297 | type: string | 591 | type: string |
298 | example: 2027-04-30 | 592 | format: date |
593 | example: "2027-04-30" | ||
594 | capitalRegAmount: | ||
595 | description: capitalRegAmount | ||
596 | type: number | ||
597 | format: float | ||
598 | example: 1234.56 | ||
299 | 599 | ||
300 | ApiResponse: | 600 | ApiResponse: |
301 | description: 响应对象,code字段用于表示响应的状态; data字段用于存放响应内容 | 601 | description: 响应对象,code字段用于表示响应的状态; data字段用于存放响应内容 | ... | ... |
src/common/api_doc_bak2.py
0 → 100644
1 | base_part = ''' | ||
2 | swagger: "2.0" | ||
3 | info: | ||
4 | title: 接口文档 | ||
5 | description: 宝马ocr/biz_logic接口文档 | ||
6 | version: 1.0.0 | ||
7 | host: "staging-bmw-ocr.situdata.com" | ||
8 | basePath: "/" | ||
9 | tags: | ||
10 | - name: doc | ||
11 | description: 文件 | ||
12 | schemes: | ||
13 | - "https" | ||
14 | security: | ||
15 | - OAuth2: [] | ||
16 | ''' | ||
17 | |||
18 | # scheme: oauth | ||
19 | security_definitions = ''' | ||
20 | OAuth2: | ||
21 | type: oauth2 | ||
22 | flow: application | ||
23 | description: > | ||
24 | This API uses OAuth 2 with the application(clientCredentials) grant flow. | ||
25 | |||
26 | client_id=sMlciTkppsMzARwHpCVarm5q7DP2Vucj3ny8JFhw | ||
27 | |||
28 | client_secret=WNoOilDx140ZLcenDKfsnikv7S2LIFs60DciYoqnrZaYLqYsKpcmt7mJIL69o9AEf84uQvRnS3K2UioxfjNyImjR4UOyXbDcF6qYgTLC4KDVByKFdVhKfrn2Lc4q4BNW | ||
29 | |||
30 | scopes=write | ||
31 | tokenUrl: https://staging-bmw-ocr.situdata.com/api/oauth/token/ | ||
32 | scopes: | ||
33 | write: Grants write access | ||
34 | ''' | ||
35 | |||
36 | responses = ''' | ||
37 | ErrorResponse: | ||
38 | description: 调用异常, 具体情况请参考`HTTP`状态码和`code`字段 | ||
39 | schema: | ||
40 | $ref: '#/definitions/ApiResponse' | ||
41 | NoContent: | ||
42 | description: 后台接收请求,但是没有响应内容 | ||
43 | schema: | ||
44 | $ref: '#/definitions/ApiResponse' | ||
45 | ''' | ||
46 | |||
47 | parameters = '' | ||
48 | |||
49 | definitions = ''' | ||
50 | Doc: | ||
51 | type: object | ||
52 | required: [applicationData, applicantData, document] | ||
53 | properties: | ||
54 | applicationData: | ||
55 | description: 申请信息 | ||
56 | type: object | ||
57 | required: [applicationId] | ||
58 | properties: | ||
59 | applicationId: | ||
60 | description: 申请id | ||
61 | type: string | ||
62 | example: CH-B0011010101 | ||
63 | applicantData: | ||
64 | description: 申请人信息 | ||
65 | type: object | ||
66 | required: [mainApplicantName, coApplicantName, guarantor1Name, guarantor2Name] | ||
67 | properties: | ||
68 | mainApplicantName: | ||
69 | description: 主申请人 | ||
70 | type: string | ||
71 | example: 王明阳 | ||
72 | coApplicantName: | ||
73 | description: 共同申请人 | ||
74 | type: string | ||
75 | example: 王明月 | ||
76 | guarantor1Name: | ||
77 | description: 担保人1 | ||
78 | type: string | ||
79 | example: 王明日 | ||
80 | guarantor2Name: | ||
81 | description: 担保人2 | ||
82 | type: string | ||
83 | example: 王明雨 | ||
84 | document: | ||
85 | description: 文件信息 | ||
86 | type: object | ||
87 | required: [documentName, documentScheme, businessType, uploadFinishTime, dataSource, metadataVersionId] | ||
88 | properties: | ||
89 | documentName: | ||
90 | description: 文件名 | ||
91 | type: string | ||
92 | example: CH-B0011010101王明阳申请表 | ||
93 | documentScheme: | ||
94 | description: 文件方案 | ||
95 | type: string | ||
96 | example: Acceptance | ||
97 | enum: [Acceptance, Settlement, Contract Management] | ||
98 | businessType: | ||
99 | description: 业务类型 | ||
100 | type: string | ||
101 | example: CO00001 | ||
102 | enum: [CO00001, CO00002] | ||
103 | uploadFinishTime: | ||
104 | description: 上传完成时间 | ||
105 | type: string | ||
106 | example: '2020-09-01 12:21:11' | ||
107 | dataSource: | ||
108 | description: 数据源 | ||
109 | type: string | ||
110 | example: POS | ||
111 | enum: [POS, EAPP, Econtract] | ||
112 | metadataVersionId: | ||
113 | description: 元数据版本ID | ||
114 | type: string | ||
115 | example: '8410480' | ||
116 | |||
117 | Application: | ||
118 | type: object | ||
119 | required: [APPLICATION_INFORMATION] | ||
120 | properties: | ||
121 | APPLICATION_INFORMATION: | ||
122 | description: 申请单信息 | ||
123 | type: object | ||
124 | required: [SUBMIT_DATETIME, STATUS, ENTITY, RATING, APPLICATION_ID, APPLICATION_VERSION, INTERMEDIATE_DECISION] | ||
125 | properties: | ||
126 | SUBMIT_DATETIME: | ||
127 | description: 提交时间 | ||
128 | type: string | ||
129 | example: 2020-07-08T18:33:31.000+08:00 | ||
130 | STATUS: | ||
131 | description: 状态 | ||
132 | type: integer | ||
133 | example: 42 | ||
134 | ENTITY: | ||
135 | description: 业务类型 | ||
136 | type: string | ||
137 | example: CO00001 | ||
138 | enum: [CO00001, CO00002] | ||
139 | RATING: | ||
140 | description: 排名 | ||
141 | type: integer | ||
142 | example: 4 | ||
143 | APPLICATION_ID: | ||
144 | description: 申请id | ||
145 | type: string | ||
146 | example: CH-B0011010101 | ||
147 | APPLICATION_VERSION: | ||
148 | description: 申请版本 | ||
149 | type: integer | ||
150 | example: 1 | ||
151 | INTERMEDIATE_DECISION: | ||
152 | description: '' | ||
153 | type: string | ||
154 | example: MUW | ||
155 | |||
156 | individualCusInfo: | ||
157 | type: object | ||
158 | required: [applicantType, idType, customerChineseName, idNum, idExpiryDate, dateOfBirth, selfEmployedSubType] | ||
159 | properties: | ||
160 | applicantType: | ||
161 | description: applicantType | ||
162 | type: string | ||
163 | example: COAPP | ||
164 | enum: [COAPP, CUSTR, GAUTR1, GAUTR2] | ||
165 | idType: | ||
166 | description: idType | ||
167 | type: string | ||
168 | example: ITARI | ||
169 | enum: [ITARI, ITHKM, ITPRC, ITPSP, ITRES, ITTID, ITUSC, ITCCU] | ||
170 | secondIdType: | ||
171 | description: secondIdType | ||
172 | type: string | ||
173 | example: ITARI | ||
174 | enum: [ITARI, ITHKM, ITPRC, ITPSP, ITRES, ITTID] | ||
175 | customerChineseName: | ||
176 | description: customerChineseName | ||
177 | type: string | ||
178 | example: 李四 | ||
179 | idNum: | ||
180 | description: idNum | ||
181 | type: string | ||
182 | example: 111111199404251111 | ||
183 | secondIdNum: | ||
184 | description: secondIdNum | ||
185 | type: string | ||
186 | example: 111111199404251111 | ||
187 | idExpiryDate: | ||
188 | description: idExpiryDate | ||
189 | type: string | ||
190 | example: 2027-04-30 | ||
191 | dateOfBirth: | ||
192 | description: dateOfBirth | ||
193 | type: string | ||
194 | example: 2027-04-30 | ||
195 | selfEmployedSubType: | ||
196 | description: selfEmployedSubType | ||
197 | type: string | ||
198 | example: CSIBM | ||
199 | enum: [CSIBM, CSOTH, CSSME] | ||
200 | |||
201 | Comparison: | ||
202 | type: object | ||
203 | required: [content] | ||
204 | properties: | ||
205 | content: | ||
206 | description: 比对内容信息 | ||
207 | type: object | ||
208 | required: [uniqSeq, applicationId, applicationEntity, customerType, applicationVersion, vehicleStatus, comments, individualCusInfo] | ||
209 | properties: | ||
210 | uniqSeq: | ||
211 | description: uniqSeq | ||
212 | type: string | ||
213 | example: 201809301905121000 | ||
214 | applicationId: | ||
215 | description: applicationId | ||
216 | type: string | ||
217 | example: CH-B100000123 | ||
218 | applicationEntity: | ||
219 | description: applicationEntity | ||
220 | type: string | ||
221 | example: HIL | ||
222 | enum: [AFC, HIL] | ||
223 | customerType: | ||
224 | description: customerType | ||
225 | type: string | ||
226 | example: TCCOR | ||
227 | enum: [TCCOR, TCDAS, TCFRE, TCIAS, TCIND, TCSEP, TCURE] | ||
228 | applicationVersion: | ||
229 | description: applicationVersion | ||
230 | type: integer | ||
231 | example: 0 | ||
232 | vehicleStatus: | ||
233 | description: vehicleStatus | ||
234 | type: string | ||
235 | example: PCUSD | ||
236 | enum: [PCUSD, PCNEW] | ||
237 | comments: | ||
238 | description: comments | ||
239 | type: array | ||
240 | items: | ||
241 | type: string | ||
242 | individualCusInfo: | ||
243 | description: individualCusInfo | ||
244 | type: array | ||
245 | items: | ||
246 | $ref: "#/definitions/individualCusInfo" | ||
247 | |||
248 | usedCarInfo: | ||
249 | description: usedCarInfo | ||
250 | type: object | ||
251 | required: [vinNo, manufactureDate, firstRegistrationDate] | ||
252 | properties: | ||
253 | vinNo: | ||
254 | description: vinNo | ||
255 | type: string | ||
256 | example: LBVSFJSDLFJLSDJF | ||
257 | manufactureDate: | ||
258 | description: manufactureDate | ||
259 | type: string | ||
260 | example: 2027-04-30 | ||
261 | firstRegistrationDate: | ||
262 | description: firstRegistrationDate | ||
263 | type: string | ||
264 | example: 2027-04-30 | ||
265 | |||
266 | corporateCusInfo: | ||
267 | description: corporateCusInfo | ||
268 | type: object | ||
269 | required: [customerChineseName, legalRepName, idNum, businessLicenseNo, taxRegistrationCode, incorporationDate, businessLicenseDueDate] | ||
270 | properties: | ||
271 | customerChineseName: | ||
272 | description: customerChineseName | ||
273 | type: string | ||
274 | example: 北京思图场景数据科技服务有限公司 | ||
275 | legalRepName: | ||
276 | description: legalRepName | ||
277 | type: string | ||
278 | example: 李六 | ||
279 | idNum: | ||
280 | description: idNum | ||
281 | type: string | ||
282 | example: MA007438143XJ1P | ||
283 | businessLicenseNo: | ||
284 | description: businessLicenseNo | ||
285 | type: string | ||
286 | example: MA007438143XJ1P | ||
287 | taxRegistrationCode: | ||
288 | description: taxRegistrationCode | ||
289 | type: string | ||
290 | example: MA007438143XJ1P | ||
291 | incorporationDate: | ||
292 | description: incorporationDate | ||
293 | type: string | ||
294 | example: 2027-04-30 | ||
295 | businessLicenseDueDate: | ||
296 | description: businessLicenseDueDate | ||
297 | type: string | ||
298 | example: 2027-04-30 | ||
299 | |||
300 | ApiResponse: | ||
301 | description: 响应对象,code字段用于表示响应的状态; data字段用于存放响应内容 | ||
302 | type: object | ||
303 | required: [code, msg] | ||
304 | properties: | ||
305 | code: | ||
306 | type: integer | ||
307 | format: uint8 | ||
308 | description: '0: success | ||
309 | 1: need login | ||
310 | 2: invalid params | ||
311 | 3: internal error | ||
312 | 4: object not exist | ||
313 | 5: async wait | ||
314 | 6: no permission | ||
315 | 7: illegal operation' | ||
316 | example: 0 | ||
317 | enum: [0, 1, 2, 3, 4, 5, 6, 7] | ||
318 | msg: | ||
319 | type: string | ||
320 | example: success | ||
321 | data: | ||
322 | type: object | ||
323 | ''' | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -48,7 +48,7 @@ class Command(BaseCommand): | ... | @@ -48,7 +48,7 @@ class Command(BaseCommand): |
48 | view_class = view.view_class | 48 | view_class = view.view_class |
49 | url_path, path_parameters = pattern[0][0] | 49 | url_path, path_parameters = pattern[0][0] |
50 | url_path = unify_url_path_format(url_path) | 50 | url_path = unify_url_path_format(url_path) |
51 | if url_path not in ['/api/compare/settlement/v1', '/api/compare/v1']: | 51 | if url_path not in ['/api/compare/offline/v1']: |
52 | continue | 52 | continue |
53 | url_path_paramters = getattr(view, 'parameters_doc', None) | 53 | url_path_paramters = getattr(view, 'parameters_doc', None) |
54 | if url_path_paramters: | 54 | if url_path_paramters: | ... | ... |
src/common/tools/mssql_script3.py
0 → 100644
1 | import pyodbc | ||
2 | |||
3 | hil_sql = """ | ||
4 | |||
5 | """ | ||
6 | |||
7 | afc_sql = """ | ||
8 | |||
9 | """ | ||
10 | |||
11 | hil_cnxn = pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};', autocommit=True) | ||
12 | |||
13 | hil_cursor = hil_cnxn.cursor() | ||
14 | hil_cursor.execute(hil_sql) | ||
15 | |||
16 | hil_cursor.close() | ||
17 | hil_cnxn.close() | ||
18 | |||
19 | afc_cnxn = pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};', autocommit=True) | ||
20 | |||
21 | afc_cursor = afc_cnxn.cursor() | ||
22 | afc_cursor.execute(afc_sql) | ||
23 | |||
24 | afc_cursor.close() | ||
25 | afc_cnxn.close() |
-
Please register or sign in to post a comment