liusheng
2024-08-02 b9cc263b8d1d31608a4c16cd157cc84b51e3d29d
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.project.mapper.ServiceReimbursementdetailMapper">
    
    <resultMap type="com.ruoyi.project.domain.ServiceReimbursementdetail" id="ServiceReimbursementdetailResult">
        <result property="id"    column="ID"    />
        <result property="rbid"    column="RBID"    />
        <result property="starttime"    column="StartTime"    />
        <result property="departure"    column="Departure"    />
        <result property="endtime"    column="EndTime"    />
        <result property="destination"    column="Destination"    />
        <result property="days"    column="Days"    />
        <result property="trafficexpense"    column="TrafficExpense"    />
        <result property="traffictype"    column="TrafficType"    />
        <result property="cityfee"    column="CityFee"    />
        <result property="hotelexpense"    column="HotelExpense"    />
        <result property="invoicecount"    column="InvoiceCount"    />
        <result property="attachcount"    column="AttachCount"    />
        <result property="otherexpense"    column="OtherExpense"    />
        <result property="foodexpenses"    column="FoodExpenses"    />
        <result property="foodallowance"    column="FoodAllowance"    />
        <result property="annexfiles"    column="AnnexFiles"    />
        <result property="invoicefiles"    column="InvoiceFiles"    />
        <result property="remark"    column="remark"    />
        <result property="del_flag"    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="travelprovince"    column="travelprovince"    />
        <result property="travelprovincename"    column="travelprovincename"    />
        <result property="travelcity"    column="travelcity"    />
        <result property="travelcityname"    column="travelcityname"    />
        <result property="traveltown"    column="traveltown"    />
        <result property="traveltownname"    column="traveltownname"    />
        <result property="otherfeeamount"    column="otherfeeamount"    />
        <result property="otherfeedesc"    column="otherfeedesc"    />
        <result property="orderno"    column="OrderNo"    />
 
    </resultMap>
 
    <sql id="selectServiceReimbursementdetailVo">
        select ID, RBID, StartTime, Departure, EndTime, Destination, Days, TrafficExpense, TrafficType,TrafficType2, CityFee, HotelExpense, InvoiceCount, AttachCount, OtherExpense, FoodExpenses, FoodAllowance, AnnexFiles,InvoiceFiles, remark, del_flag, create_by, create_time, update_by, update_time, upload_flag, upload_time, travelprovince, travelprovincename, travelcity, travelcityname, traveltown, traveltownname, otherfeeamount, otherfeedesc, OrderNo,personname,persontype from service_reimbursementdetail
    </sql>
 
    <select id="selectServiceReimbursementdetailList" parameterType="com.ruoyi.project.domain.ServiceReimbursementdetail" resultMap="ServiceReimbursementdetailResult">
        <include refid="selectServiceReimbursementdetailVo"/>
        <where>
            del_flag = '0'
            <if test="createBy != null  and createBy != ''"> and create_by = #{createBy}</if>
            <if test="createTime != null "> and create_time = #{createTime}</if>
            <if test="uploadFlag != null  and uploadFlag != ''"> and upload_flag = #{uploadFlag}</if>
            <if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
            <if test="rbid != null  and rbid != ''"> and RBID = #{rbid}</if>
        </where>
    </select>
    <select id="getRBDetailList" resultType="com.ruoyi.project.domain.ServiceReimbursementdetail">
        <include refid="selectServiceReimbursementdetailVo"/>
        where RBID = #{id} and del_flag = 0
        order by OrderNo
    </select>
    <select id="getAllIds" resultType="java.lang.Long">
        select ID from service_reimbursementdetail
        where RBID = #{rbid}
    </select>
    <select id="getAllDetailsByRBID" resultType="com.ruoyi.project.domain.ServiceReimbursementdetail">
        <include refid="selectServiceReimbursementdetailVo"/>
        where RBID = #{id} and del_flag = 0 order by OrderNo
    </select>
 
 
</mapper>