178 lines
7.7 KiB
XML
178 lines
7.7 KiB
XML
<?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="materialStatusName" column="material_status_name"/>-->
|
|
<!-- <result property="materialInventoryId" column="material_inventory_id"/>-->
|
|
<!-- <result property="netWeight" column="net_weight"/>-->
|
|
<!-- </resultMap>-->
|
|
|
|
|
|
<resultMap id="CopyCodeReferencePOMap" type="com.mhd.wms.domain.copyCodeReference.repository.po.CopyCodeReferencePO">
|
|
<result property="id" column="id"/>
|
|
<result property="materialInventoryId" column="material_inventory_id"/>
|
|
<result property="warehouseId" column="warehouse_id"/>
|
|
<result property="warehouseName" column="warehouse_name"/>
|
|
<result property="materialBaseInfoId" column="material_base_info_id"/>
|
|
<result property="materialCode" column="material_code"/>
|
|
<result property="materialName" column="material_name"/>
|
|
<result property="materialDetailId" column="material_detail_id"/>
|
|
<result property="inOrderNumber" column="in_order_number"/>
|
|
<result property="lotNumber" column="lot_number"/>
|
|
<result property="batchNumber" column="batch_number"/>
|
|
<result property="boxPalletNo" column="box_pallet_no"/>
|
|
<result property="containerCode" column="container_code"/>
|
|
<result property="inventoryQuantity" column="inventory_quantity"/>
|
|
<result property="netWeight" column="net_weight"/>
|
|
<result property="grossWeight" column="gross_weight"/>
|
|
<result property="materialStatusCode" column="material_status_code"/>
|
|
<result property="materialStatusName" column="material_status_name"/>
|
|
<result property="serialNumber" column="serial_number"/>
|
|
<result property="organizationId" column="organization_id"/>
|
|
<result property="topOrganizationId" column="top_organization_id"/>
|
|
<result property="createBy" column="create_by"/>
|
|
<result property="createByName" column="create_by_name"/>
|
|
<result property="createTime" column="create_time"/>
|
|
<result property="updateBy" column="update_by"/>
|
|
<result property="updateByName" column="update_by_name"/>
|
|
<result property="updateTime" column="update_time"/>
|
|
<result property="delFlag" column="del_flag"/>
|
|
</resultMap>
|
|
|
|
<select id="queryList" resultMap="CopyCodeReferencePOMap">
|
|
SELECT
|
|
id,
|
|
material_inventory_id,
|
|
warehouse_id,
|
|
warehouse_name,
|
|
material_base_info_id,
|
|
material_code,
|
|
material_name,
|
|
material_detail_id,
|
|
in_order_number,
|
|
lot_number,
|
|
batch_number,
|
|
box_pallet_no,
|
|
container_code,
|
|
inventory_quantity,
|
|
net_weight,
|
|
gross_weight,
|
|
material_status_code,
|
|
material_status_name,
|
|
serial_number,
|
|
organization_id,
|
|
top_organization_id,
|
|
create_by,
|
|
create_by_name,
|
|
create_time,
|
|
update_by,
|
|
update_by_name,
|
|
update_time,
|
|
del_flag
|
|
FROM copy_code_reference
|
|
WHERE del_flag = 1
|
|
<if test="warehouseId != null">
|
|
AND warehouse_id = #{warehouseId}
|
|
</if>
|
|
<if test="materialCode != null and materialCode != ''">
|
|
AND material_code = #{materialCode}
|
|
</if>
|
|
<!-- <if test="materialName != null and materialName != ''">-->
|
|
<!-- AND material_name LIKE '%' || #{materialName} || '%'-->
|
|
<!-- </if>-->
|
|
<if test="batchNumber != null and batchNumber != ''">
|
|
AND batch_number = #{batchNumber}
|
|
</if>
|
|
<if test="id != null and id != ''">
|
|
AND id = #{id}
|
|
</if>
|
|
<!-- <if test="boxPalletNo != null and boxPalletNo != ''">-->
|
|
<!-- AND box_pallet_no = #{boxPalletNo}-->
|
|
<!-- </if>-->
|
|
ORDER BY material_code, batch_number, box_pallet_no, serial_number
|
|
</select>
|
|
|
|
<select id="queryWeightList" resultMap="CopyCodeReferencePOMap">
|
|
SELECT
|
|
id,
|
|
material_inventory_id,
|
|
material_code,
|
|
batch_number,
|
|
box_pallet_no,
|
|
net_weight,
|
|
serial_number
|
|
FROM copy_code_reference
|
|
WHERE del_flag = 1
|
|
AND material_code = #{materialCode}
|
|
AND batch_number = #{batchNumber}
|
|
AND box_pallet_no = #{boxPalletNo}
|
|
ORDER BY serial_number
|
|
</select>
|
|
|
|
|
|
<!-- 查询列表:条件是 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,-->
|
|
<!-- mi.material_status_name-->
|
|
<!-- 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>-->
|
|
<!-- order by mi.create_time desc-->
|
|
<!-- </select>-->
|
|
|
|
<!-- <select id="queryWeightList" resultMap="CopyCodeReferencePOMap">-->
|
|
<!-- SELECT-->
|
|
<!-- mi.net_weight,-->
|
|
<!-- mi.material_inventory_id-->
|
|
<!-- FROM material_inventory mi-->
|
|
<!-- LEFT JOIN material_base_info mbi ON mbi.material_base_info_id = mi.material_base_info_id AND mbi.del_flag = 1-->
|
|
<!-- WHERE mi.del_flag = 1-->
|
|
<!-- AND mbi.copy_code = 1-->
|
|
<!-- AND mbi.material_code = #{materialCode}-->
|
|
<!-- AND mi.batch_number = #{batchNumber}-->
|
|
<!-- AND mi.box_pallet_no = #{boxPalletNo}-->
|
|
<!-- </select>-->
|
|
|
|
</mapper> |