提交 2b70f401 authored 作者: zhoushaopan's avatar zhoushaopan

fix(盘存模块): 修改盘点自查的数据

修改盘点自查的数据
上级 3d7ee490
...@@ -105,12 +105,11 @@ public class WarehouseInspectionServiceImpl implements WarehouseInspectionServic ...@@ -105,12 +105,11 @@ public class WarehouseInspectionServiceImpl implements WarehouseInspectionServic
public List<DeviceLibrary> findAllDevices() { public List<DeviceLibrary> findAllDevices() {
String currentUserUnitName = userUtils.getCurrentUserUnitName(); String currentUserUnitName = userUtils.getCurrentUserUnitName();
PredicateBuilder<DeviceLibrary> predicateBuilder = Specifications.and(); PredicateBuilder<DeviceLibrary> predicateBuilder = Specifications.and();
predicateBuilder.eq("ownUnit",currentUserUnitName); // predicateBuilder.eq("ownUnit",currentUserUnitName);
predicateBuilder.eq("locationUnit",currentUserUnitName); predicateBuilder.eq("locationUnit",currentUserUnitName);
List<Integer> statusList = new ArrayList<>(Arrays.asList(5,11,12)); List<Integer> statusList = new ArrayList<>(Arrays.asList(5,11,12));
List<DeviceLibrary> allDevices = deviceLibraryService.findAllDevices().stream() List<DeviceLibrary> allDevices = deviceLibraryService.findAllDevices().stream()
.filter(deviceLibrary -> deviceLibrary.getOwnUnit().equals(currentUserUnitName) .filter(deviceLibrary -> deviceLibrary.getLocationUnit().equals(currentUserUnitName)
&& deviceLibrary.getLocationUnit().equals(currentUserUnitName)
&& !statusList.contains(deviceLibrary.getLifeStatus())).collect(Collectors.toList()); && !statusList.contains(deviceLibrary.getLifeStatus())).collect(Collectors.toList());
allDevices.forEach(deviceLibrary -> deviceLibrary.setStatus(0)); allDevices.forEach(deviceLibrary -> deviceLibrary.setStatus(0));
return allDevices; return allDevices;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论