入库管理收货、上架数量修改
This commit is contained in:
@@ -9,6 +9,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="shipperId" column="shipper_id" />
|
||||
<result property="shipperCode" column="shipper_code" />
|
||||
<result property="shipperName" column="shipper_name" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseCode" column="warehouse_code" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
@@ -45,7 +48,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
|
||||
<sql id="selectMaterialInventoryPo">
|
||||
a.material_inventory_id, a.organization_id, a.organization_name, a.top_organization_id, a.warehouse_id, a.warehouse_code, a.warehouse_name,
|
||||
a.material_inventory_id, a.organization_id, a.organization_name, a.top_organization_id,
|
||||
a.shipper_id, a.shipper_code, a.shipper_name,
|
||||
a.warehouse_id, a.warehouse_code, a.warehouse_name,
|
||||
a.storage_section_id, a.storage_code, a.storage_name, a.storage_location_id, a.storage_location_code, a.storage_location_name, a.material_base_info_id,a.material_detail_id,
|
||||
a.batch_number,a.material_status_code,a.material_status_name,a.container_id,a.container_code,a.container_type,a.container_type_name,IFNULL(a.freeze_quantity,0) freeze_quantity,a.is_able,
|
||||
IFNULL(a.inventory_quantity,0) inventory_quantity, IFNULL(a.allocation_quantity,0) allocation_quantity, a.remark, a.create_time, a.create_by, a.create_by_name, a.update_time, a.update_by, a.update_by_name,
|
||||
@@ -329,7 +334,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select
|
||||
a.warehouse_id,
|
||||
a.warehouse_name,
|
||||
b.shipper_name,
|
||||
ifnull(a.shipper_name, b.shipper_name) shipper_name,
|
||||
b.material_name,
|
||||
b.material_code,
|
||||
b.bar_code,
|
||||
@@ -348,8 +353,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
WHERE
|
||||
c.del_flag = 1
|
||||
AND e.warehouse_id = a.warehouse_id
|
||||
AND e.shipper_id = b.shipper_id
|
||||
AND c.material_base_info_id = b.material_base_info_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
|
||||
),
|
||||
0
|
||||
) received_quantity,
|
||||
@@ -365,8 +370,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
WHERE
|
||||
c.del_flag = 1
|
||||
AND e.warehouse_id = a.warehouse_id
|
||||
AND e.shipper_id = b.shipper_id
|
||||
AND c.material_base_info_id = b.material_base_info_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
|
||||
),
|
||||
0
|
||||
) shelves_quantity,
|
||||
@@ -380,8 +385,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
WHERE
|
||||
c.del_flag = 1
|
||||
AND d.warehouse_id = a.warehouse_id
|
||||
AND d.shipper_id = b.shipper_id
|
||||
AND c.material_base_info_id = b.material_base_info_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
|
||||
@@ -396,7 +401,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</if>
|
||||
|
||||
<if test="shipperName != null and shipperName != ''">
|
||||
and b.shipper_name = #{shipperName}
|
||||
and (a.shipper_name = #{shipperName} OR b.shipper_name = #{shipperName})
|
||||
</if>
|
||||
|
||||
<if test="warehouseId != null and warehouseId != '' ">
|
||||
@@ -415,30 +420,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and b.bar_code = #{barCode}
|
||||
</if>
|
||||
|
||||
<if test="inventoryQuantityStart != null ">
|
||||
and sum(a.inventory_quantity) > #{inventoryQuantityStart}
|
||||
</if>
|
||||
|
||||
<if test="inventoryQuantityEnd != null ">
|
||||
and sum(a.inventory_quantity) lt #{inventoryQuantityEnd}
|
||||
</if>
|
||||
|
||||
<if test="allocationQuantityStart != null ">
|
||||
and sum(a.allocation_quantity) > #{allocationQuantityStart}
|
||||
</if>
|
||||
|
||||
<if test="allocationQuantityEnd != null ">
|
||||
and sum(a.allocation_quantity)lt #{allocationQuantityEnd}
|
||||
</if>
|
||||
|
||||
<if test="freezeQuantityStart != null ">
|
||||
and sum(a.freeze_quantity) > #{freezeQuantityStart}
|
||||
</if>
|
||||
|
||||
<if test="freezeQuantityEnd != null ">
|
||||
and sum(a.freeze_quantity) lt #{freezeQuantityEnd}
|
||||
</if>
|
||||
|
||||
<if test="receivedQuantityStart != null ">
|
||||
and ifnull(
|
||||
(
|
||||
@@ -452,8 +433,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
WHERE
|
||||
c.del_flag = 1
|
||||
AND e.warehouse_id = a.warehouse_id
|
||||
AND e.shipper_id = b.shipper_id
|
||||
AND c.material_base_info_id = b.material_base_info_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
|
||||
),
|
||||
0
|
||||
)> #{receivedQuantityStart}
|
||||
@@ -472,11 +453,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
WHERE
|
||||
c.del_flag = 1
|
||||
AND e.warehouse_id = a.warehouse_id
|
||||
AND e.shipper_id = b.shipper_id
|
||||
AND c.material_base_info_id = b.material_base_info_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
|
||||
),
|
||||
0
|
||||
) lt #{receivedQuantityEnd}
|
||||
) < #{receivedQuantityEnd}
|
||||
</if>
|
||||
|
||||
<if test="shelvesQuantityStart != null ">
|
||||
@@ -492,8 +473,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
WHERE
|
||||
c.del_flag = 1
|
||||
AND e.warehouse_id = a.warehouse_id
|
||||
AND e.shipper_id = b.shipper_id
|
||||
AND c.material_base_info_id = b.material_base_info_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
|
||||
),
|
||||
0
|
||||
) > #{shelvesQuantityStart}
|
||||
@@ -512,11 +493,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
WHERE
|
||||
c.del_flag = 1
|
||||
AND e.warehouse_id = a.warehouse_id
|
||||
AND e.shipper_id = b.shipper_id
|
||||
AND c.material_base_info_id = b.material_base_info_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
|
||||
),
|
||||
0
|
||||
) lt #{shelvesQuantityEnd}
|
||||
) < #{shelvesQuantityEnd}
|
||||
</if>
|
||||
|
||||
<if test="pickQuantityStart != null ">
|
||||
@@ -530,8 +511,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
WHERE
|
||||
c.del_flag = 1
|
||||
AND d.warehouse_id = a.warehouse_id
|
||||
AND d.shipper_id = b.shipper_id
|
||||
AND c.material_base_info_id = b.material_base_info_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
|
||||
) > #{pickQuantityStart}
|
||||
@@ -548,17 +529,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
WHERE
|
||||
c.del_flag = 1
|
||||
AND d.warehouse_id = a.warehouse_id
|
||||
AND d.shipper_id = b.shipper_id
|
||||
AND c.material_base_info_id = b.material_base_info_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
|
||||
) lt #{pickQuantityEnd}
|
||||
) < #{pickQuantityEnd}
|
||||
</if>
|
||||
|
||||
GROUP BY
|
||||
a.warehouse_id,
|
||||
a.material_base_info_id,
|
||||
b.shipper_id
|
||||
a.shipper_id
|
||||
HAVING 1=1
|
||||
<if test="inventoryQuantityStart != null ">
|
||||
and sum(a.inventory_quantity) > #{inventoryQuantityStart}
|
||||
</if>
|
||||
|
||||
<if test="inventoryQuantityEnd != null ">
|
||||
and sum(a.inventory_quantity) < #{inventoryQuantityEnd}
|
||||
</if>
|
||||
|
||||
<if test="allocationQuantityStart != null ">
|
||||
and sum(a.allocation_quantity) > #{allocationQuantityStart}
|
||||
</if>
|
||||
|
||||
<if test="allocationQuantityEnd != null ">
|
||||
and sum(a.allocation_quantity) < #{allocationQuantityEnd}
|
||||
</if>
|
||||
|
||||
<if test="freezeQuantityStart != null ">
|
||||
and sum(a.freeze_quantity) > #{freezeQuantityStart}
|
||||
</if>
|
||||
|
||||
<if test="freezeQuantityEnd != null ">
|
||||
and sum(a.freeze_quantity) < #{freezeQuantityEnd}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectOneByWhere" parameterType="com.mhd.wms.domain.statementStatistics.todo.ImmediateInventoryDO"
|
||||
|
||||
Reference in New Issue
Block a user