及时库存;
This commit is contained in:
+7
-1
@@ -56,4 +56,10 @@ public class ImmediateInventoryPO {
|
|||||||
@Excel(name = "拣货数量")
|
@Excel(name = "拣货数量")
|
||||||
private BigDecimal pickQuantity;
|
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="receivedQuantity" column="received_quantity" />
|
||||||
<result property="shelvesQuantity" column="shelves_quantity" />
|
<result property="shelvesQuantity" column="shelves_quantity" />
|
||||||
<result property="pickQuantity" column="pick_quantity" />
|
<result property="pickQuantity" column="pick_quantity" />
|
||||||
|
<result property="checkQuantity" column="check_quantity" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<select id="queryImmediateInventoryList" parameterType="com.mhd.wms.domain.statementStatistics.todo.ImmediateInventoryDO"
|
<select id="queryImmediateInventoryList" parameterType="com.mhd.wms.domain.statementStatistics.todo.ImmediateInventoryDO"
|
||||||
resultMap="queryImmediateInventoryListResult">
|
resultMap="queryImmediateInventoryListResult">
|
||||||
@@ -351,7 +352,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
AND d.del_flag = 1
|
AND d.del_flag = 1
|
||||||
LEFT JOIN stock_in_order e ON d.in_order_number = e.in_order_number
|
LEFT JOIN stock_in_order e ON d.in_order_number = e.in_order_number
|
||||||
WHERE
|
WHERE
|
||||||
c.del_flag = 1
|
c.del_flag = 1 and d.STATUS = 1
|
||||||
AND e.warehouse_id = a.warehouse_id
|
AND e.warehouse_id = a.warehouse_id
|
||||||
AND (a.shipper_id IS NULL OR e.shipper_id = a.shipper_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
|
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
|
AND d.del_flag = 1
|
||||||
LEFT JOIN stock_in_order e ON d.in_order_number = e.in_order_number
|
LEFT JOIN stock_in_order e ON d.in_order_number = e.in_order_number
|
||||||
WHERE
|
WHERE
|
||||||
c.del_flag = 1
|
c.del_flag = 1 and d.STATUS = 1
|
||||||
AND e.warehouse_id = a.warehouse_id
|
AND e.warehouse_id = a.warehouse_id
|
||||||
AND (a.shipper_id IS NULL OR e.shipper_id = a.shipper_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
|
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
|
picking_material_detail c
|
||||||
LEFT JOIN picking_order d ON c.picking_order_number = d.PICKING_ORDER_NUMBER
|
LEFT JOIN picking_order d ON c.picking_order_number = d.PICKING_ORDER_NUMBER
|
||||||
WHERE
|
WHERE
|
||||||
c.del_flag = 1
|
c.del_flag = 1 and d.STATUS = 1
|
||||||
AND d.warehouse_id = a.warehouse_id
|
AND d.warehouse_id = a.warehouse_id
|
||||||
AND (a.shipper_id IS NULL OR d.shipper_id = a.shipper_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
|
AND c.material_base_info_id = a.material_base_info_id
|
||||||
),
|
),
|
||||||
0
|
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
|
FROM
|
||||||
material_inventory a
|
material_inventory a
|
||||||
left join material_base_info b on a.material_base_info_id=b.material_base_info_id
|
left join material_base_info b on a.material_base_info_id=b.material_base_info_id
|
||||||
|
|||||||
Reference in New Issue
Block a user