--内部交易明细业务类型字段更新
UPDATE T_BEI_TRANSDETAIL SET FBIZTYPE='1' WHERE FDATASOURCE ='fromifm';
--业务类型为资金上划
UPDATE T_BEI_TRANSDETAIL T SET FBIZTYPE='2' WHERE FSRCBILLTYPE='ifm_rectransbill' AND EXISTS (SELECT FID FROM T_IFM_RECTRANSBILL M WHERE FTRANSTYPE='5' AND M.FID=T.FSOURCEBILLID);
--业务类型为资金下拨
UPDATE T_BEI_TRANSDETAIL T SET FBIZTYPE='3' WHERE FSRCBILLTYPE='ifm_transhandlebill' AND EXISTS (SELECT FID FROM T_IFM_TRANSHANDLE M WHERE FTRANSTYPE='3' AND M.FID=T.FSOURCEBILLID);
--内部交易明细的银行对账标识码赋值
UPDATE T_BEI_TRANSDETAIL T SET FORIGINALBANKCHECKFLAG= (SELECT FBEIBANKCHECKFLAG FROM T_IFM_TRANSHANDLE_E E WHERE E.FID=T.FSOURCEBILLID) WHERE FORIGINALBANKCHECKFLAG=' ' AND FDEBITAMOUNT>0 AND EXISTS (SELECT FID FROM T_IFM_TRANSHANDLE_E E WHERE E.FISCOMMITBE='1' AND E.FPAIDSTATUS='D' AND E.FID=T.FSOURCEBILLID);
