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
f983f414
Commit
f983f414
authored
Apr 21, 2022
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.增加时间-tzs
2.自动任务表达式放到配置文件-tzs
parent
1a87b195
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
CylinderSchedulerJob.java
.../boot/module/tzs/flc/biz/quartz/CylinderSchedulerJob.java
+1
-1
CylinderInfoServiceImpl.java
...ule/tzs/flc/biz/service/impl/CylinderInfoServiceImpl.java
+9
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/quartz/CylinderSchedulerJob.java
View file @
f983f414
...
...
@@ -19,7 +19,7 @@ public class CylinderSchedulerJob {
/**
* 每天9点-日报生成
*/
@Scheduled
(
cron
=
"
0 0 9 * * ?
"
)
@Scheduled
(
cron
=
"
${cylinder-early-warning-cron:0 0 9 * * ?}
"
)
public
void
dayReport
()
{
cylinderInfoService
.
calEarlyWarningLevel
();
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/service/impl/CylinderInfoServiceImpl.java
View file @
f983f414
...
...
@@ -27,6 +27,7 @@ import org.springframework.transaction.annotation.Transactional;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.math.BigDecimal
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.function.Consumer
;
...
...
@@ -627,6 +628,12 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
private
void
touchRuleToCalLevel
(
CylinderInfo
r
)
{
Date
now
=
new
Date
();
String
dateStr
;
try
{
dateStr
=
DateUtils
.
dateFormat
(
now
,
DateUtils
.
DATE_TIME_PATTERN
);
}
catch
(
ParseException
e
)
{
throw
new
RuntimeException
(
"日期个时候失败"
);
}
//1.气瓶详情
CylinderInfoDto
cylinderInfoDto
=
this
.
getDetail
(
r
.
getSequenceCode
());
try
{
...
...
@@ -641,13 +648,14 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
cylWarningMsgDto
.
setCompanyName
(
cylinderInfoDto
.
getUnitName
());
cylWarningMsgDto
.
setPhone
(
cylinderInfoDto
.
getPersonMobilePhone
());
cylWarningMsgDto
.
setPeople
(
cylinderInfoDto
.
getUnitPerson
());
cylWarningMsgDto
.
setCurrentTime
(
dateStr
);
// 2.循环调用规则 触发计算等级及发送消息
if
(
log
.
isInfoEnabled
())
{
log
.
info
(
"调用规则对象!+:{}"
,
JSON
.
toJSONString
(
cylWarningMsgDto
));
}
ruleTrigger
.
publish
(
cylWarningMsgDto
,
packageId
,
null
);
}
catch
(
Exception
e
)
{
log
.
error
(
"调用规则失败!:{}
"
,
JSON
.
toJSONString
(
cylinderInfoDto
)
);
log
.
error
(
"调用规则失败!:{}
,{}"
,
JSON
.
toJSONString
(
cylinderInfoDto
),
e
);
}
}
...
...
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