|
@@ -12,7 +12,7 @@
|
|
|
<select id="selectNoShelfdNumVoyageIdsByVoyageIds" resultType="java.lang.Long">
|
|
<select id="selectNoShelfdNumVoyageIdsByVoyageIds" resultType="java.lang.Long">
|
|
|
select voyage_id
|
|
select voyage_id
|
|
|
from product_voyage_stock
|
|
from product_voyage_stock
|
|
|
- where ship_id = #{shipId} and voyage_id not in (select voyage_id from product_voyage_stock where shelfed_num != 0)
|
|
|
|
|
|
|
+ where deleted = 0 and ship_id = #{shipId} and voyage_id not in (select voyage_id from product_voyage_stock where shelfed_num != 0)
|
|
|
and voyage_id in
|
|
and voyage_id in
|
|
|
<foreach item="item" collection="voyageIds" open="(" separator="," close=")">
|
|
<foreach item="item" collection="voyageIds" open="(" separator="," close=")">
|
|
|
#{item}
|
|
#{item}
|
|
@@ -21,7 +21,7 @@
|
|
|
<select id="selectTotal"
|
|
<select id="selectTotal"
|
|
|
resultType="com.yc.ship.module.product.controller.admin.voyagestock.vo.VoyageStockTotalVO">
|
|
resultType="com.yc.ship.module.product.controller.admin.voyagestock.vo.VoyageStockTotalVO">
|
|
|
select sum(t1.total_num) total_num, sum(t1.can_sell_num) can_sale_num, sum(t1.book_num) book_num from product_voyage_stock t1 LEFT JOIN product_voyage t2 on t1.voyage_id = t2.id
|
|
select sum(t1.total_num) total_num, sum(t1.can_sell_num) can_sale_num, sum(t1.book_num) book_num from product_voyage_stock t1 LEFT JOIN product_voyage t2 on t1.voyage_id = t2.id
|
|
|
- where 1=1
|
|
|
|
|
|
|
+ where 1=1 and t1.deleted = 0 and t2.deleted = 0
|
|
|
<if test="pageReqVO.shipId != null">
|
|
<if test="pageReqVO.shipId != null">
|
|
|
and t1.ship_id = #{pageReqVO.shipId}
|
|
and t1.ship_id = #{pageReqVO.shipId}
|
|
|
</if>
|
|
</if>
|