diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java index f2cf70efba..70f57f2af3 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java @@ -137,8 +137,10 @@ public class EpmetUserServiceImpl implements EpmetUserService { String totalTimeDesc = minutes / 60 + "小时"+ minutes % 60 + "分"; dto.setTotalTimeDesc(totalTimeDesc); List detailList = details.get(record.getId()); - List recordDetails = - detailList.stream().sorted(Comparator.comparing(StaffPatrolDetailDTO::getSerialNum).reversed()).collect(Collectors.toList()).stream().map( detail -> { + detailList = + detailList.stream().sorted(Comparator.comparing(StaffPatrolDetailDTO::getSerialNum).reversed()).collect(Collectors.toList()).stream() + .filter(item -> null == record.getPatrolEndTime() || record.getPatrolEndTime().compareTo(item.getUploadTime()) > -1).collect(Collectors.toList()); + List recordDetails = detailList.stream().map( detail -> { PatrolRecordDetailDTO detailDTO = new PatrolRecordDetailDTO(); detailDTO.setLatitude(detail.getLatitude()); detailDTO.setLongitude(detail.getLongitude());