|
@@ -15,7 +15,6 @@ import com.diagbot.dto.StaticKnowledgeIndexDTO;
|
|
import com.diagbot.entity.ConceptDetail;
|
|
import com.diagbot.entity.ConceptDetail;
|
|
import com.diagbot.entity.ConceptInfo;
|
|
import com.diagbot.entity.ConceptInfo;
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
-import com.diagbot.enums.StaticTypeEnum;
|
|
|
|
import com.diagbot.enums.StatusEnum;
|
|
import com.diagbot.enums.StatusEnum;
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
import com.diagbot.exception.CommonException;
|
|
import com.diagbot.exception.CommonException;
|
|
@@ -38,7 +37,6 @@ import com.diagbot.vo.StaticKnowledgeHISVO;
|
|
import com.diagbot.vo.StaticKnowledgeIndexVO;
|
|
import com.diagbot.vo.StaticKnowledgeIndexVO;
|
|
import com.diagbot.vo.StaticKnowledgeVO;
|
|
import com.diagbot.vo.StaticKnowledgeVO;
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Lists;
|
|
-import io.swagger.models.auth.In;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
@@ -127,6 +125,8 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
List<DictionaryInfoDTO> dicStaticIndexList = dictionaryFacade.getListByGroupType(7);
|
|
List<DictionaryInfoDTO> dicStaticIndexList = dictionaryFacade.getListByGroupType(7);
|
|
//页面术语类型和图谱映射
|
|
//页面术语类型和图谱映射
|
|
List<DictionaryInfoDTO> dicTypeMappingList = dictionaryFacade.getListByGroupType(8);
|
|
List<DictionaryInfoDTO> dicTypeMappingList = dictionaryFacade.getListByGroupType(8);
|
|
|
|
+ //静态知识类型
|
|
|
|
+ List<DictionaryInfoDTO> dicStaticTypeList = dictionaryFacade.getListByGroupType(10);
|
|
|
|
|
|
List<StaticKnowledgeIndexDTO> staticKnowledgeIndexDTOList = Lists.newLinkedList();
|
|
List<StaticKnowledgeIndexDTO> staticKnowledgeIndexDTOList = Lists.newLinkedList();
|
|
RespDTO<List<StaticKnowledgeIndexDTO>> respDTO = cdssCoreClient.staticKnowledgeIndex(staticKnowledgeIndexVO);
|
|
RespDTO<List<StaticKnowledgeIndexDTO>> respDTO = cdssCoreClient.staticKnowledgeIndex(staticKnowledgeIndexVO);
|
|
@@ -204,20 +204,24 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
//排序
|
|
//排序
|
|
Map<String, List<StaticKnowledgeIndexDTO>> map
|
|
Map<String, List<StaticKnowledgeIndexDTO>> map
|
|
= EntityUtil.makeEntityListMap(staticKnowledgeIndexDTOList, "typeName");
|
|
= EntityUtil.makeEntityListMap(staticKnowledgeIndexDTOList, "typeName");
|
|
|
|
+ Map<Integer, String> staticTypeDicMap =
|
|
|
|
+ EntityUtil.makeMapWithKeyValue(dicStaticTypeList, "val", "name");
|
|
for (DictionaryInfoDTO dic : dicStaticIndexList) {
|
|
for (DictionaryInfoDTO dic : dicStaticIndexList) {
|
|
if (dic.getName().equals("检验")) {
|
|
if (dic.getName().equals("检验")) {
|
|
- if (map.containsKey(StaticTypeEnum.LisPack.getName())) {
|
|
|
|
- retList.addAll(map.get(StaticTypeEnum.LisPack.getName()));
|
|
|
|
|
|
+ //3-检验套餐、4-检验细项
|
|
|
|
+ if (map.containsKey(staticTypeDicMap.get(3))) {
|
|
|
|
+ retList.addAll(map.get(staticTypeDicMap.get(3)));
|
|
}
|
|
}
|
|
- if (map.containsKey(StaticTypeEnum.Lis.getName())) {
|
|
|
|
- retList.addAll(map.get(StaticTypeEnum.Lis.getName()));
|
|
|
|
|
|
+ if (map.containsKey(staticTypeDicMap.get(4))) {
|
|
|
|
+ retList.addAll(map.get(staticTypeDicMap.get(4)));
|
|
}
|
|
}
|
|
} else if (dic.getName().equals("检查")) {
|
|
} else if (dic.getName().equals("检查")) {
|
|
- if (map.containsKey(StaticTypeEnum.Pacs.getName())) {
|
|
|
|
- retList.addAll(map.get(StaticTypeEnum.Pacs.getName()));
|
|
|
|
|
|
+ //5-检查、6-检查子项
|
|
|
|
+ if (map.containsKey(staticTypeDicMap.get(5))) {
|
|
|
|
+ retList.addAll(map.get(staticTypeDicMap.get(5)));
|
|
}
|
|
}
|
|
- if (map.containsKey(StaticTypeEnum.PacsSubName.getName())) {
|
|
|
|
- retList.addAll(map.get(StaticTypeEnum.PacsSubName.getName()));
|
|
|
|
|
|
+ if (map.containsKey(staticTypeDicMap.get(6))) {
|
|
|
|
+ retList.addAll(map.get(staticTypeDicMap.get(6)));
|
|
}
|
|
}
|
|
} else if (map.containsKey(dic.getName())) {
|
|
} else if (map.containsKey(dic.getName())) {
|
|
retList.addAll(map.get(dic.getName()));
|
|
retList.addAll(map.get(dic.getName()));
|
|
@@ -236,7 +240,10 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
*/
|
|
*/
|
|
public StaticKnowledgeDTO getStaticKnowledge(StaticKnowledgeVO staticKnowledgeVO) {
|
|
public StaticKnowledgeDTO getStaticKnowledge(StaticKnowledgeVO staticKnowledgeVO) {
|
|
StaticKnowledgeDTO staticKnowledgeDTO = new StaticKnowledgeDTO();
|
|
StaticKnowledgeDTO staticKnowledgeDTO = new StaticKnowledgeDTO();
|
|
- String typeName = StaticTypeEnum.getName(staticKnowledgeVO.getType());
|
|
|
|
|
|
+ List<DictionaryInfoDTO> dicStaticTypeList = dictionaryFacade.getListByGroupType(10);
|
|
|
|
+ Map<Integer, String> dicStaticTypeValNameMap =
|
|
|
|
+ EntityUtil.makeMapWithKeyValue(dicStaticTypeList, "val", "name");
|
|
|
|
+ String typeName = dicStaticTypeValNameMap.get(staticKnowledgeVO.getType());
|
|
List<DictionaryInfoDTO> dicList = dictionaryFacade.getListByGroupType(8);
|
|
List<DictionaryInfoDTO> dicList = dictionaryFacade.getListByGroupType(8);
|
|
typeName = convertTypeName(typeName, 1, dicList);
|
|
typeName = convertTypeName(typeName, 1, dicList);
|
|
|
|
|
|
@@ -334,7 +341,10 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
public List<StaticKnowledgeHISDTO> getStaticKnowledgeForHIS(StaticKnowledgeHISVO staticKnowledgeHISVO) {
|
|
public List<StaticKnowledgeHISDTO> getStaticKnowledgeForHIS(StaticKnowledgeHISVO staticKnowledgeHISVO) {
|
|
|
|
|
|
List<StaticKnowledgeHISDTO> retList = Lists.newArrayList();
|
|
List<StaticKnowledgeHISDTO> retList = Lists.newArrayList();
|
|
- String typeName = StaticTypeEnum.getName(staticKnowledgeHISVO.getType());
|
|
|
|
|
|
+ List<DictionaryInfoDTO> dicStaticTypeList = dictionaryFacade.getListByGroupType(10);
|
|
|
|
+ Map<Integer, String> dicStaticTypeValNameMap =
|
|
|
|
+ EntityUtil.makeMapWithKeyValue(dicStaticTypeList, "val", "name");
|
|
|
|
+ String typeName = dicStaticTypeValNameMap.get(staticKnowledgeHISVO.getType());
|
|
List<DictionaryInfoDTO> dicList = dictionaryFacade.getListByGroupType(8);
|
|
List<DictionaryInfoDTO> dicList = dictionaryFacade.getListByGroupType(8);
|
|
typeName = convertTypeName(typeName, 1, dicList);
|
|
typeName = convertTypeName(typeName, 1, dicList);
|
|
|
|
|
|
@@ -537,9 +547,14 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
*/
|
|
*/
|
|
public IPage<ConceptInfoDTO> getPage(ConceptInfoPageVO conceptInfoPageVO) {
|
|
public IPage<ConceptInfoDTO> getPage(ConceptInfoPageVO conceptInfoPageVO) {
|
|
List<DictionaryInfoDTO> dicList = dictionaryFacade.getListByGroupType(8);
|
|
List<DictionaryInfoDTO> dicList = dictionaryFacade.getListByGroupType(8);
|
|
|
|
+ List<DictionaryInfoDTO> dicStaticTypeList = dictionaryFacade.getListByGroupType(10);
|
|
|
|
+ Map<Integer, String> dicStaticTypeValNameMap =
|
|
|
|
+ EntityUtil.makeMapWithKeyValue(dicStaticTypeList, "val", "name");
|
|
|
|
+ Map<String, Integer> dicStaticTypeNameValMap =
|
|
|
|
+ EntityUtil.makeMapWithKeyValue(dicStaticTypeList, "name", "val");
|
|
if (StringUtil.isNotBlank(conceptInfoPageVO.getType())) {
|
|
if (StringUtil.isNotBlank(conceptInfoPageVO.getType())) {
|
|
String typeName
|
|
String typeName
|
|
- = convertTypeName(StaticTypeEnum.getName(Integer.valueOf(conceptInfoPageVO.getType())), 1, dicList);
|
|
|
|
|
|
+ = convertTypeName(dicStaticTypeValNameMap.get(conceptInfoPageVO.getType()), 1, dicList);
|
|
conceptInfoPageVO.setTypeName(typeName);
|
|
conceptInfoPageVO.setTypeName(typeName);
|
|
}
|
|
}
|
|
IPage<ConceptInfoDTO> page = super.getPage(conceptInfoPageVO);
|
|
IPage<ConceptInfoDTO> page = super.getPage(conceptInfoPageVO);
|
|
@@ -548,7 +563,7 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
records.forEach(record -> {
|
|
records.forEach(record -> {
|
|
String typeName = convertTypeName(record.getType(), 2, dicList);
|
|
String typeName = convertTypeName(record.getType(), 2, dicList);
|
|
record.setTypeName(typeName);
|
|
record.setTypeName(typeName);
|
|
- record.setType(String.valueOf(StaticTypeEnum.getKey(typeName)));
|
|
|
|
|
|
+ record.setType(String.valueOf(dicStaticTypeNameValMap.get(typeName)));
|
|
});
|
|
});
|
|
}
|
|
}
|
|
page.setRecords(records);
|
|
page.setRecords(records);
|
|
@@ -564,9 +579,14 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
public Boolean saveOrUpdateRecord(ConceptInfoVO conceptInfoVO) {
|
|
public Boolean saveOrUpdateRecord(ConceptInfoVO conceptInfoVO) {
|
|
String userId = SysUserUtils.getCurrentPrincipleID();
|
|
String userId = SysUserUtils.getCurrentPrincipleID();
|
|
Date now = DateUtil.now();
|
|
Date now = DateUtil.now();
|
|
|
|
+ //术语类型映射
|
|
List<DictionaryInfoDTO> dicList = dictionaryFacade.getListByGroupType(8);
|
|
List<DictionaryInfoDTO> dicList = dictionaryFacade.getListByGroupType(8);
|
|
|
|
+ //静态知识类型
|
|
|
|
+ List<DictionaryInfoDTO> dicStaticTypeList = dictionaryFacade.getListByGroupType(10);
|
|
|
|
+ Map<Integer, String> dicStaticTypeValNameMap =
|
|
|
|
+ EntityUtil.makeMapWithKeyValue(dicStaticTypeList, "val", "name");
|
|
//术语类型转换
|
|
//术语类型转换
|
|
- String typeName = convertTypeName(StaticTypeEnum.getName(Integer.valueOf(conceptInfoVO.getType())), 1, dicList);
|
|
|
|
|
|
+ String typeName = convertTypeName(dicStaticTypeValNameMap.get(conceptInfoVO.getType()), 1, dicList);
|
|
conceptInfoVO.setTypeName(typeName);
|
|
conceptInfoVO.setTypeName(typeName);
|
|
ConceptInfo conceptInfo = new ConceptInfo();
|
|
ConceptInfo conceptInfo = new ConceptInfo();
|
|
|
|
|
|
@@ -683,8 +703,12 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
*/
|
|
*/
|
|
public Boolean isExist(ConceptInfoVO conceptInfoVO) {
|
|
public Boolean isExist(ConceptInfoVO conceptInfoVO) {
|
|
List<DictionaryInfoDTO> dicList = dictionaryFacade.getListByGroupType(8);
|
|
List<DictionaryInfoDTO> dicList = dictionaryFacade.getListByGroupType(8);
|
|
|
|
+ //静态知识类型
|
|
|
|
+ List<DictionaryInfoDTO> dicStaticTypeList = dictionaryFacade.getListByGroupType(10);
|
|
|
|
+ Map<Integer, String> dicStaticTypeValNameMap =
|
|
|
|
+ EntityUtil.makeMapWithKeyValue(dicStaticTypeList, "val", "name");
|
|
//术语类型转换
|
|
//术语类型转换
|
|
- String typeName = convertTypeName(StaticTypeEnum.getName(Integer.valueOf(conceptInfoVO.getType())), 1, dicList);
|
|
|
|
|
|
+ String typeName = convertTypeName(dicStaticTypeValNameMap.get(conceptInfoVO.getType()), 1, dicList);
|
|
conceptInfoVO.setTypeName(typeName);
|
|
conceptInfoVO.setTypeName(typeName);
|
|
QueryWrapper<ConceptInfo> conceptInfoQueryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<ConceptInfo> conceptInfoQueryWrapper = new QueryWrapper<>();
|
|
conceptInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
conceptInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
@@ -712,6 +736,12 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
*/
|
|
*/
|
|
public ConceptInfoDTO getRecordById(IdVO idVO) {
|
|
public ConceptInfoDTO getRecordById(IdVO idVO) {
|
|
List<DictionaryInfoDTO> dicList = dictionaryFacade.getListByGroupType(8);
|
|
List<DictionaryInfoDTO> dicList = dictionaryFacade.getListByGroupType(8);
|
|
|
|
+ //静态知识类型
|
|
|
|
+ List<DictionaryInfoDTO> dicStaticTypeList = dictionaryFacade.getListByGroupType(10);
|
|
|
|
+ Map<Integer, String> dicStaticTypeValNameMap =
|
|
|
|
+ EntityUtil.makeMapWithKeyValue(dicStaticTypeList, "val", "name");
|
|
|
|
+ Map<String, Integer> dicStaticTypeNameValMap =
|
|
|
|
+ EntityUtil.makeMapWithKeyValue(dicStaticTypeList, "name", "val");
|
|
ConceptInfoDTO conceptInfoDTO = new ConceptInfoDTO();
|
|
ConceptInfoDTO conceptInfoDTO = new ConceptInfoDTO();
|
|
ConceptInfo conceptInfo = this.getById(idVO.getId());
|
|
ConceptInfo conceptInfo = this.getById(idVO.getId());
|
|
if (conceptInfo == null) {
|
|
if (conceptInfo == null) {
|
|
@@ -729,7 +759,7 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
//启用状态、修改人、修改时间为明细的内容
|
|
//启用状态、修改人、修改时间为明细的内容
|
|
String typeName = convertTypeName(conceptInfoDTO.getType(), 2, dicList);
|
|
String typeName = convertTypeName(conceptInfoDTO.getType(), 2, dicList);
|
|
conceptInfoDTO.setTypeName(typeName);
|
|
conceptInfoDTO.setTypeName(typeName);
|
|
- conceptInfoDTO.setType(String.valueOf(StaticTypeEnum.getKey(typeName)));
|
|
|
|
|
|
+ conceptInfoDTO.setType(String.valueOf(dicStaticTypeNameValMap.get(typeName)));
|
|
conceptInfoDTO.setModifier(conceptDetailList.get(0).getModifier());
|
|
conceptInfoDTO.setModifier(conceptDetailList.get(0).getModifier());
|
|
conceptInfoDTO.setGmtModified(conceptDetailList.get(0).getGmtModified());
|
|
conceptInfoDTO.setGmtModified(conceptDetailList.get(0).getGmtModified());
|
|
}
|
|
}
|
|
@@ -761,7 +791,7 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
|
|
QueryWrapper<ConceptDetail> conceptDetailQueryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<ConceptDetail> conceptDetailQueryWrapper = new QueryWrapper<>();
|
|
conceptDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
conceptDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.in("concept_id", conceptIds);
|
|
.in("concept_id", conceptIds);
|
|
- if(ListUtil.isNotEmpty(contentTypes)) {
|
|
|
|
|
|
+ if (ListUtil.isNotEmpty(contentTypes)) {
|
|
conceptDetailQueryWrapper.and(sql -> {
|
|
conceptDetailQueryWrapper.and(sql -> {
|
|
for (int i = 0; i < contentTypes.size(); i++) {
|
|
for (int i = 0; i < contentTypes.size(); i++) {
|
|
if (i > 0) {
|
|
if (i > 0) {
|