提交 62260ea5 authored 作者: zhoushaopan's avatar zhoushaopan

fix(装备模块): 过滤装备

过滤装备
上级 3349232e
...@@ -1314,6 +1314,9 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService { ...@@ -1314,6 +1314,9 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
StopWatch stopWatch = new StopWatch("条件查询结果集"); StopWatch stopWatch = new StopWatch("条件查询结果集");
stopWatch.start(); stopWatch.start();
List<DeviceLibrary> deviceLibraries = deviceLibraryDao.findAll(or); List<DeviceLibrary> deviceLibraries = deviceLibraryDao.findAll(or);
//报废 退役 销毁
List<Integer> status = new ArrayList<>(Arrays.asList(5,10,11,12));
deviceLibraries = deviceLibraries.stream().filter(deviceLibrary -> !status.contains(deviceLibrary.getLifeStatus())).collect(Collectors.toList());
deviceLibraries.forEach(DeviceLibrary::setConfigName); deviceLibraries.forEach(DeviceLibrary::setConfigName);
stopWatch.stop(); stopWatch.stop();
log.info("条件查询结果集时间为:{}",stopWatch.getTotalTimeSeconds()); log.info("条件查询结果集时间为:{}",stopWatch.getTotalTimeSeconds());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论