--模板升级，更新兼职单据状态脚本--
--暂存--
update t_hdm_parttimeapplybill  set fbillstatus = 'A' where fauditstatus = 'A' and fbillstatus != 'G';
--已提交--
update t_hdm_parttimeapplybill  set fbillstatus = 'B' where fauditstatus = 'B' and fbillstatus = 'A';
--一级审批通过--
update t_hdm_parttimeapplybill  set fbillstatus = 'D', fauditstatus = 'B' where fauditstatus = 'D' and fbillstatus = 'A';
--审批通过(待生效和已生效)
update t_hdm_parttimeapplybill  set fbillstatus = 'C' where fauditstatus = 'C' and fparttimestatus !='-1';
--审批通过(终止)
update t_hdm_parttimeapplybill  set fauditstatus = 'F' where fauditstatus = 'C' and fparttimestatus ='-1';
--审批不通过
update t_hdm_parttimeapplybill  set fbillstatus = 'E' , fauditstatus = 'B' where fauditstatus = 'E' and fbillstatus = 'A';
--终止
update t_hdm_parttimeapplybill  set fbillstatus = 'F' where fauditstatus = 'F';
--待重新提交
update t_hdm_parttimeapplybill  set fbillstatus = 'G', fauditstatus = 'A' where fauditstatus = 'G' and fbillstatus = 'A';
