Browse Source

浙江医院质控整改初始化

gaodm 5 years ago
parent
commit
a0954ca359
20 changed files with 881 additions and 0 deletions
  1. 15 0
      knowledgeman-service/src/main/java/com/diagbot/dto/RuleAppDTO.java
  2. 15 0
      knowledgeman-service/src/main/java/com/diagbot/dto/RulePubDTO.java
  3. 155 0
      knowledgeman-service/src/main/java/com/diagbot/entity/RuleApp.java
  4. 183 0
      knowledgeman-service/src/main/java/com/diagbot/entity/RulePub.java
  5. 35 0
      knowledgeman-service/src/main/java/com/diagbot/facade/RuleAppFacade.java
  6. 37 0
      knowledgeman-service/src/main/java/com/diagbot/facade/RulePubFacade.java
  7. 16 0
      knowledgeman-service/src/main/java/com/diagbot/mapper/RuleAppMapper.java
  8. 16 0
      knowledgeman-service/src/main/java/com/diagbot/mapper/RulePubMapper.java
  9. 16 0
      knowledgeman-service/src/main/java/com/diagbot/service/RuleAppService.java
  10. 16 0
      knowledgeman-service/src/main/java/com/diagbot/service/RulePubService.java
  11. 20 0
      knowledgeman-service/src/main/java/com/diagbot/service/impl/RuleAppServiceImpl.java
  12. 20 0
      knowledgeman-service/src/main/java/com/diagbot/service/impl/RulePubServiceImpl.java
  13. 18 0
      knowledgeman-service/src/main/java/com/diagbot/vo/RuleAppIdVO.java
  14. 60 0
      knowledgeman-service/src/main/java/com/diagbot/vo/RuleAppSaveVO.java
  15. 19 0
      knowledgeman-service/src/main/java/com/diagbot/vo/RulePubIdVO.java
  16. 53 0
      knowledgeman-service/src/main/java/com/diagbot/vo/RulePubSaveVO.java
  17. 69 0
      knowledgeman-service/src/main/java/com/diagbot/web/RuleAppController.java
  18. 77 0
      knowledgeman-service/src/main/java/com/diagbot/web/RulePubController.java
  19. 18 0
      knowledgeman-service/src/main/resources/mapper/RuleAppMapper.xml
  20. 23 0
      knowledgeman-service/src/main/resources/mapper/RulePubMapper.xml

+ 15 - 0
knowledgeman-service/src/main/java/com/diagbot/dto/RuleAppDTO.java

@@ -0,0 +1,15 @@
+package com.diagbot.dto;
+
+import com.diagbot.entity.RuleApp;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/1/30 15:46
+ */
+@Getter
+@Setter
+public class RuleAppDTO extends RuleApp {
+}

+ 15 - 0
knowledgeman-service/src/main/java/com/diagbot/dto/RulePubDTO.java

@@ -0,0 +1,15 @@
+package com.diagbot.dto;
+
+import com.diagbot.entity.RulePub;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/1/30 16:43
+ */
+@Getter
+@Setter
+public class RulePubDTO extends RulePub {
+}

+ 155 - 0
knowledgeman-service/src/main/java/com/diagbot/entity/RuleApp.java

@@ -0,0 +1,155 @@
+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 zhoutg
+ * @since 2020-01-30
+ */
+@TableName("kl_rule_app")
+public class RuleApp implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 索引号
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 指标名称
+     */
+    private String ruleId;
+
+    /**
+     * 1:危急值提醒  2:开单合理性  3:管理评估  4:不良反应  5:药物推荐  6:病情提示
+     */
+    private String typeId;
+
+    /**
+     * 套餐名称是否必须参与匹配
+     */
+    private String remind;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer 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 getRuleId() {
+        return ruleId;
+    }
+
+    public void setRuleId(String ruleId) {
+        this.ruleId = ruleId;
+    }
+
+    public String getTypeId() {
+        return typeId;
+    }
+
+    public void setTypeId(String typeId) {
+        this.typeId = typeId;
+    }
+
+    public String getRemind() {
+        return remind;
+    }
+
+    public void setRemind(String remind) {
+        this.remind = remind;
+    }
+
+    @Override
+    public String toString() {
+        return "RuleApp{" +
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", ruleId=" + ruleId +
+                ", typeId=" + typeId +
+                ", remind=" + remind +
+                "}";
+    }
+}

+ 183 - 0
knowledgeman-service/src/main/java/com/diagbot/entity/RulePub.java

@@ -0,0 +1,183 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-01-30
+ */
+@TableName("kl_rule_pub")
+public class RulePub implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 索引号
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    private String pubName;
+
+    private String ruleType;
+
+    /**
+     * 比较符
+     */
+    private String minOperator;
+
+    /**
+     * 索引值
+     */
+    private String minValue;
+
+    private String minUnit;
+
+    private String maxOperator;
+
+    private String maxValue;
+
+    /**
+     * 数值单位
+     */
+    private String maxUnit;
+
+    private String eqOperator;
+
+    private String eqValue;
+
+    private String eqUnit;
+
+    /**
+     * 推送的量表名称
+     */
+    private String remind;
+
+    private String suffixInfo;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+    public String getPubName() {
+        return pubName;
+    }
+
+    public void setPubName(String pubName) {
+        this.pubName = pubName;
+    }
+    public String getRuleType() {
+        return ruleType;
+    }
+
+    public void setRuleType(String ruleType) {
+        this.ruleType = ruleType;
+    }
+    public String getMinOperator() {
+        return minOperator;
+    }
+
+    public void setMinOperator(String minOperator) {
+        this.minOperator = minOperator;
+    }
+    public String getMinValue() {
+        return minValue;
+    }
+
+    public void setMinValue(String minValue) {
+        this.minValue = minValue;
+    }
+    public String getMinUnit() {
+        return minUnit;
+    }
+
+    public void setMinUnit(String minUnit) {
+        this.minUnit = minUnit;
+    }
+    public String getMaxOperator() {
+        return maxOperator;
+    }
+
+    public void setMaxOperator(String maxOperator) {
+        this.maxOperator = maxOperator;
+    }
+    public String getMaxValue() {
+        return maxValue;
+    }
+
+    public void setMaxValue(String maxValue) {
+        this.maxValue = maxValue;
+    }
+    public String getMaxUnit() {
+        return maxUnit;
+    }
+
+    public void setMaxUnit(String maxUnit) {
+        this.maxUnit = maxUnit;
+    }
+    public String getEqOperator() {
+        return eqOperator;
+    }
+
+    public void setEqOperator(String eqOperator) {
+        this.eqOperator = eqOperator;
+    }
+    public String getEqValue() {
+        return eqValue;
+    }
+
+    public void setEqValue(String eqValue) {
+        this.eqValue = eqValue;
+    }
+    public String getEqUnit() {
+        return eqUnit;
+    }
+
+    public void setEqUnit(String eqUnit) {
+        this.eqUnit = eqUnit;
+    }
+    public String getRemind() {
+        return remind;
+    }
+
+    public void setRemind(String remind) {
+        this.remind = remind;
+    }
+    public String getSuffixInfo() {
+        return suffixInfo;
+    }
+
+    public void setSuffixInfo(String suffixInfo) {
+        this.suffixInfo = suffixInfo;
+    }
+
+    @Override
+    public String toString() {
+        return "RulePub{" +
+            "id=" + id +
+            ", pubName=" + pubName +
+            ", ruleType=" + ruleType +
+            ", minOperator=" + minOperator +
+            ", minValue=" + minValue +
+            ", minUnit=" + minUnit +
+            ", maxOperator=" + maxOperator +
+            ", maxValue=" + maxValue +
+            ", maxUnit=" + maxUnit +
+            ", eqOperator=" + eqOperator +
+            ", eqValue=" + eqValue +
+            ", eqUnit=" + eqUnit +
+            ", remind=" + remind +
+            ", suffixInfo=" + suffixInfo +
+        "}";
+    }
+}

+ 35 - 0
knowledgeman-service/src/main/java/com/diagbot/facade/RuleAppFacade.java

@@ -0,0 +1,35 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.RuleAppDTO;
+import com.diagbot.service.impl.RuleAppServiceImpl;
+import com.diagbot.vo.RuleAppIdVO;
+import com.diagbot.vo.RuleAppSaveVO;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import javax.validation.Valid;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/1/30 15:43
+ */
+@Component
+public class RuleAppFacade extends RuleAppServiceImpl {
+    public IPage<RuleAppDTO> pageRuleApp() {
+        return null;
+    }
+
+    public Boolean removeRuleApp(RuleAppIdVO ruleAppIdVO) {
+        return null;
+    }
+
+    public RuleAppDTO geteRuleApp(RuleAppIdVO ruleAppIdVO) {
+        return null;
+    }
+
+    public Boolean saveRuleApp(@Valid @RequestBody RuleAppSaveVO ruleAppSaveVO) {
+        return null;
+    }
+}

+ 37 - 0
knowledgeman-service/src/main/java/com/diagbot/facade/RulePubFacade.java

@@ -0,0 +1,37 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.RulePubDTO;
+import com.diagbot.service.impl.RulePubServiceImpl;
+import com.diagbot.vo.RulePubIdVO;
+import com.diagbot.vo.RulePubSaveVO;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import javax.validation.Valid;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/1/30 15:44
+ */
+@Component
+public class RulePubFacade extends RulePubServiceImpl {
+
+    public IPage<RulePubDTO> pageRulePub() {
+        return null;
+    }
+
+    public Boolean removeRulePub(RulePubIdVO rulePubIdVO) {
+        return null;
+    }
+
+    public RulePubDTO geteRulePub(RulePubIdVO rulePubIdVO) {
+        return null;
+    }
+
+    public Boolean saveRulePub(@Valid @RequestBody RulePubSaveVO rulePubSaveVO) {
+        return null;
+    }
+}

+ 16 - 0
knowledgeman-service/src/main/java/com/diagbot/mapper/RuleAppMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.RuleApp;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-01-30
+ */
+public interface RuleAppMapper extends BaseMapper<RuleApp> {
+
+}

