chengf
2026-03-12 4c3fa7b1828d5e9bbd586a42fa00924e9f5a7c25
java110-db/src/main/resources/mapper/fee/MeterWaterServiceDaoImplMapper.xml
@@ -135,25 +135,23 @@
    <!-- 保存水电费信息至 instance表中 add by wuxw 2018-07-03 -->
    <insert id="saveMeterWaterInfoInstance" parameterType="Map">
        insert into meter_water(
        remark,status_cd,cur_reading_time,water_id,cur_degrees,meter_type,pre_degrees,obj_id,pre_reading_time,b_id,
        community_id,obj_type,fee_id,obj_name,price,
        water_id,b_id,meter_type,obj_type,obj_id,pre_degrees,cur_degrees,pre_reading_time,cur_reading_time,
        community_id,status_cd,remark,fee_id,obj_name,price,
        power_supply_bureau,household_name,household_number,electric_meter_id,`handler`,is_transferred,
        company_name_after_transfer,transfer_date,corresponding_household_count,last_payment_date,reading_type,
        multiplying_factor,unit_price,invoice_amount,amount_difference,auto_deduction,remark2,
        address,write_time,writer,
        check_apply_company_name,check_apply_dept_project,water_fee_payer,account_number,meter_read_book_no,
        water_consumption,sewage_treatment_water,collection_standard,arrears_unpaid,late_payment_fine,
        late_payment_surcharge,fee_payment_status,carry_over_balance,total_payable_amount
        address,write_time,writer,check_apply_company_name,check_apply_dept_project,water_fee_payer,
        account_number,meter_read_book_no,water_consumption,sewage_treatment_water,collection_standard,
        arrears_unpaid,late_payment_fine,late_payment_surcharge,fee_payment_status,carry_over_balance,total_payable_amount
        ) select
        t.remark,'0',t.cur_reading_time,t.water_id,t.cur_degrees,t.meter_type,t.pre_degrees,t.obj_id,
        t.pre_reading_time,t.b_id,t.community_id,t.obj_type,t.fee_id,t.obj_name,t.price,
        t.water_id,t.b_id,t.meter_type,t.obj_type,t.obj_id,t.pre_degrees,t.cur_degrees,t.pre_reading_time,t.cur_reading_time,
        t.community_id,'0',t.remark,t.fee_id,t.obj_name,t.price,
        t.power_supply_bureau,t.household_name,t.household_number,t.electric_meter_id,t.`handler`,t.is_transferred,
        t.company_name_after_transfer,t.transfer_date,t.corresponding_household_count,t.last_payment_date,t.reading_type,
        t.multiplying_factor,t.unit_price,t.invoice_amount,t.amount_difference,t.auto_deduction,t.remark2,
        #{address},#{writeTime},#{writer},
        #{checkApplyCompanyName},#{checkApplyDeptProject},#{waterFeePayer},#{accountNumber},#{meterReadBookNo},
        #{waterConsumption},#{sewageTreatmentWater},#{collectionStandard},#{arrearsUnpaid},#{latePaymentFine},
        #{latePaymentSurcharge},#{feePaymentStatus},#{carryOverBalance},#{totalPayableAmount}
        #{address},#{writeTime},#{writer},#{checkApplyCompanyName},#{checkApplyDeptProject},#{waterFeePayer},
        #{accountNumber},#{meterReadBookNo},#{waterConsumption},#{sewageTreatmentWater},#{collectionStandard},
        #{arrearsUnpaid},#{latePaymentFine},#{latePaymentSurcharge},#{feePaymentStatus},#{carryOverBalance},#{totalPayableAmount}
        from business_meter_water t where 1=1
        <if test="remark !=null and remark != ''">
            and t.remark= #{remark}
