FSM fix
Showing
1 changed file
with
14 additions
and
8 deletions
... | @@ -579,20 +579,26 @@ class UploadDocView(GenericView, DocHandler): | ... | @@ -579,20 +579,26 @@ class UploadDocView(GenericView, DocHandler): |
579 | 579 | ||
580 | # fsm激活状态, 更新ocr_result 表fsm状态 | 580 | # fsm激活状态, 更新ocr_result 表fsm状态 |
581 | if consts.FSM_ACTIVITED_STATUS.get(application_status): | 581 | if consts.FSM_ACTIVITED_STATUS.get(application_status): |
582 | ocr_result_obj = None | 582 | result_class = None |
583 | if business_type == consts.HIL_PREFIX: | 583 | if business_type == consts.HIL_PREFIX: |
584 | if document_scheme == RequestTeam.ACCEPTANCE[1]: | 584 | if document_scheme == RequestTeam.ACCEPTANCE[1]: |
585 | ocr_result_obj = HILOCRResult.objects.filter(application_id=application_id).first() | 585 | result_class = HILOCRResult |
586 | elif document_scheme == RequestTeam.SETTLEMENT[1]: | 586 | elif document_scheme == RequestTeam.SETTLEMENT[1]: |
587 | ocr_result_obj = HILSEOCRResult.objects.filter(application_id=application_id).first() | 587 | result_class = HILSEOCRResult |
588 | elif business_type == consts.AFC_PREFIX: | 588 | elif business_type == consts.AFC_PREFIX: |
589 | if document_scheme == RequestTeam.ACCEPTANCE[1]: | 589 | if document_scheme == RequestTeam.ACCEPTANCE[1]: |
590 | ocr_result_obj = AFCOCRResult.objects.filter(application_id=application_id).first() | 590 | result_class = AFCOCRResult |
591 | elif document_scheme == RequestTeam.SETTLEMENT[1]: | 591 | elif document_scheme == RequestTeam.SETTLEMENT[1]: |
592 | ocr_result_obj = AFCSEOCRResult.objects.filter(application_id=application_id).first() | 592 | result_class = AFCSEOCRResult |
593 | 593 | ||
594 | ocr_result_obj = result_class.objects.filter(application_id=application_id).first() | ||
594 | if ocr_result_obj: | 595 | if ocr_result_obj: |
595 | ocr_result_obj.fsmActivited = 1 | 596 | ocr_result_obj.fsm_activited = 1 |
597 | ocr_result_obj.save() | ||
598 | else: | ||
599 | ocr_result_obj = result_class() | ||
600 | ocr_result_obj.application_id = application_id | ||
601 | ocr_result_obj.fsm_activited = 1 | ||
596 | ocr_result_obj.save() | 602 | ocr_result_obj.save() |
597 | 603 | ||
598 | if data_source == consts.DATA_SOURCE_LIST[1]: | 604 | if data_source == consts.DATA_SOURCE_LIST[1]: |
... | @@ -1388,8 +1394,8 @@ class SECMSView(GenericView): | ... | @@ -1388,8 +1394,8 @@ class SECMSView(GenericView): |
1388 | ) | 1394 | ) |
1389 | 1395 | ||
1390 | # 检查是否fsm流程(SE) | 1396 | # 检查是否fsm流程(SE) |
1391 | fsm_contract = cms_info.get('fsmContract', False) | 1397 | fsm_contract = cms_info.get('FSMContract', False) |
1392 | fsm_best_price = cms_info.get('fsmBestPrice', False) | 1398 | fsm_best_price = cms_info.get('FSMBestPrice', False) |
1393 | if fsm_contract: | 1399 | if fsm_contract: |
1394 | fsm_compare.apply_async((application_id, business_type, None, None, False, True), | 1400 | fsm_compare.apply_async((application_id, business_type, None, None, False, True), |
1395 | queue='queue_compare') | 1401 | queue='queue_compare') | ... | ... |
-
Please register or sign in to post a comment