|
@@ -16,6 +16,7 @@ import com.diagbot.enums.FeatureTypeEnum;
|
|
|
import com.diagbot.enums.LexiconTypeEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
|
+import com.diagbot.util.EntityUtil;
|
|
|
import com.diagbot.util.FastJsonUtils;
|
|
|
import com.diagbot.util.ListUtil;
|
|
|
import com.diagbot.util.ParamConvertUtil;
|
|
@@ -118,9 +119,9 @@ public class PushFacade {
|
|
|
//警惕
|
|
|
Map<String, String> highRiskMap = new HashMap<>();
|
|
|
highRiskMap.put("disease", String.join(",", nameList));
|
|
|
- SearchData searchData = new SearchData();
|
|
|
- searchData.setDiag(String.join(",", nameList));
|
|
|
- GdbResponse graphRes = clinicalFacade.highRiskPageData(searchVo);
|
|
|
+ SearchVo hrSearchVo = new SearchVo();
|
|
|
+ hrSearchVo.setDiag(String.join(",", nameList));
|
|
|
+ GdbResponse graphRes = clinicalFacade.highRiskPageData(hrSearchVo);
|
|
|
if (graphRes != null) {
|
|
|
Map<String, String> graphResult = graphRes.getResult();
|
|
|
if (graphResult.size() > 0) {
|
|
@@ -185,9 +186,9 @@ public class PushFacade {
|
|
|
conceptBaseVO.setLibType(LexiconTypeEnum.GAUGE.getKey());
|
|
|
Concept scaleConcept = conceptFacade.getConcept(conceptBaseVO);
|
|
|
if (scaleConcept != null) {
|
|
|
- scaleJson.put("id", scaleConcept.getId());
|
|
|
+ scaleJson.put("conceptId", scaleConcept.getId());
|
|
|
} else {
|
|
|
- scaleJson.put("id", null);
|
|
|
+ scaleJson.put("conceptId", null);
|
|
|
}
|
|
|
detail.setContent(scaleJson);
|
|
|
}
|
|
@@ -246,15 +247,17 @@ public class PushFacade {
|
|
|
*/
|
|
|
public List<ConceptPushDTO> getConceptDTOList(List<String> nameList, Integer libType) {
|
|
|
List<Concept> concepts = conceptFacade.getListByNamesAndType(nameList, libType);
|
|
|
+ Map<String, Concept> conceptMap = EntityUtil.makeEntityMap(concepts, "libName");
|
|
|
List<ConceptPushDTO> conceptDTOS = Lists.newLinkedList();
|
|
|
- if (ListUtil.isNotEmpty(concepts)) {
|
|
|
- for (Concept concept : concepts) {
|
|
|
- ConceptPushDTO conceptDTO = new ConceptPushDTO();
|
|
|
+ for (String name : nameList) {
|
|
|
+ ConceptPushDTO conceptDTO = new ConceptPushDTO();
|
|
|
+ conceptDTO.setName(name);
|
|
|
+ conceptDTO.setLibType(ParamConvertUtil.libConvert2Concept(libType));
|
|
|
+ if (conceptMap.containsKey(name) && conceptMap.get(name) != null) {
|
|
|
+ Concept concept = conceptMap.get(name);
|
|
|
conceptDTO.setConceptId(concept.getId());
|
|
|
- conceptDTO.setName(concept.getLibName());
|
|
|
- conceptDTO.setLibType(ParamConvertUtil.libConvert2Concept(libType));
|
|
|
- conceptDTOS.add(conceptDTO);
|
|
|
}
|
|
|
+ conceptDTOS.add(conceptDTO);
|
|
|
}
|
|
|
return conceptDTOS;
|
|
|
}
|