wangfeng 4 роки тому
батько
коміт
8c72934498
22 змінених файлів з 919 додано та 0 видалено
  1. 46 0
      src/main/java/com/diagbot/client/CdssCoreClient.java
  2. 58 0
      src/main/java/com/diagbot/client/hystrix/CdssCoreHystrix.java
  3. 8 0
      src/main/java/com/diagbot/config/ResourceServerConfigurer.java
  4. 8 0
      src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java
  5. 27 0
      src/main/java/com/diagbot/dto/KlRuleByIdParDTO.java
  6. 31 0
      src/main/java/com/diagbot/dto/KlRuleByIdSubDTO.java
  7. 65 0
      src/main/java/com/diagbot/dto/KlRuleInfoDTO.java
  8. 18 0
      src/main/java/com/diagbot/entity/KlRuleMenuWrapper.java
  9. 210 0
      src/main/java/com/diagbot/entity/KlRulePlan.java
  10. 27 0
      src/main/java/com/diagbot/facade/KlDictionaryInfoFacade.java
  11. 62 0
      src/main/java/com/diagbot/facade/KlRuleFacade.java
  12. 28 0
      src/main/java/com/diagbot/facade/KlRulePlanFacade.java
  13. 18 0
      src/main/java/com/diagbot/vo/KlRuleByIdVO.java
  14. 18 0
      src/main/java/com/diagbot/vo/KlRuleInfoClearVO.java
  15. 30 0
      src/main/java/com/diagbot/vo/KlRuleInfoSaveSubVO.java
  16. 35 0
      src/main/java/com/diagbot/vo/KlRuleInfoSaveVO.java
  17. 30 0
      src/main/java/com/diagbot/vo/KlRuleInfoVO.java
  18. 18 0
      src/main/java/com/diagbot/vo/KlRuleMenuVO.java
  19. 18 0
      src/main/java/com/diagbot/vo/KlRuleSatartOrdisaVO.java
  20. 34 0
      src/main/java/com/diagbot/web/KlDictionaryConller.java
  21. 87 0
      src/main/java/com/diagbot/web/KlRuleController.java
  22. 43 0
      src/main/java/com/diagbot/web/KlRulePlanController.java

+ 46 - 0
src/main/java/com/diagbot/client/CdssCoreClient.java

@@ -2,14 +2,18 @@ package com.diagbot.client;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.diagbot.client.hystrix.CdssCoreHystrix;
+import com.diagbot.dto.DictionaryInfoDTO;
 import com.diagbot.dto.IndicationDTO;
 import com.diagbot.dto.KlConceptStaticDTO;
+import com.diagbot.dto.KlRuleByIdParDTO;
+import com.diagbot.dto.KlRuleInfoDTO;
 import com.diagbot.dto.PushDTO;
 import com.diagbot.dto.PushPlanDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.RetrievalDTO;
 import com.diagbot.dto.StaticKnowledgeDTO;
 import com.diagbot.dto.StaticKnowledgeIndexDTO;
+import com.diagbot.entity.KlRuleMenuWrapper;
 import com.diagbot.vo.ChangeStatusVO;
 import com.diagbot.vo.ConceptVO;
 import com.diagbot.vo.HasStaticKnowledgeVO;
@@ -17,6 +21,12 @@ import com.diagbot.vo.IdVO;
 import com.diagbot.vo.IndicationPushVO;
 import com.diagbot.vo.KlConceptStaticPageVO;
 import com.diagbot.vo.KlConceptStaticVO;
+import com.diagbot.vo.KlRuleByIdVO;
+import com.diagbot.vo.KlRuleInfoClearVO;
+import com.diagbot.vo.KlRuleInfoSaveVO;
+import com.diagbot.vo.KlRuleInfoVO;
+import com.diagbot.vo.KlRuleMenuVO;
+import com.diagbot.vo.KlRuleSatartOrdisaVO;
 import com.diagbot.vo.PushPlanVO;
 import com.diagbot.vo.PushVO;
 import com.diagbot.vo.RetrievalVO;
