|
@@ -2,6 +2,7 @@ package com.diagbot.facade;
|
|
|
|
|
|
import com.diagbot.client.CdssCoreClient;
|
|
import com.diagbot.client.CdssCoreClient;
|
|
import com.diagbot.dto.BillMsg;
|
|
import com.diagbot.dto.BillMsg;
|
|
|
|
+import com.diagbot.dto.ConceptDetailDTO;
|
|
import com.diagbot.dto.DictionaryInfoDTO;
|
|
import com.diagbot.dto.DictionaryInfoDTO;
|
|
import com.diagbot.dto.IndicationDTO;
|
|
import com.diagbot.dto.IndicationDTO;
|
|
import com.diagbot.dto.PushBaseDTO;
|
|
import com.diagbot.dto.PushBaseDTO;
|
|
@@ -9,12 +10,12 @@ import com.diagbot.dto.PushDTO;
|
|
import com.diagbot.dto.PushPlanDTO;
|
|
import com.diagbot.dto.PushPlanDTO;
|
|
import com.diagbot.dto.RespDTO;
|
|
import com.diagbot.dto.RespDTO;
|
|
import com.diagbot.dto.TreatDTO;
|
|
import com.diagbot.dto.TreatDTO;
|
|
-import com.diagbot.entity.ConceptDetail;
|
|
|
|
import com.diagbot.util.BeanUtil;
|
|
import com.diagbot.util.BeanUtil;
|
|
import com.diagbot.util.EntityUtil;
|
|
import com.diagbot.util.EntityUtil;
|
|
import com.diagbot.util.ListUtil;
|
|
import com.diagbot.util.ListUtil;
|
|
import com.diagbot.util.RespDTOUtil;
|
|
import com.diagbot.util.RespDTOUtil;
|
|
import com.diagbot.util.StringUtil;
|
|
import com.diagbot.util.StringUtil;
|
|
|
|
+import com.diagbot.vo.GetDetailVO;
|
|
import com.diagbot.vo.IndicationPushVO;
|
|
import com.diagbot.vo.IndicationPushVO;
|
|
import com.diagbot.vo.PushPlanVO;
|
|
import com.diagbot.vo.PushPlanVO;
|
|
import com.diagbot.vo.PushVO;
|
|
import com.diagbot.vo.PushVO;
|
|
@@ -131,8 +132,6 @@ public class PushFacade {
|
|
List<DictionaryInfoDTO> dicStaticTypeList = dictionaryFacade.getListByGroupType(10);
|
|
List<DictionaryInfoDTO> dicStaticTypeList = dictionaryFacade.getListByGroupType(10);
|
|
Map<Integer, String> dicStaticTypeValNameMap =
|
|
Map<Integer, String> dicStaticTypeValNameMap =
|
|
EntityUtil.makeMapWithKeyValue(dicStaticTypeList, "val", "name");
|
|
EntityUtil.makeMapWithKeyValue(dicStaticTypeList, "val", "name");
|
|
- Map<String, Integer> dicStaticTypeNameValMap =
|
|
|
|
- EntityUtil.makeMapWithKeyValue(dicStaticTypeList, "name", "val");
|
|
|
|
|
|
|
|
if (ListUtil.isNotEmpty(pushDTO.getLis())) {
|
|
if (ListUtil.isNotEmpty(pushDTO.getLis())) {
|
|
conceptBaseList.addAll(pushDTO.getLis());
|
|
conceptBaseList.addAll(pushDTO.getLis());
|
|
@@ -158,7 +157,14 @@ public class PushFacade {
|
|
.map(i -> i.getName())
|
|
.map(i -> i.getName())
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
- Map<String, List<ConceptDetail>> conceptDetailMap = conceptInfoFacade.getDetailByConcept(conceptNameList, Arrays.asList(new Integer[] { 1, 2, 3 }));
|
|
|
|
|
|
+ GetDetailVO getDetailVO = new GetDetailVO();
|
|
|
|
+ getDetailVO.setNameList(conceptNameList);
|
|
|
|
+ getDetailVO.setContentTypes(Arrays.asList(new Integer[] { 1, 2, 3 }));
|
|
|
|
+ RespDTO<Map<String, List<ConceptDetailDTO>>> respDTO = cdssCoreClient.getDetailByConcept(getDetailVO);
|
|
|
|
+ if (RespDTOUtil.respIsNG(respDTO)) {
|
|
|
|
+ return pushDTO;
|
|
|
|
+ }
|
|
|
|
+ Map<String, List<ConceptDetailDTO>> conceptDetailMap = respDTO.data;
|
|
if (pushDTO.getDis() != null) {
|
|
if (pushDTO.getDis() != null) {
|
|
for (Map.Entry<String, List<PushBaseDTO>> entry : pushDTO.getDis().entrySet()) {
|
|
for (Map.Entry<String, List<PushBaseDTO>> entry : pushDTO.getDis().entrySet()) {
|
|
if (ListUtil.isNotEmpty(entry.getValue())) {
|
|
if (ListUtil.isNotEmpty(entry.getValue())) {
|
|
@@ -182,11 +188,6 @@ public class PushFacade {
|
|
if (conceptDetailMap.containsKey(item.getName() + "_" + dicStaticTypeValNameMap.get("5"))) {
|
|
if (conceptDetailMap.containsKey(item.getName() + "_" + dicStaticTypeValNameMap.get("5"))) {
|
|
item.setHasInfo(1);
|
|
item.setHasInfo(1);
|
|
}
|
|
}
|
|
- /*if (item.getHasInfo().equals(0)) {
|
|
|
|
- if (conceptDetailMap.containsKey(item.getName() + "_" + dicStaticTypeValNameMap.get("6))) {
|
|
|
|
- item.setHasInfo(1);
|
|
|
|
- }
|
|
|
|
- }*/
|
|
|
|
});
|
|
});
|
|
}
|
|
}
|
|
if (ListUtil.isNotEmpty(pushDTO.getMedicines())) {
|
|
if (ListUtil.isNotEmpty(pushDTO.getMedicines())) {
|
|
@@ -220,14 +221,19 @@ public class PushFacade {
|
|
List<DictionaryInfoDTO> dicStaticTypeList = dictionaryFacade.getListByGroupType(10);
|
|
List<DictionaryInfoDTO> dicStaticTypeList = dictionaryFacade.getListByGroupType(10);
|
|
Map<Integer, String> dicStaticTypeValNameMap =
|
|
Map<Integer, String> dicStaticTypeValNameMap =
|
|
EntityUtil.makeMapWithKeyValue(dicStaticTypeList, "val", "name");
|
|
EntityUtil.makeMapWithKeyValue(dicStaticTypeList, "val", "name");
|
|
- Map<String, Integer> dicStaticTypeNameValMap =
|
|
|
|
- EntityUtil.makeMapWithKeyValue(dicStaticTypeList, "name", "val");
|
|
|
|
if (ListUtil.isNotEmpty(retGeneraTreat)) {
|
|
if (ListUtil.isNotEmpty(retGeneraTreat)) {
|
|
List<String> conceptNameList = retGeneraTreat.stream()
|
|
List<String> conceptNameList = retGeneraTreat.stream()
|
|
.filter(i -> StringUtil.isNotBlank(i.getUniqueName()))
|
|
.filter(i -> StringUtil.isNotBlank(i.getUniqueName()))
|
|
.map(i -> i.getUniqueName())
|
|
.map(i -> i.getUniqueName())
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
- Map<String, List<ConceptDetail>> conceptDetailMap = conceptInfoFacade.getDetailByConcept(conceptNameList, Arrays.asList(new Integer[] { 4 }));
|
|
|
|
|
|
+ GetDetailVO getDetailVO = new GetDetailVO();
|
|
|
|
+ getDetailVO.setNameList(conceptNameList);
|
|
|
|
+ getDetailVO.setContentTypes(Arrays.asList(new Integer[] { 4 }));
|
|
|
|
+ RespDTO<Map<String, List<ConceptDetailDTO>>> respDTO = cdssCoreClient.getDetailByConcept(getDetailVO);
|
|
|
|
+ if (RespDTOUtil.respIsNG(respDTO)) {
|
|
|
|
+ return retGeneraTreat;
|
|
|
|
+ }
|
|
|
|
+ Map<String, List<ConceptDetailDTO>> conceptDetailMap = respDTO.data;
|
|
if (conceptDetailMap == null || conceptDetailMap.size() == 0) {
|
|
if (conceptDetailMap == null || conceptDetailMap.size() == 0) {
|
|
return retGeneraTreat;
|
|
return retGeneraTreat;
|
|
}
|
|
}
|
|
@@ -235,7 +241,7 @@ public class PushFacade {
|
|
if (StringUtil.isNotBlank(treatDTO.getUniqueName())) {
|
|
if (StringUtil.isNotBlank(treatDTO.getUniqueName())) {
|
|
String key = treatDTO.getUniqueName() + "_" + dicStaticTypeValNameMap.get("1");
|
|
String key = treatDTO.getUniqueName() + "_" + dicStaticTypeValNameMap.get("1");
|
|
if (conceptDetailMap.containsKey(key)) {
|
|
if (conceptDetailMap.containsKey(key)) {
|
|
- List<ConceptDetail> conceptDetailList = conceptDetailMap.get(key);
|
|
|
|
|
|
+ List<ConceptDetailDTO> conceptDetailList = conceptDetailMap.get(key);
|
|
treatDTO.setGeneraTreat(conceptDetailList
|
|
treatDTO.setGeneraTreat(conceptDetailList
|
|
.stream()
|
|
.stream()
|
|
.filter(i -> Arrays.asList(i.getContentType().split(",")).contains("4"))
|
|
.filter(i -> Arrays.asList(i.getContentType().split(",")).contains("4"))
|