MOD:模拟下单的文件不支持重新识别
Showing
2 changed files
with
4 additions
and
1 deletions
... | @@ -145,7 +145,7 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -145,7 +145,7 @@ class Command(BaseCommand, LoggerMixin): |
145 | self.online_log.warn('{0} [get_doc_info] [doc not exist] [task_str={1}] [is_priority={2}]'.format( | 145 | self.online_log.warn('{0} [get_doc_info] [doc not exist] [task_str={1}] [is_priority={2}]'.format( |
146 | self.log_base, task_str, is_priority)) | 146 | self.log_base, task_str, is_priority)) |
147 | return None, None, None, None, None | 147 | return None, None, None, None, None |
148 | elif doc.status != DocStatus.INIT.value or (re_ocr_flag == 'Y' and doc.status != DocStatus.PROCESS_FAILED.value): | 148 | elif (re_ocr_flag == 'N' and doc.status != DocStatus.INIT.value) or (re_ocr_flag == 'Y' and doc.status != DocStatus.PROCESS_FAILED.value): |
149 | self.online_log.warn('{0} [get_doc_info] [doc status error] [task_str={1}] [is_priority={2}] ' | 149 | self.online_log.warn('{0} [get_doc_info] [doc status error] [task_str={1}] [is_priority={2}] ' |
150 | '[doc_status={3}]'.format(self.log_base, task_str, is_priority, doc.status)) | 150 | '[doc_status={3}]'.format(self.log_base, task_str, is_priority, doc.status)) |
151 | return None, None, None, None, None | 151 | return None, None, None, None, None | ... | ... |
... | @@ -2095,6 +2095,9 @@ class DocReOcrView(GenericView, DocHandler): | ... | @@ -2095,6 +2095,9 @@ class DocReOcrView(GenericView, DocHandler): |
2095 | 2095 | ||
2096 | doc_class, prefix = self.get_doc_class(application_entity) | 2096 | doc_class, prefix = self.get_doc_class(application_entity) |
2097 | doc = doc_class.objects.filter(id=doc_id).first() | 2097 | doc = doc_class.objects.filter(id=doc_id).first() |
2098 | if doc.application_id.startswith(consts.FIXED_APPLICATION_ID_PREFIX): | ||
2099 | self.running_log.info('[doc re-ocr fail not support CH-S] [application_entity={0}] [doc_id={1}]'.format(application_entity, doc_id)) | ||
2100 | return response.error_msg('模拟下单的文件不支持重新识别') | ||
2098 | 2101 | ||
2099 | # 3. 选择队列进入 | 2102 | # 3. 选择队列进入 |
2100 | is_priority = PriorityApplication.objects.filter(application_id=doc.application_id, on_off=True).exists() | 2103 | is_priority = PriorityApplication.objects.filter(application_id=doc.application_id, on_off=True).exists() | ... | ... |
-
Please register or sign in to post a comment