Commit 74ad371b by huangjy

fix:误报长者日报周报异常

parent 0fe2acbf
...@@ -205,7 +205,7 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev ...@@ -205,7 +205,7 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
deviceCacheUtil.put(db); deviceCacheUtil.put(db);
iotProductDeviceService.syncUpdateDeviceInfo(db.getOriDeviceId(),dto.getName(),db.getProductId()); //iotProductDeviceService.syncUpdateDeviceInfo(db.getOriDeviceId(),dto.getName(),db.getProductId());
} }
@Override @Override
......
...@@ -8,6 +8,7 @@ import com.makeit.entity.platform.device.PlatDevice; ...@@ -8,6 +8,7 @@ import com.makeit.entity.platform.device.PlatDevice;
import com.makeit.entity.platform.elder.PlatElderBreatheAnalysis; import com.makeit.entity.platform.elder.PlatElderBreatheAnalysis;
import com.makeit.entity.platform.elder.PlatElderSleep; import com.makeit.entity.platform.elder.PlatElderSleep;
import com.makeit.entity.platform.elder.PlatElderSleepAnalysis; import com.makeit.entity.platform.elder.PlatElderSleepAnalysis;
import com.makeit.enums.CommonEnum;
import com.makeit.enums.platform.alarm.PlatAlarmConfigEnum; import com.makeit.enums.platform.alarm.PlatAlarmConfigEnum;
import com.makeit.module.iot.service.IotProductDeviceService; import com.makeit.module.iot.service.IotProductDeviceService;
import com.makeit.module.iot.vo.breathe.DeviceInfoContentBreathe; import com.makeit.module.iot.vo.breathe.DeviceInfoContentBreathe;
...@@ -207,6 +208,7 @@ public class PlatElderDayReportDayServiceImpl implements PlatElderDayReportDaySe ...@@ -207,6 +208,7 @@ public class PlatElderDayReportDayServiceImpl implements PlatElderDayReportDaySe
.ge(PlatAlarmRecord::getAlarmDate, start) .ge(PlatAlarmRecord::getAlarmDate, start)
.le(PlatAlarmRecord::getAlarmDate, end) .le(PlatAlarmRecord::getAlarmDate, end)
.eq(PlatAlarmRecord::getMisinformationFlag, CommonEnum.NO.getValue())
.orderByDesc(PlatAlarmRecord::getAlarmDate) .orderByDesc(PlatAlarmRecord::getAlarmDate)
); );
...@@ -280,7 +282,7 @@ public class PlatElderDayReportDayServiceImpl implements PlatElderDayReportDaySe ...@@ -280,7 +282,7 @@ public class PlatElderDayReportDayServiceImpl implements PlatElderDayReportDaySe
.in(PlatAlarmRecord::getDeviceId, StreamUtil.mapId(platDeviceList, PlatDevice::getId)) .in(PlatAlarmRecord::getDeviceId, StreamUtil.mapId(platDeviceList, PlatDevice::getId))
.eq(PlatAlarmRecord::getElderIds, platElderIdDTO.getElderId()) .eq(PlatAlarmRecord::getElderIds, platElderIdDTO.getElderId())
.eq(PlatAlarmRecord::getMisinformationFlag, CommonEnum.NO.getValue())
.ge(PlatAlarmRecord::getAlarmDate, start) .ge(PlatAlarmRecord::getAlarmDate, start)
.le(PlatAlarmRecord::getAlarmDate, end) .le(PlatAlarmRecord::getAlarmDate, end)
.orderByDesc(PlatAlarmRecord::getAlarmDate) .orderByDesc(PlatAlarmRecord::getAlarmDate)
...@@ -334,7 +336,7 @@ public class PlatElderDayReportDayServiceImpl implements PlatElderDayReportDaySe ...@@ -334,7 +336,7 @@ public class PlatElderDayReportDayServiceImpl implements PlatElderDayReportDaySe
.in(PlatAlarmRecord::getDeviceId, StreamUtil.mapId(platDeviceList, PlatDevice::getId)) .in(PlatAlarmRecord::getDeviceId, StreamUtil.mapId(platDeviceList, PlatDevice::getId))
.eq(PlatAlarmRecord::getElderIds, platElderIdDTO.getElderId()) .eq(PlatAlarmRecord::getElderIds, platElderIdDTO.getElderId())
.eq(PlatAlarmRecord::getMisinformationFlag, CommonEnum.NO.getValue())
.ge(PlatAlarmRecord::getAlarmDate, start) .ge(PlatAlarmRecord::getAlarmDate, start)
.le(PlatAlarmRecord::getAlarmDate, end) .le(PlatAlarmRecord::getAlarmDate, end)
.orderByDesc(PlatAlarmRecord::getAlarmDate) .orderByDesc(PlatAlarmRecord::getAlarmDate)
......
...@@ -24,6 +24,7 @@ import com.makeit.utils.sql.join.JoinUtil; ...@@ -24,6 +24,7 @@ import com.makeit.utils.sql.join.JoinUtil;
import com.makeit.vo.platform.elder.PlatElderListVO; import com.makeit.vo.platform.elder.PlatElderListVO;
import com.makeit.vo.platform.space.*; import com.makeit.vo.platform.space.*;
import jodd.util.StringUtil; import jodd.util.StringUtil;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -58,6 +59,10 @@ public class PlatRoomDynamicServiceImpl implements PlatRoomDynamicService { ...@@ -58,6 +59,10 @@ public class PlatRoomDynamicServiceImpl implements PlatRoomDynamicService {
//获取下级空间 //获取下级空间
List<PlatSpace> spaces = platSpaceService.list(new QueryWrapper<PlatSpace>().lambda() List<PlatSpace> spaces = platSpaceService.list(new QueryWrapper<PlatSpace>().lambda()
.eq(PlatSpace::getParentId,dto.getId())); .eq(PlatSpace::getParentId,dto.getId()));
if (CollectionUtils.isEmpty(spaces)) {
spaces = platSpaceService.list(new QueryWrapper<PlatSpace>().lambda()
.eq(PlatSpace::getId,dto.getId()));
}
if(!spaces.isEmpty()){ if(!spaces.isEmpty()){
List<String> spaceIds = spaces.stream().map(PlatSpace::getId).collect(Collectors.toList()); List<String> spaceIds = spaces.stream().map(PlatSpace::getId).collect(Collectors.toList());
//空间下的房间 //空间下的房间
......
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