V3.36版本修改,基础信息列展示规则,分页数量修改,类别搜索修改
This commit is contained in:
@ -252,7 +252,8 @@ class MaterialBaseService:
|
||||
|
||||
category = filters.get('category')
|
||||
if category is not None and category != '':
|
||||
query = query.filter(MaterialBase.category.ilike(category.strip()))
|
||||
# 在末尾拼接 '%' 实现前缀模糊匹配
|
||||
query = query.filter(MaterialBase.category.ilike(f"{category.strip()}%"))
|
||||
|
||||
type_val = filters.get('type')
|
||||
if type_val is not None and type_val != '':
|
||||
@ -750,7 +751,8 @@ class MaterialBaseService:
|
||||
|
||||
category = filters.get('category')
|
||||
if category is not None and category != '':
|
||||
filter_conditions.append(MaterialBase.category.ilike(category.strip()))
|
||||
# 同样在末尾拼接 '%'
|
||||
filter_conditions.append(MaterialBase.category.ilike(f"{category.strip()}%"))
|
||||
type_val = filters.get('type')
|
||||
if type_val is not None and type_val != '':
|
||||
filter_conditions.append(MaterialBase.material_type.ilike(type_val.strip()))
|
||||
|
||||
Reference in New Issue
Block a user