|
@@ -4,9 +4,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.diagbot.client.UserServiceClient;
|
|
|
-import com.diagbot.dto.GetLibraryDetailListDTO;
|
|
|
-import com.diagbot.dto.LibraryDetailDTO;
|
|
|
-import com.diagbot.dto.LibraryIndexDTO;
|
|
|
+import com.diagbot.dto.GetConceptDetailListDTO;
|
|
|
+import com.diagbot.dto.ConceptDetailDTO;
|
|
|
+import com.diagbot.dto.ConceptIndexDTO;
|
|
|
import com.diagbot.dto.RespDTO;
|
|
|
import com.diagbot.entity.LibraryDetail;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
@@ -17,11 +17,11 @@ import com.diagbot.service.impl.LibraryDetailServiceImpl;
|
|
|
import com.diagbot.util.DateUtil;
|
|
|
import com.diagbot.util.ListUtil;
|
|
|
import com.diagbot.util.UserUtils;
|
|
|
-import com.diagbot.vo.AddLibraryDetailVO;
|
|
|
-import com.diagbot.vo.GetLibraryDetailListVO;
|
|
|
-import com.diagbot.vo.GetLibraryDetailVO;
|
|
|
-import com.diagbot.vo.LibraryIndexVO;
|
|
|
-import com.diagbot.vo.RemoveLibraryDetailVO;
|
|
|
+import com.diagbot.vo.AddConceptDetailVO;
|
|
|
+import com.diagbot.vo.GetConceptDetailListVO;
|
|
|
+import com.diagbot.vo.GetConceptDetailVO;
|
|
|
+import com.diagbot.vo.ConceptIndexVO;
|
|
|
+import com.diagbot.vo.RemoveConceptDetailVO;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -38,7 +38,7 @@ import java.util.stream.Collectors;
|
|
|
* @time: 2019/1/16 14:17
|
|
|
*/
|
|
|
@Component
|
|
|
-public class LibraryDetailFacade extends LibraryDetailServiceImpl {
|
|
|
+public class ConceptDetailFacade extends LibraryDetailServiceImpl {
|
|
|
|
|
|
@Autowired
|
|
|
private UserServiceClient userServiceClient;
|
|
@@ -49,11 +49,11 @@ public class LibraryDetailFacade extends LibraryDetailServiceImpl {
|
|
|
/**
|
|
|
* 获取医学术语命名列表
|
|
|
*
|
|
|
- * @param getLibraryDetailListVO
|
|
|
+ * @param getConceptDetailListVO
|
|
|
* @return
|
|
|
*/
|
|
|
- public IPage<GetLibraryDetailListDTO> getLibraryDetailList(GetLibraryDetailListVO getLibraryDetailListVO) {
|
|
|
- IPage<GetLibraryDetailListDTO> ipage = this.baseMapper.getLibraryDetailList(getLibraryDetailListVO);
|
|
|
+ public IPage<GetConceptDetailListDTO> getListFac(GetConceptDetailListVO getConceptDetailListVO) {
|
|
|
+ IPage<GetConceptDetailListDTO> ipage = this.baseMapper.getLibraryDetailList(getConceptDetailListVO);
|
|
|
List<String> ids = ipage.getRecords().stream().map(i -> i.getModifier()).distinct().collect(Collectors.toList());
|
|
|
if (ids.size() > 0) {
|
|
|
RespDTO<Map<String, String>> respDTO = userServiceClient.getUserInfoByIds(ids);
|
|
@@ -71,49 +71,49 @@ public class LibraryDetailFacade extends LibraryDetailServiceImpl {
|
|
|
/**
|
|
|
* 医学术语静态知识删除
|
|
|
*
|
|
|
- * @param removeLibraryDetailVO
|
|
|
+ * @param removeConceptDetailVO
|
|
|
* @return
|
|
|
*/
|
|
|
- public Boolean removeLibraryDetail(RemoveLibraryDetailVO removeLibraryDetailVO) {
|
|
|
- if (!(IsDeleteEnum.N.getKey().equals(removeLibraryDetailVO.getStatus())
|
|
|
- || IsDeleteEnum.Y.getKey().equals(removeLibraryDetailVO.getStatus()))) {
|
|
|
+ public Boolean delete(RemoveConceptDetailVO removeConceptDetailVO) {
|
|
|
+ if (!(IsDeleteEnum.N.getKey().equals(removeConceptDetailVO.getStatus())
|
|
|
+ || IsDeleteEnum.Y.getKey().equals(removeConceptDetailVO.getStatus()))) {
|
|
|
throw new CommonException(CommonErrorCode.STATUS_IS_ERROR, "状态值错误【Y】或【N】");
|
|
|
}
|
|
|
String person = UserUtils.getCurrentPrincipleID();
|
|
|
- List<Long> ids = removeLibraryDetailVO.getConceptId();
|
|
|
+ List<Long> ids = removeConceptDetailVO.getConceptId();
|
|
|
Date now = DateUtil.now();
|
|
|
this.update(new LibraryDetail(), new UpdateWrapper<LibraryDetail>()
|
|
|
.in("concept_id", ids)
|
|
|
.set("gmt_modified", now)
|
|
|
.set("modifier", person)
|
|
|
- .set("is_deleted", removeLibraryDetailVO.getStatus()));
|
|
|
+ .set("is_deleted", removeConceptDetailVO.getStatus()));
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取医学术语静态知识详情
|
|
|
*
|
|
|
- * @param getLibraryDetailVO
|
|
|
+ * @param getConceptDetailVO
|
|
|
* @return
|
|
|
*/
|
|
|
- public List<LibraryDetailDTO> getLibraryDetail(GetLibraryDetailVO getLibraryDetailVO) {
|
|
|
- return this.getByParam(getLibraryDetailVO.getConceptId());
|
|
|
+ public List<ConceptDetailDTO> getByConceptId(GetConceptDetailVO getConceptDetailVO) {
|
|
|
+ return this.getByParam(getConceptDetailVO.getConceptId());
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 医学术语静态知识添加或者编辑
|
|
|
*
|
|
|
- * @param libraryDetailVOList
|
|
|
+ * @param addConceptDetailVOList
|
|
|
* @return
|
|
|
*/
|
|
|
- public Boolean addLibraryDetail(List<AddLibraryDetailVO> libraryDetailVOList) {
|
|
|
- if (ListUtil.isEmpty(libraryDetailVOList)) {
|
|
|
+ public Boolean insertOrUpdate(List<AddConceptDetailVO> addConceptDetailVOList) {
|
|
|
+ if (ListUtil.isEmpty(addConceptDetailVOList)) {
|
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
|
|
|
"静态知识明细内容不能为空");
|
|
|
}
|
|
|
|
|
|
// 删除原明细信息
|
|
|
- Long conceptId = libraryDetailVOList.get(0).getConceptId();
|
|
|
+ Long conceptId = addConceptDetailVOList.get(0).getConceptId();
|
|
|
if (conceptId != null) {
|
|
|
this.remove(new QueryWrapper<LibraryDetail>()
|
|
|
.eq("concept_id", conceptId));
|
|
@@ -123,7 +123,7 @@ public class LibraryDetailFacade extends LibraryDetailServiceImpl {
|
|
|
String currentUser = UserUtils.getCurrentPrincipleID();
|
|
|
Date now = DateUtil.now();
|
|
|
List<LibraryDetail> list = new ArrayList<>();
|
|
|
- for (AddLibraryDetailVO detailVO : libraryDetailVOList) {
|
|
|
+ for (AddConceptDetailVO detailVO : addConceptDetailVOList) {
|
|
|
LibraryDetail bean = new LibraryDetail();
|
|
|
bean.setConceptId(detailVO.getConceptId());
|
|
|
bean.setGmtModified(now);
|
|
@@ -147,11 +147,11 @@ public class LibraryDetailFacade extends LibraryDetailServiceImpl {
|
|
|
/**
|
|
|
* 检索
|
|
|
*
|
|
|
- * @param libraryIndexVO
|
|
|
+ * @param conceptIndexVO
|
|
|
* @return
|
|
|
*/
|
|
|
- public List<LibraryIndexDTO> indexFac(LibraryIndexVO libraryIndexVO) {
|
|
|
- return this.index(libraryIndexVO);
|
|
|
+ public List<ConceptIndexDTO> indexFac(ConceptIndexVO conceptIndexVO) {
|
|
|
+ return this.index(conceptIndexVO);
|
|
|
}
|
|
|
|
|
|
}
|