|
@@ -1003,16 +1003,28 @@ public class WebMediatorImpl implements ViewMediator {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<ResourceVO> getTestResource() {
|
|
|
+ public List<ResourceVO> getResource() {
|
|
|
List<ResourceVO> resourceVOList = new ArrayList<>();
|
|
|
resourceDao.findAll().forEach(resourcePO -> {
|
|
|
ResourceVO resourceVO = new ResourceVO();
|
|
|
resourceVO.setCode(resourcePO.getCode());
|
|
|
+ resourceVO.setName(resourcePO.getName());
|
|
|
Optional<ResourceTypePO> type = resourceTypeDao.findByCode(resourcePO.getType());
|
|
|
resourceVO.setType(type.get().getName());
|
|
|
+ resourceVO.setQuantity(resourcePO.getQuantity());
|
|
|
+ resourceVO.setPhotoUrl(resourcePO.getPhotoUrl());
|
|
|
+ resourceVO.setDescription(resourcePO.getDescription());
|
|
|
+ resourceVO.setScene(resourcePO.getScene());
|
|
|
+ resourceVO.setUnitWork(resourcePO.getUnitWork());
|
|
|
+ resourceVO.setStandard(resourcePO.getStandard());
|
|
|
+ resourceVO.setUnit(resourcePO.getUnit());
|
|
|
+ resourceVO.setState(resourcePO.getState());
|
|
|
+ resourceVO.setStartTime(resourcePO.getStartTime());
|
|
|
+ resourceVO.setPersonnel(resourcePO.getPersonnel());
|
|
|
+ resourceVO.setRemarks(resourcePO.getRemarks());
|
|
|
resourceVOList.add(resourceVO);
|
|
|
});
|
|
|
- List<ResourceVO> results = resourceVOList.stream().distinct().collect(Collectors.toList());
|
|
|
+ List<ResourceVO> results=resourceVOList.stream().sorted(Comparator.comparing(ResourceVO::getStartTime).reversed()).collect(Collectors.toList());
|
|
|
return results;
|
|
|
}
|
|
|
|