--历史数据升级，更新简单委外入库单的出库仓库和出库仓位的数据
update t_im_mdc_ominbillentry set foutwarehouseid  = fwarehouseid where fwarehouseid != 0 and foutwarehouseid  = 0 and fid 
in (select fid from t_im_mdc_ominbill where finvschemeid in (select fid from t_im_invschemes where fisoutupdate ='1') and fbillstatus != 'A');
update t_im_mdc_ominbillentry set foutlocationid  = flocationid where flocationid != 0 and foutlocationid  = 0 and fid 
in (select fid from t_im_mdc_ominbill where finvschemeid in (select fid from t_im_invschemes where fisoutupdate ='1') and fbillstatus != 'A');
--历史数据升级，更新委外完工入库单的出库仓库和出库仓位的数据
update t_im_mdc_omcpbillentry set foutwarehouseid  = fwarehouseid where fwarehouseid != 0 and foutwarehouseid  = 0 and fid 
in (select fid from t_im_mdc_omcmplinbill where finvschemeid in (select fid from t_im_invschemes where fisoutupdate ='0') and fbillstatus != 'A');
update t_im_mdc_omcpbillentry set foutlocationid  = flocationid where flocationid != 0 and foutlocationid  = 0 and fid 
in (select fid from t_im_mdc_omcmplinbill where finvschemeid in (select fid from t_im_invschemes where fisoutupdate ='1') and fbillstatus != 'A');