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
ee4c660a
authored
2024-07-24 17:53:52 +0800
by
冯轩
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
MOD:财报比对条件
1 parent
e354e605
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
src/celery_compare/tasks.py
src/celery_compare/tasks.py
View file @
ee4c660
...
...
@@ -2605,8 +2605,8 @@ def se_fs_compare(license_en, ocr_res_dict, field_list):
compare_log
.
info
(
'{0} [se_fs_compare for ... in] [idx:{1}] [name:{2}] [value:{3}]'
.
format
(
log_base
,
idx
,
name
,
value
))
ocr_str
=
ocr_res_list
[
res_idx
]
.
get
(
compare_logic
[
name
][
0
])
compare_log
.
info
(
'{0} [se_fs_compare ocr_str] [ocr_str:{1}]'
.
format
(
log_base
,
ocr_str
))
#
hash值/公章
不需要ocr结果,所以即使为空也可以进入比对
if
isinstance
(
ocr_str
,
str
)
or
ocr_str
==
'code'
or
ocr_str
==
'stamp
'
:
#
财年/资产负债表内容/利润表内容
不需要ocr结果,所以即使为空也可以进入比对
if
isinstance
(
ocr_str
,
str
)
or
isinstance
(
ocr_str
,
dict
)
or
compare_logic
[
name
][
0
]
==
'财年'
or
compare_logic
[
name
][
0
]
==
'资产负债表内容'
or
compare_logic
[
name
][
0
]
==
'利润表内容
'
:
result
=
getattr
(
cp
,
compare_logic
[
name
][
1
])(
value
,
ocr_str
,
**
compare_logic
[
name
][
2
])
compare_log
.
info
(
'{0} [se_fs_compare result:{1}]'
.
format
(
log_base
,
result
))
no_key
=
False
...
...
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