Browse Source

关联维护多余类删除

rgb 5 years ago
parent
commit
f3074102e7

+ 0 - 74
knowledgeman-service/src/main/java/com/diagbot/dto/MultContactListDTO.java

@@ -1,74 +0,0 @@
-package com.diagbot.dto;
-
-import java.util.Date;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * @Description
- * @author rgb
- * @time 2018年12月5日下午5:00:34
- */
-@Getter
-@Setter
-public class MultContactListDTO {
-
-	/**
-     * 医学标准术语id
-     */
-	@ApiModelProperty(value="医学标准术语id")
-    private Long conceptId;
-    
-    /**
-     * 医学标准术语名称
-     */
-	@ApiModelProperty(value="医学标准术语名称")
-    private String libName;
-    
-    /**
-     * 医学标准术语类型
-     */
-	@ApiModelProperty(value="医学标准术语类型")
-    private String libType;
-	
-	/**
-	 * 医学标准术语名称(医学标准术语类型)
-	 */
-	private String libNameType;
-    
-	/**
-	 * 非前端使用,下一级概念id合并字符串,用","隔开
-	 */
-	private String otherIds;
-	
-    /**
-     * 关联术语
-     */
-	@ApiModelProperty(value="关联术语")
-    private String otherNames;
-	
-    /**
-     * 操作人
-     */
-	@ApiModelProperty(value="操作人")
-    private String operName;
-    
-    /**
-     * 操作时间
-     */
-	@JsonFormat(timezone="GMT+8",pattern ="yyyy-MM-dd HH:mm:ss")
-	@ApiModelProperty(value="操作时间")
-    private Date operTime;
-    
-	/**
-     * 状态:Y-已删除,N-启用中
-     */
-	@ApiModelProperty(value="状态:Y-已删除,N-启用中")
-	private String isDeleted;
-    
-
-}

+ 0 - 73
knowledgeman-service/src/main/java/com/diagbot/dto/RelationContactListDTO.java

@@ -1,73 +0,0 @@
-package com.diagbot.dto;
-
-import java.util.Date;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * @Description
- * @author rgb
- * @time 2018年12月5日下午5:00:34
- */
-@Getter
-@Setter
-public class RelationContactListDTO {
-    
-    /**
-     * 医学标准术语id
-     */
-	@ApiModelProperty(value="医学标准术语id")
-    private Long conceptId;
-    
-    /**
-     * 医学标准术语名称
-     */
-	@ApiModelProperty(value="医学标准术语名称")
-    private String libName;
-    
-    /**
-     * 医学标准术语类型
-     */
-	@ApiModelProperty(value="医学标准术语类型")
-    private String libType;
-	
-	/**
-	 * 医学标准术语名称(医学标准术语类型)
-	 */
-	private String libNameType;
-    
-    /**
-     * 关联术语
-     */
-	@ApiModelProperty(value="关联术语")
-    private String otherNames;
-    
-    /**
-     * 操作人
-     */
-	@ApiModelProperty(value="操作人")
-    private String operName;
-    
-    /**
-     * 操作时间
-     */
-	@JsonFormat(timezone="GMT+8",pattern ="yyyy-MM-dd HH:mm:ss")
-	@ApiModelProperty(value="操作时间")
-    private Date operTime;
-    
-	/**
-     * 状态:Y-已删除,N-启用中
-     */
-	@ApiModelProperty(value="状态:Y-已删除,N-启用中")
-	private String isDeleted;
-    
-    
-    
-    
-    
-
-}

+ 0 - 18
knowledgeman-service/src/main/java/com/diagbot/mapper/RelationMapper.java

@@ -8,17 +8,13 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.dto.GetRelationInfoListDTO;
 import com.diagbot.dto.LisSonContactListDTO;
-import com.diagbot.dto.MultContactListDTO;
 import com.diagbot.dto.OnlyByRootListDTO;
-import com.diagbot.dto.RelationContactListDTO;
 import com.diagbot.dto.RelationNodeDTO;
 import com.diagbot.dto.SingleRelationListDTO;
 import com.diagbot.entity.Relation;
 import com.diagbot.vo.GetRelationInfoListVO;
 import com.diagbot.vo.LisSonContactListVO;
-import com.diagbot.vo.MultContactListVO;
 import com.diagbot.vo.OnlyByRootListVO;
-import com.diagbot.vo.RelationContactListVO;
 import com.diagbot.vo.SingleRelationListVO;
 
 /**
@@ -35,20 +31,6 @@ public interface RelationMapper extends BaseMapper<Relation> {
 	
 	List<RelationNodeDTO> getRelationNodeDTOs(@Param(value="conceptId")Long conceptId,@Param(value="relationId")Long relationId);
 	
-	/**
-	 * 单层关联分页查询
-	 * @param relationContactListVO
-	 * @return
-	 */
-	IPage<RelationContactListDTO> relationContactList(RelationContactListVO relationContactListVO);
-	
-	/**
-	 * 多层关联分页查询
-	 * @param multContactListVO
-	 * @return
-	 */
-	IPage<MultContactListDTO> multContactList(MultContactListVO multContactListVO);
-	
 	/**
 	 * 化验子项分页查询
 	 * @param lisSonContactListVO

+ 0 - 38
knowledgeman-service/src/main/java/com/diagbot/vo/MultContactListVO.java

@@ -1,38 +0,0 @@
-package com.diagbot.vo;
-
-import java.util.List;
-
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * @Description:
- * @author: Weixuan Huang
- * @time: 2019/3/14 16:03
- */
-@SuppressWarnings({ "serial", "rawtypes" })
-@Getter
-@Setter
-public class MultContactListVO extends Page {
-    
-    /**
-     * 术语名称
-     */
-    @ApiModelProperty(value="术语名称")
-    private String name;
-
-    /**
-     * 术语类型
-     */
-    @ApiModelProperty(value="术语类型")
-    private String type;
-	
-	/**
-	 * 非前端传参,后台查询时临时使用
-	 */
-	private List<Long> rootNodeConceptIds;
-    
-}

