|
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.diagbot.dto.ConceptDTO;
|
|
import com.diagbot.dto.ConceptDTO;
|
|
import com.diagbot.dto.LibraryDetailDTO;
|
|
import com.diagbot.dto.LibraryDetailDTO;
|
|
|
|
+import com.diagbot.entity.Concept;
|
|
import com.diagbot.entity.LibraryDetail;
|
|
import com.diagbot.entity.LibraryDetail;
|
|
import com.diagbot.entity.LibraryInfo;
|
|
import com.diagbot.entity.LibraryInfo;
|
|
import com.diagbot.service.impl.LibraryDetailServiceImpl;
|
|
import com.diagbot.service.impl.LibraryDetailServiceImpl;
|
|
@@ -167,9 +168,11 @@ public class LibraryDetailFacade extends LibraryDetailServiceImpl {
|
|
* @param knowledgeVo
|
|
* @param knowledgeVo
|
|
* @return ConceptDTO
|
|
* @return ConceptDTO
|
|
*/
|
|
*/
|
|
- public Boolean removeConceptKnowledge(KnowledgeVo knowledgeVo) {
|
|
|
|
|
|
+ public ConceptDTO removeConceptKnowledge(KnowledgeVo knowledgeVo) {
|
|
|
|
|
|
- Boolean isdeleted = false;
|
|
|
|
|
|
+ ConceptDTO conceptDTO = new ConceptDTO();
|
|
|
|
+ List<String> msg = new ArrayList<>();
|
|
|
|
+ String error = "";
|
|
LibraryDetail libraryDetail;
|
|
LibraryDetail libraryDetail;
|
|
|
|
|
|
QueryWrapper<LibraryInfo> query = new QueryWrapper<>();
|
|
QueryWrapper<LibraryInfo> query = new QueryWrapper<>();
|
|
@@ -187,11 +190,21 @@ public class LibraryDetailFacade extends LibraryDetailServiceImpl {
|
|
if (libraryDetail != null) {
|
|
if (libraryDetail != null) {
|
|
libraryDetail.setIsDeleted("Y");
|
|
libraryDetail.setIsDeleted("Y");
|
|
saveOrUpdate(libraryDetail);
|
|
saveOrUpdate(libraryDetail);
|
|
- isdeleted = true;
|
|
|
|
|
|
+// isdeleted = true;
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ error = "术语 \"" + knowledgeVo.getTerm() + "(" + knowledgeVo.getType() + ")\" " +
|
|
|
|
+ "的 " + knowledgeVo.getSource() + "-" + knowledgeVo.getTitle() + " 不存在!";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ else {
|
|
|
|
+ error = "术语 \"" + knowledgeVo.getTerm() + "(" + knowledgeVo.getType() + ")\" 不存在!";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
- return isdeleted;
|
|
|
|
|
|
+ msg.add(error);
|
|
|
|
+ conceptDTO.setMessage(msg);
|
|
|
|
+ return conceptDTO;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|