|
@@ -214,12 +214,18 @@ public class IndividualLogApiController {
|
|
String startDate = curDay.toString("yyyy-MM-dd");
|
|
String startDate = curDay.toString("yyyy-MM-dd");
|
|
String endDate = curDay.plusDays(1).toString("yyyy-MM-dd");
|
|
String endDate = curDay.plusDays(1).toString("yyyy-MM-dd");
|
|
|
|
|
|
- PersonDeviceFilterLog personDeviceFilterLog;
|
|
|
|
|
|
+ PersonDeviceFilterLog personDeviceFilterLog=null;
|
|
|
|
|
|
if (lastDateStr.equals(startDate) && lastPersonLog!=null){
|
|
if (lastDateStr.equals(startDate) && lastPersonLog!=null){
|
|
- personDeviceFilterLog = lastPersonLog;
|
|
|
|
|
|
+ //当天最后一条记录
|
|
|
|
+ DateTime recordTime = new DateTime(lastPersonLog.getRecordTime());
|
|
|
|
+
|
|
|
|
+ if(recordTime.toString("yyyy-MM-dd").equals(startDate)) {
|
|
|
|
+ personDeviceFilterLog = lastPersonLog;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- else{
|
|
|
|
|
|
+
|
|
|
|
+ if(personDeviceFilterLog==null){
|
|
personDeviceFilterLog = personDeviceFilterLogService.findByPersonOrderTemperature(person.getId(), startDate, endDate);
|
|
personDeviceFilterLog = personDeviceFilterLogService.findByPersonOrderTemperature(person.getId(), startDate, endDate);
|
|
}
|
|
}
|
|
|
|
|