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
1eb9d476
Commit
1eb9d476
authored
Nov 23, 2022
by
zhangyingbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
气瓶预警消息规则调用接口修改
parent
7fcae706
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
ScheduleService.java
...boot/module/tzs/flc/biz/service/impl/ScheduleService.java
+9
-0
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/service/impl/ScheduleService.java
View file @
1eb9d476
...
@@ -25,6 +25,7 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -25,6 +25,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
...
@@ -149,13 +150,21 @@ public class ScheduleService {
...
@@ -149,13 +150,21 @@ public class ScheduleService {
CylinderInfoDto
cylinderInfoDto
=
this
.
getCylDetail
(
r
.
getSequenceCode
());
CylinderInfoDto
cylinderInfoDto
=
this
.
getCylDetail
(
r
.
getSequenceCode
());
try
{
try
{
WarningMsgDto
warningMsgDto
=
new
WarningMsgDto
();
WarningMsgDto
warningMsgDto
=
new
WarningMsgDto
();
//没有下次检验日期的气瓶默认正常
if
(!
ValidationUtil
.
isEmpty
(
cylinderInfoDto
.
getNextInspectionDate
())){
System
.
out
.
println
(
"气瓶编号为:"
+
cylinderInfoDto
.
getSequenceCode
()+
"的气瓶,没有下次检验日期数据"
);
return
;
}
int
interval
=
DateUtils
.
dateBetweenIncludeToday
(
now
,
cylinderInfoDto
.
getNextInspectionDate
())
-
1
;
int
interval
=
DateUtils
.
dateBetweenIncludeToday
(
now
,
cylinderInfoDto
.
getNextInspectionDate
())
-
1
;
if
(
interval
<
30
&&
interval
>=
0
){
if
(
interval
<
30
&&
interval
>=
0
){
warningMsgDto
.
setOverType
(
"即将超期"
);
warningMsgDto
.
setOverType
(
"即将超期"
);
}
else
if
(
interval
<
0
){
}
else
if
(
interval
<
0
){
warningMsgDto
.
setOverType
(
"已超期"
);
warningMsgDto
.
setOverType
(
"已超期"
);
}
else
{
}
else
{
//正常的气瓶不需要发消息
warningMsgDto
.
setOverType
(
"正常"
);
warningMsgDto
.
setOverType
(
"正常"
);
return
;
}
}
warningMsgDto
.
setNextInspectDate
(
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
cylinderInfoDto
.
getNextInspectionDate
()));
warningMsgDto
.
setNextInspectDate
(
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
cylinderInfoDto
.
getNextInspectionDate
()));
warningMsgDto
.
setType
(
"气瓶"
);
warningMsgDto
.
setType
(
"气瓶"
);
...
...
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