|
@ -132,7 +132,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
if (!categoryRes.success() || org.springframework.util.CollectionUtils.isEmpty(categoryRes.getData())) { |
|
|
if (!categoryRes.success() || org.springframework.util.CollectionUtils.isEmpty(categoryRes.getData())) { |
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取项目分类名称异常"); |
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取项目分类名称异常"); |
|
|
} |
|
|
} |
|
|
Map<String, String> categoryMap = categoryRes.getData().stream().collect(Collectors.toMap(IssueProjectCategoryDictDTO::getId, IssueProjectCategoryDictDTO::getCategoryName)); |
|
|
Map<String, IssueProjectCategoryDictDTO> categoryMap = categoryRes.getData().stream().collect(Collectors.toMap(IssueProjectCategoryDictDTO::getId, o -> o, (o1, o2) -> o1)); |
|
|
|
|
|
|
|
|
//封装数据
|
|
|
//封装数据
|
|
|
for (IcEventListResultDTO dto : list) { |
|
|
for (IcEventListResultDTO dto : list) { |
|
@ -143,7 +143,8 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
dto.setSourceTypeName(statusMap.get(dto.getSourceType())); |
|
|
dto.setSourceTypeName(statusMap.get(dto.getSourceType())); |
|
|
} |
|
|
} |
|
|
if (categoryMap.containsKey(dto.getCategoryId())) { |
|
|
if (categoryMap.containsKey(dto.getCategoryId())) { |
|
|
dto.setCategoryName(categoryMap.get(dto.getCategoryId())); |
|
|
IssueProjectCategoryDictDTO category = categoryMap.get(dto.getCategoryId()); |
|
|
|
|
|
dto.setCategoryName(category.getParentCategoryName().concat(StrConstant.HYPHEN).concat(category.getCategoryName())); |
|
|
} |
|
|
} |
|
|
//每个事件对应的图片数据
|
|
|
//每个事件对应的图片数据
|
|
|
if(!CollectionUtils.isEmpty(dto.getAttachmentList())){ |
|
|
if(!CollectionUtils.isEmpty(dto.getAttachmentList())){ |
|
|