Commit 14625de4 authored by 李腾威's avatar 李腾威

地图电梯今日应急统计

parent 9ce4235a
...@@ -117,22 +117,19 @@ public class ESElevatorServiceImpl { ...@@ -117,22 +117,19 @@ public class ESElevatorServiceImpl {
qb4.must(QueryBuilders.termQuery("sequenceNbr", alertCalled.getEquipmentId())); qb4.must(QueryBuilders.termQuery("sequenceNbr", alertCalled.getEquipmentId()));
boolMust.must(qb4); boolMust.must(qb4);
} else { } else {
if(!ValidationUtil.isEmpty(elevatorDto.getAlarmTypeCode())) { if(elevatorDto.getIsToday() != null && elevatorDto.getIsToday()) {
if(elevatorDto.getIsToday() != null && elevatorDto.getIsToday()) { queryWrapper.ge(AlertCalled::getCallTime, DateUtils.stampToDate(System.currentTimeMillis(),DateUtils.DATE_PATTERN));
queryWrapper.ge(AlertCalled::getCallTime, DateUtils.stampToDate(System.currentTimeMillis(),DateUtils.DATE_PATTERN)); queryWrapper.le(AlertCalled::getCallTime, DateUtils.stampToDate(DateUtils.dateAddDays(new Date(),1).getTime(),DateUtils.DATE_PATTERN));
queryWrapper.le(AlertCalled::getCallTime, DateUtils.stampToDate(DateUtils.dateAddDays(new Date(),1).getTime(),DateUtils.DATE_PATTERN)); }
} alertCalleds = iAlertCalledService.list(queryWrapper);
List<Long> stringList = new ArrayList<>();
alertCalleds = iAlertCalledService.list(queryWrapper); for (AlertCalled al: alertCalleds
List<Long> stringList = new ArrayList<>(); ) {
for (AlertCalled al: alertCalleds stringList.add(al.getEquipmentId());
) {
stringList.add(al.getEquipmentId());
}
List<Long> listL = stringList.stream().distinct().collect(Collectors.toList());
qb0.should(QueryBuilders.termsQuery("sequenceNbr", listL.toArray()));
boolMust.must(qb0);
} }
List<Long> listL = stringList.stream().distinct().collect(Collectors.toList());
qb0.should(QueryBuilders.termsQuery("sequenceNbr", listL.toArray()));
boolMust.must(qb0);
} }
...@@ -180,8 +177,6 @@ public class ESElevatorServiceImpl { ...@@ -180,8 +177,6 @@ public class ESElevatorServiceImpl {
break; break;
} }
} }
} else {
list.add(esElevatorDto);
} }
} }
} }
......
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 to comment