无关风月
2025-06-26 a0e9fac251df54e5ed6159ce1fdb77d463ebdc48
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?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.ruoyi.system.mapper.TPedigreeChartMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ruoyi.system.model.TPedigreeChart">
        <result column="id" property="id" />
        <result column="create_time" property="createTime" />
        <result column="update_time" property="updateTime" />
        <result column="create_by" property="createBy" />
        <result column="update_by" property="updateBy" />
        <result column="disabled" property="disabled" />
        <result column="generation_type" property="generationType" />
        <result column="strain_name" property="strainName" />
        <result column="strain_code" property="strainCode" />
        <result column="strain_source_start" property="strainSourceStart" />
        <result column="strain_source_end" property="strainSourceEnd" />
    </resultMap>
 
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, create_time, update_time, create_by, update_by, disabled, generation_type, strain_name, strain_code, strain_source_start, strain_source_end
    </sql>
    <select id="pageList" resultType="com.ruoyi.system.vo.TPedigreeChartVO">
        SELECT
        *
        FROM t_pedigree_chart
        <where>
            <if test="query.strainName != null and query.strainName != ''">
                AND strain_name LIKE CONCAT('%', #{query.strainName}, '%')
            </if>
            <if test="query.strainCode != null and query.strainCode != ''">
                AND strain_code LIKE CONCAT('%', #{query.strainCode}, '%')
            </if>
            <if test="query.generationType != null">
                and generation_type = #{query.generationType}
            </if>
        <if test="query.projectIds != null and query.projectIds.size() > 0">
            and project_id in
            <foreach item="item" collection="query.projectIds" separator="," open="(" close=")" index="">
                #{item}
            </foreach>
        </if>
            AND disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY create_time DESC
    </select>
    <select id="listConfirm" resultType="com.ruoyi.system.vo.TPedigreeChartConfirmVO">
        select t1.* from t_pedigree_chart_detail t1
        where t1.pedigree_chart_id = #{query.id}
          AND t1.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        and t1.preserve_signature is null
 
    </select>
    <select id="pageListDetail" resultType="com.ruoyi.system.vo.TPedigreeChartDetailVO">
        select  * from t_pedigree_chart_detail
        where pedigree_chart_id = #{query.id}
          and status = 1
          and type = 1
          and preserve_id is null
        and  disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
    </select>
 
 
</mapper>