提交 3d7ee490 authored 作者: zhoushaopan's avatar zhoushaopan

fix(自查模块): 查询自查列表过滤出已销毁的装备

查询自查列表过滤出已销毁的装备
上级 38f61cd3
......@@ -196,7 +196,7 @@ public class DeviceLibraryController {
PredicateBuilder<DeviceLibrary> predicateBuilder = Specifications.and();
predicateBuilder.eq("ownUnit", unit);
predicateBuilder.eq(selfCheckVo.getStorageLocationId()!=null,"storageLocationId",selfCheckVo.getStorageLocationId());
List<Integer> status = new ArrayList<>(Arrays.asList(5,11,12));
List<Integer> status = new ArrayList<>(Arrays.asList(5,10,11,12));
List<DeviceLibrary> deviceLibraries = deviceLibraryDao.findAll(predicateBuilder.build())
.stream().filter(deviceLibrary -> !status.contains(deviceLibrary.getLifeStatus())).collect(Collectors.toList());
deviceLibraries.forEach(DeviceLibrary::setConfigName);
......
......@@ -1313,7 +1313,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
StopWatch stopWatch = new StopWatch("条件查询结果集");
stopWatch.start();
List<DeviceLibrary> deviceLibraries = deviceLibraryDao.findAll(predicateBuilder.build());
//报废 退役 销毁
//报废 退役 销毁 丢失
List<Integer> status = new ArrayList<>(Arrays.asList(5,10,11,12));
// deviceLibraries = deviceLibraries.stream().filter(deviceLibrary -> !status.contains(deviceLibrary.getLifeStatus()) && deviceLibrary.getIsPart() == 0).collect(Collectors.toList());
deviceLibraries = deviceLibraries.stream().filter(deviceLibrary -> !status.contains(deviceLibrary.getLifeStatus()) && deviceLibrary.getType() == 1).collect(Collectors.toList());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论