|
@@ -39,8 +39,10 @@ import com.diagbot.util.BeanUtil;
|
|
|
import com.diagbot.util.DateUtil;
|
|
|
import com.diagbot.util.EntityUtil;
|
|
|
import com.diagbot.util.ListUtil;
|
|
|
+import com.diagbot.util.RespDTOUtil;
|
|
|
import com.diagbot.util.StringUtil;
|
|
|
import com.diagbot.util.UserUtils;
|
|
|
+import com.diagbot.vo.ConceptExistVO;
|
|
|
import com.diagbot.vo.DeleteQuestionVO;
|
|
|
import com.diagbot.vo.GetQuestionIdsByTypeVO;
|
|
|
import com.diagbot.vo.GetQuestionInfoVO;
|
|
@@ -436,23 +438,24 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
|
|
|
bean.setModifier(mapRespDTO.data.get(bean.getModifier()));
|
|
|
}
|
|
|
|
|
|
- //TODO 待修改
|
|
|
-// List<String> nameList = res.getRecords().stream().map(row -> row.getTagName()).collect(Collectors.toList());
|
|
|
-// ConceptExistVO conceptExistVO = new ConceptExistVO();
|
|
|
-// conceptExistVO.setNameList(nameList);
|
|
|
-// conceptExistVO.setType(res.getRecords().get(0).getType());
|
|
|
-// try {
|
|
|
-// RespDTO<Map<String, Long>> resMap = knowledgemanServiceClient.getConceptMap(conceptExistVO);
|
|
|
-// RespDTOUtil.respNGDeal(resMap, "远程调用根据名称和类型获取概念列表失败");
|
|
|
-// Map<String, Long> map = resMap.data;
|
|
|
-// for (QuestionPageDTO bean : res.getRecords()) {
|
|
|
-// if(map.get(bean.getTagName()) != null) {
|
|
|
-// bean.setExist(true);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// } catch (Exception e) {
|
|
|
-// e.printStackTrace();
|
|
|
-// }
|
|
|
+ List<String> nameList = res.getRecords().stream().map(row -> row.getTagName()).collect(Collectors.toList());
|
|
|
+ ConceptExistVO conceptExistVO = new ConceptExistVO();
|
|
|
+ conceptExistVO.setNameList(nameList);
|
|
|
+ try {
|
|
|
+ RespDTO<Map<String, List<Integer>>> resMap = knowledgemanServiceClient.getConceptMap(conceptExistVO);
|
|
|
+ RespDTOUtil.respNGDeal(resMap, "远程调用根据名称和类型获取概念列表失败");
|
|
|
+ Map<String, List<Integer>> map = resMap.data;
|
|
|
+ for (QuestionPageDTO bean : res.getRecords()) {
|
|
|
+ List<Integer> list = map.get(bean.getTagName());
|
|
|
+ if (ListUtil.isNotEmpty(list)) {
|
|
|
+ if (list.contains(bean.getType())) {
|
|
|
+ bean.setExist(true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
return res;
|
|
|
}
|
|
|
|