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
a15f0218
authored
Dec 21, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix:告警类型取值问题
parent
beeb01be
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
server-service/src/main/java/com/makeit/external/huineng/HuiNengService.java
server-service/src/main/java/com/makeit/external/strategy/HuiNengStrategy.java
server-service/src/main/java/com/makeit/external/huineng/HuiNengService.java
View file @
a15f0218
package
com
.
makeit
.
external
.
huineng
;
package
com
.
makeit
.
external
.
huineng
;
import
cn.hutool.http.HttpUtil
;
import
cn.hutool.http.HttpUtil
;
import
cn.hutool.json.JSONUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
@@ -78,7 +79,7 @@ public class HuiNengService {
...
@@ -78,7 +79,7 @@ public class HuiNengService {
reportInfo
.
setTurnState
(
bodymove
.
equals
(
"0"
)
?
"0"
:
"1"
);
reportInfo
.
setTurnState
(
bodymove
.
equals
(
"0"
)
?
"0"
:
"1"
);
data
.
add
(
reportInfo
);
data
.
add
(
reportInfo
);
dto
.
setData
(
data
);
dto
.
setData
(
data
);
String
reqJson
=
JSON
.
toJSONString
(
dto
);
String
reqJson
=
JSON
Util
.
toJsonStr
(
dto
);
String
url
=
platTenant
.
getOpenApiUrl
()
+
"/admin-api/v1/HealthMonitoringEquipment/TimingdataPush?token=aHVpbmVuZ2dhbnpoaV9wdXNoc2V0"
;
String
url
=
platTenant
.
getOpenApiUrl
()
+
"/admin-api/v1/HealthMonitoringEquipment/TimingdataPush?token=aHVpbmVuZ2dhbnpoaV9wdXNoc2V0"
;
log
.
info
(
"请求url:{},参数:{}"
,
url
,
reqJson
);
log
.
info
(
"请求url:{},参数:{}"
,
url
,
reqJson
);
String
result
=
HttpUtil
.
createPost
(
url
)
String
result
=
HttpUtil
.
createPost
(
url
)
...
...
server-service/src/main/java/com/makeit/external/strategy/HuiNengStrategy.java
View file @
a15f0218
...
@@ -51,7 +51,7 @@ public class HuiNengStrategy implements OpenApiBaseStrategy {
...
@@ -51,7 +51,7 @@ public class HuiNengStrategy implements OpenApiBaseStrategy {
dto
.
setDeviceType
(
"健康监测设备"
);
dto
.
setDeviceType
(
"健康监测设备"
);
dto
.
setDeviceModel
(
platDevice
.
getProductId
());
dto
.
setDeviceModel
(
platDevice
.
getProductId
());
dto
.
setDtype
(
"实时上报"
);
dto
.
setDtype
(
"实时上报"
);
dto
.
setUid
(
platDevice
.
getOriDeviceId
()
);
dto
.
setUid
(
""
);
dto
.
setPk
(
platDevice
.
getProductId
());
dto
.
setPk
(
platDevice
.
getProductId
());
dto
.
setDid
(
platDevice
.
getOriDeviceId
());
dto
.
setDid
(
platDevice
.
getOriDeviceId
());
dto
.
setSite
(
""
);
dto
.
setSite
(
""
);
...
@@ -109,9 +109,9 @@ public class HuiNengStrategy implements OpenApiBaseStrategy {
...
@@ -109,9 +109,9 @@ public class HuiNengStrategy implements OpenApiBaseStrategy {
HuinengBodyReportDTO
dto
=
new
HuinengBodyReportDTO
();
HuinengBodyReportDTO
dto
=
new
HuinengBodyReportDTO
();
dto
.
setId
(
platDevice
.
getOriDeviceId
());
dto
.
setId
(
platDevice
.
getOriDeviceId
());
dto
.
setDeviceType
(
"人体感应探测器
\"
"
);
dto
.
setDeviceType
(
"人体感应探测器"
);
dto
.
setDtype
(
"报警上报"
);
dto
.
setDtype
(
"报警上报"
);
dto
.
setUid
(
platDevice
.
getOriDeviceId
()
);
dto
.
setUid
(
""
);
dto
.
setPk
(
platDevice
.
getProductId
());
dto
.
setPk
(
platDevice
.
getProductId
());
dto
.
setDeviceModel
(
platDevice
.
getProductId
());
dto
.
setDeviceModel
(
platDevice
.
getProductId
());
dto
.
setDid
(
platDevice
.
getOriDeviceId
());
dto
.
setDid
(
platDevice
.
getOriDeviceId
());
...
@@ -129,7 +129,7 @@ public class HuiNengStrategy implements OpenApiBaseStrategy {
...
@@ -129,7 +129,7 @@ public class HuiNengStrategy implements OpenApiBaseStrategy {
alarmInfo
.
setPerson
(
jsonObject
.
getString
(
"person"
));
alarmInfo
.
setPerson
(
jsonObject
.
getString
(
"person"
));
alarmInfo
.
setAlarmReason
(
"跌倒触发报警"
);
alarmInfo
.
setAlarmReason
(
"跌倒触发报警"
);
alarmInfo
.
setAlarmType
(
"
3
"
);
alarmInfo
.
setAlarmType
(
"
4
"
);
alarmInfo
.
setAlarmTime
(
currentDate
);
alarmInfo
.
setAlarmTime
(
currentDate
);
alarmInfo
.
setEventName
(
"设备告警"
);
alarmInfo
.
setEventName
(
"设备告警"
);
alarmInfo
.
setEventType
(
"1"
);
alarmInfo
.
setEventType
(
"1"
);
...
...
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