xuhy
2 天以前 39a97f1b7585edc184ea5066600f1d9a2d2cb8cf
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
<?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.TProjectApprovalReportMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ruoyi.system.model.TProjectApprovalReport">
        <id column="id" property="id" />
        <result column="team_id" property="teamId" />
        <result column="report_code" property="reportCode" />
        <result column="report_name" property="reportName" />
        <result column="report_text" property="reportText" />
        <result column="status" property="status" />
        <result column="audit_person_id" property="auditPersonId" />
        <result column="audit_time" property="auditTime" />
        <result column="audit_remark" property="auditRemark" />
        <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" />
    </resultMap>
 
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, team_id, report_code, report_name, report_text, status, audit_person_id, audit_time, audit_remark, create_time, update_time, create_by, update_by, disabled
    </sql>
    <select id="pageList" resultType="com.ruoyi.system.vo.TProjectApprovalReportVO">
        select id, team_id, report_code, report_name, report_text, status, audit_person_id, audit_time, audit_remark, create_time, update_time, create_by, update_by, disabled
        from t_project_approval_report tpar
        left join t_project_team tpt on tpt.id = tpar.team_id
        <where>
            <if test="query.teamIds != null and query.teamIds.size() > 0">
                and tpt.id in
                <foreach item="item" collection="query.teamIds" separator="," open="(" close=")" index="">
                    #{item}
                </foreach>
            </if>
            <if test="query.teamName != null and query.teamName != ''">
                and tpt.team_name like concat('%',#{query.teamName},'%')
            </if>
            <if test="query.reportCode != null and query.reportCode != ''">
                and tpar.report_code like concat('%',#{query.reportCode},'%')
            </if>
            <if test="query.reportName != null and query.reportName != ''">
                and tpar.report_name like concat('%',#{query.reportName},'%')
            </if>
            <if test="query.status != null and query.status != -1">
                and tpar.status = #{query.status}
            </if>
            <if test="query.status == null">
                and tpar.status != -1
            </if>
            <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
                AND tpar.create_time BETWEEN #{query.startTime} AND #{query.endTime}
            </if>
            AND tpar.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY tpar.create_time DESC
    </select>
 
</mapper>