|
@@ -1,12 +1,19 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
+import com.diagbot.client.AiptServiceClient;
|
|
|
+import com.diagbot.dto.ConceptBaseDTO;
|
|
|
+import com.diagbot.dto.RespDTO;
|
|
|
import com.diagbot.dto.SymptomSearchDTO;
|
|
|
import com.diagbot.entity.Symptom;
|
|
|
import com.diagbot.entity.SymptomWrapper;
|
|
|
import com.diagbot.enums.ShowTypeEnum;
|
|
|
import com.diagbot.service.impl.SymptomServiceImpl;
|
|
|
+import com.diagbot.util.BeanUtil;
|
|
|
+import com.diagbot.util.RespDTOUtil;
|
|
|
+import com.diagbot.vo.ConceptUsualVO;
|
|
|
import com.diagbot.vo.SymptomSearchVO;
|
|
|
import com.diagbot.vo.SymptomUsualVO;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
@@ -21,16 +28,24 @@ import java.util.Map;
|
|
|
*/
|
|
|
@Component
|
|
|
public class SymptomFacade extends SymptomServiceImpl{
|
|
|
+ @Autowired
|
|
|
+ AiptServiceClient aiptServiceClient;
|
|
|
+
|
|
|
/**
|
|
|
* 获取常用症状
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
public List<Symptom> getUsualFac(SymptomUsualVO symptomUsualVO) {
|
|
|
- Map paramMap = new HashMap();
|
|
|
- paramMap.put("sexType", symptomUsualVO.getSexType());
|
|
|
- paramMap.put("age", symptomUsualVO.getAge());
|
|
|
- return this.getUsual(paramMap);
|
|
|
+ ConceptUsualVO conceptUsualVO = new ConceptUsualVO();
|
|
|
+ BeanUtil.copyProperties(symptomUsualVO,conceptUsualVO);
|
|
|
+ conceptUsualVO.setDeptName("全科");
|
|
|
+ conceptUsualVO.setType(1);
|
|
|
+ //从知识库获取常用标签
|
|
|
+ RespDTO<List<ConceptBaseDTO>> conceptBaseDTORespDTO = aiptServiceClient.getConceptUsual(conceptUsualVO);
|
|
|
+ RespDTOUtil.respNGDeal(conceptBaseDTORespDTO,"获取常用标签失败");
|
|
|
+ List<Symptom> symptomList = BeanUtil.listCopyTo(conceptBaseDTORespDTO.data,Symptom.class);
|
|
|
+ return symptomList;
|
|
|
}
|
|
|
|
|
|
|