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
f037f4a2
authored
Feb 27, 2024
by
罗志长
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix: 区域设置设备安装方式同步
parent
826ce8fa
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
View file @
f037f4a2
...
...
@@ -408,6 +408,13 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
if
(!
StringUtils
.
equals
(
oldAttr
,
attr
))
{
other
.
setAttribute
(
attr
);
platDeviceOtherService
.
updateById
(
other
);
if
(
iotAttr
.
getRadarMount
()
!=
null
)
{
List
<
PlatDevice
>
platDeviceList
=
list
(
new
QueryWrapper
<
PlatDevice
>().
lambda
().
eq
(
PlatDevice:
:
getOriDeviceId
,
db
.
getOriDeviceId
()));
//更新区域设置设备安装方式
platRegionSettingService
.
update
(
new
UpdateWrapper
<
PlatRegionSetting
>().
lambda
()
.
set
(
PlatRegionSetting:
:
getInstallType
,
iotAttr
.
getRadarMount
())
.
in
(
CollectionUtils
.
isNotEmpty
(
platDeviceList
),
PlatRegionSetting:
:
getDeviceId
,
StreamUtil
.
map
(
platDeviceList
,
BaseEntity:
:
getId
)));
}
}
}
...
...
@@ -489,6 +496,13 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
if
(!
StringUtils
.
equals
(
oldAttr
,
attr
))
{
other
.
setAttribute
(
attr
);
platDeviceOtherService
.
updateById
(
other
);
if
(
iotAttr
.
getRadarMount
()
!=
null
)
{
List
<
PlatDevice
>
platDeviceList
=
list
(
new
QueryWrapper
<
PlatDevice
>().
lambda
().
eq
(
PlatDevice:
:
getOriDeviceId
,
platDevice
.
getOriDeviceId
()));
//更新区域设置设备安装方式
platRegionSettingService
.
update
(
new
UpdateWrapper
<
PlatRegionSetting
>().
lambda
()
.
set
(
PlatRegionSetting:
:
getInstallType
,
iotAttr
.
getRadarMount
())
.
in
(
CollectionUtils
.
isNotEmpty
(
platDeviceList
),
PlatRegionSetting:
:
getDeviceId
,
StreamUtil
.
map
(
platDeviceList
,
BaseEntity:
:
getId
)));
}
}
}
...
...
@@ -686,6 +700,13 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
if
(!
StringUtils
.
equals
(
oldAttr
,
attr
))
{
platDeviceOther
.
setAttribute
(
attr
);
platDeviceOtherService
.
updateById
(
platDeviceOther
);
if
(
iotAttr
.
getRadarMount
()
!=
null
)
{
List
<
PlatDevice
>
platDeviceList
=
list
(
new
QueryWrapper
<
PlatDevice
>().
lambda
().
eq
(
PlatDevice:
:
getOriDeviceId
,
platDevice
.
getOriDeviceId
()));
//更新区域设置设备安装方式
platRegionSettingService
.
update
(
new
UpdateWrapper
<
PlatRegionSetting
>().
lambda
()
.
set
(
PlatRegionSetting:
:
getInstallType
,
iotAttr
.
getRadarMount
())
.
in
(
CollectionUtils
.
isNotEmpty
(
platDeviceList
),
PlatRegionSetting:
:
getDeviceId
,
StreamUtil
.
map
(
platDeviceList
,
BaseEntity:
:
getId
)));
}
}
}
...
...
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