Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
邬吉朋
ops
Commits
bdd7d4fd
Commit
bdd7d4fd
authored
Sep 18, 2024
by
wujipeng
Browse files
日期计算优化
parent
746b2bf5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/ruzhoukj/sms/service/impl/ContractServiceImpl.java
View file @
bdd7d4fd
...
...
@@ -29,9 +29,8 @@ public class ContractServiceImpl extends ServiceImpl<ContractDao, ContractEntity
List
<
ContractVO
>
contractList
=
baseMapper
.
pageContract
(
contractDTO
);
//计算剩余多少天
for
(
ContractVO
contractVO
:
contractList
)
{
Date
beginTime
=
contractVO
.
getBeginTime
();
Date
endTime
=
contractVO
.
getEndTime
();
int
differ
=
(
int
)
DateUtils
.
daysBetween
(
beginTime
,
endTime
);
int
differ
=
(
int
)
DateUtils
.
daysBetween
(
new
Date
()
,
endTime
);
if
(
differ
>
NumberConstant
.
ZERO
)
{
contractVO
.
setRemainingDays
(
differ
);
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment