44b10463 by 周伟奇

cms part 1

1 parent 1d68ef28
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/settlement/cms/v1:
17 post:
18 tags:
19 - info
20 summary: CMS上传比对信息
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/CMS'
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 associatedServices:
64 description: associatedServices
65 type: object
66 required:
67 - associatedServices
68 - price
69 - financed
70 - total
71 properties:
72 associatedServices:
73 description: associatedServices
74 type: string
75 example: 机动车保险
76 price:
77 description: price
78 type: number
79 format: float
80 example: 1234.56
81 financed:
82 description: financed
83 type: number
84 format: float
85 example: 1234.56
86 total:
87 description: total
88 type: number
89 format: float
90 example: 1234.56
91 paymentSchedule:
92 description: paymentSchedule
93 type: object
94 required:
95 - false
96 - grossRentalAmount
97 properties:
98 false:
99 description: false
100 type: integer
101 example: 3
102 grossRentalAmount:
103 description: grossRentalAmount
104 type: number
105 format: float
106 example: 1234.56
107 IDInformation:
108 description: IDInformation
109 type: object
110 required:
111 - idType
112 - idNum
113 - idExpiryDate
114 properties:
115 idType:
116 description: idType
117 type: string
118 example: ITARI
119 idNum:
120 description: idNum
121 type: string
122 example: 111111199404251111
123 idExpiryDate:
124 description: idExpiryDate
125 type: string
126 example: 2027-04-30
127 applicantInformation:
128 description: applicantInformation
129 type: object
130 required:
131 - applicantType
132 - customersubType
133 - name
134 - legalRepName
135 - IDInformation
136 properties:
137 applicantType:
138 description: applicantType
139 type: string
140 example: Borrower
141 customersubType:
142 description: customersubType
143 type: string
144 example: TCCOR
145 selfEmployedSubType:
146 description: selfEmployedSubType
147 type: string
148 example: CSIBM
149 name:
150 description: name
151 type: string
152 example: 李四
153 legalRepName:
154 description: legalRepName
155 type: string
156 example: 张三
157 dateOfBirth:
158 description: dateOfBirth
159 type: string
160 example: 2027-04-30
161 nationality:
162 description: nationality
163 type: string
164 example: 中国
165 establishmentDate:
166 description: establishmentDate
167 type: string
168 example: 2027-04-30
169 IDInformation:
170 description: IDInformation
171 type: array
172 items:
173 $ref: '#/definitions/IDInformation'
174 CMS:
175 type: object
176 required:
177 - financeCompany
178 - contractNo
179 - status
180 - branch
181 - fpCampaign
182 - applicationVersion
183 - submissionDate
184 - mortgageType
185 - dealerRegion
186 - insuranceRealNameCity
187 - totalFinanceAmount
188 - terms
189 - dealerName
190 - tier
191 - province
192 - fapiaoIssuerDealer
193 - customerName
194 - customerIdNo
195 - vehicleStatus
196 - applicationSource
197 - contractSource
198 - applicationRating
199 - applicantInformation
200 - autoApprovedDetails
201 - financialInformation
202 - paymentSchedule
203 - associatedServices
204 - vehicleInformation
205 - bankAccountDetails
206 - insuranceDetails
207 - corporateFinancialInformation
208 - settlemnetVerification
209 properties:
210 financeCompany:
211 description: financeCompany
212 type: string
213 example: 宝马汽车金融有限公司
214 contractNo:
215 description: contractNo
216 type: string
217 example: CH-B100000123
218 status:
219 description: status
220 type: string
221 example: HIL
222 branch:
223 description: branch
224 type: string
225 example: 宝马汽车金融有限公司
226 fpCampaign:
227 description: fpCampaign
228 type: string
229 example: Q1_2021_BMW_BASIC
230 applicationVersion:
231 description: applicationVersion
232 type: integer
233 example: 1
234 submissionDate:
235 description: submissionDate
236 type: string
237 example: 2020-01-01
238 mortgageType:
239 description: mortgageType
240 type: string
241 example: Mortgage Contract
242 dealerRegion:
243 description: dealerRegion
244 type: string
245 example: West
246 insuranceRealNameCity:
247 description: insuranceRealNameCity
248 type: boolean
249 example: false
250 totalFinanceAmount:
251 description: totalFinanceAmount
252 type: number
253 format: float
254 example: 1234.56
255 terms:
256 description: terms
257 type: integer
258 example: 24
259 dealerName:
260 description: dealerName
261 type: string
262 example: 乐山长宝汽车销售服务有限公司
263 tier:
264 description: tier
265 type: string
266 example: 2
267 province:
268 description: province
269 type: string
270 example: 四川省
271 fapiaoIssuerDealer:
272 description: fapiaoIssuerDealer
273 type: string
274 example: 乐山长宝汽车销售服务有限公司
275 customerName:
276 description: customerName
277 type: string
278 example: 蔡红
279 customerIdNo:
280 description: customerIdNo
281 type: string
282 example: 511102196706080000
283 vehicleStatus:
284 description: vehicleStatus
285 type: string
286 example: Used
287 applicationSource:
288 description: applicationSource
289 type: string
290 example: eApp
291 contractSource:
292 description: contractSource
293 type: string
294 example: Online Sign
295 applicationRating:
296 description: applicationRating
297 type: integer
298 example: 100
299 applicantInformation:
300 description: applicantInformation
301 type: array
302 items:
303 $ref: '#/definitions/applicantInformation'
304 autoApprovedDetails:
305 description: autoApprovedDetails
306 type: object
307 required:
308 - aaType
309 properties:
310 aaType:
311 description: aaType
312 type: string
313 example: CAA1
314 financialInformation:
315 description: financialInformation
316 type: object
317 required:
318 - vehiclePrice
319 - grossPrice
320 - associatedServicePrice
321 - vehiclePrincipal
322 - associatedServicePrincipal
323 - originationPrincipal
324 - totalDownPayment
325 - vehicleDownPaymentRatio
326 - optionAmount
327 - sumOfMSRPAndOption
328 properties:
329 vehiclePrice:
330 description: vehiclePrice
331 type: number
332 format: float
333 example: 1234.56
334 grossPrice:
335 description: grossPrice
336 type: number
337 format: float
338 example: 1234.56
339 associatedServicePrice:
340 description: associatedServicePrice
341 type: number
342 format: float
343 example: 1234.56
344 vehiclePrincipal:
345 description: vehiclePrincipal
346 type: number
347 format: float
348 example: 1234.56
349 associatedServicePrincipal:
350 description: associatedServicePrincipal
351 type: number
352 format: float
353 example: 1234.56
354 originationPrincipal:
355 description: originationPrincipal
356 type: number
357 format: float
358 example: 1234.56
359 totalDownPayment:
360 description: totalDownPayment
361 type: number
362 format: float
363 example: 1234.56
364 vehicleDownPaymentRatio:
365 description: vehicleDownPaymentRatio
366 type: number
367 format: float
368 example: 1234.56
369 optionAmount:
370 description: optionAmount
371 type: number
372 format: float
373 example: 1234.56
374 sumOfMSRPAndOption:
375 description: sumOfMSRPAndOption
376 type: number
377 format: float
378 example: 1234.56
379 paymentSchedule:
380 description: paymentSchedule
381 type: array
382 items:
383 $ref: '#/definitions/paymentSchedule'
384 associatedServices:
385 description: associatedServices
386 type: array
387 items:
388 $ref: '#/definitions/associatedServices'
389 vehicleInformation:
390 description: vehicleInformation
391 type: object
392 required:
393 - vinNo
394 properties:
395 vinNo:
396 description: vinNo
397 type: string
398 example: LBV23482934DJFKD
399 bankAccountDetails:
400 description: bankAccountDetails
401 type: object
402 required:
403 - bankName
404 - accountHolderName
405 - accountNo
406 properties:
407 bankName:
408 description: bankName
409 type: string
410 example: 中国银行
411 accountHolderName:
412 description: accountHolderName
413 type: string
414 example: 张三
415 accountNo:
416 description: accountNo
417 type: string
418 example: 12312123123123123
419 insuranceDetails:
420 description: insuranceDetails
421 type: object
422 required:
423 - insuranceType
424 - insuranceAmount
425 - startDate
426 - endDate
427 properties:
428 insuranceType:
429 description: insuranceType
430 type: string
431 example: ComprehensiveInsurance
432 insuranceAmount:
433 description: insuranceAmount
434 type: string
435 example: 60000000.0
436 startDate:
437 description: startDate
438 type: string
439 example: 2020-01-01
440 endDate:
441 description: endDate
442 type: string
443 example: 2020-01-01
444 corporateFinancialInformation:
445 description: corporateFinancialInformation
446 type: object
447 required:
448 - hashCode
449 - borrowerName
450 - fiscalYear
451 - totaAssets
452 - totalLiabilitiesAndOwnersEquity
453 - cashAndCashEquivalentAtEndOfPeriod
454 - netProfit
455 properties:
456 hashCode:
457 description: hashCode
458 type: string
459 example: 238231
460 borrowerName:
461 description: borrowerName
462 type: string
463 example: 张三
464 fiscalYear:
465 description: fiscalYear
466 type: integer
467 example: 2019
468 totaAssets:
469 description: totaAssets
470 type: number
471 format: float
472 example: 1234.56
473 totalLiabilitiesAndOwnersEquity:
474 description: totalLiabilitiesAndOwnersEquity
475 type: number
476 format: float
477 example: 1234.56
478 cashAndCashEquivalentAtEndOfPeriod:
479 description: cashAndCashEquivalentAtEndOfPeriod
480 type: number
481 format: float
482 example: 1234.56
483 netProfit:
484 description: netProfit
485 type: number
486 format: float
487 example: 1234.56
488 settlemnetVerification:
489 description: settlemnetVerification
490 type: object
491 required:
492 - applicationNo
493 properties:
494 applicationNo:
495 description: applicationNo
496 type: string
497 example: CH-B100000123
498 ApiResponse:
499 description: 响应对象,code字段用于表示响应的状态; data字段用于存放响应内容
500 type: object
501 required:
502 - code
503 - msg
504 properties:
505 code:
506 type: integer
507 format: uint8
508 description: '0: success 1: need login 2: invalid params 3: internal error
509 4: object not exist 5: async wait 6: no permission 7: illegal operation'
510 example: 0
511 enum:
512 - 0
513 - 1
514 - 2
515 - 3
516 - 4
517 - 5
518 - 6
519 - 7
520 msg:
521 type: string
522 example: success
523 data:
524 type: object
...@@ -5,6 +5,7 @@ from . import views ...@@ -5,6 +5,7 @@ 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'settlement/cms/v1', views.SECMSView.as_view()),
8 path(r'offline/v1', views.CompareOfflineView.as_view()), 9 path(r'offline/v1', views.CompareOfflineView.as_view()),
9 path(r'result', views.CompareResultView.as_view()), 10 path(r'result', views.CompareResultView.as_view()),
10 ] 11 ]
......
...@@ -312,6 +312,128 @@ compare_offline_args = { ...@@ -312,6 +312,128 @@ compare_offline_args = {
312 'workflow_name': fields.Str(required=True, validate=validate.Length(max=1024)), 312 'workflow_name': fields.Str(required=True, validate=validate.Length(max=1024)),
313 } 313 }
314 314
315 id_info_args = {
316 'idType': fields.Str(required=True, validate=validate.Length(max=32)),
317 'idNum': fields.Str(required=True, validate=validate.Length(max=64)),
318 'idExpiryDate': CustomDate(required=True),
319 }
320
321 info_args = {
322 'applicantType': fields.Str(required=True, validate=validate.Length(max=64)),
323 'customersubType': fields.Str(required=True, validate=validate.Length(max=32)),
324 'selfEmployedSubType': fields.Str(required=False, validate=validate.Length(max=32)),
325 'name': fields.Str(required=True, validate=validate.Length(max=64)),
326 'legalRepName': fields.Str(required=True, validate=validate.Length(max=64)),
327 'dateOfBirth': CustomDate(required=False),
328 'nationality': fields.Str(required=False, validate=validate.Length(max=64)),
329 'establishmentDate': CustomDate(required=False),
330 'IDInformation': fields.List(fields.Nested(id_info_args), required=True,
331 validate=validate.Length(min=1)),
332 }
333
334 auto_approve_details = {
335 'aaType': fields.Str(required=True, validate=validate.Length(max=64)),
336 }
337
338 financial_info = {
339 'vehiclePrice': CustomDecimal(required=True),
340 'grossPrice': CustomDecimal(required=True),
341 'associatedServicePrice': CustomDecimal(required=True),
342 'vehiclePrincipal': CustomDecimal(required=True),
343 'associatedServicePrincipal': CustomDecimal(required=True),
344 'originationPrincipal': CustomDecimal(required=True),
345 'totalDownPayment': CustomDecimal(required=True),
346 'vehicleDownPaymentRatio': CustomDecimal(required=True),
347 'optionAmount': CustomDecimal(required=True),
348 'sumOfMSRPAndOption': CustomDecimal(required=True),
349 }
350
351 payment_schedule = {
352 'no': fields.Int(required=True),
353 'grossRentalAmount': CustomDecimal(required=True),
354 }
355
356 associated_services = {
357 'associatedServices': fields.Str(required=True, validate=validate.Length(max=64)),
358 'price': CustomDecimal(required=True),
359 'financed': CustomDecimal(required=True),
360 'total': CustomDecimal(required=True),
361 }
362
363 vehicle_info = {
364 'vinNo': fields.Str(required=True, validate=validate.Length(max=64)),
365 }
366
367 bank_details = {
368 'bankName': fields.Str(required=True, validate=validate.Length(max=64)),
369 'accountHolderName': fields.Str(required=True, validate=validate.Length(max=64)),
370 'accountNo': fields.Str(required=True, validate=validate.Length(max=64)),
371 }
372
373 insurance_details = {
374 'insuranceType': fields.Str(required=True, validate=validate.Length(max=64)),
375 'insuranceAmount': fields.Str(required=True, validate=validate.Length(max=64)),
376 'startDate': CustomDate(required=True),
377 'endDate': CustomDate(required=True),
378 }
379
380 corporate_info = {
381 'hashCode': fields.Str(required=True, validate=validate.Length(max=64)),
382 'borrowerName': fields.Str(required=True, validate=validate.Length(max=64)),
383 'fiscalYear': fields.Int(required=True),
384 'totaAssets': CustomDecimal(required=True),
385 'totalLiabilitiesAndOwnersEquity': CustomDecimal(required=True),
386 'cashAndCashEquivalentAtEndOfPeriod': CustomDecimal(required=True),
387 'netProfit': CustomDecimal(required=True),
388 }
389
390 se_verification = {
391 'applicationNo': fields.Str(required=True, validate=validate.Length(max=64)),
392 }
393
394 se_cms_content = {
395 'financeCompany': fields.Str(required=True, validate=validate.Length(max=512)),
396 'contractNo': fields.Str(required=True, validate=validate.Length(max=64)),
397 'status': fields.Str(required=True, validate=validate.Length(max=64)),
398 'branch': fields.Str(required=True, validate=validate.Length(max=512)),
399 'fpCampaign': fields.Str(required=True, validate=validate.Length(max=512)),
400 'applicationVersion': fields.Int(required=True),
401 'submissionDate': CustomDate(required=True),
402 'mortgageType': fields.Str(required=True, validate=validate.Length(max=64)),
403 'dealerRegion': fields.Str(required=True, validate=validate.Length(max=64)),
404 'insuranceRealNameCity': fields.Boolean(required=True),
405 'totalFinanceAmount': CustomDecimal(required=True),
406 'terms': fields.Int(required=True),
407 'dealerName': fields.Str(required=True, validate=validate.Length(max=512)),
408 'tier': fields.Str(required=True, validate=validate.Length(max=64)),
409 'province': fields.Str(required=True, validate=validate.Length(max=64)),
410 'fapiaoIssuerDealer': fields.Str(required=True, validate=validate.Length(max=512)),
411 'customerName': fields.Str(required=True, validate=validate.Length(max=64)),
412 'customerIdNo': fields.Str(required=True, validate=validate.Length(max=64)),
413 'vehicleStatus': fields.Str(required=True, validate=validate.Length(max=64)),
414 'applicationSource': fields.Str(required=True, validate=validate.Length(max=64)),
415 'contractSource': fields.Str(required=True, validate=validate.Length(max=64)),
416 'applicationRating': fields.Int(required=True),
417
418 'applicantInformation': fields.List(fields.Nested(info_args),
419 required=True, validate=validate.Length(min=1, max=4)),
420 'autoApprovedDetails': fields.Nested(auto_approve_details, required=True),
421 'financialInformation': fields.Nested(financial_info, required=True),
422 'paymentSchedule': fields.List(fields.Nested(payment_schedule), required=True,
423 validate=validate.Length(min=1)),
424 'associatedServices': fields.List(fields.Nested(associated_services), required=True,
425 validate=validate.Length(min=1)),
426 'vehicleInformation': fields.Nested(vehicle_info, required=True),
427 'bankAccountDetails': fields.Nested(bank_details, required=True),
428 'insuranceDetails': fields.Nested(insurance_details, required=True),
429 'corporateFinancialInformation': fields.Nested(corporate_info, required=True),
430 'settlemnetVerification': fields.Nested(se_verification, required=True),
431 }
432
433 se_cms_args = {
434 'content': fields.Nested(se_cms_content, required=True)
435 }
436
315 437
316 class UploadDocView(GenericView, DocHandler): 438 class UploadDocView(GenericView, DocHandler):
317 # permission_classes = [] 439 # permission_classes = []
...@@ -806,3 +928,33 @@ class CompareResultView(GenericView): ...@@ -806,3 +928,33 @@ class CompareResultView(GenericView):
806 return HttpResponse(html) 928 return HttpResponse(html)
807 929
808 # return response.ok(data=compare_result) 930 # return response.ok(data=compare_result)
931
932
933 class SECMSView(GenericView):
934 permission_classes = [IsAuthenticated]
935 authentication_classes = [OAuth2AuthenticationWithUser]
936
937 # pos上传比对信息接口 SE
938 @use_args(se_cms_args, location='data')
939 def post(self, request, args):
940 self.running_log.info('cms in')
941 return response.ok()
942
943 post.openapi_doc = '''
944 tags: [info]
945 summary: CMS上传比对信息
946 consumes: [application/json]
947 produces: [application/json]
948 parameters:
949 - in: body
950 name: body
951 required: true
952 schema:
953 $ref: "#/definitions/CMS"
954
955 responses:
956 200:
957 description: ok
958 schema:
959 $ref: '#/definitions/ApiResponse'
960 '''
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -47,60 +47,385 @@ NoContent: ...@@ -47,60 +47,385 @@ NoContent:
47 parameters = '' 47 parameters = ''
48 48
49 definitions = ''' 49 definitions = '''
50 ComparisonOffline: 50 associatedServices:
51 description: associatedServices
51 type: object 52 type: object
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 required: [associatedServices, price, financed, total]
54 properties:
55 associatedServices:
56 description: associatedServices
57 type: string
58 example: 机动车保险
59 price:
60 description: price
61 type: number
62 format: float
63 example: 1234.56
64 financed:
65 description: financed
66 type: number
67 format: float
68 example: 1234.56
69 total:
70 description: total
71 type: number
72 format: float
73 example: 1234.56
74
75 paymentSchedule:
76 description: paymentSchedule
77 type: object
78 required: [no, grossRentalAmount]
79 properties:
80 no:
81 description: no
82 type: integer
83 example: 3
84 grossRentalAmount:
85 description: grossRentalAmount
86 type: number
87 format: float
88 example: 1234.56
89
90 IDInformation:
91 description: IDInformation
92 type: object
93 required: [idType, idNum, idExpiryDate]
94 properties:
95 idType:
96 description: idType
97 type: string
98 example: ITARI
99 idNum:
100 description: idNum
101 type: string
102 example: 111111199404251111
103 idExpiryDate:
104 description: idExpiryDate
105 type: string
106 example: 2027-04-30
107
108 applicantInformation:
109 description: applicantInformation
110 type: object
111 required: [applicantType, customersubType, name, legalRepName, IDInformation]
112 properties:
113 applicantType:
114 description: applicantType
115 type: string
116 example: Borrower
117 customersubType:
118 description: customersubType
119 type: string
120 example: TCCOR
121 selfEmployedSubType:
122 description: selfEmployedSubType
123 type: string
124 example: CSIBM
125 name:
126 description: name
127 type: string
128 example: 李四
129 legalRepName:
130 description: legalRepName
131 type: string
132 example: 张三
133 dateOfBirth:
134 description: dateOfBirth
135 type: string
136 example: 2027-04-30
137 nationality:
138 description: nationality
139 type: string
140 example: 中国
141 establishmentDate:
142 description: establishmentDate
143 type: string
144 example: 2027-04-30
145
146 IDInformation:
147 description: IDInformation
148 type: array
149 items:
150 $ref: "#/definitions/IDInformation"
151
152
153 CMS:
154 type: object
155 required: [financeCompany, contractNo, status, branch, fpCampaign, applicationVersion, submissionDate, mortgageType, dealerRegion, insuranceRealNameCity, totalFinanceAmount, terms, dealerName, tier, province, fapiaoIssuerDealer, customerName, customerIdNo, vehicleStatus, applicationSource, contractSource, applicationRating, applicantInformation, autoApprovedDetails, financialInformation, paymentSchedule, associatedServices, vehicleInformation, bankAccountDetails, insuranceDetails, corporateFinancialInformation, settlemnetVerification]
53 properties: 156 properties:
54 is_hil: 157 financeCompany:
55 description: is_hil 158 description: financeCompany
56 type: boolean 159 type: string
57 example: false 160 example: 宝马汽车金融有限公司
58 case_number: 161 contractNo:
59 description: case_number 162 description: contractNo
60 type: string 163 type: string
61 example: VAT Invoice Number 164 example: CH-B100000123
62 request_team: 165 status:
63 description: request_team 166 description: status
64 type: string 167 type: string
65 example: Accounting 168 example: HIL
66 request_trigger: 169 branch:
67 description: request_trigger 170 description: branch
68 type: string 171 type: string
69 example: Attended RPA (Q-Account + Machine Number) 172 example: 宝马汽车金融有限公司
70 input_file: 173 fpCampaign:
71 description: input_file 174 description: fpCampaign
72 type: string 175 type: string
73 example: CH-B1000000身份证.jpeg 176 example: Q1_2021_BMW_BASIC
74 transaction_start: 177 applicationVersion:
75 description: transaction_start 178 description: applicationVersion
76 type: string 179 type: integer
77 format: date-time 180 example: 1
78 example: "2027-04-30 19:22:29" 181 submissionDate:
79 transaction_end: 182 description: submissionDate
80 description: transaction_end 183 type: string
81 type: string 184 example: 2020-01-01
82 format: date-time 185 mortgageType:
83 example: "2027-04-30 19:22:29" 186 description: mortgageType
84 successful_at_this_level: 187 type: string
85 description: successful_at_this_level 188 example: Mortgage Contract
189 dealerRegion:
190 description: dealerRegion
191 type: string
192 example: West
193 insuranceRealNameCity:
194 description: insuranceRealNameCity
86 type: boolean 195 type: boolean
87 example: false 196 example: false
88 failure_reason: 197 totalFinanceAmount:
89 description: failure_reason 198 description: totalFinanceAmount
199 type: number
200 format: float
201 example: 1234.56
202 terms:
203 description: terms
204 type: integer
205 example: 24
206 dealerName:
207 description: dealerName
90 type: string 208 type: string
91 example: Fileds Name which doesn’t pass verification 209 example: 乐山长宝汽车销售服务有限公司
92 process_name: 210 tier:
93 description: process_name 211 description: tier
94 type: string 212 type: string
95 example: F1_VATInvoiceMapping 213 example: 2
96 total_fields: 214 province:
97 description: total_fields 215 description: province
98 type: integer
99 example: 0
100 workflow_name:
101 description: workflow_name
102 type: string 216 type: string
103 example: Normal invoice or Special invoice 217 example: 四川省
218 fapiaoIssuerDealer:
219 description: fapiaoIssuerDealer
220 type: string
221 example: 乐山长宝汽车销售服务有限公司
222 customerName:
223 description: customerName
224 type: string
225 example: 蔡红
226 customerIdNo:
227 description: customerIdNo
228 type: string
229 example: 511102196706080000
230 vehicleStatus:
231 description: vehicleStatus
232 type: string
233 example: Used
234 applicationSource:
235 description: applicationSource
236 type: string
237 example: eApp
238 contractSource:
239 description: contractSource
240 type: string
241 example: Online Sign
242 applicationRating:
243 description: applicationRating
244 type: integer
245 example: 100
246
247 applicantInformation:
248 description: applicantInformation
249 type: array
250 items:
251 $ref: "#/definitions/applicantInformation"
252
253 autoApprovedDetails:
254 description: autoApprovedDetails
255 type: object
256 required: [aaType]
257 properties:
258 aaType:
259 description: aaType
260 type: string
261 example: CAA1
262
263 financialInformation:
264 description: financialInformation
265 type: object
266 required: [vehiclePrice, grossPrice, associatedServicePrice, vehiclePrincipal, associatedServicePrincipal, originationPrincipal, totalDownPayment, vehicleDownPaymentRatio, optionAmount, sumOfMSRPAndOption]
267 properties:
268 vehiclePrice:
269 description: vehiclePrice
270 type: number
271 format: float
272 example: 1234.56
273 grossPrice:
274 description: grossPrice
275 type: number
276 format: float
277 example: 1234.56
278 associatedServicePrice:
279 description: associatedServicePrice
280 type: number
281 format: float
282 example: 1234.56
283 vehiclePrincipal:
284 description: vehiclePrincipal
285 type: number
286 format: float
287 example: 1234.56
288 associatedServicePrincipal:
289 description: associatedServicePrincipal
290 type: number
291 format: float
292 example: 1234.56
293 originationPrincipal:
294 description: originationPrincipal
295 type: number
296 format: float
297 example: 1234.56
298 totalDownPayment:
299 description: totalDownPayment
300 type: number
301 format: float
302 example: 1234.56
303 vehicleDownPaymentRatio:
304 description: vehicleDownPaymentRatio
305 type: number
306 format: float
307 example: 1234.56
308 optionAmount:
309 description: optionAmount
310 type: number
311 format: float
312 example: 1234.56
313 sumOfMSRPAndOption:
314 description: sumOfMSRPAndOption
315 type: number
316 format: float
317 example: 1234.56
318
319 paymentSchedule:
320 description: paymentSchedule
321 type: array
322 items:
323 $ref: "#/definitions/paymentSchedule"
324
325 associatedServices:
326 description: associatedServices
327 type: array
328 items:
329 $ref: "#/definitions/associatedServices"
330
331 vehicleInformation:
332 description: vehicleInformation
333 type: object
334 required: [vinNo]
335 properties:
336 vinNo:
337 description: vinNo
338 type: string
339 example: LBV23482934DJFKD
340
341 bankAccountDetails:
342 description: bankAccountDetails
343 type: object
344 required: [bankName, accountHolderName, accountNo]
345 properties:
346 bankName:
347 description: bankName
348 type: string
349 example: 中国银行
350 accountHolderName:
351 description: accountHolderName
352 type: string
353 example: 张三
354 accountNo:
355 description: accountNo
356 type: string
357 example: 12312123123123123
358
359 insuranceDetails:
360 description: insuranceDetails
361 type: object
362 required: [insuranceType, insuranceAmount, startDate, endDate]
363 properties:
364 insuranceType:
365 description: insuranceType
366 type: string
367 example: ComprehensiveInsurance
368 insuranceAmount:
369 description: insuranceAmount
370 type: string
371 example: 60000000.00
372 startDate:
373 description: startDate
374 type: string
375 example: 2020-01-01
376 endDate:
377 description: endDate
378 type: string
379 example: 2020-01-01
380
381 corporateFinancialInformation:
382 description: corporateFinancialInformation
383 type: object
384 required: [hashCode, borrowerName, fiscalYear, totaAssets, totalLiabilitiesAndOwnersEquity, cashAndCashEquivalentAtEndOfPeriod, netProfit]
385 properties:
386 hashCode:
387 description: hashCode
388 type: string
389 example: 238231
390 borrowerName:
391 description: borrowerName
392 type: string
393 example: 张三
394 fiscalYear:
395 description: fiscalYear
396 type: integer
397 example: 2019
398 totaAssets:
399 description: totaAssets
400 type: number
401 format: float
402 example: 1234.56
403 totalLiabilitiesAndOwnersEquity:
404 description: totalLiabilitiesAndOwnersEquity
405 type: number
406 format: float
407 example: 1234.56
408 cashAndCashEquivalentAtEndOfPeriod:
409 description: cashAndCashEquivalentAtEndOfPeriod
410 type: number
411 format: float
412 example: 1234.56
413 netProfit:
414 description: netProfit
415 type: number
416 format: float
417 example: 1234.56
418
419 settlemnetVerification:
420 description: settlemnetVerification
421 type: object
422 required: [applicationNo]
423 properties:
424 applicationNo:
425 description: applicationNo
426 type: string
427 example: CH-B100000123
428
104 429
105 ApiResponse: 430 ApiResponse:
106 description: 响应对象,code字段用于表示响应的状态; data字段用于存放响应内容 431 description: 响应对象,code字段用于表示响应的状态; data字段用于存放响应内容
......
1 base_part = '''
2 swagger: "2.0"
3 info:
4 title: 接口文档
5 description: 宝马ocr/biz_logic接口文档
6 version: 1.0.0
7 host: "li19dkocruat01vm.bmwgroup.net"
8 basePath: "/"
9 tags:
10 - name: info
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://li19dkocruat01vm.bmwgroup.net/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 ComparisonOffline:
51 type: object
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:
54 is_hil:
55 description: is_hil
56 type: boolean
57 example: false
58 case_number:
59 description: case_number
60 type: string
61 example: VAT Invoice Number
62 request_team:
63 description: request_team
64 type: string
65 example: Accounting
66 request_trigger:
67 description: request_trigger
68 type: string
69 example: Attended RPA (Q-Account + Machine Number)
70 input_file:
71 description: input_file
72 type: string
73 example: CH-B1000000身份证.jpeg
74 transaction_start:
75 description: transaction_start
76 type: string
77 format: date-time
78 example: "2027-04-30 19:22:29"
79 transaction_end:
80 description: transaction_end
81 type: string
82 format: date-time
83 example: "2027-04-30 19:22:29"
84 successful_at_this_level:
85 description: successful_at_this_level
86 type: boolean
87 example: false
88 failure_reason:
89 description: failure_reason
90 type: string
91 example: Fileds Name which doesn’t pass verification
92 process_name:
93 description: process_name
94 type: string
95 example: F1_VATInvoiceMapping
96 total_fields:
97 description: total_fields
98 type: integer
99 example: 0
100 workflow_name:
101 description: workflow_name
102 type: string
103 example: Normal invoice or Special invoice
104
105 ApiResponse:
106 description: 响应对象,code字段用于表示响应的状态; data字段用于存放响应内容
107 type: object
108 required: [code, msg]
109 properties:
110 code:
111 type: integer
112 format: uint8
113 description: '0: success
114 1: need login
115 2: invalid params
116 3: internal error
117 4: object not exist
118 5: async wait
119 6: no permission
120 7: illegal operation'
121 example: 0
122 enum: [0, 1, 2, 3, 4, 5, 6, 7]
123 msg:
124 type: string
125 example: success
126 data:
127 type: object
128 '''
...\ 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/offline/v1']: 51 if url_path not in ['/api/compare/settlement/cms/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:
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!