|
@@ -4,9 +4,11 @@ import com.diagbot.client.AiptServiceClient;
|
|
|
import com.diagbot.dto.ConceptBaseDTO;
|
|
|
import com.diagbot.dto.ConceptRetrievalDTO;
|
|
|
import com.diagbot.dto.RespDTO;
|
|
|
+import com.diagbot.dto.SymptomSearchDTO;
|
|
|
import com.diagbot.entity.Symptom;
|
|
|
import com.diagbot.util.BeanUtil;
|
|
|
import com.diagbot.util.RespDTOUtil;
|
|
|
+import com.diagbot.util.StringUtil;
|
|
|
import com.diagbot.vo.ConceptUsualVO;
|
|
|
import com.diagbot.vo.RetrievalVO;
|
|
|
import com.diagbot.vo.SymptomSearchVO;
|
|
@@ -51,7 +53,7 @@ public class SymptomFacade {
|
|
|
* @param symptomSearchVO
|
|
|
* @return 检索的症状
|
|
|
*/
|
|
|
- public List<Symptom> searchFac(SymptomSearchVO symptomSearchVO) {
|
|
|
+ public List<SymptomSearchDTO> searchFac(SymptomSearchVO symptomSearchVO) {
|
|
|
//调用aipt-service服务
|
|
|
RetrievalVO retrievalVO = new RetrievalVO();
|
|
|
retrievalVO.setType(1);
|
|
@@ -60,14 +62,17 @@ public class SymptomFacade {
|
|
|
retrievalVO.setSexType(symptomSearchVO.getSexType());
|
|
|
RespDTO<List<ConceptRetrievalDTO>> condeptRerievalS = aiptServiceClient.retrivelConceptInfo(retrievalVO);
|
|
|
RespDTOUtil.respNGDeal(condeptRerievalS, "获取标签失败");
|
|
|
- List<Symptom> symptomList = new ArrayList<>();
|
|
|
- Symptom symptom = new Symptom();
|
|
|
+ List<SymptomSearchDTO> symptomList = new ArrayList<>();
|
|
|
+ SymptomSearchDTO symptomSearchDTO = new SymptomSearchDTO();
|
|
|
//封装
|
|
|
for (ConceptRetrievalDTO conceptRetrievalDTO : condeptRerievalS.data) {
|
|
|
- symptom = new Symptom();
|
|
|
- symptom.setConceptId(conceptRetrievalDTO.getSelfId());
|
|
|
- symptom.setName(conceptRetrievalDTO.getSelfName());
|
|
|
- symptomList.add(symptom);
|
|
|
+ symptomSearchDTO = new SymptomSearchDTO();
|
|
|
+ symptomSearchDTO.setConceptId(conceptRetrievalDTO.getSelfId());
|
|
|
+ symptomSearchDTO.setName(conceptRetrievalDTO.getSelfName());
|
|
|
+ if (StringUtil.isNotEmpty(conceptRetrievalDTO.getSameName())) {//同义词
|
|
|
+ symptomSearchDTO.setSearchName(conceptRetrievalDTO.getSameName());
|
|
|
+ }
|
|
|
+ symptomList.add(symptomSearchDTO);
|
|
|
}
|
|
|
return symptomList;
|
|
|
}
|