|
@@ -142,10 +142,15 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public List<GetAllConceptDTO> getAllConcept(GetAllConceptVO getAllConceptVO) {
|
|
public List<GetAllConceptDTO> getAllConcept(GetAllConceptVO getAllConceptVO) {
|
|
|
|
+ List<GetAllConceptDTO> getAllConceptDTOList = Lists.newArrayList();
|
|
|
|
+ if(StringUtil.isBlank(getAllConceptVO.getName())){
|
|
|
|
+ return getAllConceptDTOList;
|
|
|
|
+ }
|
|
|
|
+
|
|
QueryWrapper<LibraryInfo> libraryInfoQe = new QueryWrapper<LibraryInfo>();
|
|
QueryWrapper<LibraryInfo> libraryInfoQe = new QueryWrapper<LibraryInfo>();
|
|
libraryInfoQe.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
libraryInfoQe.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
libraryInfoQe.eq(getAllConceptVO.getIsConcept() != null, "is_concept", getAllConceptVO.getIsConcept());
|
|
libraryInfoQe.eq(getAllConceptVO.getIsConcept() != null, "is_concept", getAllConceptVO.getIsConcept());
|
|
- libraryInfoQe.like(StringUtil.isNotBlank(getAllConceptVO.getName()), "name", getAllConceptVO.getName());
|
|
|
|
|
|
+ libraryInfoQe.like("name", getAllConceptVO.getName());
|
|
List<LibraryInfo> libraryInfoList = libraryinfoFacade.list(libraryInfoQe);
|
|
List<LibraryInfo> libraryInfoList = libraryinfoFacade.list(libraryInfoQe);
|
|
|
|
|
|
//过滤掉非概念术语
|
|
//过滤掉非概念术语
|
|
@@ -178,7 +183,7 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
}).collect(Collectors.toList());
|
|
}).collect(Collectors.toList());
|
|
}*/
|
|
}*/
|
|
|
|
|
|
- List<GetAllConceptDTO> getAllConceptDTOList = BeanUtil.listCopyTo(libraryInfoList, GetAllConceptDTO.class);
|
|
|
|
|
|
+ getAllConceptDTOList = BeanUtil.listCopyTo(libraryInfoList, GetAllConceptDTO.class);
|
|
getAllConceptDTOList.forEach(i -> {
|
|
getAllConceptDTOList.forEach(i -> {
|
|
i.setType(LexiconTypeEnum.getName(i.getTypeId().intValue()));
|
|
i.setType(LexiconTypeEnum.getName(i.getTypeId().intValue()));
|
|
i.setNameAndType(i.getName() + "(" + i.getType() + ")");
|
|
i.setNameAndType(i.getName() + "(" + i.getType() + ")");
|
|
@@ -195,11 +200,14 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
*/
|
|
*/
|
|
public List<GetAllForRelationDTO> getAllForRelation(GetAllForRelationVO getAllForRelationVO) {
|
|
public List<GetAllForRelationDTO> getAllForRelation(GetAllForRelationVO getAllForRelationVO) {
|
|
List<GetAllForRelationDTO> retList = new ArrayList<>();
|
|
List<GetAllForRelationDTO> retList = new ArrayList<>();
|
|
|
|
+ if(StringUtil.isBlank(getAllForRelationVO.getName())&&getAllForRelationVO.getTypeId()==null){
|
|
|
|
+ return retList;
|
|
|
|
+ }
|
|
|
|
|
|
QueryWrapper<Concept> conceptQe = new QueryWrapper<>();
|
|
QueryWrapper<Concept> conceptQe = new QueryWrapper<>();
|
|
conceptQe.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
conceptQe.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
- conceptQe.like(StringUtil.isNotEmpty(getAllForRelationVO.getName()), "lib_name", getAllForRelationVO.getName());
|
|
|
|
- conceptQe.eq(getAllForRelationVO.getTypeId() != null, "lib_type", getAllForRelationVO.getTypeId());
|
|
|
|
|
|
+ conceptQe.like(StringUtil.isNotBlank(getAllForRelationVO.getName()),"lib_name", getAllForRelationVO.getName());
|
|
|
|
+ conceptQe.eq(getAllForRelationVO.getTypeId()!=null,"lib_type", getAllForRelationVO.getTypeId());
|
|
List<Concept> conceptList = list(conceptQe);
|
|
List<Concept> conceptList = list(conceptQe);
|
|
|
|
|
|
Map<Long, Long> reCouMap = new HashMap<>();
|
|
Map<Long, Long> reCouMap = new HashMap<>();
|
|
@@ -510,6 +518,8 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
} else {
|
|
} else {
|
|
throw new CommonException(CommonErrorCode.RPC_ERROR, "该数据已经建立且处于已删除状态,可前往列表中恢复该条数据!");
|
|
throw new CommonException(CommonErrorCode.RPC_ERROR, "该数据已经建立且处于已删除状态,可前往列表中恢复该条数据!");
|
|
}
|
|
}
|
|
|
|
+ }else if(addConceptInfoVO.getConceptId().intValue()!=ckConceptId){
|
|
|
|
+ throw new CommonException(CommonErrorCode.RPC_ERROR, lineNumStr + "标准术语已被占用!");
|
|
}
|
|
}
|
|
} else if (addConceptInfoVO.getLineNum() == null && addConceptInfoVO.getConceptId() == null && concept != null
|
|
} else if (addConceptInfoVO.getLineNum() == null && addConceptInfoVO.getConceptId() == null && concept != null
|
|
|| libraryInfoList.stream().filter(i -> i.getConceptId().intValue() == ckConceptId).count() == 1) {
|
|
|| libraryInfoList.stream().filter(i -> i.getConceptId().intValue() == ckConceptId).count() == 1) {
|
|
@@ -559,7 +569,7 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
}
|
|
}
|
|
libraryInfoMain.setIsConcept(1);
|
|
libraryInfoMain.setIsConcept(1);
|
|
libraryInfoMain.setRemark(addConceptInfoDetailVOMain.getRemark());
|
|
libraryInfoMain.setRemark(addConceptInfoDetailVOMain.getRemark());
|
|
- libraryInfoMain.setSpell(libraryInfoMain.getSpell());
|
|
|
|
|
|
+ libraryInfoMain.setSpell(addConceptInfoDetailVOMain.getSpell());
|
|
libraryInfoMain.setConceptId(conceptId);
|
|
libraryInfoMain.setConceptId(conceptId);
|
|
libraryInfoMain.setGmtModified(now);
|
|
libraryInfoMain.setGmtModified(now);
|
|
libraryInfoMain.setModifier(currentUser);
|
|
libraryInfoMain.setModifier(currentUser);
|