feat(store): 添加仓库名称搜索功能

This commit is contained in:
zxy 2026-04-13 09:01:41 +08:00
parent 970533321e
commit c449e6b6b2
3 changed files with 15 additions and 5 deletions

View File

@ -34,6 +34,7 @@ public class StoreAreaServiceImpl extends ServiceImpl<StoreAreaMapper, StoreArea
@Resource
private StoreHouseService storeHouseService;
// ... existing code ...
@Override
public List<StoreAreaEntity> getList(StoreAreaPagination storeAreaPagination) {
LambdaQueryWrapper<StoreAreaEntity> storeAreaWrapper = new LambdaQueryWrapper<>();
@ -53,6 +54,12 @@ public class StoreAreaServiceImpl extends ServiceImpl<StoreAreaMapper, StoreArea
if (ObjectUtil.isNotEmpty(storeAreaPagination.getStoreHouseId())) {
storeAreaWrapper.eq(StoreAreaEntity::getStoreHouseId, storeAreaPagination.getStoreHouseId());
}
if (ObjectUtil.isNotEmpty(storeAreaPagination.getStoreHouseName())) {
storeAreaWrapper.apply(
"EXISTS (SELECT 1 FROM tba_store_house h WHERE h.id = store_house_id AND h.f_delete_mark = 0 AND h.store_house_name LIKE {0})",
"%" + storeAreaPagination.getStoreHouseName() + "%"
);
}
storeAreaWrapper.eq(StoreAreaEntity::getDeleteMark, 0);
storeAreaWrapper.orderByDesc(StoreAreaEntity::getCreatorTime);
List<StoreAreaEntity> storeAreaList;

View File

@ -40,6 +40,9 @@ public class StoreAreaPagination extends Pagination {
@Schema(description = "仓库id")
private Integer storeHouseId;
@Schema(description = "仓库名称")
private String storeHouseName;
@Schema(description = "仓库类型")
private String storeType;
}

View File

@ -10,11 +10,11 @@
</JnpfSelect>
</el-form-item>
</el-col>
<!-- <el-col :span="6">-->
<!-- <el-form-item label="仓库名称">-->
<!-- <el-input v-model="query.storeHouseName" placeholder="请输入" clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="6">
<el-form-item label="仓库名称">
<el-input v-model="query.storeHouseName" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="状态">
<JnpfSelect v-model="query.enabledStatus" placeholder="请选择" clearable :options="enabledStatusOptions"