buhuazhen
4 天以前 b36dfcb807af748dabdbc76a134b0667196563f6
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
66
67
68
69
70
71
72
73
74
<?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.projectManagement.mapper.InfoMapper">
 
    <resultMap id="BaseResultMap" type="com.ruoyi.projectManagement.pojo.Info">
            <id property="id" column="id" jdbcType="BIGINT"/>
            <result property="no" column="no" jdbcType="VARCHAR"/>
            <result property="title" column="title" jdbcType="VARCHAR"/>
            <result property="clientId" column="client_id" jdbcType="BIGINT"/>
            <result property="clientName" column="client_name" jdbcType="VARCHAR"/>
            <result property="projectManagementInfoParentId" column="project_management_info_parent_id" jdbcType="BIGINT"/>
            <result property="establishTime" column="establish_time" jdbcType="TIMESTAMP"/>
            <result property="projectManagementPlanId" column="project_management_plan_id" jdbcType="BIGINT"/>
            <result property="source" column="source" jdbcType="VARCHAR"/>
            <result property="managerId" column="manager_id" jdbcType="BIGINT"/>
            <result property="managerName" column="manager_name" jdbcType="VARCHAR"/>
            <result property="salesmanId" column="salesman_id" jdbcType="BIGINT"/>
            <result property="salesmanName" column="salesman_name" jdbcType="VARCHAR"/>
            <result property="isDelete" column="is_delete" jdbcType="INTEGER"/>
            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
            <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
            <result property="createUser" column="create_user" jdbcType="INTEGER"/>
            <result property="updateUser" column="update_user" jdbcType="INTEGER"/>
            <result property="planStartTime" column="plan_start_time" jdbcType="TIMESTAMP"/>
            <result property="planEndTime" column="plan_end_time" jdbcType="TIMESTAMP"/>
            <result property="actualStartTime" column="actual_start_time" jdbcType="TIMESTAMP"/>
            <result property="actualEndTime" column="actual_end_time" jdbcType="TIMESTAMP"/>
            <result property="status" column="status" jdbcType="INTEGER"/>
            <result property="departmentId" column="department_id" jdbcType="BIGINT"/>
            <result property="departmentName" column="department_name" jdbcType="VARCHAR"/>
            <result property="orderDate" column="order_date" jdbcType="TIMESTAMP"/>
            <result property="orderAmount" column="order_amount" jdbcType="VARCHAR"/>
            <result property="remark" column="remark" jdbcType="VARCHAR"/>
            <result property="attachment" column="attachment" jdbcType="VARCHAR"/>
    </resultMap>
 
    <sql id="Base_Column_List">
        id,no,title,
        client_id,client_name,project_management_info_parent_id,
        establish_time,project_management_plan_id,source,
        manager_id,manager_name,salesman_id,
        salesman_name,is_delete,create_time,
        update_time,create_user,update_user,
        plan_start_time,plan_end_time,actual_start_time,
        actual_end_time,status,department_id,
        department_name,order_date,order_amount,
        remark,attachment
    </sql>
    <select id="searchListInfo" resultType="com.ruoyi.projectManagement.vo.ListInfoVo">
        select t1.*, t2.name as project_management_plan_name,t3.title as projectManagementInfoParentName
        from project_management_info as t1
        left join project_management_plan as t2 on t1.project_management_plan_id = t2.id
        left join project_management_info as t3 on t1.project_management_info_parent_id = t3.id
        where t1.is_delete = 0
        <if test="vo.noOrName != null and vo.noOrName != ''">
            and ( t1.no like concat('%', #{vo.noOrName}, '%') OR t1.title like concat('%', #{vo.noOrName}, '%') )
        </if>
        <if test="vo.clientName != null and vo.clientName != ''">
            and t1.client_name like concat('%', #{vo.clientName}, '%')
        </if>
        <if test="vo.salesmanName != null and vo.salesmanName != ''">
            and t1.salesman_name like concat('%', #{vo.salesmanName}, '%')
        </if>
        <if test="vo.reviewStatus != null">
            and t1.review_status = #{vo.reviewStatus.code}
        </if>
        <if test="vo.stage != null">
            and t1.stage = #{vo.stage.code}
        </if>
        order by t1.create_time desc
    </select>
</mapper>