liujie
2026-04-13 eff3c1988ffa0537419d6646688f4119cebe138a
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.estate.expert.admin.domain.repository.OnDutyMapper">
 
 
    <select id="pageList" resultType="com.estate.expert.admin.domain.business.onduty.OnDutyVo">
        select t1.id,t1.plan_id,t1.project_id,t1.client_id,t1.content,t1.position_id,t1.position_name,t1.remark,t1.img,t1.time,t1.state,t1.create_time,
        t2.name as plan_name,
        t3.name as project_name,
        t4.name as client_name
        from on_duty t1
        left join plan t2 on t1.plan_id = t2.id
        left join project t3 on t1.project_id = t3.id
        left join client t4 on t1.client_id = t4.id
        where 1=1
        <if test="request.planId != null">
            and t1.plan_id = #{request.planId}
        </if>
        <if test="request.taskId != null">
            and t1.check_task_id = #{request.taskId}
        </if>
        <if test="request.clientId != null">
            and t1.client_id = #{request.clientId}
        </if>
        <if test="sTime !=null">
            and t1.time between #{sTime} and #{eTime}
        </if>
        order by t1.time desc
    </select>
    <select id="detail" resultType="com.estate.expert.admin.domain.business.onduty.OnDutyVo">
        select t1.id,t1.plan_id,t1.project_id,t1.client_id,t1.content,t1.position_id,t1.position_name,t1.remark,t1.img,t1.time,t1.state,t1.create_time,
               t2.name as plan_name,
               t3.name as project_name,
               t4.name as client_name
        from on_duty t1
                 left join plan t2 on t1.plan_id = t2.id
                 left join project t3 on t1.project_id = t3.id
                 left join client t4 on t1.client_id = t4.id
        where t1.id = #{id}
    </select>
    <select id="exportList" resultType="com.estate.expert.admin.domain.business.onduty.OnDutyVo">
        select t1.id,t1.plan_id,t1.project_id,t1.client_id,t1.content,t1.position_id,t1.position_name,t1.remark,t1.img,t1.time,t1.state,t1.create_time,
        t2.name as plan_name,
        t3.name as project_name,
        t4.name as client_name
        from on_duty t1
        left join plan t2 on t1.plan_id = t2.id
        left join project t3 on t1.project_id = t3.id
        left join client t4 on t1.client_id = t4.id
        where 1=1
        <if test="request.planId != null">
            and t1.plan_id = #{request.planId}
        </if>
        <if test="request.taskId != null">
            and t1.check_task_id = #{request.taskId}
        </if>
        <if test="request.clientId != null">
            and t1.client_id = #{request.clientId}
        </if>
        <if test="sTime !=null">
            and t1.time between #{sTime} and #{eTime}
        </if>
        order by t1.time desc
    </select>
</mapper>