即时库存复核数量查询
This commit is contained in:
+6
@@ -148,4 +148,10 @@ public class ImmediateInventoryDO extends BaseVOEntity {
|
|||||||
@Excel(name = "拣货数量结束")
|
@Excel(name = "拣货数量结束")
|
||||||
private BigDecimal pickQuantityEnd;
|
private BigDecimal pickQuantityEnd;
|
||||||
|
|
||||||
|
@ApiModelProperty("复核数量开始")
|
||||||
|
private BigDecimal checkQuantityBegin;
|
||||||
|
|
||||||
|
@ApiModelProperty("复核数量开始")
|
||||||
|
private BigDecimal checkQuantityEnd;
|
||||||
|
|
||||||
}
|
}
|
||||||
+6
@@ -150,4 +150,10 @@ public class ImmediateInventoryDTO {
|
|||||||
private BigDecimal freezeQuantityBegin;
|
private BigDecimal freezeQuantityBegin;
|
||||||
private BigDecimal allocationQuantityBegin;
|
private BigDecimal allocationQuantityBegin;
|
||||||
private BigDecimal checkQuantity;
|
private BigDecimal checkQuantity;
|
||||||
|
|
||||||
|
@ApiModelProperty("复核数量开始")
|
||||||
|
private BigDecimal checkQuantityBegin;
|
||||||
|
|
||||||
|
@ApiModelProperty("复核数量开始")
|
||||||
|
private BigDecimal checkQuantityEnd;
|
||||||
}
|
}
|
||||||
@@ -828,7 +828,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
a.shipper_id
|
a.shipper_id
|
||||||
HAVING 1=1-->
|
HAVING 1=1-->
|
||||||
|
|
||||||
<if test="checkQuantity != null ">
|
<if test="checkQuantityBegin != null ">
|
||||||
and
|
and
|
||||||
ifnull(
|
ifnull(
|
||||||
(
|
(
|
||||||
@@ -839,7 +839,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
LEFT JOIN STOCK_OUT_ORDER d ON c.OUT_ORDER_NUMBER = d.OUT_ORDER_NUMBER
|
LEFT JOIN STOCK_OUT_ORDER d ON c.OUT_ORDER_NUMBER = d.OUT_ORDER_NUMBER
|
||||||
LEFT JOIN HANDOVER_TASK_ORDER e ON d.OUT_ORDER_NUMBER = e.ORDER_NUMBER
|
LEFT JOIN HANDOVER_TASK_ORDER e ON d.OUT_ORDER_NUMBER = e.ORDER_NUMBER
|
||||||
WHERE
|
WHERE
|
||||||
d.CHECK_STATUS = 2 and e.STATUS = 1
|
d.CHECK_STATUS in (2,3) and e.STATUS = 1 and d.STATUS in (8,12)
|
||||||
AND d.DEL_FLAG = 1
|
AND d.DEL_FLAG = 1
|
||||||
AND c.DEL_FLAG = 1
|
AND c.DEL_FLAG = 1
|
||||||
and e.del_flag = 1
|
and e.del_flag = 1
|
||||||
@@ -849,7 +849,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
AND c.MATERIAL_INVENTORY_ID = a.MATERIAL_INVENTORY_ID
|
AND c.MATERIAL_INVENTORY_ID = a.MATERIAL_INVENTORY_ID
|
||||||
),
|
),
|
||||||
0
|
0
|
||||||
) = #{checkQuantity}
|
) > #{checkQuantityBegin}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="checkQuantityEnd != null ">
|
||||||
|
and
|
||||||
|
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
|
||||||
|
LEFT JOIN HANDOVER_TASK_ORDER e ON d.OUT_ORDER_NUMBER = e.ORDER_NUMBER
|
||||||
|
WHERE
|
||||||
|
d.CHECK_STATUS in (2,3) and e.STATUS = 1 and d.STATUS in (8,12)
|
||||||
|
AND d.DEL_FLAG = 1
|
||||||
|
AND c.DEL_FLAG = 1
|
||||||
|
and e.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
|
||||||
|
AND c.MATERIAL_INVENTORY_ID = a.MATERIAL_INVENTORY_ID
|
||||||
|
),
|
||||||
|
0
|
||||||
|
) < #{checkQuantityEnd}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="inventoryQuantity != null ">
|
<if test="inventoryQuantity != null ">
|
||||||
|
|||||||
Reference in New Issue
Block a user