Merge remote-tracking branch 'origin/wms_dev' into wms_dev

This commit is contained in:
zhou-hongcheng
2026-02-04 10:41:51 +08:00
6 changed files with 583 additions and 268 deletions
@@ -44,113 +44,133 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" />
<result property="updateByName" column="update_by_name" />
<result property="delFlag" column="del_flag" />
<result property="extAttr1" column="ext_attr_1" />
<result property="extAttr2" column="ext_attr_2" />
<result property="extAttr3" column="ext_attr_3" />
<result property="extAttr4" column="ext_attr_4" />
<result property="productionDate" column="production_date" />
<result property="expiryDate" column="expiry_date" />
<result property="inventoryDate" column="inventory_date" />
<result property="batchRefNo" column="batch_ref_no" />
<result property="sheetRefNo" column="sheet_ref_no" />
<result property="boxPalletNo" column="box_pallet_no" />
</resultMap>
<sql id="selectInventoryAdjustmentRecordPo">
select inventory_adjustment_id, organization_id, organization_name, top_organization_id, material_inventory_id, material_base_info_id, material_code, material_name, bar_code, shipper_id, shipper_name, warehouse_id, warehouse_code, warehouse_name, storage_section_id, storage_code, storage_name, storage_location_id, storage_location_code, storage_location_name, adjust_type, adjust_direction, adjust_before_status_code, adjust_before_status_name, adjust_after_status_code, adjust_after_status_name, inventory_before_quantity, allocation_before_quantity, freeze_before_quantity, inventory_after_quantity, allocation_after_quantity, freeze_after_quantity, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from inventory_adjustment_record
where del_flag = 1
select a.inventory_adjustment_id, a.organization_id, a.organization_name, a.top_organization_id, a.material_inventory_id,
a.material_base_info_id, a.material_code, a.material_name, a.bar_code, a.shipper_id, 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.adjust_type, a.adjust_direction, a.adjust_before_status_code,
a.adjust_before_status_name, a.adjust_after_status_code, a.adjust_after_status_name, a.inventory_before_quantity,
a.allocation_before_quantity, a.freeze_before_quantity, a.inventory_after_quantity, a.allocation_after_quantity,
a.freeze_after_quantity, a.create_time, a.create_by, a.create_by_name, a.update_time, a.update_by, a.update_by_name,
a.del_flag,b.ext_attr_1, b.ext_attr_2, b.ext_attr_3, b.ext_attr_4,
b.production_date, b.expiry_date, b.inventory_date,
b.batch_ref_no, b.sheet_ref_no, b.box_pallet_no
from inventory_adjustment_record a left join material_inventory b on a.material_inventory_id = b.material_inventory_id
where a.del_flag = 1
</sql>
<sql id="selectInventoryAdjustmentRecordPo1">
<if test="organizationId != null ">
and organization_id = #{organizationId}
and a.organization_id = #{organizationId}
</if>
<if test="organizationName != null and organizationName != ''">
and organization_name like concat('%', #{organizationName}, '%')
and a.organization_name like concat('%', #{organizationName}, '%')
</if>
<if test="topOrganizationId != null ">
and top_organization_id = #{topOrganizationId}
and a.top_organization_id = #{topOrganizationId}
</if>
<if test="materialBaseInfoId != null ">
and material_base_info_id = #{materialBaseInfoId}
and a.material_base_info_id = #{materialBaseInfoId}
</if>
<if test="materialInventoryId != null ">
and material_inventory_id = #{materialInventoryId}
and a.material_inventory_id = #{materialInventoryId}
</if>
<if test="materialCode != null and materialCode != ''">
and material_code = #{materialCode}
and a.material_code = #{materialCode}
</if>
<if test="materialName != null and materialName != ''">
and material_name like concat('%', #{materialName}, '%')
and a.material_name like concat('%', #{materialName}, '%')
</if>
<if test="barCode != null and barCode != ''">
and bar_code = #{barCode}
and a.bar_code = #{barCode}
</if>
<if test="shipperId != null ">
and shipper_id = #{shipperId}
and a.shipper_id = #{shipperId}
</if>
<if test="shipperName != null and shipperName != ''">
and shipper_name like concat('%', #{shipperName}, '%')
and a.shipper_name like concat('%', #{shipperName}, '%')
</if>
<if test="warehouseId != null ">
and warehouse_id = #{warehouseId}
and a.warehouse_id = #{warehouseId}
</if>
<if test="warehouseCode != null and warehouseCode != ''">
and warehouse_code = #{warehouseCode}
and a.warehouse_code = #{warehouseCode}
</if>
<if test="warehouseName != null and warehouseName != ''">
and warehouse_name like concat('%', #{warehouseName}, '%')
and a.warehouse_name like concat('%', #{warehouseName}, '%')
</if>
<if test="storageSectionId != null ">
and storage_section_id = #{storageSectionId}
and a.storage_section_id = #{storageSectionId}
</if>
<if test="storageCode != null and storageCode != ''">
and storage_code = #{storageCode}
and a.storage_code = #{storageCode}
</if>
<if test="storageName != null and storageName != ''">
and storage_name like concat('%', #{storageName}, '%')
and a.storage_name like concat('%', #{storageName}, '%')
</if>
<if test="storageLocationId != null ">
and storage_location_id = #{storageLocationId}
and a.storage_location_id = #{storageLocationId}
</if>
<if test="storageLocationCode != null and storageLocationCode != ''">
and storage_location_code = #{storageLocationCode}
and a.storage_location_code = #{storageLocationCode}
</if>
<if test="storageLocationName != null and storageLocationName != ''">
and storage_location_name like concat('%', #{storageLocationName}, '%')
and a.storage_location_name like concat('%', #{storageLocationName}, '%')
</if>
<if test="adjustType != null ">
and adjust_type = #{adjustType}
and a.adjust_type = #{adjustType}
</if>
<if test="adjustDirection != null ">
and adjust_direction = #{adjustDirection}
and a.adjust_direction = #{adjustDirection}
</if>
<if test="adjustBeforeStatusCode != null ">
and adjust_before_status_code = #{adjustBeforeStatusCode}
and a.adjust_before_status_code = #{adjustBeforeStatusCode}
</if>
<if test="adjustBeforeStatusName != null ">
and adjust_before_status_name = #{adjustBeforeStatusName}
and a.adjust_before_status_name = #{adjustBeforeStatusName}
</if>
<if test="adjustAfterStatusCode != null ">
and adjust_after_status_code = #{adjustAfterStatusCode}
and a.adjust_after_status_code = #{adjustAfterStatusCode}
</if>
<if test="adjustAfterStatusName != null ">
and adjust_after_status_name = #{adjustAfterStatusName}
and a.adjust_after_status_name = #{adjustAfterStatusName}
</if>
<if test="inventoryBeforeQuantity != null ">
and inventory_before_quantity = #{inventoryBeforeQuantity}
and a.inventory_before_quantity = #{inventoryBeforeQuantity}
</if>
<if test="allocationBeforeQuantity != null ">
and allocation_before_quantity = #{allocationBeforeQuantity}
and a.allocation_before_quantity = #{allocationBeforeQuantity}
</if>
<if test="freezeBeforeQuantity != null ">
and freeze_before_quantity = #{freezeBeforeQuantity}
and a.freeze_before_quantity = #{freezeBeforeQuantity}
</if>
<if test="inventoryAfterQuantity != null ">
and inventory_after_quantity = #{inventoryAfterQuantity}
and a.inventory_after_quantity = #{inventoryAfterQuantity}
</if>
<if test="allocationAfterQuantity != null ">
and allocation_after_quantity = #{allocationAfterQuantity}
and a.allocation_after_quantity = #{allocationAfterQuantity}
</if>
<if test="freezeAfterQuantity != null ">
and freeze_after_quantity = #{freezeAfterQuantity}
and a.freeze_after_quantity = #{freezeAfterQuantity}
</if>
<if test="createByName != null and createByName != ''">
and create_by_name like concat('%', #{createByName}, '%')
and a.create_by_name like concat('%', #{createByName}, '%')
</if>
<if test="updateByName != null and updateByName != ''">
and update_by_name like concat('%', #{updateByName}, '%')
and a.update_by_name like concat('%', #{updateByName}, '%')
</if>
</sql>