cgf
2025-08-23 9ec0a61f90ac2464eebc643bfe2d93ac9ba6e569
java110-db/src/main/resources/mapper/fee/FeeDetailServiceDaoImplMapper.xml
@@ -122,10 +122,10 @@
        importFeeName,pfc.fee_name feeName,t.payable_amount,t.payable_amount payableAmount,
        mw.cur_degrees curDegrees,mw.pre_degrees preDegrees, mw.pre_reading_time preReadingTime,mw.cur_reading_time
        curReadingTime,t.pay_order_id payOrderId,pfc.config_id configId,td.`name` primeRateName,pfao1.`value`
        payerObjName,
        payerObjName,pf.contract_fee,pf.contract_fee contractFee,
        t.cashier_id cashierId,t.cashier_name cashierName,pfc.fee_flag feeFlag,fr.receipt_code
        receiptCode,t.open_invoice openInvoice,t.acct_amount acctAmount,t.discount_amount discountAmount,t.deduction_amount deductionAmount,
        t.late_amount lateAmount,t.gift_amount giftAmount
        t.late_amount lateAmount,t.gift_amount giftAmount,t.invoice_no invoiceNo,t.receipt_no receiptNo,t.transferor_name transferorName
        from pay_fee_detail t
        left join pay_fee_attrs pfa on t.fee_id = pfa.fee_id and pfa.spec_cd = '390002'
        left join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0'
@@ -152,6 +152,9 @@
        </if>
        <if test="ownerId != null and ownerId != ''">
            and pfao.value = #{ownerId}
        </if>
        <if test="contractFee !=null and contractFee != ''">
            and pf.contract_fee= #{contractFee}
        </if>
        <if test="primeRate !=null and primeRate != ''">
            and t.prime_rate= #{primeRate}
@@ -297,6 +300,9 @@
        <if test="detailId !=null and detailId != ''">
            and t.detail_id= #{detailId}
        </if>
        <if test="contractFee !=null and contractFee != ''">
            and t.contract_fee= #{contractFee}
        </if>
        <if test="detailIds !=null ">
            and t.detail_id in
            <foreach collection="detailIds" item="item" open="(" close=")" separator=",">
@@ -423,6 +429,9 @@
        <if test="endTime !=null ">
            and t.end_time &lt;= #{endTime}
        </if>
        <if test="startTime !=null and b != null">
            and t.start_time = #{startTime}
        </if>
        <if test="cashierId !=null and cashierId != ''">
            and t.cashier_id= #{cashierId}
        </if>
@@ -435,22 +444,29 @@
        <if test="curYear != null and curYear != ''">
            and DATE_FORMAT(DATE_SUB(t.end_time,INTERVAL 1 DAY),'%Y') = #{curYear}
        </if>
        <if test="createTime != null and createTime != ''">
            and #{createTime} = t.create_time
        </if>
        <if test="payOrderId != null and payOrderId != ''">
            and #{payOrderId} = t.pay_order_id
        </if>
    </select>
    <!-- 保存费用明细信息至 instance表中 add by wuxw 2018-07-03 -->
    <insert id="saveFeeDetail" parameterType="Map">
        insert into
        pay_fee_detail(
        pay_fee_detail(b_id,pay_order_id,
        prime_rate,detail_id,receivable_amount,cycles,remark,received_amount,community_id,
        fee_id,state,start_time,end_time,payable_amount,cashier_name,cashier_id,open_invoice,
        acct_amount,discount_amount,deduction_amount,late_amount,gift_amount
        acct_amount,discount_amount,deduction_amount,late_amount,gift_amount,invoice_no,transferor_name
        <if test="createTime != null and createTime != ''">
            ,create_time
        </if>
        )
        values(#{primeRate},#{detailId},#{receivableAmount},#{cycles},#{remark},#{receivedAmount},#{communityId},#{feeId},#{state},
        values(#{bId},#{payOrderId},#{primeRate},#{detailId},#{receivableAmount},#{cycles},#{remark},#{receivedAmount},#{communityId},#{feeId},#{state},
        #{startTime},#{endTime},#{payableAmount},#{cashierName},#{cashierId},#{openInvoice},
        #{acctAmount},#{discountAmount},#{deductionAmount},#{lateAmount},#{giftAmount}
        #{acctAmount},#{discountAmount},#{deductionAmount},#{lateAmount},#{giftAmount},#{invoiceNo},#{transferorName}
        <if test="createTime != null and createTime != ''">
            ,#{createTime}
        </if>