This commit is contained in:
2026-09-02 14:39:28 +08:00
parent b6800a48c6
commit 9ea4ccb9b1
8 changed files with 34 additions and 10 deletions
@@ -20,7 +20,13 @@ public interface LastlegOrderMapper extends BaseMapper<LastlegOrder> {
"<if test='q.containerNo != null and q.containerNo != \"\"'>AND o.container_no LIKE CONCAT('%',#{q.containerNo},'%') </if>" +
"<if test='q.createdFrom != null'>AND o.created_at &gt;=#{q.createdFrom} </if>" +
"<if test='q.createdTo != null'>AND o.created_at &lt;=#{q.createdTo} </if>" +
"GROUP BY o.source_container_booking_id ";
"GROUP BY o.source_container_booking_id " +
"HAVING SUM(CASE WHEN NULLIF(TRIM(o.inbound_code),'') IS NULL THEN 1 ELSE 0 END)&gt;0 " +
"OR SUM(CASE WHEN p.id IS NULL OR NULLIF(TRIM(p.plan_no),'') IS NULL " +
"OR NULLIF(TRIM(p.status),'') IS NULL THEN 1 ELSE 0 END)&gt;0 " +
"OR COUNT(DISTINCT p.id)&lt;&gt;COUNT(*) " +
"OR COUNT(NULLIF(o.container_no,''))&lt;&gt;COUNT(*) " +
"OR COUNT(DISTINCT NULLIF(o.container_no,''))&lt;&gt;1 ";
String CONTAINER_PROGRESS_COLUMNS = "SELECT o.source_container_booking_id AS sourceContainerBookingId," +
"CASE WHEN COUNT(NULLIF(o.container_no,''))=COUNT(*) AND COUNT(DISTINCT NULLIF(o.container_no,''))=1 " +