insert into report_fee_month_statistics(receivable_amount, statistics_id, update_time, remark, obj_name,
received_amount, fee_year, fee_month, fee_id, config_id,
obj_id, fee_name, owe_amount, community_id, fee_create_time, obj_type,
deadline_time, cur_max_time,
his_owe_amount, cur_receivable_amount, cur_received_amount,
his_owe_received_amount, pre_received_amount, obj_name_num)
values (#{receivableAmount}, #{statisticsId}, #{updateTime}, #{remark}, #{objName}, #{receivedAmount},
#{feeYear}, #{feeMonth},
#{feeId}, #{configId}, #{objId}, #{feeName}, #{oweAmount}, #{communityId}, #{feeCreateTime}, #{objType},
#{deadlineTime}, #{curMaxTime},
#{hisOweAmount}, #{curReceivableAmount}, #{curReceivedAmount}, #{hisOweReceivedAmount},
#{preReceivedAmount}, #{objNameNum})
update report_fee_month_statistics t set
t.owe_amount= #{oweAmount}
where 1=1
and t.statistics_id= #{statisticsId}
and t.cur_max_time <= #{curMaxTime}
and t.fee_id= #{feeId}
update report_fee_month_statistics t set t.status_cd = #{statusCd}
,t.b_id = #{newBId}
, t.receivable_amount= #{receivableAmount}
, t.update_time= #{updateTime}
, t.deadline_time= #{deadlineTime}
, t.remark= #{remark}
, t.obj_name= #{objName}
, t.obj_name_num= #{objNameNum}
, t.received_amount= #{receivedAmount}
, t.fee_year= #{feeYear}
, t.fee_month= #{feeMonth}
, t.fee_id= #{feeId}
, t.config_id= #{configId}
, t.obj_id= #{objId}
, t.fee_name= #{feeName}
, t.owe_amount= #{oweAmount}
, t.fee_create_time= #{feeCreateTime}
, t.obj_type= #{objType}
, t.his_owe_amount= #{hisOweAmount}
, t.cur_receivable_amount= #{curReceivableAmount}
, t.cur_received_amount= #{curReceivedAmount}
, t.his_owe_received_amount= #{hisOweReceivedAmount}
, t.pre_received_amount= #{preReceivedAmount}
where 1=1
and t.statistics_id= #{statisticsId}
and t.community_id= #{communityId}
update report_fee_month_statistics t set t.status_cd = '1'
where 1=1
and t.statistics_id= #{statisticsId}
and t.community_id= #{communityId}
and t.fee_id= #{feeId}
and t.config_id= #{configId}
delete from report_fee_month_statistics where fee_id in
#{item}
and community_id = #{communityId}