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
c65440f9
authored
Dec 11, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix: 日报跌倒
parent
d36fe34a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
23 deletions
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderDayReportDayServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderDayReportDayServiceImpl.java
View file @
c65440f9
...
@@ -332,11 +332,6 @@ public class PlatElderDayReportDayServiceImpl implements PlatElderDayReportDaySe
...
@@ -332,11 +332,6 @@ public class PlatElderDayReportDayServiceImpl implements PlatElderDayReportDaySe
@Override
@Override
public
List
<
String
>
failRecordListInternal
(
PlatElderReportDTO
platElderIdDTO
,
LocalDateTime
start
,
LocalDateTime
end
)
{
public
List
<
String
>
failRecordListInternal
(
PlatElderReportDTO
platElderIdDTO
,
LocalDateTime
start
,
LocalDateTime
end
)
{
String
elderId
=
platElderIdDTO
.
getElderId
();
String
elderId
=
platElderIdDTO
.
getElderId
();
List
<
PlatDevice
>
platDeviceList
=
platElderRealTimeService
.
getFallDevice
(
elderId
,
platElderIdDTO
.
getDeviceId
());
if
(
CollectionUtils
.
isEmpty
(
platDeviceList
))
{
return
new
ArrayList
<>(
10
);
}
DateTimeFormatter
dateTimeFormatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
);
DateTimeFormatter
dateTimeFormatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
);
if
(
StringUtils
.
isNotEmpty
(
platElderIdDTO
.
getDeviceId
()))
{
if
(
StringUtils
.
isNotEmpty
(
platElderIdDTO
.
getDeviceId
()))
{
...
@@ -348,26 +343,17 @@ public class PlatElderDayReportDayServiceImpl implements PlatElderDayReportDaySe
...
@@ -348,26 +343,17 @@ public class PlatElderDayReportDayServiceImpl implements PlatElderDayReportDaySe
List
<
String
>
voList
=
new
ArrayList
<>(
10
);
List
<
String
>
voList
=
new
ArrayList
<>(
10
);
String
finalElderId
=
elderId
;
String
finalElderId
=
elderId
;
platDeviceList
.
forEach
(
e
->
{
List
<
PlatAlarmRecord
>
recordList
=
platAlarmRecordService
.
list
(
new
QueryWrapper
<
PlatAlarmRecord
>().
lambda
()
.
eq
(
PlatAlarmRecord:
:
getAlarmType
,
PlatAlarmConfigEnum
.
AlarmTypeEnum
.
FALL
.
getValue
())
.
in
(
PlatAlarmRecord:
:
getDeviceId
,
StreamUtil
.
mapId
(
platDeviceList
,
PlatDevice:
:
getId
))
.
eq
(
PlatAlarmRecord:
:
getElderIds
,
finalElderId
)
.
eq
(
PlatAlarmRecord:
:
getMisinformationFlag
,
CommonEnum
.
NO
.
getValue
())
.
ge
(
PlatAlarmRecord:
:
getAlarmDate
,
start
)
.
le
(
PlatAlarmRecord:
:
getAlarmDate
,
end
)
.
orderByDesc
(
PlatAlarmRecord:
:
getAlarmDate
)
);
voList
.
addAll
(
StreamUtil
.
map
(
recordList
,
i
->
i
.
getAlarmDate
().
format
(
dateTimeFormatter
)));
/* List<DeviceInfoContentFall> fallList = iotProductDeviceService.getDeviceLogByTimeRangeFall(e.getOriDeviceId(), 2 * 24 * 3600, start, end);
List
<
PlatAlarmRecord
>
recordList
=
platAlarmRecordService
.
list
(
new
QueryWrapper
<
PlatAlarmRecord
>().
lambda
()
fallList = StreamUtil.filter(fallList, i -> DeviceInfoContentFallEnum.PersonStateEnum.FALL.getValue().equals(i.getProperties().getPersonState()));
.
eq
(
PlatAlarmRecord:
:
getAlarmType
,
PlatAlarmConfigEnum
.
AlarmTypeEnum
.
FALL
.
getValue
())
.
eq
(
PlatAlarmRecord:
:
getElderIds
,
finalElderId
)
.
eq
(
PlatAlarmRecord:
:
getMisinformationFlag
,
CommonEnum
.
NO
.
getValue
())
.
ge
(
PlatAlarmRecord:
:
getAlarmDate
,
start
)
.
le
(
PlatAlarmRecord:
:
getAlarmDate
,
end
)
.
orderByDesc
(
PlatAlarmRecord:
:
getAlarmDate
)
);
*/
voList
.
addAll
(
StreamUtil
.
map
(
recordList
,
i
->
i
.
getAlarmDate
().
format
(
dateTimeFormatter
)));
});
return
voList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
return
voList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
}
}
...
...
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