Selaa lähdekoodia

静态知识检索

zhaops 4 vuotta sitten
vanhempi
commit
fad4d623f1

+ 12 - 1
src/main/java/com/diagbot/client/CdssCoreClient.java

@@ -5,14 +5,17 @@ import com.diagbot.dto.IndicationDTO;
 import com.diagbot.dto.PushDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.RetrievalDTO;
+import com.diagbot.dto.StaticKnowledgeIndexDTO;
 import com.diagbot.vo.IndicationPushVO;
 import com.diagbot.vo.PushVO;
 import com.diagbot.vo.RetrievalVO;
+import com.diagbot.vo.StaticKnowledgeIndexVO;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 
 import javax.validation.Valid;
+import java.util.List;
 
 /**
  * @Description: CDSS核心类客户端
@@ -36,7 +39,15 @@ public interface CdssCoreClient {
      */
     @PostMapping("/retrieval/index")
     RespDTO<RetrievalDTO> index(@RequestBody @Valid RetrievalVO retrievalVO);
-}
 
+    /**
+     * 静态知识检索
+     *
+     * @param staticKnowledgeIndexVO
+     * @return
+     */
+    @PostMapping("/retrieval/staticKnowledgeIndex")
+    RespDTO<List<StaticKnowledgeIndexDTO>> staticKnowledgeIndex(@RequestBody @Valid StaticKnowledgeIndexVO staticKnowledgeIndexVO);
+}
 
 

+ 15 - 0
src/main/java/com/diagbot/client/hystrix/CdssCoreHystrix.java

@@ -5,14 +5,17 @@ import com.diagbot.dto.IndicationDTO;
 import com.diagbot.dto.PushDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.RetrievalDTO;
+import com.diagbot.dto.StaticKnowledgeIndexDTO;
 import com.diagbot.vo.IndicationPushVO;
 import com.diagbot.vo.PushVO;
 import com.diagbot.vo.RetrievalVO;
+import com.diagbot.vo.StaticKnowledgeIndexVO;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 import org.springframework.web.bind.annotation.RequestBody;
 
 import javax.validation.Valid;
+import java.util.List;
 
 /**
  * @Description: 病历质控客户端(请求失败熔断)
@@ -46,4 +49,16 @@ public class CdssCoreHystrix implements CdssCoreClient {
         log.error("【hystrix】调用{}异常", "index");
         return null;
     }
+
+    /**
+     * 静态知识检索
+     *
+     * @param staticKnowledgeIndexVO
+     * @return
+     */
+    @Override
+    public RespDTO<List<StaticKnowledgeIndexDTO>> staticKnowledgeIndex(@RequestBody @Valid StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
+        log.error("【hystrix】调用{}异常", "staticKnowledgeIndex");
+        return null;
+    }
 }

+ 46 - 0
src/main/java/com/diagbot/dto/StaticKnowledgeIndexDTO.java

@@ -0,0 +1,46 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/18 15:59
+ */
+@Getter
+@Setter
+public class StaticKnowledgeIndexDTO {
+    /**
+     * 术语id
+     */
+    private Long id;
+    /**
+     * 术语名称
+     */
+    private String name;
+    /**
+     * 词性
+     */
+    private Integer type;
+    /**
+     * 词性
+     */
+    private String typeName;
+    /**
+     * 同义词
+     */
+    private String retrievalName;
+    /**
+     * 是否有静态知识
+     */
+    private Integer hasInfomation = 0;
+    /**
+     * 是否有临床路径
+     */
+    private Integer hasClinicalPathway = 0;
+    /**
+     * 是否有注意事项
+     */
+    private Integer hasNotice = 0;
+}

+ 186 - 0
src/main/java/com/diagbot/entity/ConceptDetail.java

@@ -0,0 +1,186 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 静态知识内容表
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-08-18
+ */
+@TableName("graph_concept_detail")
+public class ConceptDetail implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 提示概念id
+     */
+    private Long conceptId;
+
+    /**
+     * 提示明细标题
+     */
+    private String title;
+
+    /**
+     * 提示明细内容
+     */
+    private String content;
+
+    /**
+     * 纯文本
+     */
+    private String text;
+
+    /**
+     * 提示明细序号
+     */
+    private Integer orderNo;
+
+    /**
+     * 内容类型(多选):1-化验、辅检、手术和操作、诊断、药品静态信息,2-注意事项,3-临床路径
+     */
+    private String concentType;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public Long getConceptId() {
+        return conceptId;
+    }
+
+    public void setConceptId(Long conceptId) {
+        this.conceptId = conceptId;
+    }
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+    public String getText() {
+        return text;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+    public Integer getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(Integer orderNo) {
+        this.orderNo = orderNo;
+    }
+    public String getConcentType() {
+        return concentType;
+    }
+
+    public void setConcentType(String concentType) {
+        this.concentType = concentType;
+    }
+
+    @Override
+    public String toString() {
+        return "ConceptDetail{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", conceptId=" + conceptId +
+            ", title=" + title +
+            ", content=" + content +
+            ", text=" + text +
+            ", orderNo=" + orderNo +
+            ", concentType=" + concentType +
+        "}";
+    }
+}

