34df21f0 by 冯轩

ADD:scheme=INSURANCE的文件入库

1 parent eef759e3
......@@ -27,6 +27,7 @@ class RequestTeam(NamedEnum):
SETTLEMENT = (1, 'SETTLEMENT')
CONTRACTMANAGEMENT = (2, 'CONTRACTMANAGEMENT')
CONTROLLING = (3, 'CONTROLLING')
INSURANCE = (4, 'INSURANCE')
class RequestTrigger(NamedEnum):
......
......@@ -587,12 +587,12 @@ class UploadDocView(GenericView, DocHandler):
if business_type == consts.HIL_PREFIX:
if document_scheme == RequestTeam.ACCEPTANCE.name:
result_class = HILOCRResult
elif document_scheme == RequestTeam.SETTLEMENT.name:
elif document_scheme == RequestTeam.SETTLEMENT.name or document_scheme == RequestTeam.INSURANCE.name:
result_class = HILSEOCRResult
elif business_type == consts.AFC_PREFIX:
if document_scheme == RequestTeam.ACCEPTANCE.name:
result_class = AFCOCRResult
elif document_scheme == RequestTeam.SETTLEMENT.name:
elif document_scheme == RequestTeam.SETTLEMENT.name or document_scheme == RequestTeam.INSURANCE.name:
result_class = AFCSEOCRResult
ocr_result_obj = result_class.objects.filter(application_id=application_id).first()
......@@ -605,6 +605,7 @@ class UploadDocView(GenericView, DocHandler):
ocr_result_obj.fsm_activited = 1
ocr_result_obj.save()
self.running_log.info('[doc upload applicationId-{0}] [ocr result saved]'.format(application_id))
if data_source == consts.DATA_SOURCE_LIST[1]:
if document_name.endswith('-证书.pdf') or document_name.endswith('-证书'):
self.running_log.info('[doc upload success] [eapp license skip] [args={0}]'.format(args))
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!