|  | @@ -398,12 +398,11 @@
 | 
	
		
			
				|  |  |              CONCAT_WS('-',IFNULL( TG.f_name, '' ),CONCAT_WS( IFNULL( TG.f_packagespecs, '' ), '/袋' ),IFNULL( TWG.f_marks, '' )) AS spu
 | 
	
		
			
				|  |  |          FROM t_warehouse TW
 | 
	
		
			
				|  |  |          LEFT JOIN t_whgenleg TWG ON TWG.f_warehouseid = TW.f_id
 | 
	
		
			
				|  |  | -        LEFT JOIN t_warehousebills TWB ON TWB.f_warehouseid = TW.f_id
 | 
	
		
			
				|  |  |          LEFT JOIN t_corps TC ON TC.f_id = TWG.f_corpid
 | 
	
		
			
				|  |  |          LEFT JOIN t_goods TG ON TG.f_id = TWG.f_goodsid
 | 
	
		
			
				|  |  |          <where>
 | 
	
		
			
				|  |  |              TW.del_flag = '0'
 | 
	
		
			
				|  |  | -            AND TWB.f_items_status != 4
 | 
	
		
			
				|  |  | +            and TWG.f_qtyblc > 0
 | 
	
		
			
				|  |  |              <if test="warehouseCode != null  and warehouseCode != ''"> and TW.f_id = #{warehouseCode}</if>
 | 
	
		
			
				|  |  |              <if test="ownerName != null  and ownerName != ''"> and TC.f_name like concat('%', #{ownerName}, '%')</if>
 | 
	
		
			
				|  |  |              <if test="goodsName != null  and goodsName != ''"> and TG.f_name like concat('%', #{goodsName}, '%')</if>
 | 
	
	
		
			
				|  | @@ -451,13 +450,12 @@
 | 
	
		
			
				|  |  |              t_whgenleg TWG
 | 
	
		
			
				|  |  |          LEFT JOIN t_warehouse TW ON TWG.f_warehouseid = TW.f_id
 | 
	
		
			
				|  |  |          LEFT JOIN t_warehouse ware ON ware.f_id = TWG.f_warehouse_locationid
 | 
	
		
			
				|  |  | -        LEFT JOIN t_warehousebills TWB ON TWB.f_warehouseid = TW.f_id
 | 
	
		
			
				|  |  |          LEFT JOIN t_corps TC ON TC.f_id = TWG.f_corpid
 | 
	
		
			
				|  |  |          LEFT JOIN t_goods TG ON TG.f_id = TWG.f_goodsid
 | 
	
		
			
				|  |  |          LEFT JOIN t_warehousebills TWB ON TWG.f_originalbillno = TWB.f_billno
 | 
	
		
			
				|  |  |          <where>
 | 
	
		
			
				|  |  |              TW.del_flag = '0'
 | 
	
		
			
				|  |  | -            AND TWB.f_items_status != 4
 | 
	
		
			
				|  |  | +            and TWG.f_qtyblc > 0
 | 
	
		
			
				|  |  |              <if test="warehouseCode != null  and warehouseCode != ''"> and TWG.f_warehouseid = #{warehouseCode}</if>
 | 
	
		
			
				|  |  |              <if test="ownerName != null  and ownerName != ''"> and TC.f_name like concat('%', #{ownerName}, '%')</if>
 | 
	
		
			
				|  |  |              <if test="ownerCode != null  and ownerCode != ''"> and TC.f_id = #{ownerCode}</if>
 |