|
@@ -160,12 +160,12 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 医学术语命名删除
|
|
|
|
|
|
+ * 医学术语命名删除或者恢复
|
|
* @param removeConceptInfoVO
|
|
* @param removeConceptInfoVO
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public Boolean removeConceptInfo(RemoveConceptInfoVO removeConceptInfoVO) {
|
|
public Boolean removeConceptInfo(RemoveConceptInfoVO removeConceptInfoVO) {
|
|
- StringBuffer sbf = new StringBuffer();
|
|
|
|
|
|
+ /*StringBuffer sbf = new StringBuffer();
|
|
|
|
|
|
QueryWrapper<Medical> medicalQe = new QueryWrapper<Medical>();
|
|
QueryWrapper<Medical> medicalQe = new QueryWrapper<Medical>();
|
|
medicalQe.eq("is_deleted", "N");
|
|
medicalQe.eq("is_deleted", "N");
|
|
@@ -190,12 +190,12 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
|
|
|
|
if(sbf.length()>0){
|
|
if(sbf.length()>0){
|
|
throw new CommonException(CommonErrorCode.RPC_ERROR,sbf.toString());
|
|
throw new CommonException(CommonErrorCode.RPC_ERROR,sbf.toString());
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
|
|
|
|
String currentUser = UserUtils.getCurrentPrincipleID();
|
|
String currentUser = UserUtils.getCurrentPrincipleID();
|
|
Date now = DateUtil.now();
|
|
Date now = DateUtil.now();
|
|
|
|
|
|
- QueryWrapper<LibraryInfo> libraryInfoQe1 = new QueryWrapper<>();
|
|
|
|
|
|
+ /*QueryWrapper<LibraryInfo> libraryInfoQe1 = new QueryWrapper<>();
|
|
libraryInfoQe1.eq("concept_id", removeConceptInfoVO.getConceptId());
|
|
libraryInfoQe1.eq("concept_id", removeConceptInfoVO.getConceptId());
|
|
libraryInfoQe1.eq("is_concept", 0);
|
|
libraryInfoQe1.eq("is_concept", 0);
|
|
libraryinfoFacade.remove(libraryInfoQe1);
|
|
libraryinfoFacade.remove(libraryInfoQe1);
|
|
@@ -206,13 +206,31 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
libraryInfo.setIsDeleted("Y");
|
|
libraryInfo.setIsDeleted("Y");
|
|
libraryInfo.setGmtModified(now);
|
|
libraryInfo.setGmtModified(now);
|
|
libraryInfo.setModifier(currentUser);
|
|
libraryInfo.setModifier(currentUser);
|
|
- libraryinfoFacade.update(libraryInfo, libraryInfoQe2);
|
|
|
|
-
|
|
|
|
- Concept concept = new Concept();
|
|
|
|
|
|
+ libraryinfoFacade.update(libraryInfo, libraryInfoQe2);*/
|
|
|
|
+
|
|
|
|
+ /*Concept concept = new Concept();
|
|
concept.setId(removeConceptInfoVO.getConceptId());
|
|
concept.setId(removeConceptInfoVO.getConceptId());
|
|
concept.setIsDeleted("Y");
|
|
concept.setIsDeleted("Y");
|
|
concept.setModifier(currentUser);
|
|
concept.setModifier(currentUser);
|
|
concept.setGmtModified(now);
|
|
concept.setGmtModified(now);
|
|
|
|
+ this.updateById(concept);*/
|
|
|
|
+
|
|
|
|
+ Concept concept = this.getById(removeConceptInfoVO.getConceptId());
|
|
|
|
+ if(concept==null){
|
|
|
|
+ throw new CommonException(CommonErrorCode.NOT_EXISTS);
|
|
|
|
+ }
|
|
|
|
+ if(concept.getIsDeleted().equals(removeConceptInfoVO.getIsDeleted())){
|
|
|
|
+ if(removeConceptInfoVO.getIsDeleted().equals("Y")){
|
|
|
|
+ throw new CommonException(CommonErrorCode.RPC_ERROR,"该数据已删除!");
|
|
|
|
+ }
|
|
|
|
+ if(removeConceptInfoVO.getIsDeleted().equals("N")){
|
|
|
|
+ throw new CommonException(CommonErrorCode.RPC_ERROR,"该数据已恢复!");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ concept.setIsDeleted(removeConceptInfoVO.getIsDeleted());
|
|
|
|
+ concept.setModifier(currentUser);
|
|
|
|
+ concept.setGmtModified(now);
|
|
this.updateById(concept);
|
|
this.updateById(concept);
|
|
|
|
|
|
return true;
|
|
return true;
|