76ac8734 by 王聪

FSM fix

1 parent ba27a782
......@@ -579,20 +579,26 @@ class UploadDocView(GenericView, DocHandler):
# fsm激活状态, 更新ocr_result 表fsm状态
if consts.FSM_ACTIVITED_STATUS.get(application_status):
ocr_result_obj = None
result_class = None
if business_type == consts.HIL_PREFIX:
if document_scheme == RequestTeam.ACCEPTANCE[1]:
ocr_result_obj = HILOCRResult.objects.filter(application_id=application_id).first()
result_class = HILOCRResult
elif document_scheme == RequestTeam.SETTLEMENT[1]:
ocr_result_obj = HILSEOCRResult.objects.filter(application_id=application_id).first()
result_class = HILSEOCRResult
elif business_type == consts.AFC_PREFIX:
if document_scheme == RequestTeam.ACCEPTANCE[1]:
ocr_result_obj = AFCOCRResult.objects.filter(application_id=application_id).first()
result_class = AFCOCRResult
elif document_scheme == RequestTeam.SETTLEMENT[1]:
ocr_result_obj = AFCSEOCRResult.objects.filter(application_id=application_id).first()
result_class = AFCSEOCRResult
ocr_result_obj = result_class.objects.filter(application_id=application_id).first()
if ocr_result_obj:
ocr_result_obj.fsmActivited = 1
ocr_result_obj.fsm_activited = 1
ocr_result_obj.save()
else:
ocr_result_obj = result_class()
ocr_result_obj.application_id = application_id
ocr_result_obj.fsm_activited = 1
ocr_result_obj.save()
if data_source == consts.DATA_SOURCE_LIST[1]:
......@@ -1388,8 +1394,8 @@ class SECMSView(GenericView):
)
# 检查是否fsm流程(SE)
fsm_contract = cms_info.get('fsmContract', False)
fsm_best_price = cms_info.get('fsmBestPrice', False)
fsm_contract = cms_info.get('FSMContract', False)
fsm_best_price = cms_info.get('FSMBestPrice', False)
if fsm_contract:
fsm_compare.apply_async((application_id, business_type, None, None, False, True),
queue='queue_compare')
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!