|
@@ -5,9 +5,9 @@ import com.diagbot.biz.push.entity.FeatureRateWithExplainV2;
|
|
import com.diagbot.biz.push.entity.ResponseDataWithExplainV2;
|
|
import com.diagbot.biz.push.entity.ResponseDataWithExplainV2;
|
|
import com.diagbot.client.AiptServiceClient;
|
|
import com.diagbot.client.AiptServiceClient;
|
|
import com.diagbot.client.TranServiceClient;
|
|
import com.diagbot.client.TranServiceClient;
|
|
-import com.diagbot.dto.AIDTO;
|
|
|
|
|
|
+import com.diagbot.dto.ConceptPushDTO;
|
|
import com.diagbot.dto.DiseaseDeptDTO;
|
|
import com.diagbot.dto.DiseaseDeptDTO;
|
|
-import com.diagbot.dto.FeatureRateDTO;
|
|
|
|
|
|
+import com.diagbot.dto.PushDTO;
|
|
import com.diagbot.dto.RespDTO;
|
|
import com.diagbot.dto.RespDTO;
|
|
import com.diagbot.dto.SYFDTO;
|
|
import com.diagbot.dto.SYFDTO;
|
|
import com.diagbot.dto.SYFDeptDTO;
|
|
import com.diagbot.dto.SYFDeptDTO;
|
|
@@ -54,18 +54,28 @@ public class AIV2Facade {
|
|
* @param type
|
|
* @param type
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public AIDTO pushSymptomForSYFV2(AIVO aivo, String type) {
|
|
|
|
|
|
+ public PushDTO pushSymptomForSYFV2(AIVO aivo, String type) {
|
|
RespDTO<ResponseDataWithExplainV2> res
|
|
RespDTO<ResponseDataWithExplainV2> res
|
|
= aiptServiceClient.pushWithExplainV2(assembleFacade.assembleData(aivo, type));
|
|
= aiptServiceClient.pushWithExplainV2(assembleFacade.assembleData(aivo, type));
|
|
RespDTOUtil.respNGDealCover(res, "中间层没有结果返回");
|
|
RespDTOUtil.respNGDealCover(res, "中间层没有结果返回");
|
|
- AIDTO aidto = new AIDTO();
|
|
|
|
|
|
+ PushDTO pushDTO = new PushDTO();
|
|
|
|
|
|
List<FeatureRateWithExplainV2> symptom = res.data.getSymptom();
|
|
List<FeatureRateWithExplainV2> symptom = res.data.getSymptom();
|
|
if (ListUtil.isNotEmpty(symptom)) {
|
|
if (ListUtil.isNotEmpty(symptom)) {
|
|
- List<FeatureRateDTO> symptomDTO = BeanUtil.listCopyTo(symptom, FeatureRateDTO.class);
|
|
|
|
- aidto.setItems(symptomDTO);
|
|
|
|
|
|
+ List<ConceptPushDTO> conceptPushDTOList = Lists.newLinkedList();
|
|
|
|
+ symptom.forEach(item -> {
|
|
|
|
+ ConceptPushDTO conceptPushDTO = new ConceptPushDTO();
|
|
|
|
+ conceptPushDTO.setName(item.getFeatureName());
|
|
|
|
+ conceptPushDTO.setTagName(item.getFeatureName());
|
|
|
|
+ conceptPushDTO.setLibType(1);
|
|
|
|
+ conceptPushDTO.setType(1);
|
|
|
|
+ conceptPushDTO.setDescription(item.getDescription());
|
|
|
|
+ conceptPushDTO.setExplains(item.getExplains());
|
|
|
|
+ conceptPushDTOList.add(conceptPushDTO);
|
|
|
|
+ });
|
|
|
|
+ pushDTO.setSymptom(conceptPushDTOList);
|
|
}
|
|
}
|
|
- return aidto;
|
|
|
|
|
|
+ return pushDTO;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|