@@ -157,4 +167,40 @@ public interface CdssCoreClient {
      */
     @PostMapping("/kl/conceptStatic/isExist")
     RespDTO<Boolean> isExist(@Valid @RequestBody KlConceptStaticVO klConceptStaticVO);
+
+    /**
+     *获取规则下拉菜单信息
+     * @param klRuleMenuVO
+     * @return
+     */
+    @PostMapping("/klRulePlan/getMenu")
+    RespDTO<List<KlRuleMenuWrapper>> getMenus(@RequestBody KlRuleMenuVO klRuleMenuVO);
+
+    //"分页获取规则维护列表
+    @PostMapping("/klRule/getKlRuleInfoPage")
+    RespDTO<Page<KlRuleInfoDTO>> getKlRuleInfoPages(@RequestBody KlRuleInfoVO klRuleInfoVO);
+
+
+    //根据规则Id获取规则详情
+    @PostMapping("/klRule/getByIdRuleInfo")
+    RespDTO<KlRuleByIdParDTO> getByIdRuleInfoAll(@RequestBody @Valid KlRuleByIdVO klRuleByIdVO);
+
+    //保存规则详情[
+    @PostMapping("/klRule/saveRuleInfo")
+    RespDTO<Boolean> saveRuleInfoAll(@RequestBody @Valid KlRuleInfoSaveVO klRuleInfoSaveVO);
+
+    //刪除规则详情
+    @PostMapping("/klRule/clearRuleInfo")
+    RespDTO<Boolean> clearRuleInfoAll(@RequestBody @Valid KlRuleInfoClearVO klRuleInfoClearVO);
+
+    //停用规则
+    @PostMapping("/klRule/disableRuleInfo")
+    RespDTO<Boolean> disableRuleInfos(@RequestBody @Valid KlRuleSatartOrdisaVO klRuleSatartOrdisaVO);
+
+    //启用规则
+    @PostMapping("/klRule/startRuleInfo")
+    RespDTO<Boolean> startRuleInfos(@RequestBody @Valid KlRuleSatartOrdisaVO klRuleSatartOrdisaVO);
+
+    @PostMapping("/kl/dictionary/getDictionaryInfo")
+    RespDTO<List<DictionaryInfoDTO>> getDictionaryAll();
 }

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

@@ -2,14 +2,18 @@ package com.diagbot.client.hystrix;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.diagbot.client.CdssCoreClient;
+import com.diagbot.dto.DictionaryInfoDTO;
 import com.diagbot.dto.IndicationDTO;
 import com.diagbot.dto.KlConceptStaticDTO;
+import com.diagbot.dto.KlRuleByIdParDTO;
+import com.diagbot.dto.KlRuleInfoDTO;
 import com.diagbot.dto.PushDTO;
 import com.diagbot.dto.PushPlanDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.RetrievalDTO;
 import com.diagbot.dto.StaticKnowledgeDTO;
 import com.diagbot.dto.StaticKnowledgeIndexDTO;
+import com.diagbot.entity.KlRuleMenuWrapper;
 import com.diagbot.vo.ChangeStatusVO;
 import com.diagbot.vo.ConceptVO;
 import com.diagbot.vo.HasStaticKnowledgeVO;
@@ -17,6 +21,12 @@ import com.diagbot.vo.IdVO;
 import com.diagbot.vo.IndicationPushVO;
 import com.diagbot.vo.KlConceptStaticPageVO;
 import com.diagbot.vo.KlConceptStaticVO;
+import com.diagbot.vo.KlRuleByIdVO;
+import com.diagbot.vo.KlRuleInfoClearVO;
+import com.diagbot.vo.KlRuleInfoSaveVO;
+import com.diagbot.vo.KlRuleInfoVO;
+import com.diagbot.vo.KlRuleMenuVO;
+import com.diagbot.vo.KlRuleSatartOrdisaVO;
 import com.diagbot.vo.PushPlanVO;
 import com.diagbot.vo.PushVO;
 import com.diagbot.vo.RetrievalVO;
@@ -203,4 +213,52 @@ public class CdssCoreHystrix implements CdssCoreClient {
         log.error("【hystrix】调用{}异常", "isExist");
         return null;
     }
