compare interface
Showing
1 changed file
with
9 additions
and
4 deletions
1 | import os | 1 | import os |
2 | import time | 2 | import time |
3 | import json | ||
3 | import random | 4 | import random |
4 | import datetime | 5 | import datetime |
5 | import fitz | 6 | import fitz |
... | @@ -316,6 +317,10 @@ class CompareView(GenericView): | ... | @@ -316,6 +317,10 @@ class CompareView(GenericView): |
316 | uniq_seq = args.get('uniqSeq') | 317 | uniq_seq = args.get('uniqSeq') |
317 | business_type = args.get('applicationEntity') | 318 | business_type = args.get('applicationEntity') |
318 | application_id = args.get('applicationId') | 319 | application_id = args.get('applicationId') |
320 | individual_cus_info = json.dumps(args.get('individualCusInfo')) | ||
321 | usedcar_info = json.dumps(args.get('usedCarInfo')) if isinstance(args.get('usedCarInfo'), dict) else None | ||
322 | corporate_cus_info = json.dumps(args.get('corporateCusInfo')) if isinstance(args.get('corporateCusInfo'), | ||
323 | dict) else None | ||
319 | comparison_class = HILComparisonInfo if business_type in consts.HIL_SET else AFCComparisonInfo | 324 | comparison_class = HILComparisonInfo if business_type in consts.HIL_SET else AFCComparisonInfo |
320 | comparison_class.objects.create( | 325 | comparison_class.objects.create( |
321 | uniq_seq=uniq_seq, | 326 | uniq_seq=uniq_seq, |
... | @@ -323,12 +328,12 @@ class CompareView(GenericView): | ... | @@ -323,12 +328,12 @@ class CompareView(GenericView): |
323 | customer_type=args.get('customerType'), | 328 | customer_type=args.get('customerType'), |
324 | application_version=args.get('applicationVersion'), | 329 | application_version=args.get('applicationVersion'), |
325 | vehicle_status=args.get('vehicleStatus'), | 330 | vehicle_status=args.get('vehicleStatus'), |
326 | individual_cus_info=None, | 331 | individual_cus_info=individual_cus_info, |
327 | usedcar_info=None, | 332 | usedcar_info=usedcar_info, |
328 | corporate_cus_info=None, | 333 | corporate_cus_info=corporate_cus_info, |
329 | ) | 334 | ) |
330 | # 触发比对 | 335 | # 触发比对 |
331 | compare.apply_async((application_id, business_type, uniq_seq, None), queue='queue_compare') | 336 | # compare.apply_async((application_id, business_type, uniq_seq, None), queue='queue_compare') |
332 | return response.ok() | 337 | return response.ok() |
333 | 338 | ||
334 | post.openapi_doc = ''' | 339 | post.openapi_doc = ''' | ... | ... |
-
Please register or sign in to post a comment