+ 169 - 0
src/main/java/com/diagbot/entity/ConceptInfo.java

@@ -0,0 +1,169 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 静态知识标准术语表
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-08-18
+ */
+@TableName("graph_concept_info")
+public class ConceptInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 标准术语
+     */
+    private String name;
+
+    /**
+     * 词性
+     */
+    private String type;
+
+    /**
+     * 临床路径名称
+     */
+    private String clinicalPathwayName;
+
+    /**
+     * 注意事项名称
+     */
+    private String noticeName;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getClinicalPathwayName() {
+        return clinicalPathwayName;
+    }
+
+    public void setClinicalPathwayName(String clinicalPathwayName) {
+        this.clinicalPathwayName = clinicalPathwayName;
+    }
+
+    public String getNoticeName() {
+        return noticeName;
+    }
+
+    public void setNoticeName(String noticeName) {
+        this.noticeName = noticeName;
+    }
+
+    @Override
+    public String toString() {
+        return "ConceptInfo{" +
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", name=" + name +
+                ", type=" + type +
+                ", clinicalPathwayName=" + clinicalPathwayName +
+                ", noticeName=" + noticeName +
+                "}";
+    }
+}

+ 53 - 0
src/main/java/com/diagbot/enums/ConceptTypeEnum.java

@@ -0,0 +1,53 @@
+package com.diagbot.enums;
+
+import com.diagbot.core.KeyedNamed;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/18 16:30
+ */
+public enum ConceptTypeEnum implements KeyedNamed {
+    All(0, "全部"),
+    Disease(1, "诊断"),
+    Drug(2, "药品"),
+    Lis(3, "检验"),
+    Pacs(4, "检查"),
+    Opeartion(5, "手术和操作");
+
+    @Setter
+    private int key;
+
+    @Setter
+    private String name;
+
+    ConceptTypeEnum(int key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static ConceptTypeEnum getEnum(int key) {
+        for (ConceptTypeEnum item : ConceptTypeEnum.values()) {
+            if (item.key == key) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(int key) {
+        ConceptTypeEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+
+    @Override
+    public int getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}

+ 13 - 0
src/main/java/com/diagbot/facade/ConceptDetailFacade.java

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.ConceptDetailServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/19 14:19
+ */
+@Component
+public class ConceptDetailFacade extends ConceptDetailServiceImpl {
+}

+ 13 - 0
src/main/java/com/diagbot/facade/ConceptInfoFacade.java

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.ConceptInfoServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/19 14:17
+ */
+@Component
+public class ConceptInfoFacade extends ConceptInfoServiceImpl {
+}

+ 103 - 0
src/main/java/com/diagbot/facade/RetrievalFacade.java

@@ -1,13 +1,28 @@
 package com.diagbot.facade;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.client.CdssCoreClient;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.RetrievalDTO;
+import com.diagbot.dto.StaticKnowledgeIndexDTO;
+import com.diagbot.entity.ConceptDetail;
+import com.diagbot.entity.ConceptInfo;
+import com.diagbot.entity.DictionaryInfo;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ListUtil;
 import com.diagbot.util.RespDTOUtil;
 import com.diagbot.vo.RetrievalVO;
+import com.diagbot.vo.StaticKnowledgeIndexVO;
+import com.google.common.collect.Lists;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
 /**
  * @Description:
  * @Author:zhaops
@@ -17,6 +32,13 @@ import org.springframework.stereotype.Component;
 public class RetrievalFacade {
     @Autowired
     private CdssCoreClient cdssCoreClient;
+    @Autowired
+    private DictionaryFacade dictionaryFacade;
+    @Autowired
+    private ConceptInfoFacade conceptInfoFacade;
+    @Autowired
+    private ConceptDetailFacade conceptDetailFacade;
+
 
     /**
      * 检索
@@ -31,4 +53,85 @@ public class RetrievalFacade {
         retrievalDTO = respDTO.data;
         return retrievalDTO;
     }
+
+    /**
+     * 医学知识(静态信息)检索
+     *
+     * @param staticKnowledgeIndexVO
+     * @return
+     */
+    public List<StaticKnowledgeIndexDTO> staticKnowledgeIndex(StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
+        List<StaticKnowledgeIndexDTO> retList = Lists.newLinkedList();
+        QueryWrapper<DictionaryInfo> dictionaryInfoQueryWrapper = new QueryWrapper<>();
+        dictionaryInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("group_type", 7)
+                .eq("return_type", 2)
+                .orderByAsc("order_no");
+        List<DictionaryInfo> dicList = dictionaryFacade.list(dictionaryInfoQueryWrapper);
+
+        List<StaticKnowledgeIndexDTO> staticKnowledgeIndexDTOList = Lists.newLinkedList();
+        RespDTO<List<StaticKnowledgeIndexDTO>> respDTO = cdssCoreClient.staticKnowledgeIndex(staticKnowledgeIndexVO);
+        RespDTOUtil.respNGDealCover(respDTO, "检索失败");
+        staticKnowledgeIndexDTOList = respDTO.data;
+        if (ListUtil.isNotEmpty(staticKnowledgeIndexDTOList)) {
+            //是否有静态知识
+            List<String> conNameList = staticKnowledgeIndexDTOList
+                    .stream()
+                    .map(i -> i.getName())
+                    .collect(Collectors.toList());
+            QueryWrapper<ConceptInfo> conceptInfoQueryWrapper = new QueryWrapper<>();
+            conceptInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .in("name", conNameList);
+            List<ConceptInfo> conceptInfoList = conceptInfoFacade.list(conceptInfoQueryWrapper);
+            Map<String, ConceptInfo> infoMap
+                    = EntityUtil.makeEntityMapByKeys(conceptInfoList, "_", "name", "type");
+            for (StaticKnowledgeIndexDTO item : staticKnowledgeIndexDTOList) {
+                if (infoMap.containsKey(item.getName() + "_" + item.getTypeName())) {
+                    item.setId(infoMap.get(item.getName() + "_" + item.getTypeName()).getId());
+                }
+            }
+            List<Long> conceptIdList = conceptInfoList.stream()
+                    .map(i -> i.getId())
+                    .collect(Collectors.toList());
+            if (ListUtil.isNotEmpty(conceptIdList)) {
+                QueryWrapper<ConceptDetail> conceptDetailQueryWrapper = new QueryWrapper<>();
+                conceptDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                        .in("concept_id", conceptIdList);
+                List<ConceptDetail> conceptDetailList = conceptDetailFacade.list(conceptDetailQueryWrapper);
+                Map<Long, List<ConceptDetail>> detailMap
+                        = EntityUtil.makeEntityListMap(conceptDetailList, "conceptId");
+                for (StaticKnowledgeIndexDTO item : staticKnowledgeIndexDTOList) {
+                    if (item.getId() == null
+                            || !detailMap.containsKey(item.getId())) {
+                        item.setHasInfomation(0);
+                        item.setHasClinicalPathway(0);
+                        item.setHasNotice((0));
+                        continue;
+                    }
+                    for (ConceptDetail detail : detailMap.get(item.getId())) {
+                        List<String> contentTypeList = Arrays.asList(detail.getConcentType().split(","));
+                        if (contentTypeList.contains(1)) {
+                            item.setHasInfomation(1);
+                        }
+                        if (contentTypeList.contains(2)) {
+                            item.setHasNotice(1);
+                        }
+                        if (contentTypeList.contains(3)) {
+                            item.setHasClinicalPathway(1);
+                        }
+                    }
+                }
+            }
+
+            //排序
+            Map<String, List<StaticKnowledgeIndexDTO>> map
+                    = EntityUtil.makeEntityListMap(staticKnowledgeIndexDTOList, "typeName");
+            for (DictionaryInfo dic : dicList) {
+                if (map.containsKey(dic.getName())) {
+                    retList.addAll(map.get(dic.getName()));
+                }
+            }
+        }
+        return retList;
+    }
 }

+ 16 - 0
src/main/java/com/diagbot/mapper/ConceptDetailMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.ConceptDetail;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 静态知识内容表 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-08-18
+ */
+public interface ConceptDetailMapper extends BaseMapper<ConceptDetail> {
+
+}

+ 16 - 0
src/main/java/com/diagbot/mapper/ConceptInfoMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.ConceptInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 静态知识标准术语表 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-08-18
+ */
+public interface ConceptInfoMapper extends BaseMapper<ConceptInfo> {
+
+}

+ 16 - 0
src/main/java/com/diagbot/service/ConceptDetailService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.ConceptDetail;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 静态知识内容表 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-08-18
+ */
+public interface ConceptDetailService extends IService<ConceptDetail> {
+
+}

+ 16 - 0
src/main/java/com/diagbot/service/ConceptInfoService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.ConceptInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 静态知识标准术语表 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-08-18
+ */
+public interface ConceptInfoService extends IService<ConceptInfo> {
+
+}

+ 20 - 0
src/main/java/com/diagbot/service/impl/ConceptDetailServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.ConceptDetail;
+import com.diagbot.mapper.ConceptDetailMapper;
+import com.diagbot.service.ConceptDetailService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 静态知识内容表 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-08-18
+ */
+@Service
+public class ConceptDetailServiceImpl extends ServiceImpl<ConceptDetailMapper, ConceptDetail> implements ConceptDetailService {
+
+}

+ 20 - 0
src/main/java/com/diagbot/service/impl/ConceptInfoServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.ConceptInfo;
+import com.diagbot.mapper.ConceptInfoMapper;
+import com.diagbot.service.ConceptInfoService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 静态知识标准术语表 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-08-18
+ */
+@Service
+public class ConceptInfoServiceImpl extends ServiceImpl<ConceptInfoMapper, ConceptInfo> implements ConceptInfoService {
+
+}

+ 26 - 0
src/main/java/com/diagbot/vo/StaticKnowledgeIndexVO.java

@@ -0,0 +1,26 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/18 15:52
+ */
+@Getter
+@Setter
+public class StaticKnowledgeIndexVO {
+    /**
+     * 检索内容
+     */
+    private String inputStr;
+    /**
+     * 检索类型(多选)
+     */
+    @NotNull(message = "请输入检索类型")
+    private List<Integer> types;
+}

+ 20 - 0
src/main/java/com/diagbot/web/ConceptDetailController.java

@@ -0,0 +1,20 @@
+package com.diagbot.web;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.stereotype.Controller;
+
+/**
+ * <p>
+ * 静态知识内容表 前端控制器
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-08-18
+ */
+@Controller
+@RequestMapping("/conceptDetail")
+public class ConceptDetailController {
+
+}

+ 20 - 0
src/main/java/com/diagbot/web/ConceptInfoController.java

@@ -0,0 +1,20 @@
+package com.diagbot.web;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.stereotype.Controller;
+
+/**
+ * <p>
+ * 静态知识标准术语表 前端控制器
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-08-18
+ */
+@Controller
+@RequestMapping("/conceptInfo")
+public class ConceptInfoController {
+
+}

+ 12 - 0
src/main/java/com/diagbot/web/RetrievalController.java

@@ -2,8 +2,10 @@ package com.diagbot.web;
 
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.RetrievalDTO;
+import com.diagbot.dto.StaticKnowledgeIndexDTO;
 import com.diagbot.facade.RetrievalFacade;
 import com.diagbot.vo.RetrievalVO;
+import com.diagbot.vo.StaticKnowledgeIndexVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -13,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.validation.Valid;
+import java.util.List;
 
 /**
  * @Description:
@@ -37,4 +40,13 @@ public class RetrievalController {
         RetrievalDTO data = retrievalFacade.index(retrievalVO);
         return RespDTO.onSuc(data);
     }
+
+    @ApiOperation(value = "医学知识(静态知识)检索[zhaops]",
+            notes = "types: 类型(多选):0-全部、1-诊断、2-药品、3-检验、4-检查、5-手术和操作 <br>" +
+                    "inputStr: 检索内容<br>")
+    @PostMapping("/staticKnowledgeIndex")
+    public RespDTO<List<StaticKnowledgeIndexDTO>> staticKnowledgeIndex(@Valid @RequestBody StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
+        List<StaticKnowledgeIndexDTO> data = retrievalFacade.staticKnowledgeIndex(staticKnowledgeIndexVO);
+        return RespDTO.onSuc(data);
+    }
 }

+ 21 - 0
src/main/resources/mapper/ConceptDetailMapper.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.ConceptDetailMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.ConceptDetail">
+        <id column="id" property="id" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+        <result column="concept_id" property="conceptId" />
+        <result column="title" property="title" />
+        <result column="content" property="content" />
+        <result column="text" property="text" />
+        <result column="order_no" property="orderNo" />
+        <result column="concent_type" property="concentType" />
+    </resultMap>
+
+</mapper>

+ 19 - 0
src/main/resources/mapper/ConceptInfoMapper.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.ConceptInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.ConceptInfo">
+        <id column="id" property="id" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+        <result column="name" property="name" />
+        <result column="type" property="type" />
+        <result column="clinical_pathway_name" property="clinicalPathwayName" />
+        <result column="notice_name" property="noticeName" />
+    </resultMap>
+
+</mapper>