From 7878e3827df68db871a606575f73460158d8c66c Mon Sep 17 00:00:00 2001
From: chengf <cgf12138@163.com>
Date: 星期二, 20 一月 2026 17:22:44 +0800
Subject: [PATCH] Z三子表逻辑
---
java110-db/src/main/resources/mapper/fee/MeterWaterServiceDaoImplMapper.xml | 306 ++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 293 insertions(+), 13 deletions(-)
diff --git a/java110-db/src/main/resources/mapper/fee/MeterWaterServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/fee/MeterWaterServiceDaoImplMapper.xml
index 86f3282..75ae114 100755
--- a/java110-db/src/main/resources/mapper/fee/MeterWaterServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/fee/MeterWaterServiceDaoImplMapper.xml
@@ -8,10 +8,16 @@
<insert id="saveBusinessMeterWaterInfo" parameterType="Map">
insert into business_meter_water(
remark,cur_reading_time,water_id,cur_degrees,operate,meter_type,pre_degrees,obj_id,pre_reading_time,
- b_id,community_id,obj_type,fee_id,obj_name,price
+ b_id,community_id,obj_type,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
) values (
#{remark},#{curReadingTime},#{waterId},#{curDegrees},#{operate},#{meterType},#{preDegrees},#{objId},
- #{preReadingTime},#{bId},#{communityId},#{objType},#{feeId},#{objName},#{price}
+ #{preReadingTime},#{bId},#{communityId},#{objType},#{feeId},#{objName},#{price},
+ #{powerSupplyBureau},#{householdName},#{householdNumber},#{electricMeterId},#{handler},#{isTransferred},
+ #{companyNameAfterTransfer},#{transferDate},#{correspondingHouseholdCount},#{lastPaymentDate},#{readingType},
+ #{multiplyingFactor},#{unitPrice},#{invoiceAmount},#{amountDifference},#{autoDeduction},#{remark2}
)
</insert>
@@ -22,7 +28,14 @@
waterId,t.cur_degrees,t.cur_degrees curDegrees,t.operate,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
+ communityId,t.obj_type,t.obj_type objType,t.fee_id,t.fee_id feeId,t.obj_name,t.obj_name objName,t.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
from business_meter_water t
where 1 =1
<if test="remark !=null and remark != ''">
@@ -64,7 +77,58 @@
<if test="objType !=null and objType != ''">
and t.obj_type= #{objType}
</if>
-
+ <!-- 鏂板瀛楁鏌ヨ鏉′欢 -->
+ <if test="powerSupplyBureau !=null and powerSupplyBureau != ''">
+ and t.power_supply_bureau= #{powerSupplyBureau}
+ </if>
+ <if test="householdName !=null and householdName != ''">
+ and t.household_name= #{householdName}
+ </if>
+ <if test="householdNumber !=null and householdNumber != ''">
+ and t.household_number= #{householdNumber}
+ </if>
+ <if test="electricMeterId !=null and electricMeterId != ''">
+ and t.electric_meter_id= #{electricMeterId}
+ </if>
+ <if test="handler !=null and handler != ''">
+ and t.`handler`= #{handler}
+ </if>
+ <if test="isTransferred !=null and isTransferred != ''">
+ and t.is_transferred= #{isTransferred}
+ </if>
+ <if test="companyNameAfterTransfer !=null and companyNameAfterTransfer != ''">
+ and t.company_name_after_transfer= #{companyNameAfterTransfer}
+ </if>
+ <if test="transferDate !=null and transferDate != ''">
+ and t.transfer_date= #{transferDate}
+ </if>
+ <if test="correspondingHouseholdCount !=null and correspondingHouseholdCount != ''">
+ and t.corresponding_household_count= #{correspondingHouseholdCount}
+ </if>
+ <if test="lastPaymentDate !=null and lastPaymentDate != ''">
+ and t.last_payment_date= #{lastPaymentDate}
+ </if>
+ <if test="readingType !=null and readingType != ''">
+ and t.reading_type= #{readingType}
+ </if>
+ <if test="multiplyingFactor !=null and multiplyingFactor != ''">
+ and t.multiplying_factor= #{multiplyingFactor}
+ </if>
+ <if test="unitPrice !=null and unitPrice != ''">
+ and t.unit_price= #{unitPrice}
+ </if>
+ <if test="invoiceAmount !=null and invoiceAmount != ''">
+ and t.invoice_amount= #{invoiceAmount}
+ </if>
+ <if test="amountDifference !=null and amountDifference != ''">
+ and t.amount_difference= #{amountDifference}
+ </if>
+ <if test="autoDeduction !=null and autoDeduction != ''">
+ and t.auto_deduction= #{autoDeduction}
+ </if>
+ <if test="remark2 !=null and remark2 != ''">
+ and t.remark2= #{remark2}
+ </if>
</select>
@@ -72,10 +136,18 @@
<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
+ community_id,obj_type,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
) 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.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}
from business_meter_water t where 1=1
<if test="remark !=null and remark != ''">
and t.remark= #{remark}
@@ -114,7 +186,19 @@
<if test="objType !=null and objType != ''">
and t.obj_type= #{objType}
</if>
-
+ <!-- 鏂板瀛楁绛涢�夋潯浠� -->
+ <if test="powerSupplyBureau !=null and powerSupplyBureau != ''">
+ and t.power_supply_bureau= #{powerSupplyBureau}
+ </if>
+ <if test="householdName !=null and householdName != ''">
+ and t.household_name= #{householdName}
+ </if>
+ <if test="householdNumber !=null and householdNumber != ''">
+ and t.household_number= #{householdNumber}
+ </if>
+ <if test="electricMeterId !=null and electricMeterId != ''">
+ and t.electric_meter_id= #{electricMeterId}
+ </if>
</insert>
@@ -124,7 +208,14 @@
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
+ 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
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'
@@ -171,11 +262,71 @@
<if test="feeId !=null and feeId != ''">
and t.fee_id = #{feeId}
</if>
+ <!-- 鏂板瀛楁鏌ヨ鏉′欢 -->
+ <if test="powerSupplyBureau !=null and powerSupplyBureau != ''">
+ and t.power_supply_bureau= #{powerSupplyBureau}
+ </if>
+ <if test="householdName !=null and householdName != ''">
+ and t.household_name= #{householdName}
+ </if>
+ <if test="householdNumber !=null and householdNumber != ''">
+ and t.household_number= #{householdNumber}
+ </if>
+ <if test="electricMeterId !=null and electricMeterId != ''">
+ and t.electric_meter_id= #{electricMeterId}
+ </if>
+ <if test="handler !=null and handler != ''">
+ and t.`handler`= #{handler}
+ </if>
+ <if test="isTransferred !=null and isTransferred != ''">
+ and t.is_transferred= #{isTransferred}
+ </if>
+ <if test="companyNameAfterTransfer !=null and companyNameAfterTransfer != ''">
+ and t.company_name_after_transfer= #{companyNameAfterTransfer}
+ </if>
+ <if test="transferDate !=null and transferDate != ''">
+ and t.transfer_date= #{transferDate}
+ </if>
+ <if test="correspondingHouseholdCount !=null and correspondingHouseholdCount != ''">
+ and t.corresponding_household_count= #{correspondingHouseholdCount}
+ </if>
+ <if test="lastPaymentDate !=null and lastPaymentDate != ''">
+ and t.last_payment_date= #{lastPaymentDate}
+ </if>
+ <if test="readingType !=null and readingType != ''">
+ and t.reading_type= #{readingType}
+ </if>
+ <if test="multiplyingFactor !=null and multiplyingFactor != ''">
+ and t.multiplying_factor= #{multiplyingFactor}
+ </if>
+ <if test="unitPrice !=null and unitPrice != ''">
+ and t.unit_price= #{unitPrice}
+ </if>
+ <if test="invoiceAmount !=null and invoiceAmount != ''">
+ and t.invoice_amount= #{invoiceAmount}
+ </if>
+ <if test="amountDifference !=null and amountDifference != ''">
+ and t.amount_difference= #{amountDifference}
+ </if>
+ <if test="autoDeduction !=null and autoDeduction != ''">
+ and t.auto_deduction= #{autoDeduction}
+ </if>
+ <if test="remark2 !=null and remark2 != ''">
+ and t.remark2= #{remark2}
+ </if>
+ <if test="address !=null and address != ''">
+ and t.address= #{address}
+ </if>
+ <if test="writeTime !=null and writeTime != ''">
+ and t.write_time= #{writeTime}
+ </if>
+ <if test="writer !=null and writer != ''">
+ and t.writer= #{writer}
+ </if>
order by t.create_time desc,t.obj_name asc
<if test="page != -1 and page != null ">
limit #{page}, #{row}
</if>
-
</select>
@@ -215,6 +366,67 @@
<if test="objType !=null and objType != ''">
, t.obj_type= #{objType}
</if>
+ <!-- 鏂板瀛楁鏇存柊閫昏緫 -->
+ <if test="powerSupplyBureau !=null and powerSupplyBureau != ''">
+ , t.power_supply_bureau= #{powerSupplyBureau}
+ </if>
+ <if test="householdName !=null and householdName != ''">
+ , t.household_name= #{householdName}
+ </if>
+ <if test="householdNumber !=null and householdNumber != ''">
+ , t.household_number= #{householdNumber}
+ </if>
+ <if test="electricMeterId !=null and electricMeterId != ''">
+ , t.electric_meter_id= #{electricMeterId}
+ </if>
+ <if test="handler !=null and handler != ''">
+ , t.`handler`= #{handler}
+ </if>
+ <if test="isTransferred !=null and isTransferred != ''">
+ , t.is_transferred= #{isTransferred}
+ </if>
+ <if test="companyNameAfterTransfer !=null and companyNameAfterTransfer != ''">
+ , t.company_name_after_transfer= #{companyNameAfterTransfer}
+ </if>
+ <if test="transferDate !=null and transferDate != ''">
+ , t.transfer_date= #{transferDate}
+ </if>
+ <if test="correspondingHouseholdCount !=null and correspondingHouseholdCount != ''">
+ , t.corresponding_household_count= #{correspondingHouseholdCount}
+ </if>
+ <if test="lastPaymentDate !=null and lastPaymentDate != ''">
+ , t.last_payment_date= #{lastPaymentDate}
+ </if>
+ <if test="readingType !=null and readingType != ''">
+ , t.reading_type= #{readingType}
+ </if>
+ <if test="multiplyingFactor !=null and multiplyingFactor != ''">
+ , t.multiplying_factor= #{multiplyingFactor}
+ </if>
+ <if test="unitPrice !=null and unitPrice != ''">
+ , t.unit_price= #{unitPrice}
+ </if>
+ <if test="invoiceAmount !=null and invoiceAmount != ''">
+ , t.invoice_amount= #{invoiceAmount}
+ </if>
+ <if test="amountDifference !=null and amountDifference != ''">
+ , t.amount_difference= #{amountDifference}
+ </if>
+ <if test="autoDeduction !=null and autoDeduction != ''">
+ , t.auto_deduction= #{autoDeduction}
+ </if>
+ <if test="remark2 !=null and remark2 != ''">
+ , t.remark2= #{remark2}
+ </if>
+ <if test="address !=null and address != ''">
+ , t.address= #{address}
+ </if>
+ <if test="writeTime !=null and writeTime != ''">
+ , t.write_time= #{writeTime}
+ </if>
+ <if test="writer !=null and writer != ''">
+ , t.writer= #{writer}
+ </if>
where 1=1
<if test="waterId !=null and waterId != ''">
and t.water_id= #{waterId}
@@ -222,7 +434,6 @@
<if test="bId !=null and bId != ''">
and t.b_id= #{bId}
</if>
-
</update>
<!-- 鏌ヨ姘寸數璐规暟閲� add by wuxw 2018-07-03 -->
@@ -270,6 +481,67 @@
<if test="feeId !=null and feeId != ''">
and t.fee_id = #{feeId}
</if>
+ <!-- 鏂板瀛楁璁℃暟绛涢�夋潯浠� -->
+ <if test="powerSupplyBureau !=null and powerSupplyBureau != ''">
+ and t.power_supply_bureau= #{powerSupplyBureau}
+ </if>
+ <if test="householdName !=null and householdName != ''">
+ and t.household_name= #{householdName}
+ </if>
+ <if test="householdNumber !=null and householdNumber != ''">
+ and t.household_number= #{householdNumber}
+ </if>
+ <if test="electricMeterId !=null and electricMeterId != ''">
+ and t.electric_meter_id= #{electricMeterId}
+ </if>
+ <if test="handler !=null and handler != ''">
+ and t.`handler`= #{handler}
+ </if>
+ <if test="isTransferred !=null and isTransferred != ''">
+ and t.is_transferred= #{isTransferred}
+ </if>
+ <if test="companyNameAfterTransfer !=null and companyNameAfterTransfer != ''">
+ and t.company_name_after_transfer= #{companyNameAfterTransfer}
+ </if>
+ <if test="transferDate !=null and transferDate != ''">
+ and t.transfer_date= #{transferDate}
+ </if>
+ <if test="correspondingHouseholdCount !=null and correspondingHouseholdCount != ''">
+ and t.corresponding_household_count= #{correspondingHouseholdCount}
+ </if>
+ <if test="lastPaymentDate !=null and lastPaymentDate != ''">
+ and t.last_payment_date= #{lastPaymentDate}
+ </if>
+ <if test="readingType !=null and readingType != ''">
+ and t.reading_type= #{readingType}
+ </if>
+ <if test="multiplyingFactor !=null and multiplyingFactor != ''">
+ and t.multiplying_factor= #{multiplyingFactor}
+ </if>
+ <if test="unitPrice !=null and unitPrice != ''">
+ and t.unit_price= #{unitPrice}
+ </if>
+ <if test="invoiceAmount !=null and invoiceAmount != ''">
+ and t.invoice_amount= #{invoiceAmount}
+ </if>
+ <if test="amountDifference !=null and amountDifference != ''">
+ and t.amount_difference= #{amountDifference}
+ </if>
+ <if test="autoDeduction !=null and autoDeduction != ''">
+ and t.auto_deduction= #{autoDeduction}
+ </if>
+ <if test="remark2 !=null and remark2 != ''">
+ and t.remark2= #{remark2}
+ </if>
+ <if test="address !=null and address != ''">
+ and t.address= #{address}
+ </if>
+ <if test="writeTime !=null and writeTime != ''">
+ and t.write_time= #{writeTime}
+ </if>
+ <if test="writer !=null and writer != ''">
+ and t.writer= #{writer}
+ </if>
</select>
@@ -277,12 +549,20 @@
<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)
+ community_id,obj_type,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)
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.objId},#{item.preReadingTime},'-1',#{item.communityId},#{item.objType},#{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})
</foreach>
</insert>
-</mapper>
+</mapper>
\ No newline at end of file
--
Gitblit v1.8.0