@@ -210,18 +208,42 @@
    <!-- 查询水电费信息 add by wuxw 2018-07-03 -->
    <select id="getMeterWaterInfo" parameterType="Map" resultType="Map">
        select t.remark,t.status_cd,t.status_cd statusCd,t.cur_reading_time,t.cur_reading_time
        curReadingTime,t.water_id,t.water_id waterId,t.cur_degrees,t.cur_degrees curDegrees,t.create_time,t.create_time
        createTime,t.meter_type,t.meter_type meterType,t.pre_degrees,t.pre_degrees preDegrees,t.obj_id,t.obj_id
        objId,t.pre_reading_time,t.pre_reading_time preReadingTime,t.b_id,t.b_id bId,t.community_id,t.community_id
        communityId,t.obj_type,t.obj_type objType,t.fee_id,t.fee_id feeId,t.obj_name,t.obj_name objName,t.price,mt.type_name meterTypeName,
        t.power_supply_bureau powerSupplyBureau,t.household_name householdName,t.household_number householdNumber,
        t.electric_meter_id electricMeterId,t.`handler` handler,t.is_transferred isTransferred,
        t.company_name_after_transfer companyNameAfterTransfer,t.transfer_date transferDate,
        t.corresponding_household_count correspondingHouseholdCount,t.last_payment_date lastPaymentDate,
        t.reading_type readingType,t.multiplying_factor multiplyingFactor,t.unit_price unitPrice,
        t.invoice_amount invoiceAmount,t.amount_difference amountDifference,t.auto_deduction autoDeduction,
        t.remark2 remark2,t.address address,t.write_time writeTime,t.writer writer,
        select
        t.water_id,t.water_id waterId,
        t.b_id,t.b_id bId,
        t.meter_type,t.meter_type meterType,
        t.obj_type,t.obj_type objType,
        t.obj_id,t.obj_id objId,
        t.pre_degrees,t.pre_degrees preDegrees,
        t.cur_degrees,t.cur_degrees curDegrees,
        t.pre_reading_time,t.pre_reading_time preReadingTime,
        t.cur_reading_time,t.cur_reading_time curReadingTime,
        t.community_id,t.community_id communityId,
        t.status_cd,t.status_cd statusCd,
        t.remark,t.remark remark,
        t.fee_id,t.fee_id feeId,
        t.obj_name,t.obj_name objName,
        t.price,t.price price,
        t.power_supply_bureau powerSupplyBureau,
        t.household_name householdName,
        t.household_number householdNumber,
        t.electric_meter_id electricMeterId,
        t.`handler` handler,
        t.is_transferred isTransferred,
        t.company_name_after_transfer companyNameAfterTransfer,
        t.transfer_date transferDate,
        t.corresponding_household_count correspondingHouseholdCount,
        t.last_payment_date lastPaymentDate,
        t.reading_type readingType,
        t.multiplying_factor multiplyingFactor,
        t.unit_price unitPrice,
        t.invoice_amount invoiceAmount,
        t.amount_difference amountDifference,
        t.auto_deduction autoDeduction,
        t.remark2 remark2,
        t.address address,
        t.write_time writeTime,
        t.writer writer,
        t.check_apply_company_name checkApplyCompanyName,
        t.check_apply_dept_project checkApplyDeptProject,
        t.water_fee_payer waterFeePayer,
@@ -236,6 +258,7 @@
        t.fee_payment_status feePaymentStatus,
        t.carry_over_balance carryOverBalance,
        t.total_payable_amount totalPayableAmount,
        mt.type_name meterTypeName,
        br.road_name roadName
        from meter_water t
        left join meter_type mt on t.meter_type = mt.type_id and mt.status_cd = '0'
@@ -397,39 +420,49 @@
    <!-- 修改水电费信息 add by wuxw 2018-07-03 -->
    <update id="updateMeterWaterInfoInstance" parameterType="Map">
        update meter_water t set t.status_cd = #{statusCd}
        update meter_water t set
        t.status_cd = #{statusCd},
        <if test="newBId != null and newBId != ''">
            ,t.b_id = #{newBId}
        </if>
        <if test="remark !=null and remark != ''">
            , t.remark= #{remark}
        </if>
        <if test="curReadingTime !=null ">
            , t.cur_reading_time= #{curReadingTime}
        </if>
        <if test="curDegrees !=null and curDegrees != ''">
            , t.cur_degrees= #{curDegrees}
        </if>
        <if test="createTime !=null and createTime != ''">
            , t.create_time= #{createTime}
        <if test="waterId !=null and waterId != ''">
            ,t.water_id = #{waterId}
        </if>
        <if test="meterType !=null and meterType != ''">
            , t.meter_type= #{meterType}
        </if>
        <if test="preDegrees !=null and preDegrees != ''">
            , t.pre_degrees= #{preDegrees}
        <if test="objType !=null and objType != ''">
            , t.obj_type= #{objType}
        </if>
        <if test="objId !=null and objId != ''">
            , t.obj_id= #{objId}
        </if>
        <if test="preDegrees !=null and preDegrees != ''">
            , t.pre_degrees= #{preDegrees}
        </if>
        <if test="curDegrees !=null and curDegrees != ''">
            , t.cur_degrees= #{curDegrees}
        </if>
        <if test="preReadingTime !=null ">
            , t.pre_reading_time= #{preReadingTime}
        </if>
        <if test="curReadingTime !=null ">
            , t.cur_reading_time= #{curReadingTime}
        </if>
        <if test="communityId !=null and communityId != ''">
            , t.community_id= #{communityId}
        </if>
        <if test="objType !=null and objType != ''">
            , t.obj_type= #{objType}
        <if test="remark !=null and remark != ''">
            , t.remark= #{remark}
        </if>
        <if test="feeId !=null and feeId != ''">
            , t.fee_id= #{feeId}
        </if>
        <if test="objName !=null and objName != ''">
            , t.obj_name= #{objName}
        </if>
        <if test="price !=null and price != ''">
            , t.price= #{price}
        </if>
        <!-- 新增字段更新逻辑 -->
        <if test="powerSupplyBureau !=null and powerSupplyBureau != ''">
