Browse Source

fix: 修改库存统计的接口

luofeiyun 2 weeks ago
parent
commit
b57d931ffe

+ 2 - 2
ship-module-product/ship-module-product-biz/src/main/resources/mapper/voyagestock/VoyageStockMapper.xml

@@ -12,7 +12,7 @@
     <select id="selectNoShelfdNumVoyageIdsByVoyageIds" resultType="java.lang.Long">
         select voyage_id
         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
          <foreach item="item" collection="voyageIds" open="(" separator="," close=")">
             #{item}
@@ -21,7 +21,7 @@
     <select id="selectTotal"
             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
-        where 1=1
+        where 1=1 and t1.deleted = 0 and t2.deleted = 0
               <if test="pageReqVO.shipId != null">
                   and t1.ship_id = #{pageReqVO.shipId}
               </if>