Commit d1910d0c by huangjy

fix:跌倒记录

parent af62f66a
...@@ -328,11 +328,24 @@ public class PlatElderDayReportDayServiceImpl implements PlatElderDayReportDaySe ...@@ -328,11 +328,24 @@ public class PlatElderDayReportDayServiceImpl implements PlatElderDayReportDaySe
List<String> voList = new ArrayList<>(10); List<String> voList = new ArrayList<>(10);
platDeviceList.forEach(e -> { platDeviceList.forEach(e -> {
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()));
voList.addAll(StreamUtil.map(fallList, i -> dateTimeFormatter.format(LongTimestampUtil.toLocalDateTime(i.getTimestamp())))); 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, platElderIdDTO.getElderId())
.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);
fallList = StreamUtil.filter(fallList, i -> DeviceInfoContentFallEnum.PersonStateEnum.FALL.getValue().equals(i.getProperties().getPersonState()));
*/
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment