瀏覽代碼

Merge branch 'develop' into dev/mrman20200117_init

gaodm 5 年之前
父節點
當前提交
03573c9a09
共有 28 個文件被更改,包括 2257 次插入2 次删除
  1. 1055 0
      docs/029.20200130浙江医院质控整改/init_user.sql
  2. 69 0
      knowledgeman-service/src/main/java/com/diagbot/dto/RuleAppDTO.java
  3. 56 0
      knowledgeman-service/src/main/java/com/diagbot/dto/RulePubDTO.java
  4. 155 0
      knowledgeman-service/src/main/java/com/diagbot/entity/RuleApp.java
  5. 183 0
      knowledgeman-service/src/main/java/com/diagbot/entity/RulePub.java
  6. 55 0
      knowledgeman-service/src/main/java/com/diagbot/enums/RuleAppTypeEnum.java
  7. 109 0
      knowledgeman-service/src/main/java/com/diagbot/facade/RuleAppFacade.java
  8. 71 0
      knowledgeman-service/src/main/java/com/diagbot/facade/RulePubFacade.java
  9. 16 0
      knowledgeman-service/src/main/java/com/diagbot/mapper/RuleAppMapper.java
  10. 16 0
      knowledgeman-service/src/main/java/com/diagbot/mapper/RulePubMapper.java
  11. 16 0
      knowledgeman-service/src/main/java/com/diagbot/service/RuleAppService.java
  12. 16 0
      knowledgeman-service/src/main/java/com/diagbot/service/RulePubService.java
  13. 4 0
      knowledgeman-service/src/main/java/com/diagbot/service/impl/EnumsDataServiceImpl.java
  14. 20 0
      knowledgeman-service/src/main/java/com/diagbot/service/impl/RuleAppServiceImpl.java
  15. 20 0
      knowledgeman-service/src/main/java/com/diagbot/service/impl/RulePubServiceImpl.java
  16. 2 0
      knowledgeman-service/src/main/java/com/diagbot/vo/ConceptIndexVO.java
  17. 3 0
      knowledgeman-service/src/main/java/com/diagbot/vo/GetConceptDetailListVO.java
  18. 18 0
      knowledgeman-service/src/main/java/com/diagbot/vo/RuleAppIdVO.java
  19. 28 0
      knowledgeman-service/src/main/java/com/diagbot/vo/RuleAppPageVO.java
  20. 60 0
      knowledgeman-service/src/main/java/com/diagbot/vo/RuleAppSaveVO.java
  21. 19 0
      knowledgeman-service/src/main/java/com/diagbot/vo/RulePubIdVO.java
  22. 21 0
      knowledgeman-service/src/main/java/com/diagbot/vo/RulePubPageVO.java
  23. 53 0
      knowledgeman-service/src/main/java/com/diagbot/vo/RulePubSaveVO.java
  24. 70 0
      knowledgeman-service/src/main/java/com/diagbot/web/RuleAppController.java
  25. 69 0
      knowledgeman-service/src/main/java/com/diagbot/web/RulePubController.java
  26. 12 2
      knowledgeman-service/src/main/resources/mapper/ConceptDetailMapper.xml
  27. 18 0
      knowledgeman-service/src/main/resources/mapper/RuleAppMapper.xml
  28. 23 0
      knowledgeman-service/src/main/resources/mapper/RulePubMapper.xml

文件差異過大導致無法顯示
+ 1055 - 0
docs/029.20200130浙江医院质控整改/init_user.sql


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

@@ -0,0 +1,69 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/1/30 15:46
+ */
+@Getter
+@Setter
+public class RuleAppDTO {
+    /**
+     * 索引号
+     */
+    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 operName;
+
+    /**
+     * 指标名称
+     */
+    private String ruleId;
+
+    /**
+     * 1:危急值提醒  2:开单合理性  3:管理评估  4:不良反应  5:药物推荐  6:病情提示
+     */
+    private String typeId;
+
+    /**
+     * 套餐名称是否必须参与匹配
+     */
+    private String remind;
+    /**
+     * 1:危急值提醒  2:开单合理性  3:管理评估  4:不良反应  5:药物推荐  6:病情提示
+     */
+    private String typeIdName;
+}

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

@@ -0,0 +1,56 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/1/30 16:43
+ */
+@Getter
+@Setter
+public class RulePubDTO {
+    /**
+     * 索引号
+     */
+    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;
+}

+ 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 +
+        "}";
+    }
+}

+ 55 - 0
knowledgeman-service/src/main/java/com/diagbot/enums/RuleAppTypeEnum.java

@@ -0,0 +1,55 @@
+package com.diagbot.enums;
+
+import com.diagbot.core.KeyedNamed;
+import lombok.Setter;
+
+/**
+ * @author zhoutg
+ * @Description:
+ * @date 2018年11月21日 下午2:31:42
+ */
+public enum RuleAppTypeEnum implements KeyedNamed {
+    WJZTX(1, "危急值提醒"),
+    KDHLX(2, "开单合理性"),
+    GLPG(3, "管理评估"),
+    BLFY(4, "不良反应"),
+    YWTJ(5, "药物推荐"),
+    BQTS(6, "病情提示");
+
+
+    @Setter
+    private int key;
+
+    @Setter
+    private String name;
+
+    RuleAppTypeEnum(int key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static RuleAppTypeEnum getEnum(int key) {
+        for (RuleAppTypeEnum item : RuleAppTypeEnum.values()) {
+            if (item.key == key) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(int key) {
+        RuleAppTypeEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+
+    @Override
+    public int getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}
+

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

@@ -0,0 +1,109 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.diagbot.client.UserServiceClient;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.RuleAppDTO;
+import com.diagbot.entity.RuleApp;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.enums.RuleAppTypeEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.service.impl.RuleAppServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.IntegerUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.RespDTOUtil;
+import com.diagbot.util.StringUtil;
+import com.diagbot.util.UserUtils;
+import com.diagbot.vo.RuleAppIdVO;
+import com.diagbot.vo.RuleAppPageVO;
+import com.diagbot.vo.RuleAppSaveVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import javax.validation.Valid;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/1/30 15:44
+ */
+@Component
+public class RuleAppFacade extends RuleAppServiceImpl {
+    @Autowired
+    private UserServiceClient userServiceClient;
+
+    public IPage<RuleAppDTO> pageRuleApp(RuleAppPageVO ruleAppPageVO) {
+        IPage<RuleAppDTO> res = new Page<>(ruleAppPageVO.getCurrent(), ruleAppPageVO.getSize());
+        QueryWrapper<RuleApp> ruleAppQueryWrapper = new QueryWrapper<>();
+        ruleAppQueryWrapper.like(StringUtil.isNotBlank(ruleAppPageVO.getRuleId()), "rule_id", ruleAppPageVO.getRuleId())
+                .like(StringUtil.isNotBlank(ruleAppPageVO.getRemind()), "remind", ruleAppPageVO.getRemind())
+                .eq(StringUtil.isNotBlank(ruleAppPageVO.getTypeId()), "type_id", ruleAppPageVO.getTypeId())
+                .orderByDesc("gmt_modified", "id");
+        IPage<RuleApp> page = this.page(ruleAppPageVO, ruleAppQueryWrapper);
+        BeanUtil.copyProperties(page, res);
+        if (ListUtil.isNotEmpty(page.getRecords())) {
+            List<String> userIds = page.getRecords().stream()
+                    .map(i -> i.getModifier()).distinct().collect(Collectors.toList());
+            RespDTO<Map<String, String>> respDTO = userServiceClient.getUserInfoByIds(userIds);
+            RespDTOUtil.respNGDealCover(respDTO, "获取用户信息失败");
+            List<RuleAppDTO> ruleAppDTOList = ListUtil.newArrayList();
+            for (RuleApp ruleApp : page.getRecords()) {
+                RuleAppDTO ruleAppDTO = new RuleAppDTO();
+                BeanUtil.copyProperties(ruleApp, ruleAppDTO);
+                ruleAppDTO.setOperName(respDTO.data.get(ruleApp.getModifier()));
+                ruleAppDTO.setTypeIdName(RuleAppTypeEnum.getName(Integer.valueOf(ruleApp.getTypeId())));
+                ruleAppDTOList.add(ruleAppDTO);
+            }
+            res.setRecords(ruleAppDTOList);
+        }
+        return res;
+    }
+
+    public Boolean removeRuleApp(RuleAppIdVO ruleAppIdVO) {
+        return this.removeById(ruleAppIdVO.getId());
+    }
+
+    public RuleAppDTO getRuleApp(RuleAppIdVO ruleAppIdVO) {
+        RuleApp ruleApp = this.getById(ruleAppIdVO.getId());
+        RuleAppDTO ruleAppDTO = new RuleAppDTO();
+        BeanUtil.copyProperties(ruleApp, ruleAppDTO);
+        return ruleAppDTO;
+    }
+
+    public Boolean saveRuleApp(@Valid @RequestBody RuleAppSaveVO ruleAppSaveVO) {
+        if (null == ruleAppSaveVO) {
+            throw new CommonException(CommonErrorCode.PARAM_IS_NULL);
+        }
+        RuleApp ruleApp = new RuleApp();
+        BeanUtil.copyProperties(ruleAppSaveVO, ruleApp);
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date date = DateUtil.now();
+        ruleApp.setModifier(userId);
+        ruleApp.setGmtModified(date);
+        //查询id 是否存在
+        if (!IntegerUtil.isNull(ruleAppSaveVO.getId())) {
+            QueryWrapper<RuleApp> ruleAppQueryWrapper = new QueryWrapper<>();
+            ruleAppQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("id", ruleAppSaveVO.getId());
+            if (this.count(ruleAppQueryWrapper) < 1) {
+                ruleApp.setCreator(userId);
+                ruleApp.setGmtCreate(date);
+            }
+        } else {
+            ruleApp.setCreator(userId);
+            ruleApp.setGmtCreate(date);
+        }
+
+        return this.saveOrUpdate(ruleApp);
+    }
+}

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

@@ -0,0 +1,71 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.diagbot.dto.RulePubDTO;
+import com.diagbot.entity.RulePub;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.service.impl.RulePubServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.IntegerUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.StringUtil;
+import com.diagbot.vo.RulePubIdVO;
+import com.diagbot.vo.RulePubPageVO;
+import com.diagbot.vo.RulePubSaveVO;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/1/30 15:44
+ */
+@Component
+public class RulePubFacade extends RulePubServiceImpl {
+
+    public IPage<RulePubDTO> pageRulePub(RulePubPageVO rulePubPageVO) {
+        IPage<RulePubDTO> res = new Page<>(rulePubPageVO.getCurrent(), rulePubPageVO.getSize());
+        QueryWrapper<RulePub> rulePubQueryWrapper = new QueryWrapper<>();
+        rulePubQueryWrapper.eq(!IntegerUtil.isNull(rulePubPageVO.getId()), "id", rulePubPageVO.getId())
+                .like(StringUtil.isNotBlank(rulePubPageVO.getPubName()), "pub_name", rulePubPageVO.getPubName())
+                .orderByDesc("id");
+        IPage<RulePub> page = this.page(rulePubPageVO, rulePubQueryWrapper);
+        BeanUtil.copyProperties(page, res);
+        if (ListUtil.isNotEmpty(page.getRecords())) {
+            List<RulePubDTO> rulePubDTOList = ListUtil.newArrayList();
+            for (RulePub rulePub : page.getRecords()) {
+                RulePubDTO rulePubDTO = new RulePubDTO();
+                BeanUtil.copyProperties(rulePub, rulePubDTO);
+                rulePubDTOList.add(rulePubDTO);
+            }
+            res.setRecords(rulePubDTOList);
+        }
+        return res;
+    }
+
+    public Boolean removeRulePub(RulePubIdVO rulePubIdVO) {
+        return this.removeById(rulePubIdVO.getId());
+    }
+
+    public RulePubDTO getRulePub(RulePubIdVO rulePubIdVO) {
+        RulePub rulePub = this.getById(rulePubIdVO.getId());
+        RulePubDTO rulePubDTO = new RulePubDTO();
+        BeanUtil.copyProperties(rulePub, rulePubDTO);
+        return rulePubDTO;
+    }
+
+    public Boolean saveRulePub(@Valid @RequestBody RulePubSaveVO rulePubSaveVO) {
+        if (null == rulePubSaveVO) {
+            throw new CommonException(CommonErrorCode.PARAM_IS_NULL);
+        }
+        RulePub rulePub = new RulePub();
+        BeanUtil.copyProperties(rulePubSaveVO, rulePub);
+        return this.saveOrUpdate(rulePub);
+    }
+}

+ 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> {
+
+}

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

@@ -10,6 +10,7 @@ import com.diagbot.enums.LexiconTypeEnum;
 import com.diagbot.enums.PositionTypeEnum;
 import com.diagbot.enums.PositionTypeEnum;
 import com.diagbot.enums.ProductTypeEnum;
 import com.diagbot.enums.ProductTypeEnum;
 import com.diagbot.enums.RelationModelTypeEnum;
 import com.diagbot.enums.RelationModelTypeEnum;
+import com.diagbot.enums.RuleAppTypeEnum;
 import com.diagbot.service.EnumsDataService;
 import com.diagbot.service.EnumsDataService;
 import com.diagbot.util.EnumEntriesBuilder;
 import com.diagbot.util.EnumEntriesBuilder;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
@@ -55,11 +56,14 @@ public class EnumsDataServiceImpl implements EnumsDataService {
                         LexiconTypeEnum.PACS_ITEMS, LexiconTypeEnum.DRUGS,
                         LexiconTypeEnum.PACS_ITEMS, LexiconTypeEnum.DRUGS,
                         LexiconTypeEnum.SIDE_EFFECTS, LexiconTypeEnum.SYMPTOM,
                         LexiconTypeEnum.SIDE_EFFECTS, LexiconTypeEnum.SYMPTOM,
                         LexiconTypeEnum.OPERATION)
                         LexiconTypeEnum.OPERATION)
+                .addEnums("conceptDetailLisPacsOnlyEnum",
+                        LexiconTypeEnum.LIS_TABLES, LexiconTypeEnum.PACS_ITEMS)
                 .addEnums("relationModelTypeEnum", RelationModelTypeEnum.values())
                 .addEnums("relationModelTypeEnum", RelationModelTypeEnum.values())
                 .addEnums("diagnoseFeatureTypeEnum", DiagnoseFeatureTypeEnum.values())
                 .addEnums("diagnoseFeatureTypeEnum", DiagnoseFeatureTypeEnum.values())
                 .addEnums("diagnoseFieldEnum", DiagnoseFieldEnum.values())
                 .addEnums("diagnoseFieldEnum", DiagnoseFieldEnum.values())
                 .addEnums("diagnoseTypeEnum", DiagnoseTypeEnum.values())
                 .addEnums("diagnoseTypeEnum", DiagnoseTypeEnum.values())
                 .addEnums("hasQuestionEnum", HasQuestionEnum.values())
                 .addEnums("hasQuestionEnum", HasQuestionEnum.values())
+                .addEnums("ruleAppTypeEnum", RuleAppTypeEnum.values())
                 .build();
                 .build();
         return enumMap;
         return enumMap;
     }
     }

+ 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 {
+
+}

+ 2 - 0
knowledgeman-service/src/main/java/com/diagbot/vo/ConceptIndexVO.java

@@ -17,5 +17,7 @@ public class ConceptIndexVO {
     @ApiModelProperty(value = "检索名称",required=true)
     @ApiModelProperty(value = "检索名称",required=true)
     @NotBlank(message="名称不能为空")
     @NotBlank(message="名称不能为空")
     private String name;
     private String name;
+    @ApiModelProperty(hidden = true)
+    private Integer lisPacsOnly = 0;
 
 
 }
 }