+ 16 - 0
knowledgeman-service/src/main/java/com/diagbot/mapper/RulePubMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.RulePub;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-01-30
+ */
+public interface RulePubMapper extends BaseMapper<RulePub> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.RuleApp;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-01-30
+ */
+public interface RuleAppService extends IService<RuleApp> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.RulePub;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-01-30
+ */
+public interface RulePubService extends IService<RulePub> {
+
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.RuleApp;
+import com.diagbot.mapper.RuleAppMapper;
+import com.diagbot.service.RuleAppService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-01-30
+ */
+@Service
+public class RuleAppServiceImpl extends ServiceImpl<RuleAppMapper, RuleApp> implements RuleAppService {
+
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.RulePub;
+import com.diagbot.mapper.RulePubMapper;
+import com.diagbot.service.RulePubService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-01-30
+ */
+@Service
+public class RulePubServiceImpl extends ServiceImpl<RulePubMapper, RulePub> implements RulePubService {
+
+}

+ 18 - 0
knowledgeman-service/src/main/java/com/diagbot/vo/RuleAppIdVO.java

@@ -0,0 +1,18 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/1/30 17:04
+ */
+@Getter
+@Setter
+public class RuleAppIdVO {
+    @NotNull(message="规则应用id必传")
+    private Integer id;
+}

+ 60 - 0
knowledgeman-service/src/main/java/com/diagbot/vo/RuleAppSaveVO.java

@@ -0,0 +1,60 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/1/30 17:04
+ */
+@Getter
+@Setter
+public class RuleAppSaveVO {
+    /**
+     * 索引号
+     */
+    private Integer id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 指标名称
+     */
+    private String ruleId;
+
+    /**
+     * 1:危急值提醒  2:开单合理性  3:管理评估  4:不良反应  5:药物推荐  6:病情提示
+     */
+    private String typeId;
+
+    /**
+     * 套餐名称是否必须参与匹配
+     */
+    private String remind;
+}

+ 19 - 0
knowledgeman-service/src/main/java/com/diagbot/vo/RulePubIdVO.java

@@ -0,0 +1,19 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/1/30 17:04
+ */
+@Getter
+@Setter
+public class RulePubIdVO {
+
+    @NotNull(message="规则维护id必传")
+    private Integer id;
+}

+ 53 - 0
knowledgeman-service/src/main/java/com/diagbot/vo/RulePubSaveVO.java

@@ -0,0 +1,53 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/1/30 17:04
+ */
+@Getter
+@Setter
+public class RulePubSaveVO {
+    private Integer id;
+
+    private String pubName;
+
+    private String ruleType;
+
+    /**
+     * 比较符
+     */
+    private String minOperator;
+
+    /**
+     * 索引值
+     */
+    private String minValue;
+
+    private String minUnit;
+
+    private String maxOperator;
+
+    private String maxValue;
+
+    /**
+     * 数值单位
+     */
+    private String maxUnit;
+
+    private String eqOperator;
+
+    private String eqValue;
+
+    private String eqUnit;
+
+    /**
+     * 推送的量表名称
+     */
+    private String remind;
+
+    private String suffixInfo;
+}

+ 69 - 0
knowledgeman-service/src/main/java/com/diagbot/web/RuleAppController.java

@@ -0,0 +1,69 @@
+package com.diagbot.web;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.RuleAppDTO;
+import com.diagbot.facade.RuleAppFacade;
+import com.diagbot.vo.RuleAppIdVO;
+import com.diagbot.vo.RuleAppSaveVO;
+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.stereotype.Controller;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.Valid;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-01-30
+ */
+@RestController
+@Api(value = "规则应用ruleApp API", tags = { "规则应用ruleApp API" })
+@SuppressWarnings("unchecked")
+@RequestMapping("/ruleApp")
+public class RuleAppController {
+    @Autowired
+    private RuleAppFacade ruleAppFacade;
+
+    @ApiOperation(value = "规则应用ruleApp列表[by:gaodm]")
+    @PostMapping("/pageRuleApp")
+    @SysLogger("pageRuleApp")
+    public RespDTO<IPage<RuleAppDTO>> pageRuleApp() {
+        return RespDTO.onSuc(ruleAppFacade.pageRuleApp());
+    }
+
+    @ApiOperation(value = "删除规则应用ruleApp[by:rengb]")
+    @PostMapping("/removeRuleApp")
+    @SysLogger("removeRuleApp")
+    @Transactional
+    public RespDTO<Boolean> removeRuleApp(@Valid @RequestBody RuleAppIdVO ruleAppIdVO) {
+        return RespDTO.onSuc(ruleAppFacade.removeRuleApp(ruleAppIdVO));
+    }
+
+    @ApiOperation(value = "获取规则应用ruleApp详情[by:gaodm]")
+    @PostMapping("/getRuleApp")
+    @SysLogger("geteRuleApp")
+    public RespDTO<RuleAppDTO> geteRuleApp(@Valid @RequestBody RuleAppIdVO ruleAppIdVO) {
+        return RespDTO.onSuc(ruleAppFacade.geteRuleApp(ruleAppIdVO));
+    }
+
+    @ApiOperation(value = "规则应用ruleApp添加或者编辑[by:gaodm]")
+    @PostMapping("/saveRuleApp")
+    @SysLogger("saveRuleApp")
+    @Transactional
+    public RespDTO<Boolean> saveRuleApp(@Valid @RequestBody RuleAppSaveVO ruleAppSaveVO) {
+        return RespDTO.onSuc(ruleAppFacade.saveRuleApp(ruleAppSaveVO));
+    }
+}

+ 77 - 0
knowledgeman-service/src/main/java/com/diagbot/web/RulePubController.java

@@ -0,0 +1,77 @@
+package com.diagbot.web;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.GetRelationInfoDetailDTO;
+import com.diagbot.dto.GetRelationInfoListDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.RulePubDTO;
+import com.diagbot.facade.RulePubFacade;
+import com.diagbot.vo.AddRelationInfoVO;
+import com.diagbot.vo.GetRelationInfoDetailVO;
+import com.diagbot.vo.GetRelationInfoListVO;
+import com.diagbot.vo.RemoveRelationInfoVO;
+import com.diagbot.vo.RulePubIdVO;
+import com.diagbot.vo.RulePubSaveVO;
+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.stereotype.Controller;
+import org.springframework.web.bind.annotation.RestController;
+import springfox.documentation.annotations.ApiIgnore;
+
+import javax.validation.Valid;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-01-30
+ */
+@RestController
+@Api(value = "规则维护rulePub API", tags = { "规则维护rulePub API" })
+@SuppressWarnings("unchecked")
+@RequestMapping("/gaodm")
+public class RulePubController {
+    @Autowired
+    private RulePubFacade rulePubFacade;
+
+    @ApiOperation(value = "规则维护rulePub列表[by:gaodm]")
+    @PostMapping("/pageRulePub")
+    @SysLogger("pageRulePub")
+    public RespDTO<IPage<RulePubDTO>> pageRulePub() {
+        return RespDTO.onSuc(rulePubFacade.pageRulePub());
+    }
+
+    @ApiOperation(value = "删除规则维护rulePub[by:rengb]")
+    @PostMapping("/removeRulePub")
+    @SysLogger("removeRulePub")
+    @Transactional
+    public RespDTO<Boolean> removeRulePub(@Valid @RequestBody RulePubIdVO rulePubIdVO) {
+        return RespDTO.onSuc(rulePubFacade.removeRulePub(rulePubIdVO));
+    }
+
+    @ApiOperation(value = "获取规则维护rulePub详情[by:gaodm]")
+    @PostMapping("/getRulePub")
+    @SysLogger("geteRulePub")
+    public RespDTO<RulePubDTO> geteRulePub(@Valid @RequestBody RulePubIdVO rulePubIdVO) {
+        return RespDTO.onSuc(rulePubFacade.geteRulePub(rulePubIdVO));
+    }
+
+    @ApiOperation(value = "规则维护rulePub添加或者编辑[by:gaodm]")
+    @PostMapping("/saveRulePub")
+    @SysLogger("saveRulePub")
+    @Transactional
+    public RespDTO<Boolean> saveRulePub(@Valid @RequestBody RulePubSaveVO rulePubSaveVO) {
+        return RespDTO.onSuc(rulePubFacade.saveRulePub(rulePubSaveVO));
+    }
+
+}

+ 18 - 0
knowledgeman-service/src/main/resources/mapper/RuleAppMapper.xml

@@ -0,0 +1,18 @@
+<?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.RuleAppMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.RuleApp">
+        <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="rule_id" property="ruleId" />
+        <result column="type_id" property="typeId" />
+        <result column="remind" property="remind" />
+    </resultMap>
+
+</mapper>

+ 23 - 0
knowledgeman-service/src/main/resources/mapper/RulePubMapper.xml

@@ -0,0 +1,23 @@
+<?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.RulePubMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.RulePub">
+        <id column="id" property="id" />
+        <result column="pub_name" property="pubName" />
+        <result column="rule_type" property="ruleType" />
+        <result column="min_operator" property="minOperator" />
+        <result column="min_value" property="minValue" />
+        <result column="min_unit" property="minUnit" />
+        <result column="max_operator" property="maxOperator" />
+        <result column="max_value" property="maxValue" />
+        <result column="max_unit" property="maxUnit" />
+        <result column="eq_operator" property="eqOperator" />
+        <result column="eq_value" property="eqValue" />
+        <result column="eq_unit" property="eqUnit" />
+        <result column="remind" property="remind" />
+        <result column="suffix_info" property="suffixInfo" />
+    </resultMap>
+
+</mapper>