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
bfc6e8d0
authored
Nov 07, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix:修改设备属性问题
parent
ee3d59e7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderRealTimeServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
View file @
bfc6e8d0
...
@@ -220,7 +220,7 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
...
@@ -220,7 +220,7 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
// 写入设备
// 写入设备
PlatDeviceAttrWechatDTO
platDeviceAttrWechatDTO
=
JSON
.
parseObject
(
dto
.
getAttribute
(),
PlatDeviceAttrWechatDTO
.
class
);
PlatDeviceAttrWechatDTO
platDeviceAttrWechatDTO
=
JSON
.
parseObject
(
dto
.
getAttribute
(),
PlatDeviceAttrWechatDTO
.
class
);
platDeviceAttrWechatDTO
.
setDeviceId
(
db
.
get
OriDevice
Id
());
platDeviceAttrWechatDTO
.
setDeviceId
(
db
.
getId
());
editDeviceProperties
(
platDeviceAttrWechatDTO
);
editDeviceProperties
(
platDeviceAttrWechatDTO
);
}
}
...
@@ -343,10 +343,11 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
...
@@ -343,10 +343,11 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
if
(
StringUtils
.
isNotEmpty
(
other
.
getAttribute
()))
{
if
(
StringUtils
.
isNotEmpty
(
other
.
getAttribute
()))
{
PlatDeviceAttrWechatDTO
deviceAttrWechatDTO
=
JsonUtil
.
toObj
(
other
.
getAttribute
(),
PlatDeviceAttrWechatDTO
.
class
);
PlatDeviceAttrWechatDTO
deviceAttrWechatDTO
=
JsonUtil
.
toObj
(
other
.
getAttribute
(),
PlatDeviceAttrWechatDTO
.
class
);
//更新区域设置设备安装方式
if
(
deviceAttrWechatDTO
!=
null
)
{
platRegionSettingService
.
update
(
new
UpdateWrapper
<
PlatRegionSetting
>().
lambda
()
deviceAttrWechatDTO
.
setDeviceId
(
db
.
getId
());
.
set
(
PlatRegionSetting:
:
getInstallType
,
deviceAttrWechatDTO
.
getRadarMount
())
//更新区域设置设备安装方式
.
eq
(
PlatRegionSetting:
:
getDeviceId
,
other
.
getDeviceId
()));
editDeviceProperties
(
deviceAttrWechatDTO
);
}
}
}
}
}
...
@@ -393,7 +394,7 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
...
@@ -393,7 +394,7 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
if
(
StringUtils
.
isNotEmpty
(
dto
.
getAttribute
()))
{
if
(
StringUtils
.
isNotEmpty
(
dto
.
getAttribute
()))
{
// 写入设备
// 写入设备
PlatDeviceAttrWechatDTO
platDeviceAttrWechatDTO
=
JSON
.
parseObject
(
dto
.
getAttribute
(),
PlatDeviceAttrWechatDTO
.
class
);
PlatDeviceAttrWechatDTO
platDeviceAttrWechatDTO
=
JSON
.
parseObject
(
dto
.
getAttribute
(),
PlatDeviceAttrWechatDTO
.
class
);
platDeviceAttrWechatDTO
.
setDeviceId
(
db
.
get
OriDevice
Id
());
platDeviceAttrWechatDTO
.
setDeviceId
(
db
.
getId
());
editDeviceProperties
(
platDeviceAttrWechatDTO
);
editDeviceProperties
(
platDeviceAttrWechatDTO
);
}
}
}
}
...
...
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderRealTimeServiceImpl.java
View file @
bfc6e8d0
...
@@ -502,7 +502,8 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService {
...
@@ -502,7 +502,8 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService {
JSONObject
jsonObject
=
JSON
.
parseObject
(
fallResult
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
fallResult
);
vo
.
setDeviceId
(
platDevice
.
getId
());
vo
.
setDeviceId
(
platDevice
.
getId
());
vo
.
setOriDeviceId
(
platDevice
.
getOriDeviceId
());
vo
.
setOriDeviceId
(
platDevice
.
getOriDeviceId
());
vo
.
setTrack
((
List
<
Integer
>)
jsonObject
.
get
(
"track"
));
Object
track
=
jsonObject
.
get
(
"track"
);
vo
.
setTrack
((
track
==
null
?
Lists
.
newArrayList
()
:
(
List
<
Integer
>)
track
));
vo
.
setPersonState
(
Integer
.
valueOf
(
jsonObject
.
getString
(
"personState"
)));
vo
.
setPersonState
(
Integer
.
valueOf
(
jsonObject
.
getString
(
"personState"
)));
vo
.
setMount
(
Integer
.
valueOf
(
jsonObject
.
getString
(
"mount"
)));
vo
.
setMount
(
Integer
.
valueOf
(
jsonObject
.
getString
(
"mount"
)));
vo
.
setType
(
2
);
vo
.
setType
(
2
);
...
...
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