-- 将供应商ID回填到分录行
UPDATE t_pur_bidbillentry a SET fwinsupplierid = B.FSupplierID, fwinamount = A.FAMOUNT FROM t_pur_bidbill_a b INNER JOIN t_pur_bidbill c ON B.FID = C.FID WHERE EXISTS (SELECT 1 FROM t_pur_bidbill_a WHERE FID = A.FID) AND (B.FID = A.FID AND ((C.FBIDSTATUS IN ('E', 'F') AND C.FQUOTEMODE = '1') AND A.FWINSUPPLIERID = 0))
