huminmin
15 小时以前 2db7fd950e7c821fc2a048b51f50c6dbfcceed29
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
<?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.approve.mapper.FinReimbursementMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ruoyi.approve.pojo.FinReimbursement">
        <id column="id" property="id" />
        <result column="bill_no" property="billNo" />
        <result column="reimbursement_type" property="reimbursementType" />
        <result column="expense_type" property="expenseType" />
        <result column="applicant_id" property="applicantId" />
        <result column="applicant_code" property="applicantCode" />
        <result column="applicant_name" property="applicantName" />
        <result column="applicant_dept_id" property="applicantDeptId" />
        <result column="applicant_dept_name" property="applicantDeptName" />
        <result column="reason" property="reason" />
        <result column="apply_amount" property="applyAmount" />
        <result column="detail_total_amount" property="detailTotalAmount" />
        <result column="payee_name" property="payeeName" />
        <result column="payee_account" property="payeeAccount" />
        <result column="payee_bank" property="payeeBank" />
        <result column="approval_instance_id" property="approvalInstanceId" />
        <result column="approve_process_id" property="approveProcessId" />
        <result column="bill_status" property="billStatus" />
        <result column="approved_time" property="approvedTime" />
        <result column="paid_time" property="paidTime" />
        <result column="account_expense_id" property="accountExpenseId" />
        <result column="remark" property="remark" />
        <result column="tenant_id" property="tenantId" />
        <result column="create_user" property="createUser" />
        <result column="create_time" property="createTime" />
        <result column="update_user" property="updateUser" />
        <result column="update_time" property="updateTime" />
        <result column="dept_id" property="deptId" />
        <result column="deleted" property="deleted" />
    </resultMap>
    <select id="listPage" resultType="com.ruoyi.approve.bean.vo.FinReimbursementVo">
        select fin_reimbursement.*,
        fin_reimbursement_travel.start_time ,
        fin_reimbursement_travel.end_time
               from
                fin_reimbursement
            left join fin_reimbursement_travel on fin_reimbursement.id = fin_reimbursement_travel.reimbursement_id
        <where>
            <if test="ew.billNo != null and ew.billNo != ''">
                bill_no like concat('%',#{ew.billNo},'%')
            </if>
            <if test="ew.applicantName != null and ew.applicantName != ''">
                and applicant_name like concat('%',#{ew.applicantName},'%')
            </if>
            <if test="ew.applicantCode != null and ew.applicantCode != ''">
                and applicant_code like concat('%',#{ew.applicantCode},'%')
            </if>
            <if test="ew.createTimeStart != null and ew.createTimeStart !='' and ew.createTimeEnd != null and ew.createTimeEnd != ''">
                and create_time &gt;= #{ew.createTimeStart}
                and create_time &lt;= #{ew.createTimeEnd}
            </if>
        </where>
        order by create_time desc
    </select>
 
</mapper>