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
cb720511
authored
Sep 12, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
4ec485be
42118ccf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
server-service/src/main/java/com/makeit/entity/platform/device/PlatDevice.java
server-service/src/main/java/com/makeit/task/IotSyncTask.java
server-service/src/main/java/com/makeit/entity/platform/device/PlatDevice.java
View file @
cb720511
package
com
.
makeit
.
entity
.
platform
.
device
;
package
com
.
makeit
.
entity
.
platform
.
device
;
import
com.makeit.common.entity.BaseBusEntity
;
import
com.makeit.common.entity.BaseBusEntity
;
import
com.makeit.module.iot.enums.DeviceState
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -47,7 +48,10 @@ public class PlatDevice extends BaseBusEntity {
...
@@ -47,7 +48,10 @@ public class PlatDevice extends BaseBusEntity {
@ApiModelProperty
(
value
=
"说明"
)
@ApiModelProperty
(
value
=
"说明"
)
private
String
description
;
private
String
description
;
@ApiModelProperty
(
value
=
"状态 数据字典 1 在线 0离线"
)
/**
* @see DeviceState
*/
@ApiModelProperty
(
value
=
"状态 数据字典 1 在线 0离线 "
)
private
String
status
;
private
String
status
;
@ApiModelProperty
(
value
=
"组织id"
)
@ApiModelProperty
(
value
=
"组织id"
)
...
...
server-service/src/main/java/com/makeit/task/IotSyncTask.java
View file @
cb720511
...
@@ -106,7 +106,7 @@ public class IotSyncTask {
...
@@ -106,7 +106,7 @@ public class IotSyncTask {
platDevice
.
setRegistrationDate
(
registryTime
);
platDevice
.
setRegistrationDate
(
registryTime
);
platDevice
.
setDescription
(
iotDevice
.
getDescribe
());
platDevice
.
setDescription
(
iotDevice
.
getDescribe
());
String
state
=
iotDevice
.
getState
();
String
state
=
iotDevice
.
getState
();
platDevice
.
setStatus
(
StringUtils
.
equals
(
"online"
,
state
)
?
CommonEnum
.
YES
.
getValue
()
:
CommonEnum
.
NO
.
getValue
()
);
platDevice
.
setStatus
(
state
);
//todo 根据类型名称来匹配
//todo 根据类型名称来匹配
platDevice
.
setCategory
(
dicNameIdMap
.
get
(
iotDevice
.
getProductName
()));
platDevice
.
setCategory
(
dicNameIdMap
.
get
(
iotDevice
.
getProductName
()));
...
...
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