Browse Source

Merge remote-tracking branch 'origin/dev/icssNCD' into dev/icssNCD

gaodm 6 years ago
parent
commit
03bdb9ccbf
38 changed files with 489 additions and 228 deletions
  1. 12 3
      aipt-service/src/main/java/com/diagbot/facade/ClinicalFacade.java
  2. 23 23
      aipt-service/src/main/java/com/diagbot/vo/SearchVo.java
  3. 2 9
      aipt-service/src/main/java/com/diagbot/web/ClinicalController.java
  4. 8 1
      config-server/src/main/resources/shared/gateway-service-test.yml
  5. 2 2
      config-server/src/main/resources/shared/knowledgeman-service-test.yml
  6. 20 0
      icss-service/src/main/java/com/diagbot/client/AiptServiceClient.java
  7. 23 0
      icss-service/src/main/java/com/diagbot/client/hystrix/AiptServiceHystrix.java
  8. 25 2
      icss-service/src/main/java/com/diagbot/facade/PushFacade.java
  9. 2 0
      icss-service/src/main/java/com/diagbot/web/PushController.java
  10. 2 2
      icss-service/src/main/resources/mapper/InquiryDetailMapper.xml
  11. 5 0
      icssman-service/src/main/java/com/diagbot/dto/GetModuleDetailInfoDTO.java
  12. 5 0
      icssman-service/src/main/java/com/diagbot/entity/ModuleDetail.java
  13. 40 14
      icssman-service/src/main/java/com/diagbot/facade/DeptInfoFacade.java
  14. 12 1
      icssman-service/src/main/java/com/diagbot/facade/DeptVitalFacade.java
  15. 1 0
      icssman-service/src/main/java/com/diagbot/facade/QuestionUsualFacade.java
  16. 8 1
      icssman-service/src/main/java/com/diagbot/mapper/DeptInfoMapper.java
  17. 8 0
      icssman-service/src/main/java/com/diagbot/service/DeptInfoService.java
  18. 5 0
      icssman-service/src/main/java/com/diagbot/service/impl/DeptInfoServiceImpl.java
  19. 6 1
      icssman-service/src/main/java/com/diagbot/vo/DVDetailVO.java
  20. 6 2
      icssman-service/src/main/java/com/diagbot/web/DeptVitalController.java
  21. 1 1
      icssman-service/src/main/java/com/diagbot/web/ModuleInfoController.java
  22. 2 1
      icssman-service/src/main/java/com/diagbot/web/QuestionUsualController.java
  23. 13 0
      icssman-service/src/main/resources/mapper/DeptInfoMapper.xml
  24. 2 2
      icssman-service/src/main/resources/mapper/QuestionInfoMapper.xml
  25. 4 1
      icssman-service/src/main/resources/mapper/QuestionUsualMapper.xml
  26. 1 1
      icssman-service/src/main/resources/mapper/RetrievalMapper.xml
  27. 76 76
      knowledge-service/src/main/java/com/diagbot/aop/SysLoggerAspect.java
  28. 76 76
      knowledgeman-service/src/main/java/com/diagbot/aop/SysLoggerAspect.java
  29. 15 1
      knowledgeman-service/src/main/java/com/diagbot/facade/LibraryDetailFacade.java
  30. 23 4
      knowledgeman-service/src/main/java/com/diagbot/facade/MedicalFacade.java
  31. 14 0
      knowledgeman-service/src/main/java/com/diagbot/facade/RelationshipFacade.java
  32. 4 0
      knowledgeman-service/src/main/java/com/diagbot/mapper/LexiconRelationshipMapper.java
  33. 4 0
      knowledgeman-service/src/main/java/com/diagbot/service/LexiconRelationshipService.java
  34. 7 0
      knowledgeman-service/src/main/java/com/diagbot/service/impl/LexiconRelationshipServiceImpl.java
  35. 0 2
      knowledgeman-service/src/main/java/com/diagbot/web/LibraryDetailController.java
  36. 3 2
      knowledgeman-service/src/main/java/com/diagbot/web/MedicalController.java
  37. 14 0
      knowledgeman-service/src/main/java/com/diagbot/web/RelationController.java
  38. 15 0
      knowledgeman-service/src/main/resources/mapper/LexiconRelationshipMapper.xml

+ 12 - 3
aipt-service/src/main/java/com/diagbot/facade/ClinicalFacade.java

@@ -1,6 +1,10 @@
 package com.diagbot.facade;
 
+import com.diagbot.client.AIServiceClient;
+import com.diagbot.client.bean.Response;
+import com.diagbot.client.bean.ResponseData;
 import com.diagbot.dto.LisResult;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 import org.springframework.web.bind.annotation.RequestBody;
 import com.diagbot.vo.SearchVo;
