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
d711096e
authored
Dec 01, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix: 误报问题
parent
a19d172e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
server-common/src/main/java/com/makeit/module/iot/service/IotDevicePropertiesOperateService.java
server-service/src/main/java/com/makeit/service/platform/alarm/impl/PlatAlarmRecordServiceImpl.java
server-common/src/main/java/com/makeit/module/iot/service/IotDevicePropertiesOperateService.java
View file @
d711096e
...
@@ -111,7 +111,7 @@ public class IotDevicePropertiesOperateService extends IotCommonService {
...
@@ -111,7 +111,7 @@ public class IotDevicePropertiesOperateService extends IotCommonService {
map
.
put
(
"misinformationNotify"
,
reqMap
);
map
.
put
(
"misinformationNotify"
,
reqMap
);
HttpRequest
request
=
buildRequest
(
url
,
JSON
.
toJSONString
(
map
));
HttpRequest
request
=
buildRequest
(
url
,
JSON
.
toJSONString
(
map
));
try
{
try
{
ResponseMessage
responseMessage
=
sendP
u
t
(
url
,
request
);
ResponseMessage
responseMessage
=
sendP
os
t
(
url
,
request
);
log
.
info
(
"发送误报通知到设备返回信息:{}"
,
responseMessage
.
getMessage
());
log
.
info
(
"发送误报通知到设备返回信息:{}"
,
responseMessage
.
getMessage
());
if
(
responseMessage
.
getStatus
()
!=
200
)
{
if
(
responseMessage
.
getStatus
()
!=
200
)
{
String
errorMsg
=
responseMessage
.
getMessage
();
String
errorMsg
=
responseMessage
.
getMessage
();
...
...
server-service/src/main/java/com/makeit/service/platform/alarm/impl/PlatAlarmRecordServiceImpl.java
View file @
d711096e
...
@@ -580,7 +580,7 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
...
@@ -580,7 +580,7 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
platAlarmRecord
.
setStatus
(
CommonEnum
.
YES
.
getValue
());
platAlarmRecord
.
setStatus
(
CommonEnum
.
YES
.
getValue
());
platAlarmRecord
.
setDealDate
(
LocalDateTime
.
now
());
platAlarmRecord
.
setDealDate
(
LocalDateTime
.
now
());
CommonUserVO
user
=
CommonUserUtil
.
getUser
();
CommonUserVO
user
=
CommonUserUtil
.
getUser
();
platAlarmRecord
.
setDealUser
(
user
.
getName
());
//
platAlarmRecord.setDealUser(user.getName());
updateById
(
platAlarmRecord
);
updateById
(
platAlarmRecord
);
String
deviceId
=
platAlarmRecord
.
getDeviceId
();
String
deviceId
=
platAlarmRecord
.
getDeviceId
();
...
@@ -589,6 +589,7 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
...
@@ -589,6 +589,7 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
throw
new
RuntimeException
(
"找不到告警关联的设备,设备已解绑"
+
deviceId
);
throw
new
RuntimeException
(
"找不到告警关联的设备,设备已解绑"
+
deviceId
);
}
}
Timestamp
timestamp
=
Timestamp
.
valueOf
(
platAlarmRecord
.
getCreateDate
());
Timestamp
timestamp
=
Timestamp
.
valueOf
(
platAlarmRecord
.
getCreateDate
());
log
.
info
(
"开始想设备发送误报通知"
);
iotDevicePropertiesOperateService
.
deviceFunctionAttr
(
platDevice
.
getOriDeviceId
(),
timestamp
.
getTime
());
iotDevicePropertiesOperateService
.
deviceFunctionAttr
(
platDevice
.
getOriDeviceId
(),
timestamp
.
getTime
());
}
}
...
...
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