e1670d0f by 周伟奇

add eapp skip

1 parent b0883c72
......@@ -106,6 +106,7 @@ class UploadDocView(GenericView, DocHandler):
application_id = application_data.get('applicationId')
document_scheme = document.get('documentScheme')
data_source = document.get('dataSource')
document_name = document.get('documentName')
try:
# 1. 上传信息记录
UploadDocRecords.objects.create(
......@@ -115,7 +116,7 @@ class UploadDocView(GenericView, DocHandler):
co_applicant=applicant_data.get('coApplicantName'),
guarantor_1=applicant_data.get('guarantor1Name'),
guarantor_2=applicant_data.get('guarantor2Name'),
document_name=document.get('documentName'),
document_name=document_name,
document_scheme=document_scheme,
business_type=business_type,
data_source=data_source,
......@@ -125,6 +126,12 @@ class UploadDocView(GenericView, DocHandler):
self.running_log.info('[doc upload fail] [args={0}] [err={1}]'.format(args, e))
self.invalid_params(msg='metadataVersionId repeat')
else:
data_source = self.fix_data_source(data_source)
if data_source == consts.DATA_SOURCE_LIST[1]:
if isinstance(document_name, str):
if document_name.endswith('-证书.pdf') or document_name.endswith('-证书'):
self.running_log.info('[doc upload success] [eapp license 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!