-- 新增暂存
update t_hdm_transferbill  set fbillstatus  = 'A',fauditstatus  ='A' where ftransferinstatus  = 'A' and ftransferoutstatus = 'A' and  (fbillstatus  = 'A' or fbillstatus  = 'B');
-- 调出二次提交暂存
update t_hdm_transferbill  set fbillstatus  = 'A',fauditstatus  ='D'  where ftransferinstatus  = 'A' and ftransferoutstatus ='C' and (fbillstatus  = 'A' or fbillstatus  = 'B');
-- 调入二次提交暂存
update t_hdm_transferbill  set fbillstatus  = 'A' ,fauditstatus  ='D' where ftransferinstatus  = 'C' and ftransferoutstatus ='A' and (fbillstatus  = 'A' or fbillstatus  = 'B');
-- 调出二次提交驳回暂存
update t_hdm_transferbill  set fbillstatus  = 'A',fauditstatus  ='D'  where ftransferinstatus  = 'G' and ftransferoutstatus ='C' and (fbillstatus  = 'A' or fbillstatus  = 'B');
-- 调入二次提交驳回暂存
update t_hdm_transferbill  set fbillstatus  = 'A',fauditstatus  ='D'  where ftransferinstatus  = 'C' and ftransferoutstatus ='G' and (fbillstatus  = 'A' or fbillstatus  = 'B');
-- 调出已提交
update t_hdm_transferbill set  fbillstatus = 'B',fauditstatus  ='B'  where ftransferinstatus = 'A'  and ftransferoutstatus = 'B'  and (fbillstatus  = 'A' or fbillstatus  = 'B');
-- 调入已提交
update t_hdm_transferbill set  fbillstatus = 'B',fauditstatus  ='B' where ftransferinstatus = 'B'  and ftransferoutstatus = 'A'  and (fbillstatus  = 'A' or fbillstatus  = 'B');
-- 调出待重新提交
update t_hdm_transferbill set  fbillstatus = 'G',fauditstatus  ='A' where ftransferinstatus = 'A'  and ftransferoutstatus = 'G'  and (fbillstatus  = 'A' or fbillstatus  = 'B');
-- 调入待重新提交
update t_hdm_transferbill set  fbillstatus = 'G',fauditstatus  ='A' where ftransferinstatus = 'G'  and ftransferoutstatus = 'A'  and (fbillstatus  = 'A' or fbillstatus  = 'B');
-- 调出发起调出审批中 审批中
update t_hdm_transferbill set  fbillstatus = 'D',fauditstatus  ='D' where ftransferinstatus = 'A'  and ftransferoutstatus = 'D'  and (fbillstatus  = 'A' or fbillstatus  = 'B');
-- 调出发起调入已提交  审批中
update t_hdm_transferbill set  fbillstatus = 'D',fauditstatus  ='D' where ftransferinstatus = 'B'  and ftransferoutstatus = 'C'  and (fbillstatus  = 'A' or fbillstatus  = 'B');
-- 调出发起调入审批中  审批中
update t_hdm_transferbill set  fbillstatus = 'D',fauditstatus  ='D' where ftransferinstatus = 'D'  and ftransferoutstatus = 'C'  and (fbillstatus  = 'A' or fbillstatus  = 'B');
-- 调入发起调入审批中 审批中
update t_hdm_transferbill set  fbillstatus = 'D',fauditstatus  ='D' where ftransferinstatus = 'D'  and ftransferoutstatus = 'A'  and (fbillstatus  = 'A' or fbillstatus  = 'B');
-- 调入发起调出已提交  审批中
update t_hdm_transferbill set  fbillstatus = 'D',fauditstatus  ='D' where ftransferinstatus = 'C'  and ftransferoutstatus = 'B'  and (fbillstatus  = 'A' or fbillstatus  = 'B');
-- 调入发起调出审批中  审批中
update t_hdm_transferbill set  fbillstatus = 'D',fauditstatus  ='D' where ftransferinstatus = 'C'  and ftransferoutstatus = 'D'  and (fbillstatus  = 'A' or fbillstatus  = 'B');
-- 审批通过
update t_hdm_transferbill set  fbillstatus = 'C',fauditstatus  ='C' where  ftransferinstatus = 'C'  and ftransferoutstatus = 'C'  and (fbillstatus  = 'A' or fbillstatus  = 'B');
-- 审批不通过
update t_hdm_transferbill set  fbillstatus = 'E',fauditstatus  ='E'  where (ftransferinstatus = 'E' or ftransferoutstatus = 'E') and (fbillstatus  = 'A' or fbillstatus  = 'B');
-- 已废弃
update t_hdm_transferbill set  fbillstatus = 'F',fauditstatus  ='F' where  ftransferinstatus = 'F' and ftransferoutstatus = 'F'   and (fbillstatus  = 'A' or fbillstatus  = 'B');
-- 将audistatus改成完成状态
update t_hdm_transferbill set  fauditstatus  ='H' where ftransferstatus = '2'  and (fbillstatus  = 'A' or fbillstatus  = 'B');
