This commit is contained in:
wangliwen 2022-07-06 17:25:16 +08:00
parent 089ff2bb3a
commit fbb5fa3bc3
1 changed files with 8 additions and 3 deletions

View File

@ -544,7 +544,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
HashMap<String, Object> resultMap = new HashMap<>(); HashMap<String, Object> resultMap = new HashMap<>();
List<Map> re = resourceDao.selectTypeCount(null); List<Map> re = resourceDao.selectTypeCount(null);
//2022-07-05,ytl修改 start //2022-07-05,ytl修改 start
re.removeIf(r->{return org.apache.commons.lang3.StringUtils.equals(r.get("type").toString(),"基础设施");}); re.removeIf(r -> {
return org.apache.commons.lang3.StringUtils.equals(r.get("type").toString(), "基础设施");
});
//2022-07-05,ytl修改 end //2022-07-05,ytl修改 end
switch (Constant.ProjectPlace.getByFlag(projectPlace)) { switch (Constant.ProjectPlace.getByFlag(projectPlace)) {
case TSINGTAO_XHA: { // 青岛西海岸 case TSINGTAO_XHA: { // 青岛西海岸
@ -1655,8 +1657,11 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
List<Long> resourceIds = getSourceIdsByProcess(list); List<Long> resourceIds = getSourceIdsByProcess(list);
IPage<ResourceEntity> page = new Page<>(curPage, limit); IPage<ResourceEntity> page = new Page<>(curPage, limit);
QueryWrapper<ResourceEntity> queryWrapper = new QueryWrapper<>(); QueryWrapper<ResourceEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.in("id", resourceIds).eq("del_flag", ResourceEntityDelFlag.NORMAL.getFlag()).orderBy(true, isAsc, orderColumn); if (!resourceIds.isEmpty()) {
List<ResourceDTO> dtoList = ConvertUtils.sourceToTarget(resourceDao.selectPage(page, queryWrapper).getRecords(), ResourceDTO.class); queryWrapper.in("id", resourceIds);
}
queryWrapper.eq("del_flag", ResourceEntityDelFlag.NORMAL.getFlag()).orderBy(true, isAsc, orderColumn);
List<ResourceDTO> dtoList = ConvertUtils.sourceToTarget(Optional.ofNullable(resourceDao.selectPage(page, queryWrapper).getRecords()).orElse(new ArrayList<>()), ResourceDTO.class);
dtoList.forEach(temp -> { dtoList.forEach(temp -> {
Map p = new HashMap(); Map p = new HashMap();
p.put("resource_id", temp.getId()); p.put("resource_id", temp.getId());