@@ -17,18 +21,23 @@ import java.util.List;
  */
 @Component
 public class ClinicalFacade {
+
+    @Autowired
+    private AIServiceClient aiServiceClient;
+
     /**
      * 处理临床数据
      *
      * @param searchVo
-     * @return SearchVo
+     * @return ResponseData
      */
-    public SearchVo processClinicalData(@RequestBody SearchVo searchVo) {
+    public ResponseData processClinicalData(@RequestBody SearchVo searchVo) {
         SearchVo sData = searchVo;
 
         sData.setLisArr(processLis(sData.getLisArr()));
+        Response<ResponseData> res = aiServiceClient.bayesPageData(sData);
 
-        return sData;
+        return res.getData();
     }
 
     private List<LisResult> processLis(List<LisResult> lisArr) {

+ 23 - 23
aipt-service/src/main/java/com/diagbot/vo/SearchVo.java

@@ -17,48 +17,48 @@ import java.util.Map;
 @Getter
 @Setter
 public class SearchVo {
-    private String sex;
-    private int age;
+    private int length;
+
     private int age_start;
     private int age_end;
+    private int age;
+    private String sex;
+
+    // 搜索结果的贝叶斯阈值
+    private String threshold;
 
     private String symptom;
     private String vital;
     private String lis;
     private String pacs;
-    private String other;
-    private String featureType;
     private String diag;
-
-    private int length;
-
-
-    // 搜索结果的贝叶斯阈值
-    private String threshold;
-
-    private List<Feature> symptomFeatureList;
-    private List<Feature> lisFeatureList;
-    private List<Feature> pacsFeatureList;
-    private List<Feature> vitalFeatureList;
-    private List<Feature> symptompropertyFeatureList;
-
+    private String past;
+    private String other;
     private List<LisResult> lisArr;
-    private List<Feature> diagFeatureList;
-    private Map<String, Map<String, String>> inputs;
-
 
+    //特征类别
+    private String featureType;
     /*
-    private String past;
     //特征类别对","进行分割后数据
     private String[] featureTypes;
     //门诊 住院分类
     private String resourceType;
     //模型
-    private AlgorithmClassify algorithmClassify[];
+//    private AlgorithmClassify algorithmClassify[];
     //模型
     private String algorithmClassifyValue;
+    */
     //外部系统编码 用于返回映射数据,如果sysCode为空或null,则返回kl_standard_info标准名称
     private String sysCode;
-    */
+
+
+    private List<Feature> symptomFeatureList;
+    private List<Feature> lisFeatureList;
+    private List<Feature> pacsFeatureList;
+    private List<Feature> vitalFeatureList;
+    private List<Feature> symptompropertyFeatureList;
+
+    private List<Feature> diagFeatureList;
+    private Map<String, Map<String, String>> inputs;
 
 }

+ 2 - 9
aipt-service/src/main/java/com/diagbot/web/ClinicalController.java

@@ -2,8 +2,6 @@ package com.diagbot.web;
 
 
 import com.diagbot.annotation.SysLogger;
-import com.diagbot.client.AIServiceClient;
-import com.diagbot.client.bean.Response;
 import com.diagbot.client.bean.ResponseData;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.ClinicalFacade;
@@ -35,19 +33,14 @@ public class ClinicalController {
     @Autowired
     private ClinicalFacade clinicalFacade;
 
-    @Autowired
-    private AIServiceClient aiServiceClient;
-
     @ApiOperation(value = "临床数据处理", notes = "")
     @PostMapping("/processData")
     @SysLogger("processData")
     public RespDTO<ResponseData> processData(@Valid @RequestBody SearchVo searchVo) {
 
-        SearchVo sData = clinicalFacade.processClinicalData(searchVo);
-
-        Response<ResponseData> res = aiServiceClient.bayesPageData(sData);
+        ResponseData data = clinicalFacade.processClinicalData(searchVo);
 
-        return RespDTO.onSuc(res.getData());
+        return RespDTO.onSuc(data);
     }
 
 }

+ 8 - 1
config-server/src/main/resources/shared/gateway-service-test.yml

@@ -118,10 +118,17 @@ spring:
         filters:
         - SwaggerHeaderFilter
         - StripPrefix=2
+      - id: icssyz-service
+        uri: lb://icss-service
+        predicates:
+        - Path=/api/icssyz/**
+        filters:
+        - SwaggerHeaderFilter
+        - StripPrefix=2
 
 server:
   port: 5050
 
 lantone:
-  product: triage33,1;icsstt,2
+  product: triage33,1;icssyz,2
 

+ 2 - 2
config-server/src/main/resources/shared/knowledgeman-service-test.yml

@@ -8,9 +8,9 @@ spring:
       driverClassName: com.mysql.jdbc.Driver
       driver-class-name: com.mysql.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://192.168.2.241:3306/sys-log?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      url: jdbc:mysql://192.168.2.235:3306/diagbot-med-test?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
       username: root
-      password: lantone
+      password: diagbot@20180822
       # 连接池的配置信息
       # 初始化大小,最小,最大
       initialSize: 5

+ 20 - 0
icss-service/src/main/java/com/diagbot/client/AiptServiceClient.java

@@ -0,0 +1,20 @@
+package com.diagbot.client;
+
+import com.diagbot.client.bean.Response;
+import com.diagbot.client.bean.ResponseData;
+import com.diagbot.client.bean.SearchData;
+import com.diagbot.client.hystrix.AiptServiceHystrix;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+/**
+ * @Description:调用中间层服务
+ * @Author: Mark Huang
+ * @time: 2019/03/25 19:15
+ */
+@FeignClient(value = "aipt-service", fallback = AiptServiceHystrix.class)
+public interface AiptServiceClient {
+    @PostMapping(value = "/clinicaldata/processData")
+    Response<ResponseData> aiptData(@RequestBody SearchData searchData);
+}

+ 23 - 0
icss-service/src/main/java/com/diagbot/client/hystrix/AiptServiceHystrix.java

@@ -0,0 +1,23 @@
+package com.diagbot.client.hystrix;
+
+import com.diagbot.client.AiptServiceClient;
+import com.diagbot.client.bean.Response;
+import com.diagbot.client.bean.ResponseData;
+import com.diagbot.client.bean.SearchData;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:调用中间层服务
+ * @Author: Mark Huang
+ * @time: 2019/03/25 19:15
+ */
+@Component
+@Slf4j
+public class AiptServiceHystrix implements AiptServiceClient {
+    @Override
+    public Response<ResponseData> aiptData(SearchData searchData) {
+        log.error("【hystrix】调用{}异常", "aiptData");
+        return null;
+    }
+}

+ 25 - 2
icss-service/src/main/java/com/diagbot/facade/PushFacade.java

@@ -2,6 +2,7 @@ package com.diagbot.facade;
 
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.client.AiptServiceClient;
 import com.diagbot.client.BigDataServiceClient;
 import com.diagbot.client.TranServiceClient;
 import com.diagbot.client.bean.FeatureRate;
@@ -84,6 +85,8 @@ public class PushFacade {
     private EvaluationModuleMappingFacade evaluationModuleMappingFacade;
     @Autowired
     private TranServiceClient tranServiceClient;
+    @Autowired
+    private AiptServiceClient aiptServiceClient;
 
     /**
      * 拼装数据
@@ -163,6 +166,20 @@ public class PushFacade {
         return res.getData();
     }
 
+    /**
+     * 中间层接口
+     *
+     * @param searchData
+     * @return ResponseData
+     */
+    public ResponseData pushAipt(SearchData searchData) {
+        Response<ResponseData> res = aiptServiceClient.aiptData(searchData);
+        if (null == res || null == res.getData()) {
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "中间层没有返回结果");
+        }
+        return res.getData();
+    }
+
     /**
      * 推理接口
      *
@@ -171,7 +188,9 @@ public class PushFacade {
      */
     public PushDTO pushInner(PushVO pushVO, Integer mode) {
         PushDTO pushDTO = new PushDTO();
+        //SearchData searchData = assembleData(pushVO);
         ResponseData data = pushAI(pushVO);
+
         //大数据返回内容
         List<FeatureRate> dis = data.getDis();
 
@@ -402,6 +421,7 @@ public class PushFacade {
         return pushDTO;
     }
 
+
     /**
      * 获取返回结果标签
      *
@@ -469,6 +489,7 @@ public class PushFacade {
         }
         pushVO.setLis(lisResultVOList);
 
+        SearchData searchData = assembleData(pushVO);
         ResponseData responseData = pushAI(pushVO);
         PushKYJDTO pushKYJDTO = new PushKYJDTO();
         pushKYJDTO.setLabs(responseData.getLabs());
@@ -583,7 +604,7 @@ public class PushFacade {
             questionVO.setSexType(pushVO.getSex());
             questionVO.setId(deptVital.getVitalId());
             QuestionDTO questionDTO = questionFacade.getById(questionVO);
-            if (questionDTO != null) {
+            if (questionDTO != null && questionDTO.getId() != null) {
                 vitalDTO.add(questionDTO);
             }
         }
@@ -626,6 +647,8 @@ public class PushFacade {
             }
             pushVO.setLis(lisResultVOList);
         }
+
+        SearchData searchData = assembleData(pushVO);
         ResponseData data = pushAI(pushVO);
         String featureType = pushVO.getFeatureType();
         String[] featureTypes = featureType.split(",|,");
@@ -705,7 +728,7 @@ public class PushFacade {
                 }
             }
             //警惕
-            SearchData searchData = new SearchData();
+            searchData = new SearchData();
             searchData.setDiag(String.join(",", disNameList));
             Response<GdbResponse> graphRes = bigDataServiceClient.highRiskPageData(searchData);
             Map<String, String> graphResult = graphRes.getData().getResult();

+ 2 - 0
icss-service/src/main/java/com/diagbot/web/PushController.java

@@ -3,6 +3,7 @@ package com.diagbot.web;
 import com.alibaba.fastjson.JSONObject;
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.client.bean.ResponseData;
+import com.diagbot.client.bean.SearchData;
 import com.diagbot.dto.PushDTO;
 import com.diagbot.dto.PushKYJDTO;
 import com.diagbot.dto.RespDTO;
@@ -124,6 +125,7 @@ public class PushController {
     @PostMapping("/pushAI")
     @SysLogger("pushAI")
     public RespDTO<ResponseData> pushAI(@RequestBody @Valid PushVO pushVO) {
+        SearchData searchData = pushFacade.assembleData(pushVO);
         return RespDTO.onSuc(pushFacade.pushAI(pushVO));
     }
 

+ 2 - 2
icss-service/src/main/resources/mapper/InquiryDetailMapper.xml

@@ -18,9 +18,9 @@
     </resultMap>
     
     <insert id="saveInquiryDetails" parameterType="list">
-    	insert into icss_inquiry_detail(inquiry_id,type,content) values
+    	insert into icss_inquiry_detail(inquiry_id,type,content,content_value) values
     	<foreach collection="list" separator="," item="detail">
-    		(#{detail.inquiryId},#{detail.type},#{detail.content})
+    		(#{detail.inquiryId},#{detail.type},#{detail.content},#{detail.contentValue})
     	</foreach>
     </insert>
 

+ 5 - 0
icssman-service/src/main/java/com/diagbot/dto/GetModuleDetailInfoDTO.java

@@ -46,4 +46,9 @@ public class GetModuleDetailInfoDTO {
      * 子模板名称
      */
     private String relationModuleName;
+
+    /**
+     * 特殊标识
+     */
+    private String flag;
 }

+ 5 - 0
icssman-service/src/main/java/com/diagbot/entity/ModuleDetail.java

@@ -80,6 +80,11 @@ public class ModuleDetail implements Serializable {
      */
     private Long relationModule;
 
+    /**
+     * 特殊标志
+     */
+    private String flag;
+
     /**
      * 排序号
      */

+ 40 - 14
icssman-service/src/main/java/com/diagbot/facade/DeptInfoFacade.java

@@ -9,6 +9,7 @@ import com.diagbot.dto.GetQuestionUsualAndTypeDTO;
 import com.diagbot.dto.QuestionTypeDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.entity.DeptInfo;
+import com.diagbot.entity.QuestionUsual;
 import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.enums.QuestionTypeEnum;
 import com.diagbot.exception.CommonErrorCode;
@@ -85,6 +86,21 @@ public class DeptInfoFacade extends DeptInfoServiceImpl {
             throw new CommonException(CommonErrorCode.NOT_EXISTS,
                     "科室已删除");
         }
+        //判断科室是否重名
+        Boolean boole = false;
+        QueryWrapper<DeptInfo> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted",IsDeleteEnum.N.getKey())
+                .notIn("id",updateDeptInfoVO.getId());
+        List<DeptInfo> deptInfoList = this.list(queryWrapper);
+        for (DeptInfo deptInfo: deptInfoList) {
+            if(updateDeptInfoVO.getName().equals(deptInfo.getName())){
+                boole = true;
+            }
+        }
+        if(boole){
+            throw new CommonException(CommonErrorCode.IS_EXISTS,
+                    "科室名称重复");
+        }
         //修改操作
         DeptInfo deptInfo = this.getById(updateDeptInfoVO.getId());
         BeanUtil.copyProperties(updateDeptInfoVO, deptInfo);
@@ -106,6 +122,13 @@ public class DeptInfoFacade extends DeptInfoServiceImpl {
             throw new CommonException(CommonErrorCode.NOT_EXISTS,
                     "科室已删除");
         }
+        QueryWrapper<QuestionUsual> questionUsualQueryWrapper = new QueryWrapper<>();
+        questionUsualQueryWrapper.eq("is_deleted",IsDeleteEnum.N.getKey())
+                .eq("dept_id",deleteDeptInfoVO.getId());
+        if(questionUsualFacade.count(questionUsualQueryWrapper) > 0){
+            throw new CommonException(CommonErrorCode.NOT_EXISTS,
+                    "与常用标签关联未删除");
+        }
         //删除操作
         DeptInfo deptInfo = new DeptInfo();
         deptInfo.setId(Long.parseLong(deleteDeptInfoVO.getId()));
@@ -124,20 +147,23 @@ public class DeptInfoFacade extends DeptInfoServiceImpl {
      * @return
      */
     public IPage<GetDeptInfoDTO> getDeptInfo(GetDeptInfoVO getDeptInfoVO) {
-        IPage<GetDeptInfoDTO> iPage = this.getAllDeptInfo(getDeptInfoVO);
-        List<String> ids = new ArrayList<>();
-        for (GetDeptInfoDTO getDeptInfoDTO : iPage.getRecords()) {
-            ids.add(getDeptInfoDTO.getModifier());
-        }
-        //获取用户信息
-        RespDTO<Map<String, String>> respDTO = userServiceClient.getUserInfoByIds(ids);
-        if (respDTO == null || !CommonErrorCode.OK.getCode().equals(respDTO.code)) {
-            throw new CommonException(CommonErrorCode.RPC_ERROR,
-                    "获取用户信息失败");
-        }
-        //将用户信息放入实体
-        for (GetDeptInfoDTO getDeptInfoDTO : iPage.getRecords()) {
-            getDeptInfoDTO.setUserName(respDTO.data.get(getDeptInfoDTO.getModifier()));
+        IPage<GetDeptInfoDTO> iPage = this.getDeptInfos(getDeptInfoVO);
+        RespDTO<Map<String, String>> respDTO = new RespDTO<>();
+        if (ListUtil.isNotEmpty(iPage.getRecords())) {
+            List<String> ids = new ArrayList<>();
+            for (GetDeptInfoDTO getDeptInfoDTO : iPage.getRecords()) {
+                ids.add(getDeptInfoDTO.getModifier());
+            }
+            //获取用户信息
+            respDTO = userServiceClient.getUserInfoByIds(ids);
+            if (respDTO == null || !CommonErrorCode.OK.getCode().equals(respDTO.code)) {
+                throw new CommonException(CommonErrorCode.RPC_ERROR,
+                        "获取用户信息失败");
+            }
+            //将用户信息放入实体
+            for (GetDeptInfoDTO getDeptInfoDTO : iPage.getRecords()) {
+                getDeptInfoDTO.setUserName(respDTO.data.get(getDeptInfoDTO.getModifier()));
+            }
         }
         return iPage;
     }

+ 12 - 1
icssman-service/src/main/java/com/diagbot/facade/DeptVitalFacade.java

@@ -59,6 +59,10 @@ public class DeptVitalFacade extends DeptVitalServiceImpl {
      * @return
      */
     public Boolean saveDeptVitals(DeptVitalVO deptVitalVO) {
+        DeptInfo deptInfo = deptInfoFacade.getById(deptVitalVO.getDeptId());
+        if (deptInfo == null) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "科室不存在");
+        }
         //先删除该科室原有模板
         UpdateWrapper<DeptVital> deptVitalUpdateWrapper = new UpdateWrapper<>();
         deptVitalUpdateWrapper.eq("dept_id", deptVitalVO.getDeptId()).
@@ -91,6 +95,7 @@ public class DeptVitalFacade extends DeptVitalServiceImpl {
             DeptVital deptVital = new DeptVital();
             deptVital.setDeptId(deptVitalVO.getDeptId());
             deptVital.setVitalId(dvDetailVO.getVitalId());
+            deptVital.setRemark(dvDetailVO.getRemark());
             deptVital.setOrderNo(dvDetailVO.getOrderNo());
             deptVital.setCreator(userId);
             deptVital.setGmtCreate(now);
@@ -166,7 +171,13 @@ public class DeptVitalFacade extends DeptVitalServiceImpl {
                 .collect(Collectors.toList());
         if (vitalIds.size() > 0) {
             List<QuestionInfo> vitalList = Lists.newArrayList(questionFacade.listByIds(vitalIds));
-            List<QuestionShortDTO> vitals = BeanUtil.listCopyTo(vitalList, QuestionShortDTO.class);
+            Map<Long, QuestionInfo> vitalMap = EntityUtil.makeEntityMap(vitalList, "id");
+            List<QuestionShortDTO> vitals = Lists.newArrayList();
+            for (Long vitalId : vitalIds) {
+                QuestionShortDTO vital = new QuestionShortDTO();
+                BeanUtil.copyProperties(vitalMap.get(vitalId), vital);
+                vitals.add(vital);
+            }
             deptVitalDTO.setVitals(vitals);
         }
 

+ 1 - 0
icssman-service/src/main/java/com/diagbot/facade/QuestionUsualFacade.java

@@ -68,6 +68,7 @@ public class QuestionUsualFacade extends QuestionUsualServiceImpl {
         if (ListUtil.isNotEmpty(questionUsualList)) {
             UpdateWrapper<QuestionUsual> updateWrapper = new UpdateWrapper();
             updateWrapper.eq("dept_id", questionUsualVO.getDeptId())
+                    .in("question_id",questionUsualList)
                     .set("is_deleted", IsDeleteEnum.Y.getKey())
                     .set("modifier", userId)
                     .set("gmt_modified", DateUtil.now());

+ 8 - 1
icssman-service/src/main/java/com/diagbot/mapper/DeptInfoMapper.java

@@ -21,12 +21,19 @@ import java.util.List;
 public interface DeptInfoMapper extends BaseMapper<DeptInfo> {
 
     /**
-     * 分页获取科室信息
+     * 常用标签修改获取科室信息
      * @param getDeptInfoVO
      * @return
      */
     public IPage<GetDeptInfoDTO> getAllDeptInfo(GetDeptInfoVO getDeptInfoVO);
 
+    /**
+     * 分页获取科室信息
+     * @param getDeptInfoVO
+     * @return
+     */
+    public IPage<GetDeptInfoDTO> getDeptInfos(GetDeptInfoVO getDeptInfoVO);
+
     /**
      * 获取科室名称
      * @return

+ 8 - 0
icssman-service/src/main/java/com/diagbot/service/DeptInfoService.java

@@ -28,6 +28,14 @@ public interface DeptInfoService extends IService<DeptInfo> {
     public IPage<GetDeptInfoDTO> getAllDeptInfo(GetDeptInfoVO getDeptInfoVO);
 
 
+    /**
+     * 分页获取科室信息
+     *
+     * @param getDeptInfoVO
+     * @return
+     */
+    public IPage<GetDeptInfoDTO> getDeptInfos(GetDeptInfoVO getDeptInfoVO);
+
     /**
      * 获取科室名称
      *

+ 5 - 0
icssman-service/src/main/java/com/diagbot/service/impl/DeptInfoServiceImpl.java

@@ -23,6 +23,11 @@ import java.util.List;
 @Service
 public class DeptInfoServiceImpl extends ServiceImpl<DeptInfoMapper, DeptInfo> implements DeptInfoService {
 
+    @Override
+    public IPage<GetDeptInfoDTO> getDeptInfos(GetDeptInfoVO getDeptInfoVO) {
+        return baseMapper.getDeptInfos(getDeptInfoVO);
+    }
+
     @Override
     public IPage<GetDeptInfoDTO> getAllDeptInfo(GetDeptInfoVO getDeptInfoVO) {
         return baseMapper.getAllDeptInfo(getDeptInfoVO);

+ 6 - 1
icssman-service/src/main/java/com/diagbot/vo/DVDetailVO.java

@@ -3,14 +3,19 @@ package com.diagbot.vo;
 import lombok.Getter;
 import lombok.Setter;
 
+import javax.validation.constraints.NotNull;
+
 /**
- * @Description:
+ * @Description:查体模板明细
  * @Author:zhaops
  * @time: 2019/1/3 16:45
  */
 @Getter
 @Setter
 public class DVDetailVO {
+    @NotNull(message = "请输入查体标签id")
     private Long vitalId;
+    @NotNull(message = "请输入查体标签排序")
     private Integer orderNo;
+    private String remark;
 }

+ 6 - 2
icssman-service/src/main/java/com/diagbot/web/DeptVitalController.java

@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 import springfox.documentation.annotations.ApiIgnore;
 
+import javax.validation.Valid;
 import java.util.List;
 
 /**
@@ -41,11 +42,14 @@ public class DeptVitalController {
 
     @ApiOperation(value = "保存查体模板[by:zhaops]",
             notes = "deptId:科室ID,必填<br>" +
-                    "vitalIds:查体标签ids,必填<br>")
+                    "dvDetailVOList:查体标签明细,必填<br>" +
+                    "vitalId:查体标签id,必填<br>" +
+                    "orderNo:查体标签排序,必填<br>" +
+                    "remark:查体标签备注(格式:deptName-tagName),必填<br>")
     @PostMapping("/saveDeptVitals")
     @SysLogger("saveDeptVitals")
     @Transactional
-    public RespDTO<Boolean> saveDeptVitals(@RequestBody DeptVitalVO deptVitalVO) {
+    public RespDTO<Boolean> saveDeptVitals(@RequestBody @Valid DeptVitalVO deptVitalVO) {
         Boolean data = deptVitalFacade.saveDeptVitals(deptVitalVO);
         return RespDTO.onSuc(data);
     }

+ 1 - 1
icssman-service/src/main/java/com/diagbot/web/ModuleInfoController.java

@@ -53,7 +53,7 @@ public class ModuleInfoController {
             notes = "name: 模板名称,必填<br>" +
                     "type: 模板类型,必填<br>" +
                     "questionId: 标签id,不是标点符号时需要填写<br>" +
-                    "flag: 特殊标类型<br>" +
+                    "flag: 特殊标类型<br>" +
                     "relationModule: 关联模板id<br>" +
                     "text: 特殊标签(如逗号句号)<br>" +
                     "textType: 特殊标签归属类型<br>" +

+ 2 - 1
icssman-service/src/main/java/com/diagbot/web/QuestionUsualController.java

@@ -50,7 +50,8 @@ public class QuestionUsualController {
 
     @ApiOperation(value = "常用标签维护——添加和修改[by:wangyu]",
             notes = "deptId: 科室id,必填<br>" +
-                    "questionName: 症状名称,必填")
+                    "questionName: 症状id,必填<br>" +
+                    "type: 修改时要传")
     @PostMapping("/addQuestionUsual")
     @SysLogger("addQuestionUsual")
     @Transactional

+ 13 - 0
icssman-service/src/main/resources/mapper/DeptInfoMapper.xml

@@ -31,6 +31,19 @@
         b.gmt_modified DESC
     </select>
 
+    <select id="getDeptInfos" resultType="com.diagbot.dto.GetDeptInfoDTO">
+        SELECT
+        a.id,a.gmt_create,a.gmt_modified,a.creator,a.modifier,a.`name`,a.remark
+        FROM
+        `icss_dept_info` a
+        WHERE
+        a.is_deleted = 'N'
+        <if test="name != null and name != ''">
+            AND a.`name` LIKE CONCAT('%',#{name},'%')
+        </if>
+        ORDER BY a.gmt_modified DESC
+    </select>
+
     <select id="getDeptName" resultType="com.diagbot.dto.DeptInfoDTO">
         SELECT
 	      *

+ 2 - 2
icssman-service/src/main/resources/mapper/QuestionInfoMapper.xml

@@ -105,7 +105,7 @@
         WHERE
         a.is_deleted = 'N'
         AND a.sub_type = '0'
-        AND a.type = #{type}
+        AND a.type = #{type} and a.tag_type != 8
         <if test="deptId != null and deptId != ''">
             AND a.id NOT IN (
             SELECT
@@ -136,7 +136,7 @@
         `icss_question_info` a
         WHERE
         a.is_deleted = 'N'
-        AND a.type = #{type}
+        AND a.type = #{type} AND a.tag_type != 8
         <if test="moduleId != null and moduleId != ''">
             AND a.id NOT IN (
             SELECT

+ 4 - 1
icssman-service/src/main/resources/mapper/QuestionUsualMapper.xml

@@ -17,7 +17,10 @@
     </resultMap>
 
     <select id="getQuestionUsualByQuestionId" resultType="com.diagbot.entity.QuestionUsual">
-        SELECT a.* FROM `icss_question_usual` a WHERE a.is_deleted = 'N' AND a.dept_id = #{questionUsualVO.deptId} AND a.type = #{type}
+        SELECT a.* FROM `icss_question_usual` a
+        LEFT JOIN icss_question_info b ON a.question_id = b.id
+        WHERE a.is_deleted = 'N' and b.is_deleted = 'N'
+        AND a.dept_id = #{questionUsualVO.deptId} AND b.type = #{questionUsualVO.type}
     </select>
 
     <select id="getQuestionUsualByDeptIds" resultType="com.diagbot.dto.GetQuestionUsualAndTypeDTO">

+ 1 - 1
icssman-service/src/main/resources/mapper/RetrievalMapper.xml

@@ -33,7 +33,7 @@
 			AND a.id=#{questionId}
 		</if>
 		<if test="questionName!=null">
-			AND a.`name`=#{questionName}
+			AND a.tag_name=#{questionName}
 		</if>
 	</select>
 	

+ 76 - 76
knowledge-service/src/main/java/com/diagbot/aop/SysLoggerAspect.java

@@ -1,76 +1,76 @@
-//package com.diagbot.aop;
-//
-//import com.diagbot.annotation.SysLogger;
-//import com.diagbot.entity.SysLog;
-//import com.diagbot.enums.SysTypeEnum;
-//import com.diagbot.rabbit.MySender;
-//import com.diagbot.util.GsonUtil;
-//import com.diagbot.util.HttpUtils;
-//import com.diagbot.util.StringUtil;
-//import com.diagbot.util.UserUtils;
-//import org.aspectj.lang.JoinPoint;
-//import org.aspectj.lang.annotation.Aspect;
-//import org.aspectj.lang.annotation.Before;
-//import org.aspectj.lang.annotation.Pointcut;
-//import org.aspectj.lang.reflect.MethodSignature;
-//import org.springframework.beans.factory.annotation.Autowired;
-//import org.springframework.stereotype.Component;
-//
-//import java.lang.reflect.Method;
-//import java.util.Date;
-//
-///**
-// * @Description: 日志拦截切面
-// * @author: gaodm
-// * @time: 2018/8/2 13:36
-// */
-//@Aspect
-//@Component
-//public class SysLoggerAspect {
-//    @Autowired
-//    private MySender mySender;
-//
-//    @Pointcut("@annotation(com.diagbot.annotation.SysLogger)")
-//    public void loggerPointCut() {
-//
-//    }
-//
-//    @Before("loggerPointCut()")
-//    public void saveSysLog(JoinPoint joinPoint) {
-//        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
-//        Method method = signature.getMethod();
-//
-//        SysLog sysLog = new SysLog();
-//        SysLogger sysLogger = method.getAnnotation(SysLogger.class);
-//        if (sysLogger != null) {
-//            //注解上的描述
-//            sysLog.setOperation(sysLogger.value());
-//        }
-//        //请求的方法名
-//        String className = joinPoint.getTarget().getClass().getName();
-//        String methodName = signature.getName();
-//        sysLog.setMethod(className + "." + methodName + "()");
-//        //请求的参数
-//        Object[] args = joinPoint.getArgs();
-//        String params = "";
-//        for (Object o : args) {
-//            params += GsonUtil.toJson(o);
-//        }
-//        if (!StringUtil.isEmpty(params)) {
-//            sysLog.setParams(params);
-//        }
-//        //设置IP地址
-//        sysLog.setIp(HttpUtils.getIpAddress());
-//        //用户名
-//        String username = UserUtils.getCurrentPrinciple();
-//        if (!StringUtil.isEmpty(username)) {
-//            sysLog.setUsername(username);
-//        }
-//        sysLog.setGmtCreate(new Date());
-//        sysLog.setSysType(SysTypeEnum.KNOWLEDGE_SERVICE.getKey());
-//        //保存系统日志
-//        mySender.outputLogSend(sysLog);
-//    }
-//
-//}
-//
+package com.diagbot.aop;
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.entity.SysLog;
+import com.diagbot.enums.SysTypeEnum;
+import com.diagbot.rabbit.MySender;
+import com.diagbot.util.GsonUtil;
+import com.diagbot.util.HttpUtils;
+import com.diagbot.util.StringUtil;
+import com.diagbot.util.UserUtils;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Before;
+import org.aspectj.lang.annotation.Pointcut;
+import org.aspectj.lang.reflect.MethodSignature;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.lang.reflect.Method;
+import java.util.Date;
+
+/**
+ * @Description: 日志拦截切面
+ * @author: gaodm
+ * @time: 2018/8/2 13:36
+ */
+@Aspect
+@Component
+public class SysLoggerAspect {
+    @Autowired
+    private MySender mySender;
+
+    @Pointcut("@annotation(com.diagbot.annotation.SysLogger)")
+    public void loggerPointCut() {
+
+    }
+
+    @Before("loggerPointCut()")
+    public void saveSysLog(JoinPoint joinPoint) {
+        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
+        Method method = signature.getMethod();
+
+        SysLog sysLog = new SysLog();
+        SysLogger sysLogger = method.getAnnotation(SysLogger.class);
+        if (sysLogger != null) {
+            //注解上的描述
+            sysLog.setOperation(sysLogger.value());
+        }
+        //请求的方法名
+        String className = joinPoint.getTarget().getClass().getName();
+        String methodName = signature.getName();
+        sysLog.setMethod(className + "." + methodName + "()");
+        //请求的参数
+        Object[] args = joinPoint.getArgs();
+        String params = "";
+        for (Object o : args) {
+            params += GsonUtil.toJson(o);
+        }
+        if (!StringUtil.isEmpty(params)) {
+            sysLog.setParams(params);
+        }
+        //设置IP地址
+        sysLog.setIp(HttpUtils.getIpAddress());
+        //用户名
+        String username = UserUtils.getCurrentPrinciple();
+        if (!StringUtil.isEmpty(username)) {
+            sysLog.setUsername(username);
+        }
+        sysLog.setGmtCreate(new Date());
+        sysLog.setSysType(SysTypeEnum.KNOWLEDGE_SERVICE.getKey());
+        //保存系统日志
+        mySender.outputLogSend(sysLog);
+    }
+
+}
+

+ 76 - 76
knowledgeman-service/src/main/java/com/diagbot/aop/SysLoggerAspect.java

@@ -1,76 +1,76 @@
-//package com.diagbot.aop;
-//
-//import com.diagbot.annotation.SysLogger;
-//import com.diagbot.entity.SysLog;
-//import com.diagbot.enums.SysTypeEnum;
-//import com.diagbot.rabbit.MySender;
-//import com.diagbot.util.GsonUtil;
-//import com.diagbot.util.HttpUtils;
-//import com.diagbot.util.StringUtil;
-//import com.diagbot.util.UserUtils;
-//import org.aspectj.lang.JoinPoint;
-//import org.aspectj.lang.annotation.Aspect;
-//import org.aspectj.lang.annotation.Before;
-//import org.aspectj.lang.annotation.Pointcut;
-//import org.aspectj.lang.reflect.MethodSignature;
-//import org.springframework.beans.factory.annotation.Autowired;
-//import org.springframework.stereotype.Component;
-//
-//import java.lang.reflect.Method;
-//import java.util.Date;
-//
-///**
-// * @Description: 日志拦截切面
-// * @author: gaodm
-// * @time: 2018/8/2 13:36
-// */
-//@Aspect
-//@Component
-//public class SysLoggerAspect {
-//    @Autowired
-//    private MySender mySender;
-//
-//    @Pointcut("@annotation(com.diagbot.annotation.SysLogger)")
-//    public void loggerPointCut() {
-//
-//    }
-//
-//    @Before("loggerPointCut()")
-//    public void saveSysLog(JoinPoint joinPoint) {
-//        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
-//        Method method = signature.getMethod();
-//
-//        SysLog sysLog = new SysLog();
-//        SysLogger sysLogger = method.getAnnotation(SysLogger.class);
-//        if (sysLogger != null) {
-//            //注解上的描述
-//            sysLog.setOperation(sysLogger.value());
-//        }
-//        //请求的方法名
-//        String className = joinPoint.getTarget().getClass().getName();
-//        String methodName = signature.getName();
-//        sysLog.setMethod(className + "." + methodName + "()");
-//        //请求的参数
-//        Object[] args = joinPoint.getArgs();
-//        String params = "";
-//        for (Object o : args) {
-//            params += GsonUtil.toJson(o);
-//        }
-//        if (!StringUtil.isEmpty(params)) {
-//            sysLog.setParams(params);
-//        }
-//        //设置IP地址
-//        sysLog.setIp(HttpUtils.getIpAddress());
-//        //用户名
-//        String username = UserUtils.getCurrentPrinciple();
-//        if (!StringUtil.isEmpty(username)) {
-//            sysLog.setUsername(username);
-//        }
-//        sysLog.setGmtCreate(new Date());
-//        sysLog.setSysType(SysTypeEnum.KNOWLEDGEMAN_SERVICE.getKey());
-//        //保存系统日志
-//        mySender.outputLogSend(sysLog);
-//    }
-//
-//}
-//
+package com.diagbot.aop;
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.entity.SysLog;
+import com.diagbot.enums.SysTypeEnum;
+import com.diagbot.rabbit.MySender;
+import com.diagbot.util.GsonUtil;
+import com.diagbot.util.HttpUtils;
+import com.diagbot.util.StringUtil;
+import com.diagbot.util.UserUtils;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Before;
+import org.aspectj.lang.annotation.Pointcut;
+import org.aspectj.lang.reflect.MethodSignature;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.lang.reflect.Method;
+import java.util.Date;
+
+/**
+ * @Description: 日志拦截切面
+ * @author: gaodm
+ * @time: 2018/8/2 13:36
+ */
+@Aspect
+@Component
+public class SysLoggerAspect {
+    @Autowired
+    private MySender mySender;
+
+    @Pointcut("@annotation(com.diagbot.annotation.SysLogger)")
+    public void loggerPointCut() {
+
+    }
+
+    @Before("loggerPointCut()")
+    public void saveSysLog(JoinPoint joinPoint) {
+        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
+        Method method = signature.getMethod();
+
+        SysLog sysLog = new SysLog();
+        SysLogger sysLogger = method.getAnnotation(SysLogger.class);
+        if (sysLogger != null) {
+            //注解上的描述
+            sysLog.setOperation(sysLogger.value());
+        }
+        //请求的方法名
+        String className = joinPoint.getTarget().getClass().getName();
+        String methodName = signature.getName();
+        sysLog.setMethod(className + "." + methodName + "()");
+        //请求的参数
+        Object[] args = joinPoint.getArgs();
+        String params = "";
+        for (Object o : args) {
+            params += GsonUtil.toJson(o);
+        }
+        if (!StringUtil.isEmpty(params)) {
+            sysLog.setParams(params);
+        }
+        //设置IP地址
+        sysLog.setIp(HttpUtils.getIpAddress());
+        //用户名
+        String username = UserUtils.getCurrentPrinciple();
+        if (!StringUtil.isEmpty(username)) {
+            sysLog.setUsername(username);
+        }
+        sysLog.setGmtCreate(new Date());
+        sysLog.setSysType(SysTypeEnum.KNOWLEDGEMAN_SERVICE.getKey());
+        //保存系统日志
+        mySender.outputLogSend(sysLog);
+    }
+
+}
+

+ 15 - 1
knowledgeman-service/src/main/java/com/diagbot/facade/LibraryDetailFacade.java

@@ -175,6 +175,7 @@ public class LibraryDetailFacade extends LibraryDetailServiceImpl {
         String error = "";
         LibraryDetail libraryDetail;
 
+        /*
         QueryWrapper<LibraryInfo> query = new QueryWrapper<>();
         query.eq("name", knowledgeVo.getTerm());
         query.eq("type", knowledgeVo.getType());
@@ -183,7 +184,9 @@ public class LibraryDetailFacade extends LibraryDetailServiceImpl {
         if (libraryInfo != null) {
             QueryWrapper<LibraryDetail> detquery = new QueryWrapper<>();
             detquery.eq("concept_id", libraryInfo.getConceptId());
-            detquery.eq("source", knowledgeVo.getSource());
+            if (knowledgeVo.getSource() != null) {
+                detquery.eq("source", knowledgeVo.getSource());
+            }
             detquery.eq("title", knowledgeVo.getTitle());
             libraryDetail = getOne(detquery);
 
@@ -200,6 +203,17 @@ public class LibraryDetailFacade extends LibraryDetailServiceImpl {
         else {
             error = "术语 \"" + knowledgeVo.getTerm() + "(" + knowledgeVo.getType() + ")\" 不存在!";
         }
+        */
+        QueryWrapper<LibraryDetail> query = new QueryWrapper<>();
+        query.eq("id", knowledgeVo.getId());
+        libraryDetail = getOne(query);
+
+        if (libraryDetail != null) {
+            remove(query);
+        }
+        else {
+            error = "术语 \"" + knowledgeVo.getTerm() + "(" + knowledgeVo.getType() + ")\" 不存在!";
+        }
 
 
         msg.add(error);

+ 23 - 4
knowledgeman-service/src/main/java/com/diagbot/facade/MedicalFacade.java

@@ -141,11 +141,15 @@ public class MedicalFacade extends MedicalServiceImpl {
      * @param termVo
      * @return ConceptDTO
      */
-    public Boolean removeMedicalInfo(TermVo termVo) {
+    public ConceptDTO removeMedicalInfo(TermVo termVo) {
 
-        Boolean isdeleted = false;
-        List<Medical> medicals;
+//        Boolean isdeleted = false;
+        ConceptDTO conceptDTO = new ConceptDTO();
+        Medical medical;
+        List<String> msg = new ArrayList<>();
+        String error = "";
 
+        /*
         QueryWrapper<LibraryInfo> query = new QueryWrapper<>();
         query.eq("name", termVo.getTerm());
         query.eq("type", termVo.getType());
@@ -165,8 +169,23 @@ public class MedicalFacade extends MedicalServiceImpl {
                 isdeleted = true;
             }
         }
+        */
+        QueryWrapper<Medical> query = new QueryWrapper<>();
+        query.eq("id", termVo.getId());
+        medical = getOne(query);
 
-        return isdeleted;
+        if (medical != null) {
+            remove(query);
+        }
+        else {
+            error = "术语 \"" + termVo.getTerm() + "(" + termVo.getType() + ")\" 不存在!";
+        }
+
+
+        msg.add(error);
+        conceptDTO.setMessage(msg);
+
+        return conceptDTO;
     }
 
 

+ 14 - 0
knowledgeman-service/src/main/java/com/diagbot/facade/RelationshipFacade.java

@@ -1,9 +1,11 @@
 package com.diagbot.facade;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.dto.RelationDTO;
 import com.diagbot.entity.LexiconRelationship;
 import com.diagbot.service.impl.LexiconRelationshipServiceImpl;
+import com.diagbot.vo.AllRelationVo;
 import org.springframework.stereotype.Component;
 
 /**
@@ -33,4 +35,16 @@ public class RelationshipFacade extends LexiconRelationshipServiceImpl {
 
         return lexiconRelationship;
     }
+    /**
+     *
+     * 获取所有关系名称
+     *
+     * @param allrelationVo
+     * @result IPage<LexiconRelationship>
+     */
+    public IPage<LexiconRelationship> getRelationName(AllRelationVo allrelationVo) {
+
+        return getAllRelationName(allrelationVo);
+    }
+
 }

+ 4 - 0
knowledgeman-service/src/main/java/com/diagbot/mapper/LexiconRelationshipMapper.java

@@ -1,9 +1,11 @@
 package com.diagbot.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.dto.RelationDTO;
 import com.diagbot.entity.LexiconRelationship;
 import com.diagbot.facade.LibraryInfoFacade;
+import com.diagbot.vo.AllRelationVo;
 
 /**
  * <p>
@@ -15,4 +17,6 @@ import com.diagbot.facade.LibraryInfoFacade;
  */
 public interface LexiconRelationshipMapper extends BaseMapper<LexiconRelationship> {
     public LexiconRelationship getLexiconRelationship(RelationDTO relationDTO, LibraryInfoFacade libraryInfoFacade);
+
+    public IPage<LexiconRelationship> getAllRelationName(AllRelationVo allrelationVo);
 }

+ 4 - 0
knowledgeman-service/src/main/java/com/diagbot/service/LexiconRelationshipService.java

@@ -1,9 +1,11 @@
 package com.diagbot.service;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.diagbot.dto.RelationDTO;
 import com.diagbot.entity.LexiconRelationship;
 import com.diagbot.facade.LibraryInfoFacade;
+import com.diagbot.vo.AllRelationVo;
 
 /**
  * <p>
@@ -15,4 +17,6 @@ import com.diagbot.facade.LibraryInfoFacade;
  */
 public interface LexiconRelationshipService extends IService<LexiconRelationship> {
     public LexiconRelationship getLexiconRelationship(RelationDTO relationDTO, LibraryInfoFacade libraryInfoFacade);
+
+    public IPage<LexiconRelationship> getAllRelationName(AllRelationVo allrelationVo);
 }

+ 7 - 0
knowledgeman-service/src/main/java/com/diagbot/service/impl/LexiconRelationshipServiceImpl.java

@@ -1,11 +1,13 @@
 package com.diagbot.service.impl;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.diagbot.dto.RelationDTO;
 import com.diagbot.entity.LexiconRelationship;
 import com.diagbot.facade.LibraryInfoFacade;
 import com.diagbot.mapper.LexiconRelationshipMapper;
 import com.diagbot.service.LexiconRelationshipService;
+import com.diagbot.vo.AllRelationVo;
 import org.springframework.stereotype.Service;
 
 /**
@@ -22,4 +24,9 @@ public class LexiconRelationshipServiceImpl extends ServiceImpl<LexiconRelations
     public LexiconRelationship getLexiconRelationship(RelationDTO relationDTO, LibraryInfoFacade libraryInfoFacade) {
         return baseMapper.getLexiconRelationship(relationDTO, libraryInfoFacade);
     }
+
+    @Override
+    public IPage<LexiconRelationship> getAllRelationName(AllRelationVo allrelationVo) {
+        return baseMapper.getAllRelationName(allrelationVo);
+    }
 }

+ 0 - 2
knowledgeman-service/src/main/java/com/diagbot/web/LibraryDetailController.java

@@ -4,12 +4,10 @@ package com.diagbot.web;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.*;
-import com.diagbot.entity.Concept;
 import com.diagbot.facade.LibraryDetailFacade;
 import com.diagbot.vo.AmendTermVo;
 import com.diagbot.vo.ConceptVo;
 import com.diagbot.vo.KnowledgeVo;
-import com.diagbot.vo.TermVo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;

+ 3 - 2
knowledgeman-service/src/main/java/com/diagbot/web/MedicalController.java

@@ -7,6 +7,7 @@ import com.diagbot.dto.ConceptDTO;
 import com.diagbot.dto.LibraryInfoDTO;
 import com.diagbot.dto.MedicalDTO;
 import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.Concept;
 import com.diagbot.facade.MedicalFacade;
 import com.diagbot.vo.ConceptVo;
 import com.diagbot.vo.TermVo;
@@ -72,8 +73,8 @@ public class MedicalController {
     @PostMapping("/removeMedicalInfo")
     @SysLogger("removeMedicalInfo")
     public RespDTO<ConceptDTO> removeMedicalInfo(@Valid @RequestBody TermVo termVo) {
-        Boolean result = medicalFacade.removeMedicalInfo(termVo);
+        ConceptDTO data = medicalFacade.removeMedicalInfo(termVo);
 
-        return RespDTO.onSuc(result);
+        return RespDTO.onSuc(data);
     }
 }

+ 14 - 0
knowledgeman-service/src/main/java/com/diagbot/web/RelationController.java

@@ -5,7 +5,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.RelationDTO;
 import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.LexiconRelationship;
 import com.diagbot.facade.RelationFacade;
+import com.diagbot.facade.RelationshipFacade;
 import com.diagbot.vo.AllRelationVo;
 import com.diagbot.vo.RelationVo;
 import io.swagger.annotations.Api;
@@ -35,6 +37,9 @@ public class RelationController {
     @Autowired
     RelationFacade relationFacade;
 
+    @Autowired
+    RelationshipFacade relationshipFacade;
+
     @ApiOperation(value = "按标准术语查询关系",
             notes = "Term:术语名称, 必填<br>Type:术语类型, 必填<br>")
     @PostMapping("/getConceptRelation")
@@ -65,4 +70,13 @@ public class RelationController {
         return RespDTO.onSuc(data);
     }
 
+    @ApiOperation(value = "所有关系名称查询")
+    @PostMapping("/getRelationName")
+    @SysLogger("getRelationName")
+    public RespDTO<IPage<LexiconRelationship>> getAllRelationName(@RequestBody AllRelationVo allrelationVo) {
+        IPage<LexiconRelationship> data = relationshipFacade.getRelationName(allrelationVo);
+
+        return RespDTO.onSuc(data);
+    }
+
 }

+ 15 - 0
knowledgeman-service/src/main/resources/mapper/LexiconRelationshipMapper.xml

@@ -0,0 +1,15 @@
+<?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.LexiconRelationshipMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.LexiconRelationship">
+        <id column="id" property="id" />
+        <result column="name" property="name" />
+        <result column="code" property="code" />
+    </resultMap>
+
+    <select id="getAllRelationName" resultType="com.diagbot.entity.LexiconRelationship">
+        SELECT * FROM lexicon_relationship
+    </select>
+</mapper>