|
@@ -10,6 +10,7 @@ import com.diagbot.dto.ConceptScaleSubDTO;
|
|
|
import com.diagbot.dto.DictionaryInfoDTO;
|
|
|
import com.diagbot.dto.KlConceptDetailDTO;
|
|
|
import com.diagbot.dto.KlConceptStaticDTO;
|
|
|
+import com.diagbot.dto.KlScaleByIdDTO;
|
|
|
import com.diagbot.dto.StaticKnowledgeDTO;
|
|
|
import com.diagbot.dto.StaticKnowledgeDetailDTO;
|
|
|
import com.diagbot.dto.StaticKnowledgeIndexPageDTO;
|
|
@@ -35,6 +36,7 @@ import com.diagbot.vo.GetDetailVO;
|
|
|
import com.diagbot.vo.IdVO;
|
|
|
import com.diagbot.vo.KlConceptStaticPageVO;
|
|
|
import com.diagbot.vo.KlConceptStaticVO;
|
|
|
+import com.diagbot.vo.KlScaleByIdVO;
|
|
|
import com.diagbot.vo.StaticKnowledgeIndexPageVO;
|
|
|
import com.diagbot.vo.StaticKnowledgeVO;
|
|
|
import com.google.common.collect.Lists;
|
|
@@ -67,6 +69,8 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
|
|
|
private KlConceptScaleFacade klConceptScaleFacade;
|
|
|
@Autowired
|
|
|
private KlDictionaryInfoFacade klDictionaryInfoFacade;
|
|
|
+ @Autowired
|
|
|
+ private KlScaleFacade klScaleFacade;
|
|
|
|
|
|
@Autowired
|
|
|
@Qualifier("klConceptDetailServiceImpl")
|
|
@@ -436,7 +440,6 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
|
|
|
* @return
|
|
|
*/
|
|
|
public Boolean saveOrUpdateRecord(KlConceptStaticVO klConceptStaticVO) {
|
|
|
- //String userId = SysUserUtils.getCurrentPrincipleID();
|
|
|
if (klConceptStaticVO.getUserId() == null) {
|
|
|
klConceptStaticVO.setUserId(0L);
|
|
|
}
|
|
@@ -452,7 +455,7 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
|
|
|
concept = klConceptFacade.getOne(new QueryWrapper<KlConcept>()
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("lib_name", klConceptStaticVO.getName())
|
|
|
- .eq("lib_type", type), false);
|
|
|
+ .eq("lib_type", klConceptStaticVO.getType()), false);
|
|
|
}
|
|
|
if (concept == null) {
|
|
|
throw new CommonException(CommonErrorCode.NOT_EXISTS, "标准术语不存在");
|
|
@@ -501,6 +504,15 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
|
|
|
//保存新的明细
|
|
|
klConceptDetailService.saveBatch(details);
|
|
|
|
|
|
+ //保存量表明细
|
|
|
+ if (klConceptStaticVO.getType().equals(LexiconEnum.Scale.getKey())) {
|
|
|
+ if (klConceptStaticVO.getScale() != null) {
|
|
|
+ klConceptStaticVO.getScale().setConceptId(concept.getId());
|
|
|
+ klConceptStaticVO.getScale().setModifier(concept.getModifier());
|
|
|
+ klScaleFacade.saveUpKlScaleAll(klConceptStaticVO.getScale());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
return true;
|
|
|
}
|
|
|
|
|
@@ -579,6 +591,14 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
|
|
|
klConceptStaticDTO.setDetails(ListUtil.isNotEmpty(details)
|
|
|
? BeanUtil.listCopyTo(details, KlConceptDetailDTO.class)
|
|
|
: new ArrayList<>());
|
|
|
+
|
|
|
+ //获取量表结构
|
|
|
+ KlScaleByIdVO klScaleByIdVO = new KlScaleByIdVO();
|
|
|
+ klScaleByIdVO.setId(staticInfo.getId());
|
|
|
+ List<KlScaleByIdDTO> scaleList = klScaleFacade.getKlScaleById(klScaleByIdVO);
|
|
|
+ if (ListUtil.isNotEmpty(scaleList)) {
|
|
|
+ klConceptStaticDTO.setScale(scaleList.get(0));
|
|
|
+ }
|
|
|
return klConceptStaticDTO;
|
|
|
}
|
|
|
|
|
@@ -623,6 +643,13 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
|
|
|
if (ListUtil.isEmpty(details)) {
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
+ List<KlConceptScale> scales = klConceptScaleFacade.list(new QueryWrapper<KlConceptScale>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("concept_id", concept.getId()));
|
|
|
+ if (ListUtil.isEmpty(scales)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
return true;
|
|
|
}
|
|
|
|