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
cd074ed9
authored
2024-07-25 10:15:45 +0800
by
冯轩
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
MOD:财年和非零比对逻辑
1 parent
5b8c29fd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
src/common/tools/comparison.py
src/common/tools/comparison.py
View file @
cd074ed
...
...
@@ -705,7 +705,7 @@ class Comparison:
this_year_str
=
datetime
.
now
()
.
strftime
(
'
%
Y'
)
this_year
=
int
(
this_year_str
)
last_year
=
this_year
-
1
if
input_str
!=
this_year
and
input_str
!=
last_year
:
if
str
(
input_str
)
!=
str
(
this_year
)
and
str
(
input_str
)
!=
str
(
last_year
)
:
return
self
.
RESULT_N
return
self
.
RESULT_Y
except
Exception
as
e
:
...
...
@@ -714,7 +714,7 @@ class Comparison:
def
input_list_not_zero_compare
(
self
,
input_list
,
ocr_list
,
**
kwargs
):
try
:
for
item
in
input_list
:
if
item
=
=
0
:
if
float
(
item
)
<
=
0
:
return
self
.
RESULT_N
return
self
.
RESULT_Y
except
Exception
as
e
:
...
...
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