|
|
@ -6,6 +6,8 @@ import com.epmet.constant.DataSourceConstant; |
|
|
|
import com.epmet.dao.topic.TopicDao; |
|
|
|
import com.epmet.dto.AgencySubTreeDto; |
|
|
|
import com.epmet.dto.extract.result.TopicInfoResultDTO; |
|
|
|
import com.epmet.dto.group.result.TopicContentResultDTO; |
|
|
|
import com.epmet.dto.screen.form.ProjectSourceMapFormDTO; |
|
|
|
import com.epmet.dto.stats.DimTopicStatusDTO; |
|
|
|
import com.epmet.dto.stats.topic.*; |
|
|
|
import com.epmet.dto.stats.topic.result.GroupTopicData; |
|
|
@ -15,6 +17,7 @@ import com.epmet.dto.topic.TopicOriginInfoDTO; |
|
|
|
import com.epmet.dto.topic.result.ResiGroupTopicResultDTO; |
|
|
|
import com.epmet.dto.topic.result.ResiTopicOperationResultDTO; |
|
|
|
import com.epmet.dto.topic.result.ResiTopicResultDTO; |
|
|
|
import com.epmet.entity.evaluationindex.screen.ScreenDifficultyImgDataEntity; |
|
|
|
import com.epmet.service.topic.TopicService; |
|
|
|
import com.epmet.service.user.impl.UserServiceImpl; |
|
|
|
import com.epmet.util.DimIdGenerator; |
|
|
@ -24,10 +27,12 @@ import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.text.NumberFormat; |
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collector; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
/** |
|
|
@ -126,6 +131,55 @@ public class TopicServiceImpl implements TopicService { |
|
|
|
return topicDao.queryUpdateTopicOriginInfoList(customerId,updateDateId); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 查询话题的图片 |
|
|
|
* @param list |
|
|
|
* @return java.util.Map<java.lang.String,java.util.List<com.epmet.entity.evaluationindex.screen.ScreenDifficultyImgDataEntity>> |
|
|
|
* @author wangc |
|
|
|
* @date 2020.09.28 15:57 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public Map<String,List<ScreenDifficultyImgDataEntity>> getTopicImgs(List<ProjectSourceMapFormDTO> list) { |
|
|
|
if(CollectionUtils.isEmpty(list)) return Collections.EMPTY_MAP; |
|
|
|
List<ScreenDifficultyImgDataEntity> imgs = topicDao.selectTopicImgs(list); |
|
|
|
if(CollectionUtils.isEmpty(imgs)) return Collections.EMPTY_MAP; |
|
|
|
//key -> topicId | value -> projectId
|
|
|
|
Map<String,String> projectTopicMap = list.stream().collect(Collectors.toMap(ProjectSourceMapFormDTO :: getSourceId,ProjectSourceMapFormDTO :: getProjectId)); |
|
|
|
//key -> topicId
|
|
|
|
Map<String,List<ScreenDifficultyImgDataEntity>> result |
|
|
|
= imgs.stream().collect(Collectors.groupingBy(ScreenDifficultyImgDataEntity :: getEventId)); |
|
|
|
Map<String,List<ScreenDifficultyImgDataEntity>> projectResult = new HashMap<>(); |
|
|
|
projectTopicMap.forEach((topic,project) -> { |
|
|
|
result.get(topic).forEach( dest -> { |
|
|
|
dest.setEventId(project); |
|
|
|
}); |
|
|
|
projectResult.put(project,result.get(topic)); |
|
|
|
}); |
|
|
|
|
|
|
|
return projectResult; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 得到话题(项目)内容 |
|
|
|
* @param list |
|
|
|
* @return java.util.Map<java.lang.String,java.lang.String> |
|
|
|
* @author wangc |
|
|
|
* @date 2020.09.28 16:28 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public Map<String, String> getTopicContent(List<ProjectSourceMapFormDTO> list) { |
|
|
|
if(CollectionUtils.isEmpty(list)) return Collections.EMPTY_MAP; |
|
|
|
List<TopicContentResultDTO> contents = topicDao.selectTopicContent(list); |
|
|
|
if(CollectionUtils.isEmpty(contents)) return Collections.EMPTY_MAP; |
|
|
|
Map<String,String> topicContentMap = contents.stream().collect(Collectors.toMap(TopicContentResultDTO :: getTopicId,TopicContentResultDTO::getContent)); |
|
|
|
//key -> topicId | value -> projectId
|
|
|
|
Map<String,String> projectTopicMap = list.stream().collect(Collectors.toMap(ProjectSourceMapFormDTO :: getSourceId,ProjectSourceMapFormDTO :: getProjectId)); |
|
|
|
Map<String,String> result = new HashMap<>(); |
|
|
|
projectTopicMap.forEach((topic,project) -> { |
|
|
|
result.put(project,topicContentMap.get(topic)); |
|
|
|
}); |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 初始化机关-所有下级网格Map |
|
|
|