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
239dc580
authored
Feb 27, 2024
by
罗志长
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix: 平台端小程序机构统计设备列表
parent
b1beee1d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
server-service/src/main/java/com/makeit/service/wechat/impl/PlatElderCenterWechatServiceImpl.java
server-service/src/main/java/com/makeit/service/wechat/impl/PlatElderCenterWechatServiceImpl.java
View file @
239dc580
...
@@ -231,12 +231,37 @@ public class PlatElderCenterWechatServiceImpl implements PlatElderCenterWechatSe
...
@@ -231,12 +231,37 @@ public class PlatElderCenterWechatServiceImpl implements PlatElderCenterWechatSe
}
}
LocalDateTime
now
=
LocalDateTime
.
now
();
LocalDateTime
now
=
LocalDateTime
.
now
();
LocalDateTime
start
=
now
.
minusSeconds
(
10
);
LocalDateTime
start
=
now
.
minusSeconds
(
10
);
List
<
PlatRoomBedDevice
>
platRoomDevices
=
platRoomBedDeviceService
.
list
(
new
QueryWrapper
<
PlatRoomBedDevice
>().
lambda
()
.
in
(
PlatRoomBedDevice:
:
getRoomId
,
roomIds
)
.
isNull
(
PlatRoomBedDevice:
:
getBedId
));
List
<
PlatRoomBedDevice
>
platBedDevices
=
platRoomBedDeviceService
.
list
(
new
QueryWrapper
<
PlatRoomBedDevice
>().
lambda
()
.
in
(
PlatRoomBedDevice:
:
getRoomId
,
roomIds
)
.
isNotNull
(
PlatRoomBedDevice:
:
getBedId
));
Map
<
String
,
List
<
PlatRoomBedDevice
>>
roomDeviceMap
=
StreamUtil
.
groupBy
(
platRoomDevices
,
PlatRoomBedDevice:
:
getRoomId
);
Map
<
String
,
PlatRoomBedDevice
>
bedDeviceMap
=
StreamUtil
.
toMap
(
platBedDevices
,
PlatRoomBedDevice:
:
getBedId
);
List
<
PlatDevice
>
platDeviceList
=
platDeviceService
.
list
();
Map
<
String
,
PlatDevice
>
deviceMap
=
StreamUtil
.
toMap
(
platDeviceList
,
BaseEntity:
:
getId
);
for
(
WorkStationInstitutionRoomVO
vo
:
roomVOList
)
{
for
(
WorkStationInstitutionRoomVO
vo
:
roomVOList
)
{
vo
.
setPathName
(
vo
.
getPathName
()
+
"-"
+
vo
.
getRoomName
());
vo
.
setPathName
(
vo
.
getPathName
()
+
"-"
+
vo
.
getRoomName
());
if
(
bedMap
.
get
(
vo
.
getRoomId
())
!=
null
)
{
if
(
bedMap
.
get
(
vo
.
getRoomId
())
!=
null
)
{
List
<
WorkStationInstitutionBedVO
>
roomBedVos
=
bedMap
.
get
(
vo
.
getRoomId
());
List
<
WorkStationInstitutionBedVO
>
roomBedVos
=
bedMap
.
get
(
vo
.
getRoomId
());
//获取告警类型及老人状态
//获取告警类型及老人状态
for
(
WorkStationInstitutionBedVO
r
:
roomBedVos
)
{
for
(
WorkStationInstitutionBedVO
r
:
roomBedVos
)
{
List
<
PlatDevice
>
deviceList
=
Lists
.
newArrayList
();
List
<
PlatRoomBedDevice
>
platRoomBedDevices
=
roomDeviceMap
.
get
(
r
.
getRoomId
());
if
(
CollectionUtils
.
isNotEmpty
(
platRoomBedDevices
))
{
List
<
String
>
tempDeviceIdList
=
StreamUtil
.
map
(
platRoomBedDevices
,
PlatRoomBedDevice:
:
getDeviceId
);
for
(
String
s
:
tempDeviceIdList
)
{
PlatDevice
platDevice
=
deviceMap
.
get
(
s
);
if
(
platDevice
!=
null
)
{
deviceList
.
add
(
platDevice
);
}
}
}
if
(
StringUtil
.
isNotEmpty
(
r
.
getElderId
()))
{
if
(
StringUtil
.
isNotEmpty
(
r
.
getElderId
()))
{
if
(
elderAlarmTypeMap
.
containsKey
(
r
.
getElderId
()))
{
if
(
elderAlarmTypeMap
.
containsKey
(
r
.
getElderId
()))
{
r
.
setAlarmTypeMap
(
elderAlarmTypeMap
.
get
(
r
.
getElderId
()));
r
.
setAlarmTypeMap
(
elderAlarmTypeMap
.
get
(
r
.
getElderId
()));
...
@@ -247,7 +272,15 @@ public class PlatElderCenterWechatServiceImpl implements PlatElderCenterWechatSe
...
@@ -247,7 +272,15 @@ public class PlatElderCenterWechatServiceImpl implements PlatElderCenterWechatSe
PlatElderRealTimeNowVO
realTimeNowVO
=
platElderRealTimeService
.
nowStatus
(
platElderIdDTO
);
PlatElderRealTimeNowVO
realTimeNowVO
=
platElderRealTimeService
.
nowStatus
(
platElderIdDTO
);
r
.
setElderStatus
(
realTimeNowVO
.
getStatus
());
r
.
setElderStatus
(
realTimeNowVO
.
getStatus
());
PlatRoomBedDevice
platRoomBedDevice
=
bedDeviceMap
.
get
(
r
.
getBedId
());
if
(
platRoomBedDevice
!=
null
)
{
PlatDevice
platDevice
=
deviceMap
.
get
(
platRoomBedDevice
.
getDeviceId
());
if
(
platDevice
!=
null
)
{
deviceList
.
add
(
platDevice
);
}
}
}
}
r
.
setDeviceList
(
deviceList
);
}
}
vo
.
setList
(
roomBedVos
);
vo
.
setList
(
roomBedVos
);
}
}
...
...
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