|
|
@ -106,5 +106,34 @@ |
|
|
|
where ldrs.reservation_id = #{reservationId} |
|
|
|
where ldrs.reservation_id = #{reservationId} |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="getOneOwn" resultType="com.logpm.distribution.vo.DistributionStockupVO"> |
|
|
|
|
|
|
|
select ldr.id,ds.stockup_code stockupCode,ds.stockup_user stockupUser,ds.stockup_status stockupStatus,ldr.reservation_date reservationDate,ldr.serve_type serveType,ldr.delivery_way deliveryWay, |
|
|
|
|
|
|
|
ldr.delivery_type deliveryType , lds.train_number trainNumber ,ds.stockup_area stockupArea |
|
|
|
|
|
|
|
from logpm_distribution_reservation ldr |
|
|
|
|
|
|
|
LEFT JOIN logpm_distribution_stockup_info dsi on ldr.id = dsi.reservation_id |
|
|
|
|
|
|
|
LEFT JOIN logpm_distribution_stockup ds on dsi.stockup_id = ds.id |
|
|
|
|
|
|
|
LEFT JOIN logpm_distribution_signfor lds on lds.reservation_id = ldr.id |
|
|
|
|
|
|
|
<where> ldr.id in ( |
|
|
|
|
|
|
|
select DISTINCT ldsi.reservation_id |
|
|
|
|
|
|
|
from logpm_distribution_stockup_info ldsi |
|
|
|
|
|
|
|
where ldsi.stockup_id in (select lds.id |
|
|
|
|
|
|
|
from logpm_distribution_stockup lds ) |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
and ds.id = #{id} |
|
|
|
|
|
|
|
</where> |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="detailReservationOwn" resultType="com.logpm.distribution.vo.DistributionStockupVO"> |
|
|
|
|
|
|
|
select ldr.id,ldr.consignee ,ldr.delivery_address deliveryAddress,ldr.delivery_phone deliveryPhone,ldr.mall_name mallName, |
|
|
|
|
|
|
|
ldr.stock_article_id stockArticleId,ldr.stockup_status stockupStatus |
|
|
|
|
|
|
|
from logpm_distribution_reservation ldr |
|
|
|
|
|
|
|
LEFT JOIN logpm_distribution_stockup_info ldsi on ldr.id = ldsi.reservation_id |
|
|
|
|
|
|
|
<where> |
|
|
|
|
|
|
|
ldr.id in (select reservation_id |
|
|
|
|
|
|
|
from logpm_distribution_stockup_info ) |
|
|
|
|
|
|
|
and ldsi.stockup_id = #{id} |
|
|
|
|
|
|
|
</where> |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper> |
|
|
|
</mapper> |
|
|
|