liusheng
2023-05-09 467780e481263910e2ed3f2852a19ce097667795
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
88
89
90
91
92
<?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.project.mapper.ServiceReimbursementpayeeMapper">
 
    <resultMap type="ServiceReimbursementpayee" id="ServiceReimbursementpayeeResult">
        <result property="id" column="id"/>
        <result property="rbid" column="rbid"/>
        <result property="orderno" column="orderno"/>
        <result property="persontype" column="persontype"/>
        <result property="personname" column="personname"/>
        <result property="bankname" column="bankname"/>
        <result property="bankcardno" column="bankcardno"/>
        <result property="amount" column="amount"/>
        <result property="phone" column="phone"/>
        <result property="familyrelations" column="familyrelations"/>
        <result property="paiddate" column="paiddate"/>
        <result property="remark" column="remark"/>
        <result property="delFlag" column="del_flag"/>
        <result property="createBy" column="create_by"/>
        <result property="createTime" column="create_time"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
        <result property="uploadflag" column="uploadflag"/>
        <result property="uploadtime" column="uploadtime"/>
    </resultMap>
 
    <sql id="selectServiceReimbursementpayeeVo">
        select id,
               rbid,
               orderno,
               persontype,
               personname,
               bankname,
               bankcardno,
               amount,
               phone,
               familyrelations,
               paiddate,
               remark,
               del_flag,
               create_by,
               create_time,
               update_by,
               update_time,
               uploadflag,
               uploadtime
        from service_reimbursementpayee
    </sql>
 
    <select id="selectServiceReimbursementpayeeList" parameterType="ServiceReimbursementpayee"
            resultMap="ServiceReimbursementpayeeResult">
        <include refid="selectServiceReimbursementpayeeVo"/>
        <where>
            <if test="rbid != null ">and rbid = #{rbid}</if>
            <if test="orderno != null ">and orderno = #{orderno}</if>
            <if test="persontype != null  and persontype != ''">and persontype = #{persontype}</if>
            <if test="personname != null  and personname != ''">and personname like concat('%', #{personname}, '%')</if>
            <if test="bankname != null  and bankname != ''">and bankname like concat('%', #{bankname}, '%')</if>
            <if test="bankcardno != null  and bankcardno != ''">and bankcardno = #{bankcardno}</if>
            <if test="amount != null ">and amount = #{amount}</if>
            <if test="phone != null  and phone != ''">and phone = #{phone}</if>
            <if test="familyrelations != null  and familyrelations != ''">and familyrelations = #{familyrelations}</if>
            <if test="paiddate != null ">and paiddate = #{paiddate}</if>
            <if test="uploadflag != null  and uploadflag != ''">and uploadflag = #{uploadflag}</if>
            <if test="uploadtime != null ">and uploadtime = #{uploadtime}</if>
        </where>
    </select>
 
 
    <select id="getReimbursementpayeeInfo" resultType="com.ruoyi.project.domain.ServiceReimbursementpayee">
        SELECT b.personname as personname,b.bankname as bankname,b.bankcardno as bankcardno,b.amount as
        amount,b.persontype as persontype,b.paiddate as paiddate,b.Remark as remark from service_reimbursement
        a,service_reimbursementpayee b where a.id=b.RBID and a.del_flag!=1 and b.del_flag!=1
        <if test="id != null">
            and a.id = #{id}
        </if>
        <if test='username != null and username != ""'>
            and a.UserName=#{username}
        </if>
        <if test='recordstatus != null and recordstatus != ""'>
            and a.FlowLevel=#{recordstatus}
        </if>
        <if test='starttime != null and endtime != ""'>
            and a.create_time BETWEEN #{starttime} AND #{endtime}
        </if>
 
        ORDER BY a.id desc
    </select>
 
</mapper>