yxh
2023-05-31 e7acba8aaaa91a067728d4769b4af5a9dd6ac189
ruoyi-project/src/main/resources/mapper/project/ServiceFunddetailMapper.xml
@@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.project.mapper.ServiceFunddetailMapper">
    
    <resultMap type="ServiceFunddetail" id="ServiceFunddetailResult">
    <resultMap type="com.ruoyi.project.domain.ServiceFunddetail" id="ServiceFunddetailResult">
        <result property="id"    column="ID"    />
        <result property="fundid"    column="fundID"    />
        <result property="beneficiaryname"    column="BeneficiaryName"    />
@@ -57,14 +57,66 @@
    </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
        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">
    <select id="selectServiceFunddetailList" parameterType="com.ruoyi.project.domain.ServiceFunddetail"
            resultMap="ServiceFunddetailResult">
        <include refid="selectServiceFunddetailVo"/>
        <where>
            del_flag = '0'
            <if test="beneficiaryname != null  and beneficiaryname != ''"> and BeneficiaryName like concat('%', #{beneficiaryname}, '%')</if>
            <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>
@@ -109,8 +161,73 @@
        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 count(*)
        from service_funddetail
        where ItemID = #{itemid}
          and fundID = #{fundid}
          and del_flag = '0'
    </select>
    <select id="getDataBybeneficiaryNo" parameterType="com.ruoyi.project.domain.FunddetailReqVo"
            resultMap="ServiceFunddetailResult">
        select a.ID,
        a.fundID,
        a.InfoId,
        a.DonorNo,
        a.DonorName,
        a.BeneficiaryName,
        a.BeneficiaryNo,
        a.UnitName,
        a.UnitNo,
        a.UnitUserNo,
        a.Title,
        a.OrderNo,
        a.ItemCode,
        a.IDCardType,
        a.IDCardNo,
        a.Sex,
        a.FamilyRelations,
        a.Phone,
        a.DepositBank,
        a.BankCardNo,
        a.BranchBankName,
        a.AnnexBankCard,
        a.AnnexRegistForm,
        a.ApplyType,
        a.ApplyTypeName,
        a.ItemID,
        a.ItemName,
        a.ItemType,
        a.Amount,
        a.PrepaidAmount,
        a.TaxAmount,
        a.InvoiceCount,
        a.TaxedAmount,
        a.AttachCount,
        a.Quantity,
        a.Price,
        a.Remark,
        a.RecordStatus,
        a.del_flag,
        a.create_by,
        a.create_time,
        a.update_by,
        a.update_time,
        a.uploadflag,
        a.uploadtime,
        a.SERVICESSCOPE,
        a.SERVICESSCOPENAME,
        a.SERVICETYPE,
        a.SERVICETYPENAME
        from service_funddetail a,
        service_fund b
        where a.del_flag = '0'
        and a.fundID = b.id
        <if test="beneficiaryNo != null  and beneficiaryNo != '' ">and a.beneficiaryNo = #{beneficiaryNo}</if>
        and b.create_time >= #{starttime}
        and b.create_time &lt;= #{endtime}
    </select>
</mapper>