zhitong.yu
7 天以前 7fc9c42987a13c1d8d2159591a5803e70518827f
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
<?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.hxzk.gps.mapper.Warning.TbWarningMapper">
 
    <select id="FindWarningInfo" resultType="com.hxzk.gps.entity.Warning.TbWarning">
        SELECT w.id, w.type, w.objectid, w.status, w.time, w.baoliu1, w.baoliu2, w.baoliu3, w.baoliu4, w.baoliu5, w.baoliu6,w.baoliu7, p.p_name as baoliu10
        FROM tb_warning w
        INNER JOIN tb_person p on p.p_tagid = w.objectid
        WHERE p.company = #{CompanyName}
        <if test="objectid != null and objectid != ''">
            AND w.objectid LIKE CONCAT('%', #{objectid}, '%')
        </if>
        <if test="baoliu10 != null and baoliu10 != ''">
            AND w.baoliu10 LIKE CONCAT('%', #{baoliu10}, '%')
        </if>
        <if test="type != null and type != ''">
            AND w.type LIKE CONCAT('%', #{type}, '%')
        </if>
    </select>
 
    <select id="FindWarningUntreated" resultType="com.hxzk.gps.entity.Warning.TbWarning">
        SELECT w.id, w.type, w.objectid, w.status, w.time, w.baoliu1, w.baoliu2, w.baoliu3, w.baoliu4, w.baoliu5, w.baoliu6,w.baoliu7, p.p_name as baoliu10
        FROM tb_warning w
        INNER JOIN tb_person p on p.p_tagid = w.objectid
        WHERE p.companyid IN
        <foreach item="item" index="index" collection="companyIds" open="(" separator="," close=")">
            #{item}
        </foreach>
        and w.status = #{status}
    </select>
</mapper>