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
cbc44d4c
authored
Nov 22, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix:设备实时监测问题
parent
b0a3e7d8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
8 deletions
server-service/src/main/java/com/makeit/service/platform/auth/impl/PlatOrgServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderDayReportDayServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderRealTimeServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/auth/impl/PlatOrgServiceImpl.java
View file @
cbc44d4c
...
@@ -414,6 +414,8 @@ public class PlatOrgServiceImpl extends ServiceImpl<PlatOrgMapper, PlatOrg>
...
@@ -414,6 +414,8 @@ public class PlatOrgServiceImpl extends ServiceImpl<PlatOrgMapper, PlatOrg>
Set
<
String
>
orgIdList
=
getOrgIdListByUserId
(
userVOCanNull
.
getId
());
Set
<
String
>
orgIdList
=
getOrgIdListByUserId
(
userVOCanNull
.
getId
());
List
<
PlatOrg
>
orgList
=
this
.
list
(
new
LambdaQueryWrapper
<
PlatOrg
>()
List
<
PlatOrg
>
orgList
=
this
.
list
(
new
LambdaQueryWrapper
<
PlatOrg
>()
.
eq
(
StringUtils
.
isNotEmpty
(
param
.
getType
()),
PlatOrg:
:
getType
,
param
.
getType
())
.
eq
(
StringUtils
.
isNotEmpty
(
param
.
getType
()),
PlatOrg:
:
getType
,
param
.
getType
())
.
like
(
StringUtils
.
isNotEmpty
(
param
.
getName
()),
PlatOrg:
:
getName
,
param
.
getName
())
.
eq
(
StringUtils
.
isNotEmpty
(
param
.
getStatus
()),
PlatOrg:
:
getStatus
,
param
.
getStatus
())
.
in
(
BaseEntity:
:
getId
,
orgIdList
).
eq
(
PlatOrg:
:
getStatus
,
CommonEnum
.
YES
.
getValue
()));
.
in
(
BaseEntity:
:
getId
,
orgIdList
).
eq
(
PlatOrg:
:
getStatus
,
CommonEnum
.
YES
.
getValue
()));
if
(
CollectionUtils
.
isEmpty
(
orgList
))
{
if
(
CollectionUtils
.
isEmpty
(
orgList
))
{
return
new
ArrayList
<>();
return
new
ArrayList
<>();
...
...
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderDayReportDayServiceImpl.java
View file @
cbc44d4c
...
@@ -385,16 +385,14 @@ public class PlatElderDayReportDayServiceImpl implements PlatElderDayReportDaySe
...
@@ -385,16 +385,14 @@ public class PlatElderDayReportDayServiceImpl implements PlatElderDayReportDaySe
.
orderByDesc
(
PlatAlarmRecord:
:
getAlarmDate
)
.
orderByDesc
(
PlatAlarmRecord:
:
getAlarmDate
)
);
);
List
<
String
>
list
=
recordList
.
stream
().
map
(
i
->
i
.
getAlarmDate
().
format
(
dateTimeFormatter
)).
distinct
().
collect
(
Collectors
.
toList
());
voList
.
addAll
(
StreamUtil
.
map
(
recordList
,
i
->
i
.
getAlarmDate
().
format
(
dateTimeFormatter
)));
voList
.
addAll
(
list
);
/* List<DeviceInfoContentFall> fallList = iotProductDeviceService.getDeviceLogByTimeRangeFall(e.getOriDeviceId(), 2 * 24 * 3600, start, end);
/* List<DeviceInfoContentFall> fallList = iotProductDeviceService.getDeviceLogByTimeRangeFall(e.getOriDeviceId(), 2 * 24 * 3600, start, end);
fallList = StreamUtil.filter(fallList, i -> DeviceInfoContentFallEnum.PersonStateEnum.FALL.getValue().equals(i.getProperties().getPersonState()));
fallList = StreamUtil.filter(fallList, i -> DeviceInfoContentFallEnum.PersonStateEnum.FALL.getValue().equals(i.getProperties().getPersonState()));
*/
*/
});
});
return
voList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
return
voList
;
}
}
...
...
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderRealTimeServiceImpl.java
View file @
cbc44d4c
...
@@ -119,7 +119,7 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService {
...
@@ -119,7 +119,7 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService {
PlatDevice
device
=
platDeviceService
.
getOne
(
new
QueryWrapper
<
PlatDevice
>().
lambda
()
PlatDevice
device
=
platDeviceService
.
getOne
(
new
QueryWrapper
<
PlatDevice
>().
lambda
()
.
eq
(
PlatDevice:
:
getOriDeviceId
,
deviceId
).
last
(
"limit 1"
));
.
eq
(
PlatDevice:
:
getOriDeviceId
,
deviceId
).
last
(
"limit 1"
));
if
(
device
!=
null
)
{
if
(
device
!=
null
)
{
deviceList
.
add
(
platD
evice
);
deviceList
.
add
(
d
evice
);
}
}
}
}
...
@@ -142,7 +142,7 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService {
...
@@ -142,7 +142,7 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService {
PlatDevice
device
=
platDeviceService
.
getOne
(
new
QueryWrapper
<
PlatDevice
>().
lambda
()
PlatDevice
device
=
platDeviceService
.
getOne
(
new
QueryWrapper
<
PlatDevice
>().
lambda
()
.
eq
(
PlatDevice:
:
getOriDeviceId
,
deviceId
).
last
(
"limit 1"
));
.
eq
(
PlatDevice:
:
getOriDeviceId
,
deviceId
).
last
(
"limit 1"
));
if
(
device
!=
null
)
{
if
(
device
!=
null
)
{
deviceList
.
add
(
platD
evice
);
deviceList
.
add
(
d
evice
);
}
}
}
}
...
@@ -495,8 +495,19 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService {
...
@@ -495,8 +495,19 @@ public class PlatElderRealTimeServiceImpl implements PlatElderRealTimeService {
/* if (platElderIdDTO == null || StringUtils.isEmpty(platElderIdDTO.getElderId())) {
/* if (platElderIdDTO == null || StringUtils.isEmpty(platElderIdDTO.getElderId())) {
return voList;
return voList;
}*/
}*/
List
<
PlatDevice
>
deviceListSpace
=
getSpaceDevice
(
platElderIdDTO
.
getElderId
(),
platElderIdDTO
.
getDeviceId
());
List
<
PlatDevice
>
deviceListSpace
=
Lists
.
newArrayList
();
List
<
PlatDevice
>
fallDeviceList
=
getFallDevice
(
platElderIdDTO
.
getElderId
(),
platElderIdDTO
.
getDeviceId
());
List
<
PlatDevice
>
fallDeviceList
=
Lists
.
newArrayList
();
if
(
StringUtils
.
isNotBlank
(
platElderIdDTO
.
getDeviceId
()))
{
PlatDevice
device
=
platDeviceService
.
getOne
(
new
QueryWrapper
<
PlatDevice
>().
lambda
()
.
eq
(
PlatDevice:
:
getOriDeviceId
,
platElderIdDTO
.
getDeviceId
()).
last
(
"limit 1"
));
if
(
device
!=
null
)
{
deviceListSpace
.
add
(
device
);
}
}
else
{
deviceListSpace
=
getSpaceDevice
(
platElderIdDTO
.
getElderId
(),
platElderIdDTO
.
getDeviceId
());
fallDeviceList
=
getFallDevice
(
platElderIdDTO
.
getElderId
(),
platElderIdDTO
.
getDeviceId
());
}
deviceListSpace
.
addAll
(
fallDeviceList
);
deviceListSpace
.
addAll
(
fallDeviceList
);
for
(
PlatDevice
platDevice
:
deviceListSpace
)
{
for
(
PlatDevice
platDevice
:
deviceListSpace
)
{
String
spaceResult
=
redisTemplate
.
opsForValue
().
get
(
DEVICE_SPACE_DATA
+
platDevice
.
getOriDeviceId
());
String
spaceResult
=
redisTemplate
.
opsForValue
().
get
(
DEVICE_SPACE_DATA
+
platDevice
.
getOriDeviceId
());
...
...
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