| 
					
				 | 
			
			
				@@ -683,9 +683,17 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 <if test="fId != null and fId!= ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     AND wi.f_mblno = (select distinct f_mblno from t_warehousebills where f_id = #{fId}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     AND wi.f_warehouselocid in ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        select distinct wi.f_warehouselocid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        from t_warehousebillsitems wi left join t_warehousebillsfees wf on wf.src_id = wi.f_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        where wf.f_pid = #{fId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        SELECT DISTINCT * FROM ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            SELECT wi.f_warehouselocid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            FROM t_warehousebillsitems wi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            LEFT JOIN t_warehousebillsfees wf ON wf.src_id = wi.f_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            WHERE wf.f_pid = #{fId} and wf.f_billtype = 'SJCK' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            UNION ALL 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            SELECT wh.f_warehouse_locationid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            FROM t_whgenleg wh 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            LEFT JOIN t_warehousebillsfees wf ON wf.src_id = wh.f_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            WHERE wf.f_pid = #{fId} and wf.f_billtype = 'KCZZ' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        ) as wh 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -695,9 +703,17 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 <if test="fId != null and fId!= ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     AND wi.f_mblno = (select distinct f_mblno from t_warehousebills where f_id = #{fId}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     AND wi.f_transfer_warehouselocid in ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        select distinct wi.f_warehouselocid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        from t_warehousebillsitems wi left join t_warehousebillsfees wf on wf.src_id = wi.f_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        where wf.f_pid = #{fId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        SELECT DISTINCT * FROM ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            SELECT wi.f_warehouselocid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            FROM t_warehousebillsitems wi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            LEFT JOIN t_warehousebillsfees wf ON wf.src_id = wi.f_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            WHERE wf.f_pid = #{fId} and wf.f_billtype = 'SJCK' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            UNION ALL 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            SELECT wh.f_warehouse_locationid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            FROM t_whgenleg wh 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            LEFT JOIN t_warehousebillsfees wf ON wf.src_id = wh.f_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            WHERE wf.f_pid = #{fId} and wf.f_billtype = 'KCZZ' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        ) as wh 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 |