|
@@ -112,9 +112,9 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
|
|
|
mappingConfigPageVO.setHospitalId(Long.valueOf(SysUserUtils.getCurrentHospitalID()));
|
|
|
}
|
|
|
//查询启用禁用全部状态
|
|
|
- if (mappingConfigPageVO.getStatus() != null && mappingConfigPageVO.getStatus().equals(0)) {
|
|
|
+ /*if (mappingConfigPageVO.getStatus() != null && mappingConfigPageVO.getStatus().equals(0)) {
|
|
|
mappingConfigPageVO.setStatus(null);
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
FilterVO filterVO = new FilterVO();
|
|
|
RespDTO<List<IndexBatchDTO>> respDTO = null;
|
|
@@ -164,6 +164,47 @@ 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<Long> dbConceptIds = list.stream()
|
|
|
+ .filter(i -> i.getConceptId() != null)
|
|
|
+ .map(MappingConfig::getConceptId)
|
|
|
+ .distinct()
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ List<Long> dbFormConceptIds = list.stream()
|
|
|
+ .filter(i -> i.getFormConceptId() != null)
|
|
|
+ .map(MappingConfig::getFormConceptId)
|
|
|
+ .distinct()
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ ConceptVO conceptVO = new ConceptVO();
|
|
|
+ conceptVO.setSource(-1);
|
|
|
+ conceptVO.setIds(dbConceptIds);
|
|
|
+ conceptVO.setStatus(mappingConfigPageVO.getStatus());
|
|
|
+ RespDTO<List<IndexBatchDTO>> conceptRespDTO = null;
|
|
|
+ if (ListUtil.isNotEmpty(dbConceptIds)) {
|
|
|
+ conceptRespDTO = cdssCoreClient.getConceptNames(conceptVO);
|
|
|
+ if (ListUtil.isEmpty(conceptIds)
|
|
|
+ && RespDTOUtil.respIsOK(conceptRespDTO)) {
|
|
|
+ conceptIds = conceptRespDTO.data.stream().map(IndexBatchDTO::getId).collect(Collectors.toList());
|
|
|
+ mappingConfigPageVO.setConceptIds(conceptIds);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (ListUtil.isNotEmpty(dbFormConceptIds)) {
|
|
|
+ conceptVO.setIds(dbFormConceptIds);
|
|
|
+ conceptVO.setStatus(mappingConfigPageVO.getFormStatus());
|
|
|
+ conceptRespDTO = cdssCoreClient.getConceptNames(conceptVO);
|
|
|
+ if (ListUtil.isEmpty(formConceptIds)
|
|
|
+ && RespDTOUtil.respIsOK(conceptRespDTO)) {
|
|
|
+ formConceptIds = conceptRespDTO.data.stream().map(IndexBatchDTO::getId).collect(Collectors.toList());
|
|
|
+ mappingConfigPageVO.setFormConceptIds(formConceptIds);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//多条匹配
|
|
|
if (mappingConfigPageVO.getIsMatch() != null && mappingConfigPageVO.getIsMatch().equals(2)) {
|
|
|
mappingConfigPageVO.setIsMatch(null);
|