|
@@ -13,6 +13,7 @@ import com.diagbot.entity.KlConceptCommon;
|
|
|
import com.diagbot.entity.KlDisease;
|
|
|
import com.diagbot.entity.KlLibraryInfo;
|
|
|
import com.diagbot.entity.KlLis;
|
|
|
+import com.diagbot.entity.KlRule;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
@@ -330,4 +331,17 @@ public class KlConceptFacade extends KlConceptServiceImpl {
|
|
|
conceptQe.eq("lib_type", libTypeId);
|
|
|
return list(conceptQe).stream().map(i -> i.getId()).collect(Collectors.toList());
|
|
|
}
|
|
|
+
|
|
|
+ public Boolean clearConceptInfo(KlConceptClearVO klConceptClearVO) {
|
|
|
+ Date now = DateUtil.now();
|
|
|
+ int sum = klLibraryInfoFacade.count(new QueryWrapper<KlLibraryInfo>().eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("id", klConceptClearVO.getLibId()).eq("is_concept",0));
|
|
|
+ if (sum == 0) {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该数据已不存在或删除的不是同义词!");
|
|
|
+ }
|
|
|
+ UpdateWrapper<KlLibraryInfo> klLibraryUpdate = new UpdateWrapper<>();
|
|
|
+ klLibraryUpdate.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("id", klConceptClearVO.getLibId()).set("is_deleted",IsDeleteEnum.Y.getKey()).set("gmt_modified",now);
|
|
|
+ return klLibraryInfoFacade.update(klLibraryUpdate);
|
|
|
+ }
|
|
|
}
|