| | |
| | | <select id="getReportOweFeeInfo" parameterType="Map" resultType="Map"> |
| | | select distinct(t.payer_obj_id) payerObjId |
| | | from report_owe_fee t |
| | | LEFT JOIN pay_fee pf on t.fee_id = pf.fee_id |
| | | where 1 =1 |
| | | and pf.status_cd = '0' |
| | | <if test="configName !=null and configName != ''"> |
| | | and t.config_name= #{configName} |
| | | </if> |
| | |
| | | <if test="updateTime !=null and updateTime != ''"> |
| | | and t.update_time= #{updateTime} |
| | | </if> |
| | | |
| | | <if test="oweId !=null and oweId != ''"> |
| | | and t.owe_id= #{oweId} |
| | | </if> |
| | |
| | | </if> |
| | | <if test="amountOwed !=null and amountOwed != ''"> |
| | | and t.amount_owed= #{amountOwed} |
| | | </if> |
| | | <if test='hasOweFee !=null and hasOweFee == "Y"'> |
| | | and t.amount_owed > 0 |
| | | </if> |
| | | <if test="payerObjName !=null and payerObjName != ''"> |
| | | and t.payer_obj_name= #{payerObjName} |
| | |
| | | <if test="payerObjId !=null and payerObjId != ''"> |
| | | and t.payer_obj_id= #{payerObjId} |
| | | </if> |
| | | order by t.create_time desc |
| | | order by t.payer_obj_name |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | |
| | | <update id="updateReportOweFeeInfo" parameterType="Map"> |
| | | update report_owe_fee t |
| | | <set> |
| | | <if test="newBId != null and newBId != ''"> |
| | | t.b_id = #{newBId}, |
| | | </if> |
| | | <if test="configName !=null and configName != ''"> |
| | | t.config_name= #{configName}, |
| | | </if> |
| | |
| | | </if> |
| | | </set> |
| | | where 1=1 |
| | | and t.owe_id= #{oweId} |
| | | and t.owe_id= #{oweId} |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | </update> |
| | | |
| | | |
| | | <!-- 修改欠费统计信息 add by wuxw 2018-07-03 --> |
| | | <update id="deleteReportOweFeeInfo" parameterType="Map"> |
| | | delete from report_owe_fee |
| | | where 1=1 |
| | | <if test="oweId !=null and oweId != ''"> |
| | | and owe_id= #{oweId} |
| | | </if> |
| | | <if test="feeId !=null and feeId != ''"> |
| | | and fee_id = #{feeId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and community_id= #{communityId} |
| | | </if> |
| | | </update> |
| | | |
| | | <!-- 查询欠费统计数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryReportOweFeesCount" parameterType="Map" resultType="Map"> |
| | | select count(distinct(t.payer_obj_id)) count |
| | | from report_owe_fee t |
| | | LEFT JOIN pay_fee pf on t.fee_id = pf.fee_id |
| | | where 1 =1 |
| | | and pf.status_cd = '0' |
| | | <if test="configName !=null and configName != ''"> |
| | | and t.config_name= #{configName} |
| | | </if> |
| | |
| | | </if> |
| | | <if test="amountOwed !=null and amountOwed != ''"> |
| | | and t.amount_owed= #{amountOwed} |
| | | </if> |
| | | <if test='hasOweFee !=null and hasOweFee == "Y"'> |
| | | and t.amount_owed > 0 |
| | | </if> |
| | | <if test="payerObjName !=null and payerObjName != ''"> |
| | | and t.payer_obj_name= #{payerObjName} |
| | |
| | | communityId,t.payer_obj_type,t.payer_obj_type payerObjType,t.payer_obj_id,t.payer_obj_id payerObjId, |
| | | t.owner_id,t.owner_id ownerId,t.owner_name,t.owner_name ownerName |
| | | from report_owe_fee t |
| | | where 1 = 1 |
| | | LEFT JOIN pay_fee pf on t.fee_id = pf.fee_id |
| | | where 1 =1 |
| | | and pf.status_cd = '0' |
| | | <if test="configName !=null and configName != ''"> |
| | | and t.config_name= #{configName} |
| | | </if> |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | order by t.create_time desc |
| | | order by t.payer_obj_name |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | |
| | | from report_owe_fee t |
| | | left join building_owner_room_rel borr on borr.room_id = t.payer_obj_id and borr.status_cd = '0' |
| | | left join building_owner bo on borr.owner_id = bo.owner_id and bo.owner_type_cd = '1001' and bo.status_cd = '0' |
| | | where 1 = 1 |
| | | LEFT JOIN pay_fee pf on t.fee_id = pf.fee_id |
| | | where 1 =1 |
| | | and pf.status_cd = '0' |
| | | <if test="configName !=null and configName != ''"> |
| | | and t.config_name= #{configName} |
| | | </if> |
| | |
| | | from report_owe_fee t |
| | | left join owner_car oc on oc.car_id = t.payer_obj_id and oc.status_cd = '0' |
| | | left join building_owner bo on oc.owner_id = bo.owner_id and bo.owner_type_cd = '1001' and bo.status_cd = '0' |
| | | where 1 = 1 |
| | | LEFT JOIN pay_fee pf on t.fee_id = pf.fee_id |
| | | where 1 =1 |
| | | and pf.status_cd = '0' |
| | | <if test="configName !=null and configName != ''"> |
| | | and t.config_name= #{configName} |
| | | </if> |