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
39fadc7a
authored
2021-12-08 14:44:32 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add mvi layout
1 parent
95ba61d5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
2 deletions
src/apps/doc/consts.py
src/apps/doc/management/commands/ocr_process.py
src/apps/doc/ocr/wb.py
src/celery_compare/tasks.py
src/apps/doc/consts.py
View file @
39fadc7
...
...
@@ -866,7 +866,8 @@ MVI_FIELD_ORDER = (('发票代码', '发票代码'),
(
'开户银行'
,
'开户银行'
),
(
'主管税务机关及代码'
,
'主管税务机关及代码'
),
(
'吨位'
,
'吨位'
),
(
'限乘人数'
,
'限乘人数'
),)
(
'限乘人数'
,
'限乘人数'
),
(
'新旧版式'
,
'新旧版式'
),)
IC_PID
=
VAT_PID
=
VATS_PID
=
MVC_PID
=
MVI_PID
=
RP_PID
=
DDA_PID
=
HMH_PID
=
JYPZ_PID
=
INSURANCE_PID
=
None
# 营业执照
...
...
@@ -1386,9 +1387,10 @@ 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'
,
'stamp'
,
'发票联'
,
'发票真伪校验'
]
SE_NEW_ADD_FIELD
=
[
'customerName'
,
'idNum'
,
'dateOfInvoice'
,
'stamp'
,
'发票联'
,
'发票真伪校验'
,
'新旧版式'
]
SE_FPL_VALUE
=
'发票联'
SE_STAMP_VALUE
=
'有'
SE_LAYOUT_VALUE
=
'旧版-旧打印、新版-新打印'
SE_GB_NEW_FIELD
=
[
'vinNo'
]
SE_GB_USED_FIELD
=
[
'customerName'
,
'idNum'
,
'date'
]
SE_HMH_FIELD
=
[
'借款人/承租人姓名'
,
'借款人/承租人证件号'
,
'申请号'
,
'渠道'
,
'签字'
]
...
...
@@ -1573,6 +1575,7 @@ MVI_COMPARE_LOGIC = {
'stamp'
:
(
'销售单位章'
,
'se_common_compare'
,
{},
'发票无章'
),
'发票联'
:
(
'发票类型'
,
'se_common_compare'
,
{},
'发票疑似非发票联'
),
'发票真伪校验'
:
(
'发票真伪校验'
,
'se_common_compare'
,
{},
'发票疑似造假,需人工核算'
),
'新旧版式'
:
(
'新旧版式'
,
'se_contain_compare_2'
,
{},
'发票版本与打印版式不符'
),
}
ZW_METHOD
=
'mvi_special'
LOWER_AMOUNT_FIELD
=
'价税合计小写'
...
...
src/apps/doc/management/commands/ocr_process.py
View file @
39fadc7
...
...
@@ -652,6 +652,7 @@ class Command(BaseCommand, LoggerMixin):
position_dict
[
detail_dict
.
get
(
'chinese_key'
,
''
)]
=
{
consts
.
FIELD_POSITION_KEY
:
detail_dict
.
get
(
'position'
,
{})
}
rebuild_data_dict
[
'新旧版式'
]
=
license_data
.
get
(
'layout'
,
''
)
rebuild_data_dict
[
consts
.
IMG_PATH_KEY
]
=
img_path
rebuild_data_dict
[
consts
.
SECTION_IMG_PATH_KEY
]
=
section_img_path
rebuild_data_dict
[
consts
.
ALL_POSITION_KEY
]
=
position_dict
...
...
src/apps/doc/ocr/wb.py
View file @
39fadc7
...
...
@@ -330,6 +330,7 @@ class BSWorkbook(Workbook):
metadata_rows
.
extend
(
code
)
if
len
(
verify_list
)
>
0
:
metadata_rows
.
append
(
self
.
blank_row
)
metadata_rows
.
append
(
self
.
verify_header
)
metadata_rows
.
extend
(
verify_list
)
...
...
src/celery_compare/tasks.py
View file @
39fadc7
...
...
@@ -992,6 +992,7 @@ def get_se_cms_compare_info(last_obj, application_entity, detect_list):
format
(
float
(
amount
)
-
bhsj
,
'.2f'
),
consts
.
RESULT_Y
])))
vehicle_field_input
.
append
((
consts
.
SE_NEW_ADD_FIELD
[
6
],
consts
.
SE_LAYOUT_VALUE
))
vehicle_info
[
consts
.
MVI_EN
]
=
vehicle_field_input
else
:
gb_field_input
=
[
...
...
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