@@ -699,26 +732,24 @@
    <!-- 批量插入费用 -->
    <insert id="insertMeterWaters" parameterType="Map">
        insert into meter_water
        (remark,status_cd,cur_reading_time,water_id,cur_degrees,meter_type,pre_degrees,obj_id,pre_reading_time,b_id,
        community_id,obj_type,fee_id,obj_name,price,
        (water_id,b_id,meter_type,obj_type,obj_id,pre_degrees,cur_degrees,pre_reading_time,cur_reading_time,
        community_id,status_cd,remark,fee_id,obj_name,price,
        power_supply_bureau,household_name,household_number,electric_meter_id,`handler`,is_transferred,
        company_name_after_transfer,transfer_date,corresponding_household_count,last_payment_date,reading_type,
        multiplying_factor,unit_price,invoice_amount,amount_difference,auto_deduction,remark2,
        address,write_time,writer,
        check_apply_company_name,check_apply_dept_project,water_fee_payer,account_number,meter_read_book_no,
        water_consumption,sewage_treatment_water,collection_standard,arrears_unpaid,late_payment_fine,
        late_payment_surcharge,fee_payment_status,carry_over_balance,total_payable_amount)
        address,write_time,writer,check_apply_company_name,check_apply_dept_project,water_fee_payer,
        account_number,meter_read_book_no,water_consumption,sewage_treatment_water,collection_standard,
        arrears_unpaid,late_payment_fine,late_payment_surcharge,fee_payment_status,carry_over_balance,total_payable_amount)
        VALUES
        <foreach collection="meterWaterPos" item="item" separator=",">
            (#{item.remark},'0',#{item.curReadingTime},#{item.waterId},#{item.curDegrees},#{item.meterType},#{item.preDegrees},
            #{item.objId},#{item.preReadingTime},'-1',#{item.communityId},#{item.objType},#{item.feeId},#{item.objName},#{item.price},
            (#{item.waterId},#{item.bId},#{item.meterType},#{item.objType},#{item.objId},#{item.preDegrees},#{item.curDegrees},
            #{item.preReadingTime},#{item.curReadingTime},#{item.communityId},'0',#{item.remark},#{item.feeId},#{item.objName},#{item.price},
            #{item.powerSupplyBureau},#{item.householdName},#{item.householdNumber},#{item.electricMeterId},#{item.handler},#{item.isTransferred},
            #{item.companyNameAfterTransfer},#{item.transferDate},#{item.correspondingHouseholdCount},#{item.lastPaymentDate},#{item.readingType},
            #{item.multiplyingFactor},#{item.unitPrice},#{item.invoiceAmount},#{item.amountDifference},#{item.autoDeduction},#{item.remark2},
            #{item.address},#{item.writeTime},#{item.writer},
            #{item.checkApplyCompanyName},#{item.checkApplyDeptProject},#{item.waterFeePayer},#{item.accountNumber},#{item.meterReadBookNo},
            #{item.waterConsumption},#{item.sewageTreatmentWater},#{item.collectionStandard},#{item.arrearsUnpaid},#{item.latePaymentFine},
            #{item.latePaymentSurcharge},#{item.feePaymentStatus},#{item.carryOverBalance},#{item.totalPayableAmount})
            #{item.address},#{item.writeTime},#{item.writer},#{item.checkApplyCompanyName},#{item.checkApplyDeptProject},#{item.waterFeePayer},
            #{item.accountNumber},#{item.meterReadBookNo},#{item.waterConsumption},#{item.sewageTreatmentWater},#{item.collectionStandard},
            #{item.arrearsUnpaid},#{item.latePaymentFine},#{item.latePaymentSurcharge},#{item.feePaymentStatus},#{item.carryOverBalance},#{item.totalPayableAmount})
        </foreach>
    </insert>