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
cf9842d1
authored
2024-08-01 15:15:34 +0800
by
wangling
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
保单比对规则修改,开始时间<后天(不包含), 结束时间>昨天(不包含)
1 parent
8c0ddf7e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
src/common/tools/comparison.py
src/common/tools/comparison.py
View file @
cf9842d
...
...
@@ -611,15 +611,18 @@ class Comparison:
# Get today's date
today_date
=
datetime
.
today
()
.
date
()
'''
开始时间<后天(不包含), 结束时间>昨天(不包含)
'''
if
kwargs
.
get
(
'start'
,
False
):
# Check if dates are equal and within the range of yesterday to today
if
ocr_date
<
today_date
:
# 开始时间 < 后天(不包含)
day_after_tomorrow_date
=
today_date
+
relativedelta
(
days
=
2
)
if
ocr_date
<
day_after_tomorrow_date
:
return
self
.
RESULT_Y
else
:
#
Check if dates are equal and ocr_date is greater than tomorrow
tomorrow_date
=
today_date
+
relativedelta
(
days
=
1
)
if
ocr_date
>
tomorrow
_date
:
#
结束时间>昨天(不包含)
yesterday_date
=
today_date
+
relativedelta
(
days
=-
1
)
if
ocr_date
>
yesterday
_date
:
return
self
.
RESULT_Y
# Default return value if conditions are not met
...
...
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