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
fdf03315
authored
Oct 24, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix: 修复bug
parent
75bcc069
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
server-service/src/main/java/com/makeit/service/platform/space/impl/PlatRegionSettingServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/space/impl/PlatRoomBedDeviceServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/space/impl/PlatRegionSettingServiceImpl.java
View file @
fdf03315
...
...
@@ -22,6 +22,7 @@ import com.makeit.service.platform.space.PlatRegionSettingService;
import
com.makeit.utils.LongTimestampUtil
;
import
com.makeit.utils.data.convert.BeanDtoVoUtils
;
import
com.makeit.utils.data.convert.JsonUtil
;
import
com.makeit.utils.old.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -67,6 +68,7 @@ public class PlatRegionSettingServiceImpl extends ServiceImpl<PlatRegionSettingM
.
in
(
PlatDeviceOther:
:
getDeviceId
,
listDeviceId
));
}
platDeviceOthers
=
platDeviceOthers
.
stream
().
filter
(
platDeviceOther
->
StringUtils
.
isNotEmpty
(
platDeviceOther
.
getAttribute
())).
collect
(
Collectors
.
toList
());
Map
<
String
,
String
>
map
=
platDeviceOthers
.
stream
().
collect
(
Collectors
.
toMap
(
PlatDeviceOther:
:
getDeviceId
,
PlatDeviceOther:
:
getAttribute
));
List
<
PlatRegionSetting
>
list
=
new
ArrayList
<>();
listDeviceId
.
forEach
(
item
->{
...
...
server-service/src/main/java/com/makeit/service/platform/space/impl/PlatRoomBedDeviceServiceImpl.java
View file @
fdf03315
...
...
@@ -74,6 +74,15 @@ public class PlatRoomBedDeviceServiceImpl extends ServiceImpl<PlatRoomBedDeviceM
throw
new
BusinessException
(
CodeMessageEnum
.
PLATFORM_ERROR_BED_BIND_DEVICE_NOT_AUTH
);
}
}
// 绑定床位不重复插入数据,直接绑定
if
(
StringUtils
.
isNotEmpty
(
dto
.
getBedId
()))
{
List
<
PlatRoomBedDevice
>
platRoomBedDeviceList
=
list
(
new
QueryWrapper
<
PlatRoomBedDevice
>().
lambda
().
in
(
PlatRoomBedDevice:
:
getDeviceId
,
listEquipmentIds
));
for
(
PlatRoomBedDevice
platRoomBedDevice
:
platRoomBedDeviceList
)
{
platRoomBedDevice
.
setBedId
(
dto
.
getBedId
());
updateById
(
platRoomBedDevice
);
}
return
;
}
listEquipmentIds
.
forEach
(
item
->
{
...
...
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