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
8628572e
authored
2021-07-14 18:38:24 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'feature/se_compare3' into feature/0611
2 parents
73004bca
297e01db
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
src/apps/doc/consts.py
src/celery_compare/tasks.py
src/common/tools/comparison.py
src/apps/doc/consts.py
View file @
8628572
...
...
@@ -1294,7 +1294,8 @@ SE_CORPORATE_ALL_FIELD = ['companyName', 'legalRepName', 'firstIdNo', 'businessL
'taxRegistrationCertificateNo'
,
'establishmentDate'
,
'businessLicenseDueDate'
]
SE_NEW_FIELD
=
[
'vinNo'
,
'dealer'
,
'vehicleTransactionAmount'
]
SE_USED_FIELD
=
[
'vinNo'
,
'vehicleTransactionAmount'
]
SE_NEW_ADD_FIELD
=
[
'customerName'
,
'idNum'
,
'dateOfInvoice'
]
SE_NEW_ADD_FIELD
=
[
'customerName'
,
'idNum'
,
'dateOfInvoice'
,
'stamp'
]
SE_STAMP_VALUE
=
'有'
SE_GB_NEW_FIELD
=
[
'vinNo'
]
SE_GB_USED_FIELD
=
[
'customerName'
,
'idNum'
,
'date'
]
...
...
@@ -1368,6 +1369,7 @@ MVI_COMPARE_LOGIC = {
'customerName'
:
(
'购方名称'
,
'se_name_compare'
,
{}),
'idNum'
:
(
'购买方身份证号或组织机构代码'
,
'se_contain_compare_2'
,
{}),
'dateOfInvoice'
:
(
'开票日期'
,
'se_date_compare_2'
,
{}),
'stamp'
:
(
'发票章'
,
'se_common_compare'
,
{}),
}
UCI_COMPARE_LOGIC
=
{
...
...
@@ -1375,6 +1377,7 @@ UCI_COMPARE_LOGIC = {
'vehicleTransactionAmount'
:
(
'价税合计小写'
,
'se_amount_compare'
,
{}),
'customerName'
:
(
'购方名称'
,
'se_name_compare'
,
{}),
'idNum'
:
(
'购方纳税人识别号'
,
'se_contain_compare_2'
,
{}),
'stamp'
:
(
'发票章'
,
'se_common_compare'
,
{}),
}
MVC_COMPARE_LOGIC
=
{
...
...
src/celery_compare/tasks.py
View file @
8628572
...
...
@@ -574,6 +574,7 @@ def get_se_compare_info(last_obj, application_entity):
vehicle_field_input
.
append
((
consts
.
SE_NEW_ADD_FIELD
[
0
],
main_name
))
vehicle_field_input
.
append
((
consts
.
SE_NEW_ADD_FIELD
[
1
],
main_num
))
vehicle_field_input
.
append
((
consts
.
SE_NEW_ADD_FIELD
[
2
],
last_obj
.
first_submmison_date
))
vehicle_field_input
.
append
((
consts
.
SE_NEW_ADD_FIELD
[
3
],
consts
.
SE_STAMP_VALUE
))
vehicle_info
[
consts
.
MVI_EN
]
=
vehicle_field_input
else
:
gb_field_input
=
[]
...
...
@@ -593,6 +594,7 @@ def get_se_compare_info(last_obj, application_entity):
gb34_field_input
.
append
((
consts
.
SE_GB_USED_FIELD
[
0
],
main_name
))
gb34_field_input
.
append
((
consts
.
SE_GB_USED_FIELD
[
1
],
main_num
))
gb34_field_input
.
append
((
consts
.
SE_GB_USED_FIELD
[
2
],
last_obj
.
first_submmison_date
))
vehicle_field_input
.
append
((
consts
.
SE_NEW_ADD_FIELD
[
3
],
consts
.
SE_STAMP_VALUE
))
vehicle_info
[
consts
.
UCI_EN
]
=
vehicle_field_input
vehicle_info
[
consts
.
MVC_EN
]
=
gb_field_input
vehicle_info
[
consts
.
MVC34_EN
]
=
gb34_field_input
...
...
src/common/tools/comparison.py
View file @
8628572
...
...
@@ -157,7 +157,7 @@ class Comparison:
def
se_date_compare
(
self
,
input_str
,
ocr_str
,
**
kwargs
):
if
kwargs
.
get
(
'long'
,
False
):
if
'长期'
in
ocr_str
or
'永久'
in
ocr_str
:
if
'长期'
in
ocr_str
or
'永久'
in
ocr_str
or
'***'
in
ocr_str
or
'至今'
in
ocr_str
:
if
input_str
in
[
'2099-12-31'
,
'2099-01-01'
,
'2999-12-31'
,
'2999-01-01'
]:
return
self
.
RESULT_Y
else
:
...
...
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