|
|
@@ -260,12 +260,26 @@
|
|
|
AND t1.is_deleted = 0
|
|
|
AND t2.is_deleted = 0
|
|
|
AND t2.kind = '2'
|
|
|
+ <if test="type != null and type != '' and type != '散货'">
|
|
|
+ AND YEAR ( t2.arrival_time ) = YEAR ( CURRENT_DATE )
|
|
|
+ AND MONTH ( t2.arrival_time ) = MONTH ( CURRENT_DATE )
|
|
|
+ </if>
|
|
|
+ <if test="type != null and type != '' and type == '散货'">
|
|
|
+ AND YEAR ( t1.arrival_time ) = YEAR ( CURRENT_DATE )
|
|
|
+ AND MONTH ( t1.arrival_time ) = MONTH ( CURRENT_DATE )
|
|
|
+ </if>
|
|
|
GROUP BY
|
|
|
t1.id,
|
|
|
t2.id,
|
|
|
t2.plate_no,
|
|
|
t2.arrival_time
|
|
|
- ORDER BY
|
|
|
+ <if test="type != null and type != '' and type != '散货'">
|
|
|
+ ORDER BY
|
|
|
+ t2.arrival_time DESC
|
|
|
+ </if>
|
|
|
+ <if test="type != null and type != '' and type == '散货'">
|
|
|
+ ORDER BY
|
|
|
t1.arrival_time DESC
|
|
|
+ </if>
|
|
|
</select>
|
|
|
</mapper>
|