
-- 匹配业务单据=收款单/上划单，流水方向升级为收款
update t_cas_smartmatch set fdirection = 'rec' where fbiztype in ('rec','transup') and fdirection = ' ';
-- 匹配业务单据=付款单/代发单/下拨单/付款交易处理单，流水方向升级为付款
update t_cas_smartmatch set fdirection = 'pay' where fbiztype in ('pay','agentpay','transdown','transhandle') and fdirection = ' ';
-- 匹配后收款单自动确认收款 或 匹配后付款单自动确认付款 为是时， 匹配后自动确认按钮更新为是
update t_cas_smartmatch set fautoconfirm = '1' where  (fautorec = '1' or fautopay ='1') and fautoconfirm = '0';

-- 业务单据日期取值
update t_cas_smartmatch set fbizdateprop = 'bizdate' where fbiztype ='pay' and fbizdateprop = ' ';
update t_cas_smartmatch set fbizdateprop = 'bizdate' where fbiztype ='rec' and fbizdateprop = ' ';
update t_cas_smartmatch set fbizdateprop = 'bizdate', fentrybizdateprop = 'bizdate' where fbiztype ='agentpay' and fbizdateprop = ' ';
update t_cas_smartmatch set fbizdateprop = 'transbilldate' where fbiztype ='transup' and fbizdateprop = ' ';
update t_cas_smartmatch set fbizdateprop = 'transbilldate' where fbiztype ='transdown' and fbizdateprop = ' ';
update t_cas_smartmatch set fbizdateprop = 'bizdate' where fbiztype ='transhandle' and fbizdateprop = ' ';
update t_cas_smartmatch set fbizdateprop = 'bizdate' where fbiztype ='exchange_buy' and fbizdateprop = ' ';
update t_cas_smartmatch set fbizdateprop = 'bizdate' where fbiztype ='exchange_sell' and fbizdateprop = ' ';

-- 匹配关系
update t_cas_smartmatch_e set fmatchrel = 'one-one' where fmatchrel = ' ';