w 库存管理-抄码商品对照表

This commit is contained in:
zhaoqing
2026-04-14 17:22:52 +08:00
parent d10d899a1c
commit 1fa6d88545
11 changed files with 346 additions and 0 deletions
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.mhd.wms.domain.copyCodeReference.repository.mapper.CopyCodeReferenceMapper">
<resultMap id="CopyCodeReferencePOMap" type="com.mhd.wms.domain.copyCodeReference.repository.po.CopyCodeReferencePO">
<result property="serialNumber" column="serial_number"/>
<result property="warehouseName" column="warehouse_name"/>
<result property="materialCode" column="material_code"/>
<result property="materialName" column="material_name"/>
<result property="inOrderNumber" column="in_order_number"/>
<result property="lotNumber" column="lot_number"/>
<result property="batchNumber" column="batch_number"/>
<result property="containerCode" column="container_code"/>
<result property="inventoryQuantity" column="inventory_quantity"/>
<result property="shipperName" column="shipper_name"/>
<result property="boxPalletNo" column="box_pallet_no"/>
<result property="netWeight" column="net_weight"/>
</resultMap>
<!-- 查询列表:条件是 material_base_info.copy_code = 1 -->
<select id="queryList" resultMap="CopyCodeReferencePOMap">
SELECT
mi.warehouse_name,
mbi.material_code,
mbi.material_name,
mi.in_order_number,
mi.batch_number,
mi.container_code,
mi.inventory_quantity,
mi.net_weight,
mi.shipper_name,
mi.lot_number,
mi.box_pallet_no
FROM material_inventory mi
LEFT JOIN material_base_info mbi ON mi.material_base_info_id = mbi.material_base_info_id
LEFT JOIN shelf_material_detail ssd ON mi.material_detail_id = ssd.material_detail_id
LEFT JOIN warehouse w ON mi.warehouse_id = w.warehouse_id
WHERE mi.del_flag = 1
AND mbi.copy_code = 1
<if test="shipperId != null">
AND mi.shipper_id = #{shipperId}
</if>
<if test="warehouseId != null">
AND mi.warehouse_id = #{warehouseId}
</if>
<if test="materialCode != null and materialCode != ''">
AND mbi.material_code = #{materialCode}
</if>
<if test="batchNumber != null and batchNumber != ''">
AND mi.batch_number = #{batchNumber}
</if>
<if test="containerCode != null and containerCode != ''">
AND mi.container_code = #{containerCode}
</if>
</select>
</mapper>