+
+    @Override
+    public RespDTO<List<KlRuleMenuWrapper>> getMenus(KlRuleMenuVO klRuleMenuVO) {
+        log.error("【hystrix】调用{}异常", "getMenus");
+        return null;
+    }
+
+    @Override
+    public RespDTO<Page<KlRuleInfoDTO>> getKlRuleInfoPages(KlRuleInfoVO klRuleInfoVO) {
+        log.error("【hystrix】调用{}异常", "getKlRuleInfoPages");
+        return null;
+    }
+
+    @Override
+    public RespDTO<KlRuleByIdParDTO> getByIdRuleInfoAll(@Valid KlRuleByIdVO klRuleByIdVO) {
+        log.error("【hystrix】调用{}异常", "getByIdRuleInfoAll");
+        return null;
+    }
+
+    @Override
+    public RespDTO<Boolean> saveRuleInfoAll(@Valid KlRuleInfoSaveVO klRuleInfoSaveVO) {
+        log.error("【hystrix】调用{}异常", "saveRuleInfoAll");
+        return null;
+    }
+
+    @Override
+    public RespDTO<Boolean> clearRuleInfoAll(@Valid KlRuleInfoClearVO klRuleInfoClearVO) {
+        log.error("【hystrix】调用{}异常", "clearRuleInfoAll");
+        return null;
+    }
+
+    @Override
+    public RespDTO<Boolean> disableRuleInfos(@Valid KlRuleSatartOrdisaVO klRuleSatartOrdisaVO) {
+        log.error("【hystrix】调用{}异常", "disableRuleInfos");
+        return null;
+    }
+
+    @Override
+    public RespDTO<Boolean> startRuleInfos(@Valid KlRuleSatartOrdisaVO klRuleSatartOrdisaVO) {
+        log.error("【hystrix】调用{}异常", "startRuleInfos");
+        return null;
+    }
+
+    @Override
+    public RespDTO<List<DictionaryInfoDTO>> getDictionaryAll() {
+        log.error("【hystrix】调用{}异常", "getDictionaryAll");
+        return null;
+    }
 }

+ 8 - 0
src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -161,6 +161,14 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/demo/mrtestInfo/importExcel").permitAll()
                 .antMatchers("/demo/mrtestInfo/exportExcel").permitAll()
                 .antMatchers("/demo/mrtestInfo/mrTestProcess").permitAll()
+                .antMatchers("/kl/dictionary/getDictionarys").permitAll()
+                .antMatchers("/klRulePlan/getMenu").permitAll()
+                .antMatchers("/klRule/getKlRuleInfoPage").permitAll()
+                .antMatchers("/klRule/getByIdRuleInfo").permitAll()
+                .antMatchers("/klRule/saveRuleInfo").permitAll()
+                .antMatchers("/klRule/clearRuleInfo").permitAll()
+                .antMatchers("/klRule/disableRuleInfo").permitAll()
+                .antMatchers("/klRule/startRuleInfo").permitAll()
                 .antMatchers("/**").authenticated();
         //                .antMatchers("/**").permitAll();
     }

+ 8 - 0
src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -203,6 +203,14 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/demo/mrtestInfo/importExcel", request)
                 || matchers("/demo/mrtestInfo/exportExcel", request)
                 || matchers("/demo/mrtestInfo/mrTestProcess", request)
+                || matchers("/kl/dictionary/getDictionarys", request)
+                || matchers("/klRulePlan/getMenu", request)
+                || matchers("/klRule/getKlRuleInfoPage", request)
+                || matchers("/klRule/getByIdRuleInfo", request)
+                || matchers("/klRule/saveRuleInfo", request)
+                || matchers("/klRule/clearRuleInfo", request)
+                || matchers("/klRule/disableRuleInfo", request)
+                || matchers("/klRule/startRuleInfo", request)
                 || matchers("/", request)) {
             return true;
         }

+ 27 - 0
src/main/java/com/diagbot/dto/KlRuleByIdParDTO.java

@@ -0,0 +1,27 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2021-03-08 13:18
+ */
+@Setter
+@Getter
+public class KlRuleByIdParDTO {
+    private Long parId;
+    private String parDescription;//规则名称
+    private Integer parRuleType;//规则类型(1:开单合理性;2:高危;3:危急值;4:其他值提醒;5:其他值提醒输血;6:正常项目重复开立)
+    private Long parConceptId;//提示概念id
+    private String parlibName;
+    private Integer parHasSub;//是否有子条件(0:无,1:有)
+    private String parMsg;//附加信息
+    private Integer parStatus;//启用状态(0:禁用,1:启用)
+    private String parLenName;
+    private String parLenCode;
+    private List<KlRuleByIdSubDTO>  klRuleByIdSub;
+}

+ 31 - 0
src/main/java/com/diagbot/dto/KlRuleByIdSubDTO.java

@@ -0,0 +1,31 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2021-03-08 13:16
+ */
+@Setter
+@Getter
+public class KlRuleByIdSubDTO {
+    private Long subId;//基础规则id
+    private String subDescription;//基础规则名称
+    private Long subConceptId;//医学标准术语id
+    private String subLibName;//医学标准术语
+    private String subLenName;//基础规则术语类型
+    private String subLenCode;//基础规则术语编码
+    private Integer subType;//基础规则类型(1:开单外等于术语本身;2:开单外存在比较;3:开单外不等于术语本身;4:过敏原;5:开单项;6:检查结果正则表达式)
+    private Integer groupType;
+    private String subMinOperator;//最小域比较符
+    private String subMinValue;//最小域值
+    private String subMinUnit;//最小域单位
+    private String subMaxOperator;//最大域比较符
+    private String subMaxValue;//最大域值
+    private String subMaxUnit;//最大域单位
+    private String subEqOperator;//等于域比较符
+    private String subEqValue;//等于域值
+    private String subEqUnit;//等于域单位
+}

+ 65 - 0
src/main/java/com/diagbot/dto/KlRuleInfoDTO.java

@@ -0,0 +1,65 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2021-03-05 13:44
+ */
+@Setter
+@Getter
+public class KlRuleInfoDTO {
+
+    /**
+     * 主键
+     */
+    private Long parId;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 提示概念id
+     */
+    private Long parConceptId;
+
+    private String parConceptName;
+
+
+    private String parLibTypeName;
+    /**
+     * 描述
+     */
+    private String parDescription;
+
+    /**
+     * 规则类型(1:开单合理性;2:高危;3:危急值;4:其他值提醒;5:其他值提醒输血;6:正常项目重复开立)
+     */
+    private Integer parRuleType;
+
+    /**
+     * 是否有子条件(0:无,1:有)
+     */
+    private Integer parHasSub;
+
+    /**
+     * 启用状态(0:禁用,1:启用)
+     */
+    private Integer parStatus;
+
+    /**
+     * 附加信息
+     */
+    private String parMsg;
+}

+ 18 - 0
src/main/java/com/diagbot/entity/KlRuleMenuWrapper.java

@@ -0,0 +1,18 @@
+package com.diagbot.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2021-03-09 10:20
+ */
+@Getter
+@Setter
+public class KlRuleMenuWrapper extends KlRulePlan {
+    private List<KlRuleMenuWrapper> subMenuList = new ArrayList<>();
+}

+ 210 - 0
src/main/java/com/diagbot/entity/KlRulePlan.java

@@ -0,0 +1,210 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2021-03-09
+ */
+public class KlRulePlan implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 资源ID
+     */
+    @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;
+
+    /**
+     * 规则类型(1:开单合理性;2:高危;3:危急值;4:其他值提醒;5:其他值提醒输血;6:正常项目重复开立)
+     */
+    private Long ruleType;
+
+    /**
+     * -1:表示顶级,其他值表示上级菜单的id
+     */
+    private Long parentId;
+
+    /**
+     * 基础规则类型
+     */
+    private String name;
+
+    private Integer type;
+    private Integer number;
+    /**
+     * 类型编码
+     */
+    private String code;
+    /**
+     * 显示顺序
+     */
+    private Integer orderNo;
+
+    private String remark;
+
+    public Integer getNumber() {
+        return number;
+    }
+
+    public void setNumber(Integer number) {
+        this.number = number;
+    }
+
+    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 getRuleType() {
+        return ruleType;
+    }
+
+    public void setRuleType(Long ruleType) {
+        this.ruleType = ruleType;
+    }
+
+    public Long getParentId() {
+        return parentId;
+    }
+
+    public void setParentId(Long parentId) {
+        this.parentId = parentId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public Integer getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(Integer orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "KlRulePlan{" +
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", ruleType=" + ruleType +
+                ", parentId=" + parentId +
+                ", name=" + name +
+                ", type=" + type +
+                ", code=" + code +
+                ", orderNo=" + orderNo +
+                ", remark=" + remark +
+                "}";
+    }
+}

+ 27 - 0
src/main/java/com/diagbot/facade/KlDictionaryInfoFacade.java

@@ -0,0 +1,27 @@
+package com.diagbot.facade;
+
+import com.diagbot.client.CdssCoreClient;
+import com.diagbot.dto.DictionaryInfoDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.util.RespDTOUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2021-03-17 13:34
+ */
+@Component
+public class KlDictionaryInfoFacade {
+    @Autowired
+    CdssCoreClient cdssCoreClient;
+
+    public List<DictionaryInfoDTO> getListByGroupType() {
+        RespDTO<List<DictionaryInfoDTO>> dictionaryAll = cdssCoreClient.getDictionaryAll();
+        RespDTOUtil.respNGDeal(dictionaryAll, "获取字典表信息数据失败");
+        return dictionaryAll.data;
+    }
+}

+ 62 - 0
src/main/java/com/diagbot/facade/KlRuleFacade.java

@@ -0,0 +1,62 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.diagbot.client.CdssCoreClient;
+import com.diagbot.dto.KlRuleByIdParDTO;
+import com.diagbot.dto.KlRuleInfoDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.util.RespDTOUtil;
+import com.diagbot.vo.KlRuleByIdVO;
+import com.diagbot.vo.KlRuleInfoClearVO;
+import com.diagbot.vo.KlRuleInfoSaveVO;
+import com.diagbot.vo.KlRuleInfoVO;
+import com.diagbot.vo.KlRuleSatartOrdisaVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @Author: wangfeng
+ * @time: 2021/3/1 16:20
+ */
+@Component
+public class KlRuleFacade {
+    @Autowired
+    CdssCoreClient cdssCoreClient;
+
+    public Page<KlRuleInfoDTO> getKlRuleInfoPage(KlRuleInfoVO klRuleInfoVO) {
+        RespDTO<Page<KlRuleInfoDTO>> klRuleInfoPages = cdssCoreClient.getKlRuleInfoPages(klRuleInfoVO);
+        RespDTOUtil.respNGDeal(klRuleInfoPages, "获取分页获取规则维护列表数据失败");
+        return klRuleInfoPages.data;
+    }
+
+    public KlRuleByIdParDTO getByIdRuleInfos(KlRuleByIdVO klRuleByIdVO) {
+        RespDTO<KlRuleByIdParDTO> byIdRuleInfoAll = cdssCoreClient.getByIdRuleInfoAll(klRuleByIdVO);
+        RespDTOUtil.respNGDeal(byIdRuleInfoAll, "获取规则详情数据失败");
+        return byIdRuleInfoAll.data;
+    }
+
+    public Boolean saveRuleInfos(KlRuleInfoSaveVO klRuleInfoSaveVO) {
+        RespDTO<Boolean> booleanRespDTO = cdssCoreClient.saveRuleInfoAll(klRuleInfoSaveVO);
+        RespDTOUtil.respNGDeal(booleanRespDTO, "保存规则详情数据失败");
+        return booleanRespDTO.data;
+    }
+
+    public Boolean clearRuleInfos(KlRuleInfoClearVO klRuleInfoClearVO) {
+        RespDTO<Boolean> booleanRespDTO = cdssCoreClient.clearRuleInfoAll(klRuleInfoClearVO);
+        RespDTOUtil.respNGDeal(booleanRespDTO, "刪除规则详情数据失败");
+        return booleanRespDTO.data;
+    }
+
+    public Boolean startOrDisableRule(KlRuleSatartOrdisaVO klRuleSatartOrdisaVO) {
+        RespDTO<Boolean> booleanRespDTO = cdssCoreClient.disableRuleInfos(klRuleSatartOrdisaVO);
+        RespDTOUtil.respNGDeal(booleanRespDTO, "停用规则失败");
+        return booleanRespDTO.data;
+    }
+
+    public Boolean startRuleInfos(KlRuleSatartOrdisaVO klRuleSatartOrdisaVO) {
+        RespDTO<Boolean> booleanRespDTO = cdssCoreClient.startRuleInfos(klRuleSatartOrdisaVO);
+        RespDTOUtil.respNGDeal(booleanRespDTO, "启用规则失败");
+        return booleanRespDTO.data;
+    }
+}

+ 28 - 0
src/main/java/com/diagbot/facade/KlRulePlanFacade.java

@@ -0,0 +1,28 @@
+package com.diagbot.facade;
+
+import com.diagbot.client.CdssCoreClient;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.KlRuleMenuWrapper;
+import com.diagbot.util.RespDTOUtil;
+import com.diagbot.vo.KlRuleMenuVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2021-03-09 15:30
+ */
+@Component
+public class KlRulePlanFacade {
+    @Autowired
+    CdssCoreClient cdssCoreClient;
+
+    public List<KlRuleMenuWrapper> getMenu(KlRuleMenuVO klRuleMenuVO) {
+        RespDTO<List<KlRuleMenuWrapper>> menus = cdssCoreClient.getMenus(klRuleMenuVO);
+        RespDTOUtil.respNGDeal(menus, "获取规则下拉菜单信息数据失败");
+        return menus.data;
+    }
+}

+ 18 - 0
src/main/java/com/diagbot/vo/KlRuleByIdVO.java

@@ -0,0 +1,18 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2021-03-08 11:11
+ */
+@Setter
+@Getter
+public class KlRuleByIdVO {
+    @NotNull(message = "请输id")
+    private Long id;
+}

+ 18 - 0
src/main/java/com/diagbot/vo/KlRuleInfoClearVO.java

@@ -0,0 +1,18 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2021-03-08 13:46
+ */
+@Setter
+@Getter
+public class KlRuleInfoClearVO {
+    @NotNull(message = "请输id")
+    private Long id;
+}

+ 30 - 0
src/main/java/com/diagbot/vo/KlRuleInfoSaveSubVO.java

@@ -0,0 +1,30 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2021-03-08 13:38
+ */
+@Setter
+@Getter
+public class KlRuleInfoSaveSubVO {
+    private String subDescription;//基础规则名称
+    private Long subConceptId;//医学标准术语id
+/*    private String subLibName;//医学标准术语
+    private String subLenName;//基础规则术语类型
+    private String subLenCode;//基础规则术语编码*/
+    private Integer subType;//基础规则类型(1:开单外等于术语本身;2:开单外存在比较;3:开单外不等于术语本身;4:过敏原;5:开单项;6:检查结果正则表达式)
+    private Integer groupType;
+    private String subMinOperator;//最小域比较符
+    private String subMinValue;//最小域值
+    private String subMinUnit;//最小域单位
+    private String subMaxOperator;//最大域比较符
+    private String subMaxValue;//最大域值
+    private String subMaxUnit;//最大域单位
+    private String subEqOperator;//等于域比较符
+    private String subEqValue;//等于域值
+    private String subEqUnit;//等于域单位
+}

+ 35 - 0
src/main/java/com/diagbot/vo/KlRuleInfoSaveVO.java

@@ -0,0 +1,35 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2021-03-08 13:37
+ */
+@Setter
+@Getter
+public class KlRuleInfoSaveVO {
+    private Long parId;
+    @NotBlank(message = "请输入规则名称")
+    private String parDescription;//规则名称
+    @NotNull(message = "请输入规则类型")
+    private Integer parRuleType;//规则类型(1:开单合理性;2:高危;3:危急值;4:其他值提醒;5:其他值提醒输血;6:正常项目重复开立)
+    @NotNull(message = "请输入概念id")
+    private Long parConceptId;//提示概念id
+    @NotNull(message = "请输入概念id")
+    private Integer parHasSub;//是否有子条件(0:无,1:有)
+    private String parMsg;//附加信息
+    @ApiModelProperty(hidden = true)
+    private Integer parStatus = 1;//启用状态(0:禁用,1:启用)
+    /*    private String parlibName;
+        private String parLenName;
+        private String parLenCode;*/
+    private List<KlRuleInfoSaveSubVO> klRuleInfoSaveSub;
+}

+ 30 - 0
src/main/java/com/diagbot/vo/KlRuleInfoVO.java

@@ -0,0 +1,30 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2021-03-05 13:44
+ */
+@Setter
+@Getter
+public class KlRuleInfoVO extends Page {
+    /**
+     * 描述
+     */
+    private String parDescription;
+    /**
+     * 规则类型(1:开单合理性;2:高危;3:危急值;4:其他值提醒;5:其他值提醒输血;6:正常项目重复开立)
+     */
+    private Integer parRuleType;
+
+    private String parConceptName;
+    /**
+     * 启用状态(0:禁用,1:启用)
+     */
+    private Integer parStatus;
+
+}

+ 18 - 0
src/main/java/com/diagbot/vo/KlRuleMenuVO.java

@@ -0,0 +1,18 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2021-03-09 13:35
+ */
+@Setter
+@Getter
+public class KlRuleMenuVO {
+    /**
+     * 规则类型(1:开单合理性;2:高危;3:危急值;4:其他值提醒;5:其他值提醒输血;6:正常项目重复开立)
+     */
+    private Integer ruleType;
+}

+ 18 - 0
src/main/java/com/diagbot/vo/KlRuleSatartOrdisaVO.java

@@ -0,0 +1,18 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2021-03-08 16:32
+ */
+@Setter
+@Getter
+public class KlRuleSatartOrdisaVO {
+    @NotNull(message = "请输id")
+    private Long id;
+}

+ 34 - 0
src/main/java/com/diagbot/web/KlDictionaryConller.java

@@ -0,0 +1,34 @@
+package com.diagbot.web;
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.DictionaryInfoDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.KlDictionaryInfoFacade;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2021-03-17 13:14
+ */
+@RestController
+@RequestMapping("/kl/dictionary")
+@Api(value = "字典表信息相关API", tags = { "字典表信息相关API" })
+public class KlDictionaryConller {
+    @Autowired
+    KlDictionaryInfoFacade dictionaryFacade;
+
+    @ApiOperation(value = "根据分组获取字典表信息详情[by:wangfeng]")
+    @PostMapping("/getDictionarys")
+    @SysLogger("getDictionarys")
+    public RespDTO<List<DictionaryInfoDTO>> getDictionaryInfoAll() {
+        return RespDTO.onSuc(dictionaryFacade.getListByGroupType());
+    }
+}

+ 87 - 0
src/main/java/com/diagbot/web/KlRuleController.java

@@ -0,0 +1,87 @@
+package com.diagbot.web;
+
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.KlRuleByIdParDTO;
+import com.diagbot.dto.KlRuleInfoDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.KlRuleFacade;
+import com.diagbot.vo.KlRuleByIdVO;
+import com.diagbot.vo.KlRuleInfoClearVO;
+import com.diagbot.vo.KlRuleInfoSaveVO;
+import com.diagbot.vo.KlRuleInfoVO;
+import com.diagbot.vo.KlRuleSatartOrdisaVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.Valid;
+
+/**
+ * <p>
+ * 规则信息表 前端控制器
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2021-03-05
+ */
+@RestController
+@RequestMapping("/klRule")
+@Api(value = "规则维护相关API", tags = { "规则维护相关API" })
+@SuppressWarnings("unchecked")
+public class KlRuleController {
+
+    @Autowired
+    KlRuleFacade klRuleFacade;
+
+    @ApiOperation(value = "分页获取规则维护列表[by:wangfeng]")
+    @PostMapping("/getKlRuleInfoPage")
+    @SysLogger("getKlRuleInfoPage")
+    public RespDTO<Page<KlRuleInfoDTO>> getKlRuleInfoPages(@RequestBody KlRuleInfoVO klRuleInfoVO) {
+        return RespDTO.onSuc(klRuleFacade.getKlRuleInfoPage(klRuleInfoVO));
+    }
+
+    @ApiOperation(value = "根据规则Id获取规则详情[by:wangfeng]")
+    @PostMapping("/getByIdRuleInfo")
+    @SysLogger("getByIdRuleInfo")
+    public RespDTO<KlRuleByIdParDTO> getByIdRuleInfoAll(@RequestBody @Valid KlRuleByIdVO klRuleByIdVO) {
+        return RespDTO.onSuc(klRuleFacade.getByIdRuleInfos(klRuleByIdVO));
+    }
+
+    @ApiOperation(value = "保存规则详情[by:wangfeng]")
+    @PostMapping("/saveRuleInfo")
+    @SysLogger("saveRuleInfo")
+    @Transactional
+    public RespDTO<Boolean> saveRuleInfoAll(@RequestBody @Valid KlRuleInfoSaveVO klRuleInfoSaveVO) {
+        return RespDTO.onSuc(klRuleFacade.saveRuleInfos(klRuleInfoSaveVO));
+    }
+
+    @ApiOperation(value = "刪除规则详情[by:wangfeng]")
+    @PostMapping("/clearRuleInfo")
+    @SysLogger("clearRuleInfo")
+    @Transactional
+    public RespDTO<Boolean> clearRuleInfoAll(@RequestBody @Valid KlRuleInfoClearVO klRuleInfoClearVO) {
+        return RespDTO.onSuc(klRuleFacade.clearRuleInfos(klRuleInfoClearVO));
+    }
+
+    @ApiOperation(value = "停用规则[by:wangfeng]")
+    @PostMapping("/disableRuleInfo")
+    @SysLogger("disableRuleInfo")
+    public RespDTO<Boolean> disableRuleInfos(@RequestBody @Valid KlRuleSatartOrdisaVO klRuleSatartOrdisaVO) {
+        return RespDTO.onSuc(klRuleFacade.startOrDisableRule(klRuleSatartOrdisaVO));
+    }
+
+    @ApiOperation(value = "启用规则[by:wangfeng]")
+    @PostMapping("/startRuleInfo")
+    @SysLogger("startRuleInfo")
+    public RespDTO<Boolean> startRuleInfos(@RequestBody @Valid KlRuleSatartOrdisaVO klRuleSatartOrdisaVO) {
+        return RespDTO.onSuc(klRuleFacade.startRuleInfos(klRuleSatartOrdisaVO));
+    }
+
+}

+ 43 - 0
src/main/java/com/diagbot/web/KlRulePlanController.java

@@ -0,0 +1,43 @@
+package com.diagbot.web;
+
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.KlRuleMenuWrapper;
+import com.diagbot.facade.KlRulePlanFacade;
+import com.diagbot.vo.KlRuleMenuVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2021-03-09
+ */
+@RestController
+@Api(value = "规则下拉菜单API", tags = { "规则下拉菜单API" })
+@RequestMapping("/klRulePlan")
+@SuppressWarnings("unchecked")
+public class KlRulePlanController {
+
+    @Autowired
+    KlRulePlanFacade klRulePlanFacade;
+
+    @ApiOperation(value = "获取规则下拉菜单信息[by:wangfeng]",
+            notes = "")
+    @PostMapping("/getMenu")
+    @SysLogger("getMenu")
+    public RespDTO<List<KlRuleMenuWrapper>> getMenus(@RequestBody KlRuleMenuVO klRuleMenuVO) {
+        return RespDTO.onSuc( klRulePlanFacade.getMenu(klRuleMenuVO));
+    }
+}