dda report
Showing
1 changed file
with
19 additions
and
3 deletions
... | @@ -755,7 +755,7 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -755,7 +755,7 @@ class Command(BaseCommand, LoggerMixin): |
755 | # 'idcard': True or False, | 755 | # 'idcard': True or False, |
756 | # 'bs': None or normal or mobile, | 756 | # 'bs': None or normal or mobile, |
757 | # } | 757 | # } |
758 | report_list = [None, False, None] | 758 | report_list = [None, False, None, False] |
759 | do_dda = is_hil and doc.document_scheme == consts.DOC_SCHEME_LIST[1] | 759 | do_dda = is_hil and doc.document_scheme == consts.DOC_SCHEME_LIST[1] |
760 | except Exception as e: | 760 | except Exception as e: |
761 | self.online_log.error('{0} [process error (db filter)] [task={1}] [error={2}]'.format( | 761 | self.online_log.error('{0} [process error (db filter)] [task={1}] [error={2}]'.format( |
... | @@ -1206,12 +1206,13 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -1206,12 +1206,13 @@ class Command(BaseCommand, LoggerMixin): |
1206 | '{0} [process error (dda id&bc db save)] [task={1}] ' | 1206 | '{0} [process error (dda id&bc db save)] [task={1}] ' |
1207 | '[error={2}]'.format(self.log_base, task_str, traceback.format_exc())) | 1207 | '[error={2}]'.format(self.log_base, task_str, traceback.format_exc())) |
1208 | 1208 | ||
1209 | # TODO report | ||
1210 | |||
1211 | except Exception as e: | 1209 | except Exception as e: |
1212 | self.online_log.error( | 1210 | self.online_log.error( |
1213 | '{0} [process error (dda process)] [task={1}] ' | 1211 | '{0} [process error (dda process)] [task={1}] ' |
1214 | '[error={2}]'.format(self.log_base, task_str, traceback.format_exc())) | 1212 | '[error={2}]'.format(self.log_base, task_str, traceback.format_exc())) |
1213 | else: | ||
1214 | report_list[3] = True | ||
1215 | |||
1215 | finally: | 1216 | finally: |
1216 | # report_dict = { | 1217 | # report_dict = { |
1217 | # 'process': None or pdf or excel or edms | 1218 | # 'process': None or pdf or excel or edms |
... | @@ -1280,6 +1281,21 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -1280,6 +1281,21 @@ class Command(BaseCommand, LoggerMixin): |
1280 | self.online_log.error('{0} [process error (report db save)] [error={1}]'.format( | 1281 | self.online_log.error('{0} [process error (report db save)] [error={1}]'.format( |
1281 | self.log_base, traceback.format_exc())) | 1282 | self.log_base, traceback.format_exc())) |
1282 | 1283 | ||
1284 | try: | ||
1285 | if report_list[3]: | ||
1286 | report_table.objects.create( | ||
1287 | case_number=doc.application_id, | ||
1288 | request_team=RequestTeam.get_value(doc.document_scheme, 0), | ||
1289 | request_trigger=RequestTrigger.DOCUPLOAD.value, | ||
1290 | input_file=doc.document_name, | ||
1291 | transaction_start=doc.start_time, | ||
1292 | transaction_end=end_time, | ||
1293 | process_name=ProcessName.DDA.value, | ||
1294 | ) | ||
1295 | except Exception as e: | ||
1296 | self.online_log.error('{0} [process error (report db save)] [error={1}]'.format( | ||
1297 | self.log_base, traceback.format_exc())) | ||
1298 | |||
1283 | finally: | 1299 | finally: |
1284 | try: | 1300 | try: |
1285 | img_save_path = os.path.join(doc_data_path, 'img') | 1301 | img_save_path = os.path.join(doc_data_path, 'img') | ... | ... |
-
Please register or sign in to post a comment