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
962a3fb6
authored
2022-06-09 19:27:48 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix zhifubao
1 parent
a5da8759
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
src/apps/doc/consts.py
src/apps/doc/ocr/wb.py
src/apps/doc/consts.py
View file @
962a3fb
...
...
@@ -589,7 +589,7 @@ CLASSIFY_LIST = [
(
'中国农业银行账户活期交易明细清单'
,
(
1
,
2
,
4
,
5
,
None
,
3
,
6
,
None
,
None
,
None
,
None
,
None
,
None
)),
(
'平安银行个人账户交易明细清单-版式二'
,
(
2
,
None
,
3
,
4
,
None
,
5
,
None
,
6
,
None
,
None
,
None
,
None
,
None
)),
(
'支付宝收支明细证明'
,
(
8
,
None
,
5
,
None
,
None
,
3
,
2
,
None
,
None
,
None
,
None
,
None
,
None
)),
(
'支付宝收支明细证明'
,
(
8
,
None
,
5
,
None
,
None
,
3
,
2
,
None
,
None
,
None
,
1
,
None
,
None
)),
(
'其他'
,
OTHER_TUPLE
),
...
...
src/apps/doc/ocr/wb.py
View file @
962a3fb
...
...
@@ -118,8 +118,8 @@ class BSWorkbook(Workbook):
find_count
=
len
(
header_col_list
)
if
find_count
<
2
:
find_count
=
0
elif
classify
==
consts
.
NEW_ZHIFUBAO_CLASSIFY
and
find_count
<
3
:
find_count
=
0
#
elif classify == consts.NEW_ZHIFUBAO_CLASSIFY and find_count < 3:
#
find_count = 0
else
:
for
idx
,
header_col
in
header_col_list
:
sheet_header_info
.
setdefault
(
ws
.
title
,
{})
.
setdefault
(
header_col
,
idx
)
...
...
@@ -150,7 +150,7 @@ class BSWorkbook(Workbook):
key
=
lambda
x
:
sheet_header_info
[
x
][
consts
.
FIND_COUNT_KEY
])
best_sheet_info
=
sheet_header_info
.
get
(
sheet_order_list
[
0
])
max_find_count
=
best_sheet_info
.
get
(
consts
.
FIND_COUNT_KEY
,
0
)
if
max_find_count
==
0
:
if
max_find_count
==
0
or
classify
==
consts
.
NEW_ZHIFUBAO_CLASSIFY
:
if
special_nhzs
:
classify
=
consts
.
SPECIAL_NYZS_CLASSIFY
for
key
,
value
in
consts
.
CLASSIFY_MAP
.
items
():
...
...
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