df8f0f1f by 冯轩

Merge branch 'feature/portal-reocr' into feature/uat-tmp

2 parents f2631585 b6752f9c
...@@ -2301,10 +2301,10 @@ class DocReOcrView(GenericView, DocHandler): ...@@ -2301,10 +2301,10 @@ class DocReOcrView(GenericView, DocHandler):
2301 doc = doc_class.objects.filter(id=doc_id).first() 2301 doc = doc_class.objects.filter(id=doc_id).first()
2302 if doc.application_id.startswith(consts.FIXED_APPLICATION_ID_PREFIX): 2302 if doc.application_id.startswith(consts.FIXED_APPLICATION_ID_PREFIX):
2303 self.running_log.info('[doc re-ocr fail not support CH-S] [application_entity={0}] [doc_id={1}]'.format(application_entity, doc_id)) 2303 self.running_log.info('[doc re-ocr fail not support CH-S] [application_entity={0}] [doc_id={1}]'.format(application_entity, doc_id))
2304 return response.error_msg('模拟下单的文件不支持重新识别') 2304 return response.ok_msg('模拟下单的文件不支持重新识别')
2305 if doc.status != DocStatus.PROCESS_FAILED.value: 2305 if doc.status != DocStatus.PROCESS_FAILED.value:
2306 self.running_log.info('[doc re-ocr fail not support status] [application_entity={0}] [doc_id={1}]'.format(application_entity, doc_id)) 2306 self.running_log.info('[doc re-ocr fail not support status] [application_entity={0}] [doc_id={1}]'.format(application_entity, doc_id))
2307 return response.error_msg('不支持的文件状态') 2307 return response.ok_msg('不支持的文件状态')
2308 2308
2309 # 3. 选择队列进入 2309 # 3. 选择队列进入
2310 is_priority = PriorityApplication.objects.filter(application_id=doc.application_id, on_off=True).exists() 2310 is_priority = PriorityApplication.objects.filter(application_id=doc.application_id, on_off=True).exists()
......
...@@ -34,6 +34,9 @@ class APIResponse(JsonResponse): ...@@ -34,6 +34,9 @@ class APIResponse(JsonResponse):
34 def ok(**kwargs): 34 def ok(**kwargs):
35 return APIResponse(MetaStatus.SUCCESS.value, msg=MetaStatus.SUCCESS.verbose_name, **kwargs) 35 return APIResponse(MetaStatus.SUCCESS.value, msg=MetaStatus.SUCCESS.verbose_name, **kwargs)
36 36
37 def ok_msg(msg=MetaStatus.SUCCESS.verbose_name, **kwargs):
38 return APIResponse(MetaStatus.SUCCESS.value, msg=msg, **kwargs)
39
37 40
38 def error_msg(msg='internal error', **kwargs): 41 def error_msg(msg='internal error', **kwargs):
39 return APIResponse(MetaStatus.INTERNAL_ERROR.value, msg=msg, **kwargs) 42 return APIResponse(MetaStatus.INTERNAL_ERROR.value, msg=msg, **kwargs)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!