Kaynağa Gözat

术语禁用

zhaops 3 yıl önce
ebeveyn
işleme
47989c3637

+ 153 - 0
cdssman-service/src/main/java/com/diagbot/entity/KlDiagnoseBaseRelation.java

@@ -0,0 +1,153 @@
+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 zhoutg
+ * @since 2021-07-15
+ */
+public class KlDiagnoseBaseRelation implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * diagnose_base_id
+     */
+    private Long diagnoseBaseId;
+
+    /**
+     * concept_id
+     */
+    private Long conceptId;
+
+    /**
+     * 排序号
+     */
+    private Integer orderNo;
+
+    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 getDiagnoseBaseId() {
+        return diagnoseBaseId;
+    }
+
+    public void setDiagnoseBaseId(Long diagnoseBaseId) {
+        this.diagnoseBaseId = diagnoseBaseId;
+    }
+
+    public Long getConceptId() {
+        return conceptId;
+    }
+
+    public void setConceptId(Long conceptId) {
+        this.conceptId = conceptId;
+    }
+
+    public Integer getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(Integer orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    @Override
+    public String toString() {
+        return "KlDiagnoseBaseRelation{" +
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", diagnoseBaseId=" + diagnoseBaseId +
+                ", conceptId=" + conceptId +
+                ", orderNo=" + orderNo +
+                "}";
+    }
+}

+ 7 - 3
cdssman-service/src/main/java/com/diagbot/facade/KlConceptFacade.java

@@ -16,6 +16,7 @@ import com.diagbot.entity.KlConceptCommon;
 import com.diagbot.entity.KlConceptStatic;
 import com.diagbot.entity.KlDiagnose;
 import com.diagbot.entity.KlDiagnoseBase;
+import com.diagbot.entity.KlDiagnoseBaseRelation;
 import com.diagbot.entity.KlDrugMapping;
 import com.diagbot.entity.KlLexicon;
 import com.diagbot.entity.KlLibraryInfo;
@@ -92,6 +93,8 @@ public class KlConceptFacade extends KlConceptServiceImpl {
     @Autowired
     KlDiagnoseBaseFacade klDiagnoseBaseFacade;
     @Autowired
+    KlDiagnoseBaseRelationFacade klDiagnoseBaseRelationFacade;
+    @Autowired
     KlDrugFacade klDrugFacade;
     @Autowired
     KlSymptomFacade klSymptomFacade;
@@ -579,10 +582,11 @@ public class KlConceptFacade extends KlConceptServiceImpl {
             if (diagnosesum > 0) {
                 throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该医学标准术语与诊断依据维护存在关系!");
             }
-            //kl_diagnose_base
-            int diagnoseBasesum = klDiagnoseBaseFacade.count(new QueryWrapper<KlDiagnoseBase>().eq("is_deleted", IsDeleteEnum.N.getKey())
+            //kl_diagnose_base_relation
+            int diagnoseBaseRelationsum = klDiagnoseBaseRelationFacade.count(new QueryWrapper<KlDiagnoseBaseRelation>()
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
                     .eq("concept_id", klConceptSatarOrdisaVO.getConceptId()));
-            if (diagnoseBasesum > 0) {
+            if (diagnoseBaseRelationsum > 0) {
                 throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该医学标准术语与诊断依据维护明细存在关系!");
             }
             //kl_drug_mapping

+ 13 - 0
cdssman-service/src/main/java/com/diagbot/facade/KlDiagnoseBaseRelationFacade.java

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.KlDiagnoseBaseRelationServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2021/7/15 13:50
+ */
+@Component
+public class KlDiagnoseBaseRelationFacade extends KlDiagnoseBaseRelationServiceImpl {
+}

+ 16 - 0
cdssman-service/src/main/java/com/diagbot/mapper/KlDiagnoseBaseRelationMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.KlDiagnoseBaseRelation;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 基础规则关联表 Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2021-07-15
+ */
+public interface KlDiagnoseBaseRelationMapper extends BaseMapper<KlDiagnoseBaseRelation> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.KlDiagnoseBaseRelation;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 基础规则关联表 服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2021-07-15
+ */
+public interface KlDiagnoseBaseRelationService extends IService<KlDiagnoseBaseRelation> {
+
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.KlDiagnoseBaseRelation;
+import com.diagbot.mapper.KlDiagnoseBaseRelationMapper;
+import com.diagbot.service.KlDiagnoseBaseRelationService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 基础规则关联表 服务实现类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2021-07-15
+ */
+@Service
+public class KlDiagnoseBaseRelationServiceImpl extends ServiceImpl<KlDiagnoseBaseRelationMapper, KlDiagnoseBaseRelation> implements KlDiagnoseBaseRelationService {
+
+}

+ 18 - 0
cdssman-service/src/main/resources/mapper/KlDiagnoseBaseRelationMapper.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.KlDiagnoseBaseRelationMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.KlDiagnoseBaseRelation">
+        <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="diagnose_base_id" property="diagnoseBaseId" />
+        <result column="concept_id" property="conceptId" />
+        <result column="order_no" property="orderNo" />
+    </resultMap>
+
+</mapper>