/* 财务应收、暂估应收、收入确认单业务类型历史数据升级 */
UPDATE T_AR_REVCFMBILL SET fbiztype = fbiztypeid where fbiztype = 0 and fbiztypeid <> 0;
update T_AR_FINARBILL A set fbiztype = (select fbiztypeid from T_AR_FINARBILL_E where fid = A.fid and fbiztypeid <> 0) where exists (select fbiztypeid from T_AR_FINARBILL_E where fid = A.fid and fbiztypeid <> 0) and fbiztype = 0;
update T_AR_BUSBILL A set fbiztype = (select fbiztypeid from T_AR_BUSBILL_E where fid = A.fid and fbiztypeid <> 0) where exists (select fbiztypeid from T_AR_BUSBILL_E where fid = A.fid and fbiztypeid <> 0) and fbiztype = 0;