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
bd062e9a
authored
2021-03-29 17:52:28 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix bug
1 parent
802fa321
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
src/apps/doc/views.py
src/celery_compare/tasks.py
src/apps/doc/views.py
View file @
bd062e9
...
...
@@ -444,7 +444,7 @@ class DocView(GenericView, DocHandler):
file
.
close
()
# 1. 上传信息记录
# application_id = '{0}{1}'.format(consts.FIXED_APPLICATION_ID_PREFIX, metadata_version_id)
application_id
=
'CH-
B
200012772'
application_id
=
'CH-
S
200012772'
upload_finish_time
=
timezone
.
now
()
document_scheme
=
random
.
choice
(
consts
.
DOC_SCHEME_LIST
)
data_source
=
random
.
choice
(
consts
.
DATA_SOURCE_LIST
)
...
...
src/celery_compare/tasks.py
View file @
bd062e9
...
...
@@ -75,7 +75,7 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id):
sep_is_find
=
True
for
sep_field
,
sep_tuple
in
consts
.
TCSEP
.
items
():
sep_res
=
getattr
(
cp
,
sep_tuple
[
1
])(
individual_cus_info
.
get
(
sep_field
),
sep_ocr
.
get
(
sep_tuple
[
0
]),
sep_tuple
[
2
])
individual_cus_info
.
get
(
sep_field
),
sep_ocr
.
get
(
sep_tuple
[
0
]),
**
sep_tuple
[
2
])
individual_cus_info
[
sep_field
+
'Result'
]
=
sep_res
res_set
.
add
(
sep_res
)
break
...
...
@@ -101,7 +101,7 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id):
is_find
=
True
for
compare_field
,
compare_tuple
in
compare_target
.
get
(
'compare_field'
)
.
items
():
compare_res
=
getattr
(
cp
,
compare_tuple
[
1
])(
individual_cus_info
.
get
(
compare_field
),
ocr_res
.
get
(
compare_tuple
[
0
]),
compare_tuple
[
2
])
individual_cus_info
.
get
(
compare_field
),
ocr_res
.
get
(
compare_tuple
[
0
]),
**
compare_tuple
[
2
])
individual_cus_info
[
compare_field
+
'Result'
]
=
compare_res
res_set
.
add
(
compare_res
)
break
...
...
@@ -127,7 +127,7 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id):
is_bl_find
=
True
for
bl_field
,
bl_tuple
in
consts
.
TCCOR
.
items
():
bl_res
=
getattr
(
cp
,
bl_tuple
[
1
])(
corporate_cus_info
.
get
(
bl_field
),
bl_ocr
.
get
(
bl_tuple
[
0
]),
bl_tuple
[
2
])
corporate_cus_info
.
get
(
bl_field
),
bl_ocr
.
get
(
bl_tuple
[
0
]),
**
bl_tuple
[
2
])
corporate_cus_info
[
bl_field
+
'Result'
]
=
bl_res
res_set
.
add
(
bl_res
)
break
...
...
@@ -152,7 +152,7 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id):
is_usedcar_find
=
True
for
mvc_field
,
mvc_tuple
in
consts
.
PCUSD_MVC
.
items
():
mvc_res
=
getattr
(
cp
,
mvc_tuple
[
1
])(
usedcar_info
.
get
(
mvc_field
),
mvc_ocr
.
get
(
mvc_tuple
[
0
]),
mvc_tuple
[
2
])
usedcar_info
.
get
(
mvc_field
),
mvc_ocr
.
get
(
mvc_tuple
[
0
]),
**
mvc_tuple
[
2
])
usedcar_info
[
mvc_field
+
'Result'
]
=
mvc_res
res_set
.
add
(
mvc_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