yxh
yxh
2023-03-27 cc3c043f5591646ccfeef921d41f559441544c20
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?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.ServiceFunddetailMapper">
    
    <resultMap type="ServiceFunddetail" id="ServiceFunddetailResult">
        <result property="id"    column="ID"    />
        <result property="fundid"    column="fundID"    />
        <result property="beneficiaryname"    column="BeneficiaryName"    />
        <result property="beneficiaryno"    column="BeneficiaryNo"    />
        <result property="unitname"    column="UnitName"    />
        <result property="unitno"    column="UnitNo"    />
        <result property="unituserno"    column="UnitUserNo"    />
        <result property="title"    column="Title"    />
        <result property="idcardtype"    column="IDCardType"    />
        <result property="idcardno"    column="IDCardNo"    />
        <result property="sex"    column="Sex"    />
        <result property="familyrelations"    column="FamilyRelations"    />
        <result property="phone"    column="Phone"    />
        <result property="depositbank"    column="DepositBank"    />
        <result property="bankcardno"    column="BankCardNo"    />
        <result property="branchbankname"    column="BranchBankName"    />
        <result property="annexbankcard"    column="AnnexBankCard"    />
        <result property="annexregistform"    column="AnnexRegistForm"    />
        <result property="applytype"    column="ApplyType"    />
        <result property="applytypename"    column="ApplyTypeName"    />
        <result property="itemid"    column="ItemID"    />
        <result property="itemname"    column="ItemName"    />
        <result property="itemtype"    column="ItemType"    />
        <result property="amount"    column="Amount"    />
        <result property="prepaidamount"    column="PrepaidAmount"    />
        <result property="taxamount"    column="TaxAmount"    />
        <result property="invoicecount"    column="InvoiceCount"    />
        <result property="taxedamount"    column="TaxedAmount"    />
        <result property="attachcount"    column="AttachCount"    />
        <result property="remark"    column="Remark"    />
        <result property="recordstatus"    column="RecordStatus"    />
        <result property="price"    column="Price"    />
        <result property="quantity"    column="Quantity"    />
        <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="uploadflag"    column="uploadflag"    />
        <result property="uploadtime"    column="uploadtime"    />
        <result property="infoid"    column="InfoId"    />
        <result property="donorno"    column="DonorNo"    />
        <result property="donorname"    column="DonorName"    />
        <result property="servicesscope"    column="SERVICESSCOPE"    />
        <result property="servicesscopename"    column="SERVICESSCOPENAME"    />
        <result property="servicetype"    column="SERVICETYPE"    />
        <result property="servicetypename"    column="SERVICETYPENAME"    />
        <result property="orderno"    column="OrderNo"    />
        <result property="itemcode"    column="ItemCode"    />
    </resultMap>
 
    <sql id="selectServiceFunddetailVo">
        select ID, fundID, InfoId, DonorNo, DonorName, BeneficiaryName, BeneficiaryNo, UnitName, UnitNo, UnitUserNo, Title, OrderNo, ItemCode, IDCardType, IDCardNo, Sex, FamilyRelations, Phone, DepositBank, BankCardNo, BranchBankName, AnnexBankCard, AnnexRegistForm, ApplyType,ApplyTypeName, ItemID, ItemName, ItemType, Amount, PrepaidAmount, TaxAmount, InvoiceCount, TaxedAmount, AttachCount, Quantity, Price, Remark, RecordStatus, del_flag, create_by, create_time, update_by, update_time, uploadflag, uploadtime,SERVICESSCOPE,SERVICESSCOPENAME,SERVICETYPE,SERVICETYPENAME from service_funddetail
    </sql>
 
    <select id="selectServiceFunddetailList" parameterType="ServiceFunddetail" resultMap="ServiceFunddetailResult">
        <include refid="selectServiceFunddetailVo"/>
        <where>
            del_flag = '0'
            <if test="beneficiaryname != null  and beneficiaryname != ''"> and BeneficiaryName like concat('%', #{beneficiaryname}, '%')</if>
            <if test="unitname != null  and unitname != ''"> and UnitName like concat('%', #{unitname}, '%')</if>
            <if test="applytype != null  and applytype != ''"> and ApplyType = #{applytype}</if>
            <if test="itemname != null  and itemname != ''"> and ItemName like concat('%', #{itemname}, '%')</if>
            <if test="itemtype != null  and itemtype != ''"> and ItemType = #{itemtype}</if>
            <if test="recordstatus != null  and recordstatus != ''"> and RecordStatus = #{recordstatus}</if>
            <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 uploadflag = #{uploadflag}</if>
            <if test="uploadtime != null "> and uploadtime = #{uploadtime}</if>
            <if test="fundid != null and fundid != '' "> and fundID = #{fundid}</if>
 
        </where>
    </select>
    <select id="selectFundDetailListById" resultType="com.ruoyi.project.domain.ServiceFunddetail">
        <include refid="selectServiceFunddetailVo"/>
        where fundID = #{id} and del_flag = '0'
        order by OrderNo
    </select>
 
    <select id="getAllDetailsByFDIDLW" resultType="com.ruoyi.project.domain.ServiceFunddetail">
        <include refid="selectServiceFunddetailVo"/>
        where fundID = #{id} and ItemType = "10"
    </select>
    <select id="getAllDetailsByFDIDSH" resultType="com.ruoyi.project.domain.ServiceFunddetail">
        <include refid="selectServiceFunddetailVo"/>
        where fundID = #{id} and ItemType = "14"
    </select>
    <select id="getAllDetailsByFDIDSS" resultType="com.ruoyi.project.domain.ServiceFunddetail">
        <include refid="selectServiceFunddetailVo"/>
        where fundID = #{id} and ItemType = "16"
    </select>
    <select id="getAllDetailsByFDIDYX" resultType="com.ruoyi.project.domain.ServiceFunddetail">
        <include refid="selectServiceFunddetailVo"/>
        where fundID = #{id} and ItemType = "15"
    </select>
    <select id="getAllDetailsByFDIDHZ" resultType="com.ruoyi.project.domain.ServiceFunddetail">
        <include refid="selectServiceFunddetailVo"/>
        where fundID = #{id} and del_flag = 0 order by OrderNo
    </select>
    <select id="getAllDetailsByFDIDLWF" resultType="com.ruoyi.project.domain.ServiceFunddetail">
        <include refid="selectServiceFunddetailVo"/>
        where fundID = #{id} and ItemType = "12"
    </select>
    <select id="countItem" resultType="java.lang.Integer">
        select count(*) from service_funddetail
        where ItemID = #{itemid} and fundID = #{fundid} and del_flag = '0'
    </select>
 
</mapper>