+ 3 - 0
knowledgeman-service/src/main/java/com/diagbot/vo/GetConceptDetailListVO.java

@@ -31,6 +31,9 @@ public class GetConceptDetailListVO extends Page {
 
 
 	@ApiModelProperty(value = "状态值,已删除=Y,启用中=N")
 	@ApiModelProperty(value = "状态值,已删除=Y,启用中=N")
 	private String status;
 	private String status;
+
+    @ApiModelProperty(hidden = true)
+	private Integer lisPacsOnly = 0;
 	
 	
 
 
 }
 }

+ 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;
+}

+ 28 - 0
knowledgeman-service/src/main/java/com/diagbot/vo/RuleAppPageVO.java

@@ -0,0 +1,28 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/1/30 17:04
+ */
+@Getter
+@Setter
+public class RuleAppPageVO extends Page {
+    /**
+     * 指标名称
+     */
+    private String ruleId;
+    /**
+     * 1:危急值提醒  2:开单合理性  3:管理评估  4:不良反应  5:药物推荐  6:病情提示
+     */
+    private String typeId;
+
+    /**
+     * 套餐名称是否必须参与匹配
+     */
+    private String remind;
+}

+ 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;
+}

+ 21 - 0
knowledgeman-service/src/main/java/com/diagbot/vo/RulePubPageVO.java

@@ -0,0 +1,21 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/1/30 17:04
+ */
+@Getter
+@Setter
+public class RulePubPageVO extends Page {
+    /**
+     * 索引号
+     */
+    private Integer id;
+
+    private String pubName;
+}

+ 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;
+}

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

@@ -0,0 +1,70 @@
+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.RuleAppPageVO;
+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(@RequestBody RuleAppPageVO ruleAppPageVO) {
+        return RespDTO.onSuc(ruleAppFacade.pageRuleApp(ruleAppPageVO));
+    }
+
+    @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> getRuleApp(@Valid @RequestBody RuleAppIdVO ruleAppIdVO) {
+        return RespDTO.onSuc(ruleAppFacade.getRuleApp(ruleAppIdVO));
+    }
+
+    @ApiOperation(value = "规则应用ruleApp添加或者编辑[by:gaodm]")
+    @PostMapping("/saveRuleApp")
+    @SysLogger("saveRuleApp")
+    @Transactional
+    public RespDTO<Boolean> saveRuleApp(@RequestBody RuleAppSaveVO ruleAppSaveVO) {
+        return RespDTO.onSuc(ruleAppFacade.saveRuleApp(ruleAppSaveVO));
+    }
+}

+ 69 - 0
knowledgeman-service/src/main/java/com/diagbot/web/RulePubController.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.RulePubDTO;
+import com.diagbot.facade.RulePubFacade;
+import com.diagbot.vo.RulePubIdVO;
+import com.diagbot.vo.RulePubPageVO;
+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.web.bind.annotation.RestController;
+
+import javax.validation.Valid;
+
+/**
+ * <p>
+ * 前端控制器
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-01-30
+ */
+@RestController
+@Api(value = "规则维护rulePub API", tags = { "规则维护rulePub API" })
+@SuppressWarnings("unchecked")
+@RequestMapping("/rulePub")
+public class RulePubController {
+    @Autowired
+    private RulePubFacade rulePubFacade;
+
+    @ApiOperation(value = "规则维护rulePub列表[by:gaodm]")
+    @PostMapping("/pageRulePub")
+    @SysLogger("pageRulePub")
+    public RespDTO<IPage<RulePubDTO>> pageRulePub(@RequestBody RulePubPageVO rulePubPageVO) {
+        return RespDTO.onSuc(rulePubFacade.pageRulePub(rulePubPageVO));
+    }
+
+    @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> getRulePub(@Valid @RequestBody RulePubIdVO rulePubIdVO) {
+        return RespDTO.onSuc(rulePubFacade.getRulePub(rulePubIdVO));
+    }
+
+    @ApiOperation(value = "规则维护rulePub添加或者编辑[by:gaodm]")
+    @PostMapping("/saveRulePub")
+    @SysLogger("saveRulePub")
+    @Transactional
+    public RespDTO<Boolean> saveRulePub(@RequestBody RulePubSaveVO rulePubSaveVO) {
+        return RespDTO.onSuc(rulePubFacade.saveRulePub(rulePubSaveVO));
+    }
+
+}

+ 12 - 2
knowledgeman-service/src/main/resources/mapper/ConceptDetailMapper.xml

@@ -32,6 +32,9 @@
 		<if test="libType!=null">
 		<if test="libType!=null">
 			and b.lib_type=#{libType}
 			and b.lib_type=#{libType}
 		</if>
 		</if>
+        <if test="lisPacsOnly != null and lisPacsOnly == 1">
+            AND b.lib_type in (16,46)
+        </if>
         group by a.concept_id
         group by a.concept_id
         ORDER BY a.is_deleted ASC, a.gmt_modified DESC
         ORDER BY a.is_deleted ASC, a.gmt_modified DESC
    	</select>
    	</select>
@@ -47,7 +50,7 @@
 
 
     <select id="index" resultType="com.diagbot.dto.ConceptIndexDTO">
     <select id="index" resultType="com.diagbot.dto.ConceptIndexDTO">
         SELECT
         SELECT
-			DISTINCT 
+			DISTINCT
 			a.id AS conceptId,
 			a.id AS conceptId,
 			a.lib_name AS name,
 			a.lib_name AS name,
 			a.lib_type AS typeId
 			a.lib_type AS typeId
@@ -57,7 +60,14 @@
 		<if test="name != null and name != ''">
 		<if test="name != null and name != ''">
             AND UPPER(a.lib_name) like concat('%',UPPER(TRIM(#{name})) ,'%' )
             AND UPPER(a.lib_name) like concat('%',UPPER(TRIM(#{name})) ,'%' )
         </if>
         </if>
-        AND a.lib_type not in(12,13,14)
+        <choose>
+            <when test="lisPacsOnly != null and lisPacsOnly == 1">
+                AND a.lib_type in (16,46)
+            </when>
+            <otherwise>
+                AND a.lib_type not in(12,13,14)
+            </otherwise>
+        </choose>
 		ORDER BY a.gmt_modified DESC
 		ORDER BY a.gmt_modified DESC
     </select>
     </select>
 
 

+ 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>