智慧保安后台管理-外网项目备份
Administrator
2021-07-15 7b1d4ea5a82843e76655f4e5955ec7ab58767b5a
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
75
76
77
78
79
80
81
82
83
84
85
86
87
<?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="org.springblade.modules.workreport.mapper.WorkReportMapper">
 
    <!--工作汇报分页信息-->
    <select id="selectWorkReportPage" resultType="org.springblade.modules.workreport.vo.WorkReportVo">
        SELECT
            swr.*,bu.real_name realName,bt.dept_name AS deptName
        FROM
            sys_work_report swr
        left join
            blade_user bu
        on
            bu.id = swr.user_id
        LEFT JOIN
            blade_dept bt
        ON
            swr.dept_id = bt.id
        WHERE
            1=1
        <if test="workReport.realName!=null and  workReport.realName!=''">
            and bu.real_name like concat('%', #{workReport.realName},'%')
        </if>
        <if test="workReport.type!=null">
            and swr.type = #{workReport.type}
        </if>
        <if test="workReport.userId!=null">
            and swr.user_id = #{workReport.userId}
        </if>
        <if test="workReport.category!=null">
            and swr.category = #{workReport.category}
        </if>
    </select>
 
    <!--工作汇报分页信息-->
    <select id="selectWorkReplyPage" resultType="org.springblade.modules.workreport.vo.WorkReportVo">
        SELECT
            swr.*,bu.real_name realName,bt.dept_name AS deptName
        FROM
            sys_work_report swr
        left join
            blade_user bu
        on
            bu.id = swr.user_id
        LEFT JOIN
            blade_dept bt
        ON
            swr.dept_id = bt.id
        WHERE
            1=1
        <if test="workReport.realName!=null and  workReport.realName!=''">
            and bu.real_name like concat('%', #{workReport.realName},'%')
        </if>
        <if test="workReport.type!=null">
            and swr.type = #{workReport.type}
        </if>
        <if test="workReport.userId!=null">
            and swr.received_ids like concat('%', #{workReport.userId},'%')
        </if>
        <if test="workReport.category!=null">
            and swr.category = #{workReport.category}
        </if>
    </select>
 
 
 
    <!--工作汇报详情信息-->
    <select id="selectWorkReportInfo" resultType="org.springblade.modules.workreport.vo.WorkReportVo">
        SELECT
        swr.*,bu.real_name realName,bt.dept_name AS deptName
        FROM
        sys_work_report swr
        left join
        blade_user bu
        on
        bu.id = swr.user_id
        LEFT JOIN
        blade_dept bt
        ON
        swr.dept_id = bt.id
        WHERE
        1=1
        <if test="workReport.id!=null">
            and swr.id = #{workReport.id}
        </if>
    </select>
</mapper>