|
@@ -8,12 +8,12 @@ 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.entity.ConceptDetail;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
|
-import com.diagbot.service.LibraryDetailService;
|
|
|
-import com.diagbot.service.impl.LibraryDetailServiceImpl;
|
|
|
+import com.diagbot.service.ConceptDetailService;
|
|
|
+import com.diagbot.service.impl.ConceptDetailServiceImpl;
|
|
|
import com.diagbot.util.DateUtil;
|
|
|
import com.diagbot.util.ListUtil;
|
|
|
import com.diagbot.util.UserUtils;
|
|
@@ -38,13 +38,13 @@ import java.util.stream.Collectors;
|
|
|
* @time: 2019/1/16 14:17
|
|
|
*/
|
|
|
@Component
|
|
|
-public class ConceptDetailFacade extends LibraryDetailServiceImpl {
|
|
|
+public class ConceptDetailServiceImpl extends ConceptDetailServiceImpl {
|
|
|
|
|
|
@Autowired
|
|
|
private UserServiceClient userServiceClient;
|
|
|
@Autowired
|
|
|
- @Qualifier("libraryDetailServiceImpl")
|
|
|
- private LibraryDetailService libraryDetailService;
|
|
|
+ @Qualifier("conceptDetailServiceImpl")
|
|
|
+ private ConceptDetailService conceptDetailService;
|
|
|
|
|
|
/**
|
|
|
* 获取医学术语命名列表
|
|
@@ -53,7 +53,7 @@ public class ConceptDetailFacade extends LibraryDetailServiceImpl {
|
|
|
* @return
|
|
|
*/
|
|
|
public IPage<GetConceptDetailListDTO> getListFac(GetConceptDetailListVO getConceptDetailListVO) {
|
|
|
- IPage<GetConceptDetailListDTO> ipage = this.baseMapper.getLibraryDetailList(getConceptDetailListVO);
|
|
|
+ IPage<GetConceptDetailListDTO> ipage = this.baseMapper.getConceptDetailList(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);
|
|
@@ -82,7 +82,7 @@ public class ConceptDetailFacade extends LibraryDetailServiceImpl {
|
|
|
String person = UserUtils.getCurrentPrincipleID();
|
|
|
List<Long> ids = removeConceptDetailVO.getConceptId();
|
|
|
Date now = DateUtil.now();
|
|
|
- this.update(new LibraryDetail(), new UpdateWrapper<LibraryDetail>()
|
|
|
+ this.update(new ConceptDetail(), new UpdateWrapper<ConceptDetail>()
|
|
|
.in("concept_id", ids)
|
|
|
.set("gmt_modified", now)
|
|
|
.set("modifier", person)
|
|
@@ -115,16 +115,16 @@ public class ConceptDetailFacade extends LibraryDetailServiceImpl {
|
|
|
// 删除原明细信息
|
|
|
Long conceptId = addConceptDetailVOList.get(0).getConceptId();
|
|
|
if (conceptId != null) {
|
|
|
- this.remove(new QueryWrapper<LibraryDetail>()
|
|
|
+ this.remove(new QueryWrapper<ConceptDetail>()
|
|
|
.eq("concept_id", conceptId));
|
|
|
}
|
|
|
|
|
|
// 新增明细信息
|
|
|
String currentUser = UserUtils.getCurrentPrincipleID();
|
|
|
Date now = DateUtil.now();
|
|
|
- List<LibraryDetail> list = new ArrayList<>();
|
|
|
+ List<ConceptDetail> list = new ArrayList<>();
|
|
|
for (AddConceptDetailVO detailVO : addConceptDetailVOList) {
|
|
|
- LibraryDetail bean = new LibraryDetail();
|
|
|
+ ConceptDetail bean = new ConceptDetail();
|
|
|
bean.setConceptId(detailVO.getConceptId());
|
|
|
bean.setGmtModified(now);
|
|
|
bean.setGmtCreate(now);
|
|
@@ -139,7 +139,7 @@ public class ConceptDetailFacade extends LibraryDetailServiceImpl {
|
|
|
bean.setTitle(detailVO.getTitle());
|
|
|
list.add(bean);
|
|
|
}
|
|
|
- libraryDetailService.saveBatch(list);
|
|
|
+ conceptDetailService.saveBatch(list);
|
|
|
return true;
|
|
|
}
|
|
|
|