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
) values (
#{receivableAmount},#{statisticsId},#{updateTime},#{remark},#{objName},#{receivedAmount},#{feeYear},#{feeMonth},#{feeId},#{configId},#{objId},#{feeName},#{oweAmount},#{communityId},#{feeCreateTime},#{objType}
)
update report_fee_month_statistics t set
t.owe_amount= #{oweAmount}
where 1=1
and t.statistics_id= #{statisticsId}
and t.fee_year <= #{feeYear}
and t.fee_month <= #{feeMonth}
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.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.community_id= #{communityId}
, t.fee_create_time= #{feeCreateTime}
, t.obj_type= #{objType}
where 1=1
and t.statistics_id= #{statisticsId}