6051569d by 王聪

Merge branch 'fix/1118上线问题反馈' into 'feature/uat-tmp'

1118压缩包ocr识别问题修复

See merge request !4
2 parents 5073ca54 52647aaa
......@@ -576,6 +576,15 @@ class UploadDocView(GenericView, DocHandler):
self.running_log.info('[doc upload success] [eapp license skip] [args={0}]'.format(args))
return response.ok()
if data_source == consts.DATA_SOURCE_LIST[-1] and document_scheme == consts.DOC_SCHEME_LIST[1]:
# 电子合同来源的压缩包直接返回,避免被ocr识别导致线上问题
if document_name.endswith('.zip') \
or document_name.endswith('.rar') \
or document_name.endswith('.ZIP') \
or document_name.endswith('.RAR'):
self.running_log.info('[doc upload success] [SETTLEMENT ECONTRACT zip skip] [args={0}]'.format(args))
return response.ok()
# 2. 根据业务类型分库存储
doc_class, prefix = self.get_doc_class(business_type)
doc = doc_class.objects.create(
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!