7553f30a by 周伟奇

dda report

1 parent 5c7e5769
......@@ -755,7 +755,7 @@ class Command(BaseCommand, LoggerMixin):
# 'idcard': True or False,
# 'bs': None or normal or mobile,
# }
report_list = [None, False, None]
report_list = [None, False, None, False]
do_dda = is_hil and doc.document_scheme == consts.DOC_SCHEME_LIST[1]
except Exception as e:
self.online_log.error('{0} [process error (db filter)] [task={1}] [error={2}]'.format(
......@@ -1206,12 +1206,13 @@ class Command(BaseCommand, LoggerMixin):
'{0} [process error (dda id&bc db save)] [task={1}] '
'[error={2}]'.format(self.log_base, task_str, traceback.format_exc()))
# TODO report
except Exception as e:
self.online_log.error(
'{0} [process error (dda process)] [task={1}] '
'[error={2}]'.format(self.log_base, task_str, traceback.format_exc()))
else:
report_list[3] = True
finally:
# report_dict = {
# 'process': None or pdf or excel or edms
......@@ -1280,6 +1281,21 @@ class Command(BaseCommand, LoggerMixin):
self.online_log.error('{0} [process error (report db save)] [error={1}]'.format(
self.log_base, traceback.format_exc()))
try:
if report_list[3]:
report_table.objects.create(
case_number=doc.application_id,
request_team=RequestTeam.get_value(doc.document_scheme, 0),
request_trigger=RequestTrigger.DOCUPLOAD.value,
input_file=doc.document_name,
transaction_start=doc.start_time,
transaction_end=end_time,
process_name=ProcessName.DDA.value,
)
except Exception as e:
self.online_log.error('{0} [process error (report db save)] [error={1}]'.format(
self.log_base, traceback.format_exc()))
finally:
try:
img_save_path = os.path.join(doc_data_path, 'img')
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!