|  | @@ -2548,6 +2548,7 @@
 | 
	
		
			
				|  |  |          DISTINCT
 | 
	
		
			
				|  |  |          tv.f_name AS shipsName,
 | 
	
		
			
				|  |  |          ty.f_no AS voyage,
 | 
	
		
			
				|  |  | +        ty.f_atd AS atd,
 | 
	
		
			
				|  |  |          ROUND(sum( CASE f_dc WHEN 'D' THEN f_amount ELSE 0 END ),2) AS receivable,
 | 
	
		
			
				|  |  |          ROUND(sum( CASE f_dc WHEN 'C' THEN f_amount ELSE 0 END ),2) AS handle,
 | 
	
		
			
				|  |  |          ROUND((sum( CASE f_dc WHEN 'D' THEN f_amount ELSE 0 END ) - sum( CASE f_dc WHEN 'C' THEN f_amount ELSE 0 END )),2) AS profit,
 | 
	
	
		
			
				|  | @@ -2583,8 +2584,8 @@
 | 
	
		
			
				|  |  |              <if test='timeInterval != null and timeInterval[1] != null and timeInterval[1]!= ""'>
 | 
	
		
			
				|  |  |                  and ty.f_ATD <= #{timeInterval[1]}
 | 
	
		
			
				|  |  |              </if>
 | 
	
		
			
				|  |  | -            GROUP BY tw.f_vslid,tw.f_voyid
 | 
	
		
			
				|  |  | -            ORDER BY tw.f_bsdate DESC
 | 
	
		
			
				|  |  | +            GROUP BY tw.f_vslid,tw.f_voyid,ty.f_atd
 | 
	
		
			
				|  |  | +            ORDER BY ty.f_atd DESC
 | 
	
		
			
				|  |  |          </where>
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |      <select id="handle" resultType="com.ruoyi.finance.shipping.HandleExcel">
 |