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
5b9338bd
authored
2021-10-06 15:15:09 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'feature/bd' into feature/0918
2 parents
a1f6365c
dc8d0d47
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
src/apps/doc/management/commands/ocr_process.py
src/apps/doc/management/commands/ocr_process.py
View file @
5b9338b
...
...
@@ -256,12 +256,16 @@ class Command(BaseCommand, LoggerMixin):
product_result
=
[
''
,
''
,
''
]
for
product
in
license_data
.
get
(
'result'
,
{})
.
get
(
'productList'
,
[]):
name
=
product
.
get
(
'name'
,
{})
.
get
(
'words'
,
''
)
if
name
.
find
(
'机动车损失
保险
'
)
!=
-
1
:
if
name
.
find
(
'机动车损失'
)
!=
-
1
:
product_result
[
0
]
=
product
.
get
(
'coverage'
,
{})
.
get
(
'words'
,
''
)
product_result
[
2
]
=
product
.
get
(
'deductible_franchise'
,
{})
.
get
(
'words'
,
''
)
elif
name
.
find
(
'
机动车第三者责任保险
'
)
!=
-
1
:
elif
name
.
find
(
'
第三者责任
'
)
!=
-
1
:
product_result
[
1
]
=
product
.
get
(
'coverage'
,
{})
.
get
(
'words'
,
''
)
special_str
=
license_data
.
get
(
'result'
,
{})
.
get
(
'1stBeneficiary'
,
{})
.
get
(
'words'
,
''
)
special
=
'无'
if
special_str
.
find
(
'宝马'
)
!=
-
1
or
special_str
.
find
(
'先锋国际融资租赁有限公司'
)
!=
-
1
:
special
=
'有'
insurance_ocr_result
=
{
'被保险人姓名'
:
license_data
.
get
(
'result'
,
{})
.
get
(
'insured'
,
{})
.
get
(
'name'
,
{})
.
get
(
'words'
,
''
),
'被保险人证件号码'
:
license_data
.
get
(
'result'
,
{})
.
get
(
'insured'
,
{})
.
get
(
'certiCode'
,
{})
.
get
(
'words'
,
''
),
...
...
@@ -273,7 +277,7 @@ class Command(BaseCommand, LoggerMixin):
'保险起始日期'
:
license_data
.
get
(
'result'
,
{})
.
get
(
'startDate'
,
{})
.
get
(
'words'
,
''
),
'保险截止日期'
:
license_data
.
get
(
'result'
,
{})
.
get
(
'endDate'
,
{})
.
get
(
'words'
,
''
),
'保单章'
:
''
,
'特别约定第一受益人'
:
license_data
.
get
(
'result'
,
{})
.
get
(
'1stBeneficiary'
,
{})
.
get
(
'words'
,
''
)
,
'特别约定第一受益人'
:
special
,
}
license_summary
.
setdefault
(
classify
,
[])
.
append
(
insurance_ocr_result
)
elif
classify
==
consts
.
DDA_CLASSIFY
:
# DDA处理
...
...
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