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
9be470c1
authored
2021-05-31 16:54:57 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
gb page order
1 parent
4ab9525a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
src/apps/doc/management/commands/ocr_process.py
src/apps/doc/management/commands/ocr_process.py
View file @
9be470c
...
...
@@ -337,7 +337,7 @@ class Command(BaseCommand, LoggerMixin):
ic_merge
=
False
rp_merge
=
False
for
classify
in
(
consts
.
IC_CLASSIFY
,
consts
.
MVI_CLASSIFY
):
for
classify
in
(
consts
.
IC_CLASSIFY
,
consts
.
MVI_CLASSIFY
,
consts
.
MVC_CLASSIFY
):
license_list
=
license_summary
.
get
(
classify
)
...
...
@@ -394,8 +394,20 @@ class Command(BaseCommand, LoggerMixin):
price
=
round
(
price_total
*
100
/
(
rate
+
100
),
2
)
license_dict
[
'不含税价(逻辑计算)'
]
=
price
return
ic_merge
,
rp_merge
if
classify
==
consts
.
MVC_CLASSIFY
:
# 机动车登记证先1/2页,后3/4页
key
,
_
,
_
=
consts
.
FIELD_ORDER_MAP
.
get
(
classify
)
page_1_2
=
[]
page_3_4
=
[]
for
license_dict
in
license_list
:
if
key
in
license_dict
:
page_3_4
.
append
(
license_dict
)
else
:
page_1_2
.
append
(
license_dict
)
page_1_2
.
extend
(
page_3_4
)
license_summary
[
classify
]
=
page_1_2
page_1_2
=
page_3_4
=
None
return
ic_merge
,
rp_merge
def
parse_img_path
(
self
,
img_path
):
img_name
,
_
=
os
.
path
.
splitext
(
os
.
path
.
basename
(
img_path
))
...
...
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