| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getFeeInfoBus" resultType="Map" parameterType="Map"> |
| | | select count(1) count |
| | | from pay_fee t |
| | | INNER join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0' |
| | | left join t_dict td1 on pfc.fee_type_cd = td1.status_cd and td1.table_name = 'pay_fee_config' and td1.table_columns = 'fee_type_cd' |
| | | left join t_dict td2 on t.state = td2.status_cd and td2.table_name = 'pay_fee' and td2.table_columns = 'state' |
| | | left join t_dict td3 on pfc.fee_flag = td3.status_cd and td3.table_name = 'pay_fee' and td3.table_columns = 'fee_flag' |
| | | left join t_dict td4 on pfc.bill_type = td4.status_cd and td4.table_name = 'pay_fee_config' and td4.table_columns = 'bill_type' |
| | | LEFT JOIN pay_fee_attrs pfa on t.fee_id = pfa.fee_id and pfa.spec_cd = '390002' and pfa.status_cd = '0' |
| | | LEFT JOIN pay_fee_attrs pfa1 on t.fee_id = pfa1.fee_id and pfa1.spec_cd = '390010' and pfa1.status_cd = '0' |
| | | LEFT JOIN pay_fee_attrs pfa2 on t.fee_id = pfa2.fee_id and pfa2.spec_cd = '390008' and pfa2.status_cd = '0' |
| | | left join import_fee_detail ifd on t.fee_id = ifd.fee_id and ifd.status_cd = '0' and t.fee_flag = '2006012' |
| | | LEFT JOIN meter_water mw on t.fee_id = mw.fee_id and mw.status_cd = '0' and mw.community_id = t.community_id |
| | | where 1 = 1 |
| | | <if test="feeTypeCd != null and feeTypeCd != ''"> |
| | | and t.fee_type_cd = #{feeTypeCd} |
| | | </if> |
| | | <if test="startTime != null"> <!-- 修正原条件中的变量错误 --> |
| | | and t.start_time = #{startTime} |
| | | </if> |
| | | <if test="statusCd != null and statusCd != ''"> <!-- 修正原条件中的变量错误 --> |
| | | and t.status_cd = #{statusCd} |
| | | </if> |
| | | <if test="endTime != null"> |
| | | and STR_TO_DATE(pfa1.`value`, '%Y-%m-%d %H:%i:%s.%f') = #{endTime} |
| | | </if> |
| | | <if test="community_id != null and community_id != ''"> <!-- 修正原条件中的变量错误 --> |
| | | and t.community_id = #{communityId} |
| | | and pfc.community_id in (#{communityId}, '9999') |
| | | </if> |
| | | <if test="payerObjId != null and payerObjId != ''"> <!-- 修正原条件中的变量错误 --> |
| | | and t.payer_obj_id = #{payerObjId} |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 修改费用信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateFeeInfoInstance" parameterType="Map"> |
| | | update pay_fee t set t.status_cd = #{statusCd} |