| | |
| | | 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 |
| | | 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.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} |
| | | #{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} |
| | |
| | | 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.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, |
| | | t.account_number accountNumber, |
| | | t.meter_read_book_no meterReadBookNo, |
| | | t.water_consumption waterConsumption, |
| | | t.sewage_treatment_water sewageTreatmentWater, |
| | | t.collection_standard collectionStandard, |
| | | t.arrears_unpaid arrearsUnpaid, |
| | | t.late_payment_fine latePaymentFine, |
| | | t.late_payment_surcharge latePaymentSurcharge, |
| | | t.fee_payment_status feePaymentStatus, |
| | | t.carry_over_balance carryOverBalance, |
| | | t.total_payable_amount totalPayableAmount |
| | | from meter_water t |
| | | left join meter_type mt on t.meter_type = mt.type_id and mt.status_cd = '0' |
| | | left join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | |
| | | <if test="writer !=null and writer != ''"> |
| | | and t.writer= #{writer} |
| | | </if> |
| | | <!-- 新增字段查询条件 --> |
| | | <if test="checkApplyCompanyName !=null and checkApplyCompanyName != ''"> |
| | | and t.check_apply_company_name= #{checkApplyCompanyName} |
| | | </if> |
| | | <if test="checkApplyDeptProject !=null and checkApplyDeptProject != ''"> |
| | | and t.check_apply_dept_project= #{checkApplyDeptProject} |
| | | </if> |
| | | <if test="waterFeePayer !=null and waterFeePayer != ''"> |
| | | and t.water_fee_payer= #{waterFeePayer} |
| | | </if> |
| | | <if test="accountNumber !=null and accountNumber != ''"> |
| | | and t.account_number= #{accountNumber} |
| | | </if> |
| | | <if test="meterReadBookNo !=null and meterReadBookNo != ''"> |
| | | and t.meter_read_book_no= #{meterReadBookNo} |
| | | </if> |
| | | <if test="waterConsumption !=null and waterConsumption != ''"> |
| | | and t.water_consumption= #{waterConsumption} |
| | | </if> |
| | | <if test="sewageTreatmentWater !=null and sewageTreatmentWater != ''"> |
| | | and t.sewage_treatment_water= #{sewageTreatmentWater} |
| | | </if> |
| | | <if test="collectionStandard !=null and collectionStandard != ''"> |
| | | and t.collection_standard= #{collectionStandard} |
| | | </if> |
| | | <if test="arrearsUnpaid !=null and arrearsUnpaid != ''"> |
| | | and t.arrears_unpaid= #{arrearsUnpaid} |
| | | </if> |
| | | <if test="latePaymentFine !=null and latePaymentFine != ''"> |
| | | and t.late_payment_fine= #{latePaymentFine} |
| | | </if> |
| | | <if test="latePaymentSurcharge !=null and latePaymentSurcharge != ''"> |
| | | and t.late_payment_surcharge= #{latePaymentSurcharge} |
| | | </if> |
| | | <if test="feePaymentStatus !=null and feePaymentStatus != ''"> |
| | | and t.fee_payment_status= #{feePaymentStatus} |
| | | </if> |
| | | <if test="carryOverBalance !=null and carryOverBalance != ''"> |
| | | and t.carry_over_balance= #{carryOverBalance} |
| | | </if> |
| | | <if test="totalPayableAmount !=null and totalPayableAmount != ''"> |
| | | and t.total_payable_amount= #{totalPayableAmount} |
| | | </if> |
| | | order by t.create_time desc,t.obj_name asc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | |
| | | </if> |
| | | <if test="writer !=null and writer != ''"> |
| | | , t.writer= #{writer} |
| | | </if> |
| | | <!-- 新增水费相关字段更新逻辑 --> |
| | | <if test="checkApplyCompanyName !=null and checkApplyCompanyName != ''"> |
| | | , t.check_apply_company_name= #{checkApplyCompanyName} |
| | | </if> |
| | | <if test="checkApplyDeptProject !=null and checkApplyDeptProject != ''"> |
| | | , t.check_apply_dept_project= #{checkApplyDeptProject} |
| | | </if> |
| | | <if test="waterFeePayer !=null and waterFeePayer != ''"> |
| | | , t.water_fee_payer= #{waterFeePayer} |
| | | </if> |
| | | <if test="accountNumber !=null and accountNumber != ''"> |
| | | , t.account_number= #{accountNumber} |
| | | </if> |
| | | <if test="meterReadBookNo !=null and meterReadBookNo != ''"> |
| | | , t.meter_read_book_no= #{meterReadBookNo} |
| | | </if> |
| | | <if test="waterConsumption !=null and waterConsumption != ''"> |
| | | , t.water_consumption= #{waterConsumption} |
| | | </if> |
| | | <if test="sewageTreatmentWater !=null and sewageTreatmentWater != ''"> |
| | | , t.sewage_treatment_water= #{sewageTreatmentWater} |
| | | </if> |
| | | <if test="collectionStandard !=null and collectionStandard != ''"> |
| | | , t.collection_standard= #{collectionStandard} |
| | | </if> |
| | | <if test="arrearsUnpaid !=null and arrearsUnpaid != ''"> |
| | | , t.arrears_unpaid= #{arrearsUnpaid} |
| | | </if> |
| | | <if test="latePaymentFine !=null and latePaymentFine != ''"> |
| | | , t.late_payment_fine= #{latePaymentFine} |
| | | </if> |
| | | <if test="latePaymentSurcharge !=null and latePaymentSurcharge != ''"> |
| | | , t.late_payment_surcharge= #{latePaymentSurcharge} |
| | | </if> |
| | | <if test="feePaymentStatus !=null and feePaymentStatus != ''"> |
| | | , t.fee_payment_status= #{feePaymentStatus} |
| | | </if> |
| | | <if test="carryOverBalance !=null and carryOverBalance != ''"> |
| | | , t.carry_over_balance= #{carryOverBalance} |
| | | </if> |
| | | <if test="totalPayableAmount !=null and totalPayableAmount != ''"> |
| | | , t.total_payable_amount= #{totalPayableAmount} |
| | | </if> |
| | | where 1=1 |
| | | <if test="waterId !=null and waterId != ''"> |
| | |
| | | <if test="writer !=null and writer != ''"> |
| | | and t.writer= #{writer} |
| | | </if> |
| | | <!-- 新增水费字段计数筛选条件 --> |
| | | <if test="checkApplyCompanyName !=null and checkApplyCompanyName != ''"> |
| | | and t.check_apply_company_name= #{checkApplyCompanyName} |
| | | </if> |
| | | <if test="checkApplyDeptProject !=null and checkApplyDeptProject != ''"> |
| | | and t.check_apply_dept_project= #{checkApplyDeptProject} |
| | | </if> |
| | | <if test="waterFeePayer !=null and waterFeePayer != ''"> |
| | | and t.water_fee_payer= #{waterFeePayer} |
| | | </if> |
| | | <if test="accountNumber !=null and accountNumber != ''"> |
| | | and t.account_number= #{accountNumber} |
| | | </if> |
| | | <if test="meterReadBookNo !=null and meterReadBookNo != ''"> |
| | | and t.meter_read_book_no= #{meterReadBookNo} |
| | | </if> |
| | | <if test="waterConsumption !=null and waterConsumption != ''"> |
| | | and t.water_consumption= #{waterConsumption} |
| | | </if> |
| | | <if test="sewageTreatmentWater !=null and sewageTreatmentWater != ''"> |
| | | and t.sewage_treatment_water= #{sewageTreatmentWater} |
| | | </if> |
| | | <if test="collectionStandard !=null and collectionStandard != ''"> |
| | | and t.collection_standard= #{collectionStandard} |
| | | </if> |
| | | <if test="arrearsUnpaid !=null and arrearsUnpaid != ''"> |
| | | and t.arrears_unpaid= #{arrearsUnpaid} |
| | | </if> |
| | | <if test="latePaymentFine !=null and latePaymentFine != ''"> |
| | | and t.late_payment_fine= #{latePaymentFine} |
| | | </if> |
| | | <if test="latePaymentSurcharge !=null and latePaymentSurcharge != ''"> |
| | | and t.late_payment_surcharge= #{latePaymentSurcharge} |
| | | </if> |
| | | <if test="feePaymentStatus !=null and feePaymentStatus != ''"> |
| | | and t.fee_payment_status= #{feePaymentStatus} |
| | | </if> |
| | | <if test="carryOverBalance !=null and carryOverBalance != ''"> |
| | | and t.carry_over_balance= #{carryOverBalance} |
| | | </if> |
| | | <if test="totalPayableAmount !=null and totalPayableAmount != ''"> |
| | | and t.total_payable_amount= #{totalPayableAmount} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | |
| | | 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) |
| | | 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.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.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> |
| | | |