Commit 1f3154f5 by 罗志长

fix:呼吸心率日报

parent 4348eb2e
......@@ -9,6 +9,6 @@ public interface PlatElderBreatheHeartRateRecordService extends IService<PlatEld
void breatheHeartRateRecordTask();
List<PlatElderBreatheHeartRateRecord> list(String elderId, long start, long end);
List<PlatElderBreatheHeartRateRecord> list(String elderId, String iotDeviceId, long start, long end);
}
......@@ -16,6 +16,7 @@ import com.makeit.service.platform.elder.PlatElderService;
import com.makeit.utils.data.convert.StreamUtil;
import com.makeit.utils.time.LocalDateTimeUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -70,9 +71,10 @@ public class PlatElderBreatheHeartRateRecordServiceImpl extends ServiceImpl<Plat
}
@Override
public List<PlatElderBreatheHeartRateRecord> list(String elderId, long start, long end) {
public List<PlatElderBreatheHeartRateRecord> list(String elderId, String iotDeviceId, long start, long end) {
LambdaQueryWrapper<PlatElderBreatheHeartRateRecord> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(PlatElderBreatheHeartRateRecord::getElderId, elderId);
queryWrapper.eq(StringUtils.isNotBlank(elderId), PlatElderBreatheHeartRateRecord::getElderId, elderId);
queryWrapper.eq(StringUtils.isNotBlank(iotDeviceId), PlatElderBreatheHeartRateRecord::getIotDeviceId, iotDeviceId);
queryWrapper.ge(PlatElderBreatheHeartRateRecord::getReportTime, start);
queryWrapper.le(PlatElderBreatheHeartRateRecord::getReportTime, end);
return list(queryWrapper);
......
......@@ -286,7 +286,7 @@ public class PlatElderDayReportDayServiceImpl implements PlatElderDayReportDaySe
long reportTimeStart = LocalDateTimeUtils.getMilliSecond(start);
long reportTimeEnd = LocalDateTimeUtils.getMilliSecond(end);
List<PlatElderBreatheHeartRateRecord> list = platElderBreatheHeartRateRecordService.list(platElderIdDTO.getElderId(), reportTimeStart, reportTimeEnd);
List<PlatElderBreatheHeartRateRecord> list = platElderBreatheHeartRateRecordService.list(platElderIdDTO.getElderId(), platElderIdDTO.getDeviceId(), reportTimeStart, reportTimeEnd);
return StreamUtil.map(list, e -> {
PlatElderRealTimeHeartRespiratoryVO vo = new PlatElderRealTimeHeartRespiratoryVO();
......
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