提交 2aab7f5a authored 作者: 邓砥奕's avatar 邓砥奕

更新

上级 834b4ed5
...@@ -16,7 +16,6 @@ import com.tykj.dev.misc.utils.GetTreeUtils; ...@@ -16,7 +16,6 @@ import com.tykj.dev.misc.utils.GetTreeUtils;
import com.tykj.dev.misc.utils.JacksonUtil; import com.tykj.dev.misc.utils.JacksonUtil;
import com.tykj.dev.misc.utils.PageUtil; import com.tykj.dev.misc.utils.PageUtil;
import com.tykj.dev.misc.utils.ResultUtil; import com.tykj.dev.misc.utils.ResultUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl; import org.springframework.data.domain.PageImpl;
...@@ -134,17 +133,23 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService { ...@@ -134,17 +133,23 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
@Override @Override
public Page<DeviceStatisticsVo> getDeviceStatisticsPage(DeviceLibrarySelectVo deviceLibrarySelectVo, Pageable pageable) { public Page<DeviceStatisticsVo> getDeviceStatisticsPage(DeviceLibrarySelectVo deviceLibrarySelectVo, Pageable pageable) {
//获取存在的所有装备型号 //获取存在的所有装备型号
List<String> list = new ArrayList<>(); // List<String> list = new ArrayList<>();
if (deviceLibrarySelectVo.getModel() != null) { // if (deviceLibrarySelectVo.getModel() != null) {
list.add(deviceLibrarySelectVo.getModel()); // list.add(deviceLibrarySelectVo.getModel());
} else { // } else {
list = getAllModel(); // list = getAllModel();
} // }
//设置最大size的装备查询vo //设置最大size的装备查询vo
List<DeviceStatisticsVo> deviceStatisticsVos = new ArrayList<>(); List<DeviceStatisticsVo> deviceStatisticsVos = new ArrayList<>();
DeviceLibrarySelectVo d = new DeviceLibrarySelectVo(); DeviceLibrarySelectVo d = new DeviceLibrarySelectVo();
BeanUtils.copyProperties(deviceLibrarySelectVo, d); // BeanUtils.copyProperties(deviceLibrarySelectVo, d);
d.setSize(Integer.MAX_VALUE); d.setSize(Integer.MAX_VALUE);
d.setPage(0);
d.setAreaId(deviceLibrarySelectVo.getAreaId());
d.setUnitId(deviceLibrarySelectVo.getUnitId());
d.setModel(deviceLibrarySelectVo.getModel());
d.setName(deviceLibrarySelectVo.getName());
d.setContent(deviceLibrarySelectVo.getContent());
//获取所有的核心装备 //获取所有的核心装备
List<DeviceLibrary> libraryEntities = getCoreDevicePage(d, d.getPageable()).getContent(); List<DeviceLibrary> libraryEntities = getCoreDevicePage(d, d.getPageable()).getContent();
if (libraryEntities.size() > 0) { if (libraryEntities.size() > 0) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论