|
@@ -27,7 +27,7 @@
|
|
|
resource_route rr
|
|
resource_route rr
|
|
|
LEFT JOIN resource_dock rd on rr.on_dock_id = rd.id
|
|
LEFT JOIN resource_dock rd on rr.on_dock_id = rd.id
|
|
|
LEFT JOIN resource_port rp on rd.port_id = rp.id
|
|
LEFT JOIN resource_port rp on rd.port_id = rp.id
|
|
|
- LEFT JOIN product_voyage pv ON rr.id = pv.route_id
|
|
|
|
|
|
|
+ LEFT JOIN product_voyage pv ON rr.id = pv.route_id and pv.start_time > now()
|
|
|
<if test="reqVo.startDay != null and reqVo.startDay != ''">
|
|
<if test="reqVo.startDay != null and reqVo.startDay != ''">
|
|
|
and pv.start_time BETWEEN BETWEEN CONCAT(#{reqVo.startDay},' 00:00:00') and CONCAT(#{reqVo.startDay},' 23:59:59')
|
|
and pv.start_time BETWEEN BETWEEN CONCAT(#{reqVo.startDay},' 00:00:00') and CONCAT(#{reqVo.startDay},' 23:59:59')
|
|
|
</if>
|
|
</if>
|
|
@@ -43,15 +43,17 @@
|
|
|
FROM
|
|
FROM
|
|
|
product_price_voyage ppv
|
|
product_price_voyage ppv
|
|
|
LEFT JOIN product_price_room_model pprm ON pprm.object_id = ppv.id
|
|
LEFT JOIN product_price_room_model pprm ON pprm.object_id = ppv.id
|
|
|
|
|
+ where ppv.deleted = 0 and pprm.deleted = 0
|
|
|
ORDER BY
|
|
ORDER BY
|
|
|
pprm.price ASC
|
|
pprm.price ASC
|
|
|
) t1
|
|
) t1
|
|
|
GROUP BY
|
|
GROUP BY
|
|
|
t1.voyage_id
|
|
t1.voyage_id
|
|
|
) t2 ON pv.id = t2.voyage_id
|
|
) t2 ON pv.id = t2.voyage_id
|
|
|
|
|
+ where rr.deleted = 0 and rd.deleted = 0 and rp.deleted = 0 and pv.deleted = 0 and rs.deleted = 0
|
|
|
GROUP BY
|
|
GROUP BY
|
|
|
rs.id
|
|
rs.id
|
|
|
- ) t3 where 1=1
|
|
|
|
|
|
|
+ ) t3 where 1=1 and t3.price is not null
|
|
|
<if test="reqVo.shipId != null">
|
|
<if test="reqVo.shipId != null">
|
|
|
and t3.ship_id = #{reqVo.shipId}
|
|
and t3.ship_id = #{reqVo.shipId}
|
|
|
</if>
|
|
</if>
|
|
@@ -67,6 +69,7 @@
|
|
|
<if test="reqVo.direction != null">
|
|
<if test="reqVo.direction != null">
|
|
|
and t3.direction = #{reqVo.direction}
|
|
and t3.direction = #{reqVo.direction}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ order by t3.price asc
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|