带bracode的库存确认“ select wh_to_id,barcode from( select t.wh_to_id,t.barcode,count(t.barcode),sum(t.quantity) from tb_usc_material_flow t where t.barcode is not null having count(t.barcode) =1 group by t.wh_to_id,t.barcode) where (wh_to_id, barcode) not in (select stock.wh_id, stock.barcode from tb_usc_jit_stock stock); select stock.stock_id from tb_usc_jit_stock stock where (stock.wh_id, stock.barcode) not in ( select t.wh_to_id,t.barcode from tb_usc_material_flow t where t.barcode is not null having count(t.barcode) =1 group by t.wh_to_id,t.barcode) and stock.barcode is not null --------- 不带bracode的库存确认“ select * from tb_usc_jit_stock t where t.wh_id not in(select wh_id from tb_usc_warehouse wu where wu.wh_type='lv1' ) and t.barcode is null