浏览代码

1、术语关联映射

zhaops 3 年之前
父节点
当前提交
07309cd1e0
共有 1 个文件被更改,包括 9 次插入7 次删除
  1. 9 7
      src/main/java/com/diagbot/facade/MappingConfigFacade.java

+ 9 - 7
src/main/java/com/diagbot/facade/MappingConfigFacade.java

@@ -164,11 +164,11 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
         }
         mappingConfigPageVO.setFormConceptIds(formConceptIds);
 
-        List<MappingConfig> list=this.list(new QueryWrapper<MappingConfig>()
-                .eq("is_deleted",IsDeleteEnum.N.getKey())
-                .eq("type",mappingConfigPageVO.getType())
-                .eq("hospital_id",mappingConfigPageVO.getHospitalId()));
-        if(ListUtil.isNotEmpty(list)) {
+        List<MappingConfig> list = this.list(new QueryWrapper<MappingConfig>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("type", mappingConfigPageVO.getType())
+                .eq("hospital_id", mappingConfigPageVO.getHospitalId()));
+        if (ListUtil.isNotEmpty(list)) {
             List<Long> dbConceptIds = list.stream()
                     .filter(i -> i.getConceptId() != null)
                     .map(MappingConfig::getConceptId)
@@ -184,7 +184,8 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
             conceptVO.setIds(dbConceptIds);
             conceptVO.setStatus(mappingConfigPageVO.getStatus());
             RespDTO<List<IndexBatchDTO>> conceptRespDTO = null;
-            if (ListUtil.isNotEmpty(dbConceptIds)) {
+            if (ListUtil.isNotEmpty(dbConceptIds)
+                    && mappingConfigPageVO.getStatus() != null) {
                 conceptRespDTO = cdssCoreClient.getConceptNames(conceptVO);
                 if (ListUtil.isEmpty(conceptIds)
                         && RespDTOUtil.respIsOK(conceptRespDTO)) {
@@ -193,7 +194,8 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
                 }
             }
 
-            if (ListUtil.isNotEmpty(dbFormConceptIds)) {
+            if (ListUtil.isNotEmpty(dbFormConceptIds)
+                    && mappingConfigPageVO.getFormStatus() != null) {
                 conceptVO.setIds(dbFormConceptIds);
                 conceptVO.setStatus(mappingConfigPageVO.getFormStatus());
                 conceptRespDTO = cdssCoreClient.getConceptNames(conceptVO);