feat(wms): 优化物料筛选逻辑并调整实体类字段
- 在 WmsMaterialCoilBo 中引入 TableField 注解支持 - 调整 itemName 和新增 selectType 字段位置,增强数据绑定准确性 - 修改筛选判断依据,由 itemType 改为 selectType,提高查询灵活性 - 完善细粒度筛选条件拼接逻辑,确保查询条件动态构建正确性
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.klp.domain.bo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
@@ -134,8 +135,6 @@ public class WmsMaterialCoilBo extends BaseEntity {
|
||||
//材料类型
|
||||
private String materialType;
|
||||
|
||||
private String itemName;
|
||||
|
||||
|
||||
/**
|
||||
* 质量状态(0=正常,1=待检,2=不合格)
|
||||
@@ -167,6 +166,10 @@ public class WmsMaterialCoilBo extends BaseEntity {
|
||||
*/
|
||||
private String coilIds;
|
||||
|
||||
// 筛选类型
|
||||
private String selectType;
|
||||
// 物品名称
|
||||
private String itemName;
|
||||
// 材质(两表通用字段名:product.material / raw_material.material)
|
||||
private String itemMaterial;
|
||||
// 厂家(两表通用字段名:product.manufacturer / raw_material.manufacturer)
|
||||
|
||||
@@ -339,7 +339,7 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
qw.eq(StringUtils.isNotBlank(bo.getItemType()), "mc.item_type", bo.getItemType());
|
||||
|
||||
// 按 itemType + 细粒度字段筛选(若对应字段非空则拼接条件;为空则不拼)
|
||||
if (StringUtils.isNotBlank(bo.getItemType())) {
|
||||
if (StringUtils.isNotBlank(bo.getSelectType())) {
|
||||
List<Long> matchedItemIds = new ArrayList<>();
|
||||
boolean hasAnyItemFilter = StringUtils.isNotBlank(bo.getItemMaterial())
|
||||
|| StringUtils.isNotBlank(bo.getItemManufacturer())
|
||||
|
||||
Reference in New Issue
Block a user