Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
8d245c0a
Commit
8d245c0a
authored
Jul 01, 2025
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor(jg): 优化检验日期为空的处理
- 在处理下次检验日期时,增加了对空值的过滤 - 避免了可能因空指针异常导致的程序崩溃
parent
da2db7e0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
JgEnableDisableServiceImpl.java
...odule/jg/biz/service/impl/JgEnableDisableServiceImpl.java
+1
-1
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgEnableDisableServiceImpl.java
View file @
8d245c0a
...
@@ -218,7 +218,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
...
@@ -218,7 +218,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
List
<
IdxBizJgInspectionDetectionInfo
>
inspectInfos
=
jgInspectionDetectionInfoService
.
checkInspectionInfo
(
record
);
List
<
IdxBizJgInspectionDetectionInfo
>
inspectInfos
=
jgInspectionDetectionInfoService
.
checkInspectionInfo
(
record
);
List
<
Date
>
nextInspectDates
=
inspectInfos
.
stream
().
map
(
IdxBizJgInspectionDetectionInfo:
:
getNextInspectDate
).
collect
(
Collectors
.
toList
());
List
<
Date
>
nextInspectDates
=
inspectInfos
.
stream
().
map
(
IdxBizJgInspectionDetectionInfo:
:
getNextInspectDate
).
collect
(
Collectors
.
toList
());
Date
currentDate
=
new
Date
();
Date
currentDate
=
new
Date
();
nextInspectDates
.
forEach
(
next
->
{
nextInspectDates
.
stream
().
filter
(
Objects:
:
nonNull
).
forEach
(
next
->
{
// 下次检验日期在当前时间之前的
// 下次检验日期在当前时间之前的
if
(
next
.
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDate
()
if
(
next
.
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDate
()
.
isBefore
(
currentDate
.
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDate
()))
{
.
isBefore
(
currentDate
.
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDate
()))
{
...
...
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