c61eec7f by 冯轩

MOD:只能重新识别状态为识别失败的文件

1 parent c084e697
...@@ -2098,6 +2098,9 @@ class DocReOcrView(GenericView, DocHandler): ...@@ -2098,6 +2098,9 @@ class DocReOcrView(GenericView, DocHandler):
2098 if doc.application_id.startswith(consts.FIXED_APPLICATION_ID_PREFIX): 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)) 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('模拟下单的文件不支持重新识别') 2100 return response.error_msg('模拟下单的文件不支持重新识别')
2101 if doc.status != DocStatus.PROCESS_FAILED.value:
2102 self.running_log.info('[doc re-ocr fail not support status] [application_entity={0}] [doc_id={1}]'.format(application_entity, doc_id))
2103 return response.error_msg('不支持的文件状态')
2101 2104
2102 # 3. 选择队列进入 2105 # 3. 选择队列进入
2103 is_priority = PriorityApplication.objects.filter(application_id=doc.application_id, on_off=True).exists() 2106 is_priority = PriorityApplication.objects.filter(application_id=doc.application_id, on_off=True).exists()
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!