+ 0 - 37
knowledgeman-service/src/main/java/com/diagbot/vo/RelationContactListVO.java

@@ -1,37 +0,0 @@
-package com.diagbot.vo;
-
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * @Description:
- * @author: Weixuan Huang
- * @time: 2019/3/14 16:03
- */
-@SuppressWarnings({ "serial", "rawtypes" })
-@Getter
-@Setter
-public class RelationContactListVO extends Page {
-    
-    /**
-     * 术语名称
-     */
-    @ApiModelProperty(value="术语名称")
-    private String name;
-
-    /**
-     * 术语类型
-     */
-    @ApiModelProperty(value="术语类型")
-    private String type;
-    
-    /**
-     * 状态:Y-已删除,N-启用中
-     */
-	@ApiModelProperty(value="状态:Y-已删除,N-启用中")
-	private String isDeleted;
-    
-}

+ 0 - 68
knowledgeman-service/src/main/resources/mapper/RelationMapper.xml

@@ -77,74 +77,6 @@
 		ORDER BY b.order_no ASC,a.gmt_modified DESC
     </select>
     
-    <select id="relationContactList" resultType="com.diagbot.dto.RelationContactListDTO">
-    	SELECT
-			*
-		FROM
-		(SELECT
-		t2.id AS conceptId,
-		t2.lib_name AS libName,
-		t4.name AS libType,
-		CONCAT(t2.lib_name,'(',t4.name,')') AS libNameType,
-		GROUP_CONCAT(t3.lib_name ORDER BY t5.order_no ASC,t1.gmt_modified DESC) AS otherNames,
-		t1.modifier AS operName,
-		MAX(t1.gmt_modified) AS operTime,
-		t1.is_deleted AS isDeleted
-		FROM
-		(SELECT
-		a.*
-		FROM
-		(SELECT * FROM kl_relation WHERE relation_id=17) a
-		LEFT JOIN (SELECT start_id FROM kl_relation WHERE relation_id=17) b
-		ON a.end_id=b.start_id
-		LEFT JOIN (SELECT end_id FROM kl_relation WHERE relation_id=17) c
-		ON a.start_id=c.end_id
-		WHERE b.start_id IS NULL AND c.end_id IS NULL) t1
-		JOIN kl_concept t2 ON t1.start_id=t2.id
-		JOIN kl_concept t3 ON t1.end_id=t3.id
-		JOIN kl_lexicon t4 ON t2.lib_type=t4.id
-		LEFT JOIN kl_relation_order t5 ON t1.id=t5.t_relation_id
-		where t2.is_deleted='N' AND t3.is_deleted='N' AND t4.is_deleted='N'
-		GROUP BY t2.id) tab
-		where 1=1
-		<if test="name!=null and name!=''">
-			and libNameType like concat('%',#{name},'%')
-		</if>
-		ORDER BY isDeleted ASC,operTime DESC
-    </select>
-    
-    <select id="multContactList" resultType="com.diagbot.dto.MultContactListDTO">
-    	SELECT 
-		a.start_id AS conceptId,
-		a.modifier AS operName,
-		a.gmt_modified AS operTime,
-		a.is_deleted AS isDeleted,
-		GROUP_CONCAT(DISTINCT a.end_id ORDER BY d.order_no ASC) AS otherIds,
-		SUM(CASE WHEN b.start_id IS NULL THEN 0 ELSE 1 END) AS notnullcou
-		FROM
-		(SELECT * FROM kl_relation WHERE relation_id=17
-		<choose>
-			<when test="rootNodeConceptIds==null"></when>
-			<when test="rootNodeConceptIds.size==0">
-				AND start_id=-99999999
-			</when>
-			<otherwise>
-				AND start_id IN
-				<foreach collection="rootNodeConceptIds" open="(" close=")" separator="," item="rootNodeConceptId">
-					#{rootNodeConceptId}
-				</foreach>
-			</otherwise>
-		</choose>
-		) a
-		LEFT JOIN (SELECT start_id FROM kl_relation WHERE relation_id=17) b ON a.end_id=b.start_id
-		LEFT JOIN (SELECT end_id FROM kl_relation WHERE relation_id=17) c ON a.start_id=c.end_id
-		LEFT JOIN kl_relation_order d ON a.id=d.t_relation_id
-		WHERE c.end_id IS NULL 
-		GROUP BY a.start_id
-		HAVING notnullcou>0
-		ORDER BY operTime DESC
-    </select>
-    
     <select id="lisSonContactList" resultType="com.diagbot.dto.LisSonContactListDTO">
     	SELECT
 			*