Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
周伟奇
/
bmw-ocr
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
c6290fa1
authored
2021-04-15 15:40:42 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
gcap close
1 parent
7967d700
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
src/celery_compare/tasks.py
src/celery_compare/tasks.py
View file @
c6290fa
...
...
@@ -5,7 +5,7 @@ import traceback
from
datetime
import
datetime
,
timedelta
from
collections
import
OrderedDict
from
.
import
app
from
apps.doc.models
import
AFCOCRResult
,
HILOCRResult
,
AFCComparisonInfo
,
HILComparisonInfo
from
apps.doc.models
import
AFCOCRResult
,
HILOCRResult
,
AFCComparisonInfo
,
HILComparisonInfo
,
Configs
from
apps.doc
import
consts
from
apps.doc.ocr.gcap
import
gcap
from
apps.doc.exceptions
import
GCAPException
...
...
@@ -162,7 +162,7 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id):
'vehicleStatus'
:
last_obj
.
vehicle_status
,
'wholeResult'
:
'Y'
,
'wholeResultMessage'
:
''
,
'applicationLink'
:
r'
file:
//china.bmw.corp/WINFS/SF-CN-data/SF3-CN-S/SF3-CN-S-1-New Business/CA/OCR II test'
,
'applicationLink'
:
r'//china.bmw.corp/WINFS/SF-CN-data/SF3-CN-S/SF3-CN-S-1-New Business/CA/OCR II test'
,
}
})
...
...
@@ -255,6 +255,12 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id):
log_base
,
application_entity
,
application_id
,
uniq_seq
,
ocr_res_id
))
time
.
sleep
(
5
)
is_gcap_send
=
Configs
.
objects
.
filter
(
id
=
1
)
.
first
()
if
is_gcap_send
is
not
None
and
is_gcap_send
.
value
==
'N'
:
compare_log
.
info
(
'{0} [gcap closed] [entity={1}] [id={2}] [uniq_seq={3}] [ocr_res_id={4}]'
.
format
(
log_base
,
application_entity
,
application_id
,
uniq_seq
,
ocr_res_id
))
return
# 将比对结果发送GCAP
try
:
data
=
gcap
.
dict_to_xml
(
comparison_res
)
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment