From 52a34779ec5a6cb0de880ab05093cd61e8cbede5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A7=A6=E9=B8=BF=E5=B1=95?= <18031053041@163.com>
Date: Sat, 7 Feb 2026 13:52:49 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8A=80=E6=9C=AF=E6=95=B0=E6=8D=AE=E4=BB=93?=
=?UTF-8?q?=E5=BA=93=E6=9F=A5=E8=AF=A2=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../mapper/basic/lease/LeaseMapper.xml | 87 ++++++++---------
.../storageLocation/StorageLocationMapper.xml | 93 +++++++++++--------
.../StorageLocationGroupMapper.xml | 46 +++++----
.../storageSection/StorageSectionMapper.xml | 44 +++++----
4 files changed, 153 insertions(+), 117 deletions(-)
diff --git a/mhd-modules/mhd-system/src/main/resources/mapper/basic/lease/LeaseMapper.xml b/mhd-modules/mhd-system/src/main/resources/mapper/basic/lease/LeaseMapper.xml
index f2a7d2ce4..e50d747e7 100644
--- a/mhd-modules/mhd-system/src/main/resources/mapper/basic/lease/LeaseMapper.xml
+++ b/mhd-modules/mhd-system/src/main/resources/mapper/basic/lease/LeaseMapper.xml
@@ -29,93 +29,94 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select
- id,
- organization_id,
- organization_name,
- top_organization_id,
- warehouse_id,
- warehouse_name,
- shipper_id,
- cargo_owner_name,
- lease_type,
- lease_area,
- start_date,
- end_date,
- remark,
- create_time,
- create_by,
- create_by_name,
- update_time,
- update_by,
- update_by_name,
- del_flag
- from lease
+ a.id,
+ a.organization_id,
+ a.organization_name,
+ a.top_organization_id,
+ a.warehouse_id,
+ COALESCE(w.warehouse_name, a.warehouse_name) as warehouse_name,
+ a.shipper_id,
+ a.cargo_owner_name,
+ a.lease_type,
+ a.lease_area,
+ a.start_date,
+ a.end_date,
+ a.remark,
+ a.create_time,
+ a.create_by,
+ a.create_by_name,
+ a.update_time,
+ a.update_by,
+ a.update_by_name,
+ a.del_flag
+ from lease a
+ LEFT JOIN warehouse w ON a.warehouse_id = w.warehouse_id AND w.del_flag = 1
- and organization_id = #{organizationId}
+ and a.organization_id = #{organizationId}
- and top_organization_id = #{topOrganizationId}
+ and a.top_organization_id = #{topOrganizationId}
- and organization_name like concat('%', #{organizationName}, '%')
+ and a.organization_name like concat('%', #{organizationName}, '%')
- and warehouse_id = #{warehouseId}
+ and a.warehouse_id = #{warehouseId}
- and warehouse_name like concat('%', #{warehouseName}, '%')
+ and (w.warehouse_name like concat('%', #{warehouseName}, '%') or a.warehouse_name like concat('%', #{warehouseName}, '%'))
- and cargo_owner_name like concat('%', #{cargoOwnerName}, '%')
+ and a.cargo_owner_name like concat('%', #{cargoOwnerName}, '%')
- and lease_type = #{leaseType}
+ and a.lease_type = #{leaseType}
- and create_time = #{createTime}
+ and a.create_time = #{createTime}
- and lease_area = #{leaseArea}
+ and a.lease_area = #{leaseArea}
- and remark like concat('%', #{remark}, '%')
+ and a.remark like concat('%', #{remark}, '%')
- and create_by_name like concat('%', #{createByName}, '%')
+ and a.create_by_name like concat('%', #{createByName}, '%')
- and update_by_name like concat('%', #{updateByName}, '%')
+ and a.update_by_name like concat('%', #{updateByName}, '%')
- and date_format(create_time,'%Y-%m-%d') >= #{createTimeStart}
+ and date_format(a.create_time,'%Y-%m-%d') >= #{createTimeStart}
- and date_format(create_time,'%Y-%m-%d') <= #{createTimeEnd}
+ and date_format(a.create_time,'%Y-%m-%d') <= #{createTimeEnd}
- and date_format(update_time,'%Y-%m-%d') >= #{updateTimeStart}
+ and date_format(a.update_time,'%Y-%m-%d') >= #{updateTimeStart}
- and date_format(update_time,'%Y-%m-%d') <= #{updateTimeEnd}
+ and date_format(a.update_time,'%Y-%m-%d') <= #{updateTimeEnd}
- and start_date >= #{startDate} and start_date <= #{endDate}
+ and a.start_date >= #{startDate} and a.start_date <= #{endDate}
- AND start_date <= #{time}
- AND end_date >= #{time}
+ AND a.start_date <= #{time}
+ AND a.end_date >= #{time}
- and del_flag = #{delFlag}
- and del_flag = 1
+ and a.del_flag = #{delFlag}
+ and a.del_flag = 1
@@ -123,6 +124,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
\ No newline at end of file
diff --git a/mhd-modules/mhd-system/src/main/resources/mapper/basic/storageLocation/StorageLocationMapper.xml b/mhd-modules/mhd-system/src/main/resources/mapper/basic/storageLocation/StorageLocationMapper.xml
index 4e76c1ac6..27f39d600 100644
--- a/mhd-modules/mhd-system/src/main/resources/mapper/basic/storageLocation/StorageLocationMapper.xml
+++ b/mhd-modules/mhd-system/src/main/resources/mapper/basic/storageLocation/StorageLocationMapper.xml
@@ -51,119 +51,133 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- select storage_location_id, organization_id, organization_name, top_organization_id, warehouse_id, warehouse_code, warehouse_name, storage_section_id, storage_code, storage_name, storage_location_code, storage_location_name, storage_location_classify, storage_location_classify_name, storage_location_type, storage_location_type_name, mixing_strategy, mixing_strategy_name, storage_location_group_id, storage_location_group_code, storage_location_group_name, weight_limit, volume_limit, location_size, location_length, location_width, location_height, coordinate, coordinate_area, coordinate_column, coordinate_row, coordinate_layer, remark, opening_up, nullify, status, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from storage_location
+ select a.storage_location_id, a.organization_id, a.organization_name, a.top_organization_id, a.warehouse_id,
+ COALESCE(w.warehouse_code, a.warehouse_code) as warehouse_code,
+ COALESCE(w.warehouse_name, a.warehouse_name) as warehouse_name,
+ a.storage_section_id, a.storage_code, a.storage_name, a.storage_location_code, a.storage_location_name,
+ a.storage_location_classify, a.storage_location_classify_name, a.storage_location_type, a.storage_location_type_name,
+ a.mixing_strategy, a.mixing_strategy_name, a.storage_location_group_id, a.storage_location_group_code, a.storage_location_group_name,
+ a.weight_limit, a.volume_limit, a.location_size, a.location_length, a.location_width, a.location_height,
+ a.coordinate, a.coordinate_area, a.coordinate_column, a.coordinate_row, a.coordinate_layer, a.remark,
+ a.opening_up, a.nullify, a.status, a.create_time, a.create_by, a.create_by_name, a.update_time, a.update_by, a.update_by_name, a.del_flag
+ from storage_location a
+ LEFT JOIN warehouse w ON a.warehouse_id = w.warehouse_id AND w.del_flag = 1
- and organization_id = #{organizationId}
+ and a.organization_id = #{organizationId}
- and organization_name like concat('%', #{organizationName}, '%')
+ and a.organization_name like concat('%', #{organizationName}, '%')
- and top_organization_id = #{topOrganizationId}
+ and a.top_organization_id = #{topOrganizationId}
- and warehouse_id = #{warehouseId}
+ and a.warehouse_id = #{warehouseId}
- and warehouse_code = #{warehouseCode}
+ and (w.warehouse_code like concat('%', #{warehouseCode}, '%') or a.warehouse_code like concat('%', #{warehouseCode}, '%'))
- and warehouse_name like concat('%', #{warehouseName}, '%')
+ and (w.warehouse_name like concat('%', #{warehouseName}, '%') or a.warehouse_name like concat('%', #{warehouseName}, '%'))
- and storage_section_id = #{storageSectionId}
+ and a.storage_section_id = #{storageSectionId}
- and storage_code = #{storageCode}
+ and a.storage_code = #{storageCode}
- and storage_name like concat('%', #{storageName}, '%')
+ and a.storage_name like concat('%', #{storageName}, '%')
- and storage_location_code = #{storageLocationCode}
+ and a.storage_location_code = #{storageLocationCode}
- and storage_location_name like concat('%', #{storageLocationName}, '%')
+ and a.storage_location_name like concat('%', #{storageLocationName}, '%')
- and storage_location_classify = #{storageLocationClassify}
+ and a.storage_location_classify = #{storageLocationClassify}
- and storage_location_classify_name like concat('%', #{storageLocationClassifyName}, '%')
+ and a.storage_location_classify_name like concat('%', #{storageLocationClassifyName}, '%')
- and storage_location_type = #{storageLocationType}
+ and a.storage_location_type = #{storageLocationType}
- and storage_location_type_name like concat('%', #{storageLocationTypeName}, '%')
+ and a.storage_location_type_name like concat('%', #{storageLocationTypeName}, '%')
- and mixing_strategy = #{mixingStrategy}
+ and a.mixing_strategy = #{mixingStrategy}
- and mixing_strategy_name like concat('%', #{mixingStrategyName}, '%')
+ and a.mixing_strategy_name like concat('%', #{mixingStrategyName}, '%')
- and storage_location_group_id = #{storageLocationGroupId}
+ and a.storage_location_group_id = #{storageLocationGroupId}
- and storage_location_group_code = #{storageLocationGroupCode}
+ and a.storage_location_group_code = #{storageLocationGroupCode}
- and storage_location_group_name like concat('%', #{storageLocationGroupName}, '%')
+ and a.storage_location_group_name like concat('%', #{storageLocationGroupName}, '%')
- and weight_limit = #{weightLimit}
+ and a.weight_limit = #{weightLimit}
- and volume_limit = #{volumeLimit}
+ and a.volume_limit = #{volumeLimit}
- and location_size = #{locationSize}
+ and a.location_size = #{locationSize}
- and location_length = #{locationLength}
+ and a.location_length = #{locationLength}
- and location_width = #{locationWidth}
+ and a.location_width = #{locationWidth}
- and location_height = #{locationHeight}
+ and a.location_height = #{locationHeight}
- and coordinate = #{coordinate}
+ and a.coordinate = #{coordinate}
- and coordinate_area = #{coordinateArea}
+ and a.coordinate_area = #{coordinateArea}
- and coordinate_column = #{coordinateColumn}
+ and a.coordinate_column = #{coordinateColumn}
- and coordinate_row = #{coordinateRow}
+ and a.coordinate_row = #{coordinateRow}
- and coordinate_layer = #{coordinateLayer}
+ and a.coordinate_layer = #{coordinateLayer}
- and opening_up = #{openingUp}
+ and a.opening_up = #{openingUp}
- and nullify = #{nullify}
+ and a.nullify = #{nullify}
- and create_by_name like concat('%', #{createByName}, '%')
+ and a.create_by_name like concat('%', #{createByName}, '%')
- and update_by_name like concat('%', #{updateByName}, '%')
+ and a.update_by_name like concat('%', #{updateByName}, '%')
- and remark like concat('%',#{remark},'%')
+ and a.remark like concat('%',#{remark},'%')
+
+ and a.del_flag = #{delFlag}
+ and a.del_flag = 1
+
@@ -172,9 +186,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-