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
84724514
Commit
84724514
authored
Dec 27, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备提醒功能
parent
a79b4b6f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
0 deletions
+65
-0
EquipRegularlyRemindServicelmpl.java
...yjc/biz/service/impl/EquipRegularlyRemindServicelmpl.java
+54
-0
UseInfo.java
.../com/yeejoin/amos/boot/module/ymt/api/entity/UseInfo.java
+11
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/EquipRegularlyRemindServicelmpl.java
0 → 100644
View file @
84724514
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzsUserInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.UseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.UseInfoMapper
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
java.util.*
;
@EnableScheduling
public
class
EquipRegularlyRemindServicelmpl
{
@Autowired
private
UseInfoMapper
useInfoMapper
;
@Scheduled
(
cron
=
"0 0 8 * * * ?"
)
public
void
sendReminderMessage
(){
//获取当前日期
String
currentDate
=
DateUtils
.
getDateNowShortStr
();
Date
date
=
DateUtils
.
dateAddDays
(
new
Date
(),
31
);
List
<
String
>
types
=
new
ArrayList
<>();
List
<
String
>
status
=
new
ArrayList
<>();
//查询需要发送消息的设备
LambdaQueryWrapper
<
UseInfo
>
query
=
new
LambdaQueryWrapper
<>();
query
.
in
(
UseInfo:
:
getLastInspectType
,
types
);
query
.
in
(
UseInfo:
:
getStatus
,
status
);
query
.
le
(
UseInfo:
:
getNextInspectDate
,
date
).
or
().
ge
(
UseInfo:
:
getNextInspectDate
,
currentDate
);
List
<
UseInfo
>
equips
=
useInfoMapper
.
selectList
(
query
);
//查询符合发送规则的人员电话
//组装短信内容
HashMap
<
String
,
String
>
params
=
new
HashMap
<>();
//发送短信
Systemctl
.
smsClient
.
sendCommonSms
(
params
);
}
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/entity/UseInfo.java
View file @
84724514
...
@@ -6,6 +6,8 @@ import lombok.Data;
...
@@ -6,6 +6,8 @@ import lombok.Data;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
/**
/**
* 使用信息表
* 使用信息表
*
*
...
@@ -183,4 +185,13 @@ public class UseInfo extends AbstractEquipBaseEntity {
...
@@ -183,4 +185,13 @@ public class UseInfo extends AbstractEquipBaseEntity {
*/
*/
@TableField
(
value
=
"\"IS_NOT_ES\""
)
@TableField
(
value
=
"\"IS_NOT_ES\""
)
private
Integer
isNotEs
;
private
Integer
isNotEs
;
@TableField
(
value
=
"NEXT_INSPECT_DATE"
)
private
Date
nextInspectDate
;
@TableField
(
value
=
"LAST_INSPECT_REPORT_NO"
)
private
String
lastInspectReportNo
;
@TableField
(
value
=
"LAST_INSPECT_TYPE"
)
private
String
lastInspectType
;
}
}
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