Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c28fe535
authored
Sep 15, 2023
by
朱淼
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'dev' of
http://git.xmmakeit.com/huangjiay/iot-platform-server
into dev
parents
e9ed0d15
6f41dd9e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
server-service/src/main/java/com/makeit/entity/platform/alarm/PlatAlarmRecord.java
server-service/src/main/java/com/makeit/service/platform/alarm/impl/PlatAlarmRecordServiceImpl.java
server-service/src/main/java/com/makeit/task/IotSyncTask.java
server-service/src/main/java/com/makeit/entity/platform/alarm/PlatAlarmRecord.java
View file @
c28fe535
...
...
@@ -7,7 +7,6 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
/**
* 告警记录
...
...
@@ -28,7 +27,7 @@ public class PlatAlarmRecord extends BaseBusEntity {
/**
* 告警时间
*/
private
Dat
e
alarmDate
;
private
LocalDateTim
e
alarmDate
;
/**
* 状态 0 待处理 1 已处理
...
...
server-service/src/main/java/com/makeit/service/platform/alarm/impl/PlatAlarmRecordServiceImpl.java
View file @
c28fe535
...
...
@@ -52,7 +52,6 @@ import org.springframework.transaction.annotation.Transactional;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.Set
;
...
...
@@ -327,7 +326,7 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
PlatAlarmRecord
platAlarmRecord
=
new
PlatAlarmRecord
();
platAlarmRecord
.
setAlarmId
(
config
.
getId
());
platAlarmRecord
.
setAlarmType
(
config
.
getAlarmType
());
platAlarmRecord
.
setAlarmDate
(
new
Date
());
platAlarmRecord
.
setAlarmDate
(
LocalDateTime
.
now
());
platAlarmRecord
.
setStatus
(
CommonEnum
.
NO
.
getValue
());
platAlarmRecord
.
setNoticeStatus
(
CommonEnum
.
NO
.
getValue
());
//模板信息 替换参数
...
...
server-service/src/main/java/com/makeit/task/IotSyncTask.java
View file @
c28fe535
...
...
@@ -50,7 +50,7 @@ public class IotSyncTask {
* 启用状态的租户才同步
* 新增和更新平台端设备表
*/
//
@Scheduled(cron = "0 0 */1 * * ?")
//@Scheduled(cron = "0 0 */1 * * ?")
@TenantIdIgnore
public
void
syncEquipmentInfo
()
{
log
.
info
(
"开始执行同步设备信息接口"
);
...
...
@@ -109,8 +109,10 @@ public class IotSyncTask {
platDevice
.
setName
(
iotDevice
.
getName
());
platDevice
.
setProductName
(
iotDevice
.
getProductName
());
platDevice
.
setProductId
(
iotDevice
.
getProductId
());
if
(
iotDevice
.
getRegistryTime
()!=
null
)
{
LocalDateTime
registryTime
=
LocalDateTime
.
ofEpochSecond
(
iotDevice
.
getRegistryTime
()
/
1000
,
0
,
ZoneOffset
.
ofHours
(
8
));
platDevice
.
setRegistrationDate
(
registryTime
);
}
platDevice
.
setDescription
(
iotDevice
.
getDescribe
());
String
state
=
iotDevice
.
getState
();
DeviceState
deviceState
=
JSON
.
parseObject
(
state
,
DeviceState
.
class
);
...
...
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