--更新实际预提金额，等于预提金额
update t_ifm_intbill_batch_int a set factualinstamt=finterestamt
where  (fintobjectid is null or fintobjectid=0)
and (factualinstamt is null or factualinstamt =0)
and exists (select 1 from t_ifm_intbill_batch t
							where t.fid=a.fid
							and t.fdatasource in ('ifm','hand')
							and t.floantype != 'deposit'
							and t.fbiztype = 'preint');

--利息预提批量处理历史数据中计息对象为空的数据，更新
update t_ifm_intbill_batch_int a set fintobjectid=(select max(fid) from t_ifm_intobject b where b.fintobjectid=a.finneracctid)
where (fintobjectid is null or fintobjectid=0)
and finneracctid >0
and exists (select 1 from t_ifm_intobject c where c.fintobjectid=a.finneracctid)
and exists (select 1 from t_ifm_intbill_batch t
							where t.fid=a.fid
							and t.fdatasource in ('ifm','hand')
							and t.floantype != 'deposit'
							and t.fbiztype = 'preint');