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
381b8847
Commit
381b8847
authored
Apr 21, 2022
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.自动任务调用规则,送token-tzs
parent
82d69dd9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
3 deletions
+19
-3
CylinderSchedulerJob.java
.../boot/module/tzs/flc/biz/quartz/CylinderSchedulerJob.java
+2
-2
CylinderInfoServiceImpl.java
...ule/tzs/flc/biz/service/impl/CylinderInfoServiceImpl.java
+17
-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 @
381b8847
...
...
@@ -17,9 +17,9 @@ public class CylinderSchedulerJob {
private
CylinderInfoServiceImpl
cylinderInfoService
;
/**
* 每天
凌晨0
点-日报生成
* 每天
9
点-日报生成
*/
@Scheduled
(
cron
=
"0 0
8
* * ?"
)
@Scheduled
(
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 @
381b8847
...
...
@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.CylWarningMsgDto;
import
com.yeejoin.amos.boot.module.tzs.api.entity.MsgLog
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.EarlyWarningLevelEnum
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.MsgLogServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.TzsAuthServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.*
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.entity.*
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.mapper.CylinderInfoMapper
;
...
...
@@ -96,6 +97,12 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
@Autowired
private
RuleTrigger
ruleTrigger
;
@Autowired
TzsAuthServiceImpl
tzsAuthService
;
@Value
(
"${cylinder-early-warning-packageId:气瓶监管/cylwarningmsg}"
)
private
String
packageId
;
/**
* 分页查询
*/
...
...
@@ -607,6 +614,9 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
wrapper
.
orderByDesc
(
CylinderInfo:
:
getSequenceNbr
);
IPage
<
CylinderInfo
>
result
=
this
.
page
(
page
,
wrapper
);
for
(
CylinderInfo
r
:
result
.
getRecords
())
{
// 设置token
tzsAuthService
.
setRequestContext
();
// 调用规则
this
.
touchRuleToCalLevel
(
r
);
}
}
...
...
@@ -635,7 +645,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
if
(
log
.
isInfoEnabled
())
{
log
.
info
(
"调用规则对象!+:{}"
,
JSON
.
toJSONString
(
cylWarningMsgDto
));
}
ruleTrigger
.
publish
(
cylWarningMsgDto
,
"气瓶监管/cylwarningmsg"
,
null
);
ruleTrigger
.
publish
(
cylWarningMsgDto
,
packageId
,
null
);
}
catch
(
Exception
e
)
{
log
.
error
(
"调用规则失败!:{}"
,
JSON
.
toJSONString
(
cylinderInfoDto
));
}
...
...
@@ -655,6 +665,12 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
return
msgLogService
.
list
(
wrapper
);
}
/**
* 更新气瓶等级
* @param sequenceCode 唯一表设
* @param level 等级
* @return CylinderInfo
*/
public
CylinderInfo
updateEarlyWarningLevel
(
String
sequenceCode
,
String
level
)
{
CylinderInfo
cylinderInfo
=
this
.
getOne
(
new
LambdaQueryWrapper
<
CylinderInfo
>().
eq
(
CylinderInfo:
:
getSequenceCode
,
sequenceCode
));
cylinderInfo
.
setEarlyWarningLevel
(
level
);
...
...
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