及时库存;

This commit is contained in:
王奎兴
2026-01-28 16:34:36 +08:00
parent d143ca2840
commit 373600aba2
2 changed files with 29 additions and 5 deletions
@@ -56,4 +56,10 @@ public class ImmediateInventoryPO {
@Excel(name = "拣货数量")
private BigDecimal pickQuantity;
}
@ApiModelProperty("复核数量")
@Excel(name = "复核数量")
private BigDecimal checkQuantity;
}
@@ -328,6 +328,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="receivedQuantity" column="received_quantity" />
<result property="shelvesQuantity" column="shelves_quantity" />
<result property="pickQuantity" column="pick_quantity" />
<result property="checkQuantity" column="check_quantity" />
</resultMap>
<select id="queryImmediateInventoryList" parameterType="com.mhd.wms.domain.statementStatistics.todo.ImmediateInventoryDO"
resultMap="queryImmediateInventoryListResult">
@@ -351,7 +352,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND d.del_flag = 1
LEFT JOIN stock_in_order e ON d.in_order_number = e.in_order_number
WHERE
c.del_flag = 1
c.del_flag = 1 and d.STATUS = 1
AND e.warehouse_id = a.warehouse_id
AND (a.shipper_id IS NULL OR e.shipper_id = a.shipper_id)
AND c.material_base_info_id = a.material_base_info_id
@@ -368,7 +369,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND d.del_flag = 1
LEFT JOIN stock_in_order e ON d.in_order_number = e.in_order_number
WHERE
c.del_flag = 1
c.del_flag = 1 and d.STATUS = 1
AND e.warehouse_id = a.warehouse_id
AND (a.shipper_id IS NULL OR e.shipper_id = a.shipper_id)
AND c.material_base_info_id = a.material_base_info_id
@@ -383,13 +384,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
picking_material_detail c
LEFT JOIN picking_order d ON c.picking_order_number = d.PICKING_ORDER_NUMBER
WHERE
c.del_flag = 1
c.del_flag = 1 and d.STATUS = 1
AND d.warehouse_id = a.warehouse_id
AND (a.shipper_id IS NULL OR d.shipper_id = a.shipper_id)
AND c.material_base_info_id = a.material_base_info_id
),
0
) pick_quantity
) pick_quantity,
ifnull(
(
SELECT
SUM(c.CHECK_QUANTITY) AS CHECK_QUANTITY
FROM
OUT_MATERIAL_DETAIL c
LEFT JOIN STOCK_OUT_ORDER d ON c.OUT_ORDER_NUMBER = d.OUT_ORDER_NUMBER
WHERE
d.CHECK_STATUS = 2
AND d.DEL_FLAG = 1
AND c.DEL_FLAG = 1
AND d.warehouse_id = a.warehouse_id
AND (a.shipper_id IS NULL OR d.shipper_id = a.shipper_id)
AND c.material_base_info_id = a.material_base_info_id
),
0
) CHECK_QUANTITY
FROM
material_inventory a
left join material_base_info b on a.material_base_info_id=b.material_base_info_id