feat(WmsCoilPendingAction): 添加按钢卷ID列表查询功能
- 在WmsCoilPendingActionBo中新增coilIds字段用于存储钢卷ID列表 - 实现字符串形式的钢卷ID逗号分隔解析为Long类型列表 - 扩展buildQueryWrapperPlus方法支持按多个钢卷ID批量查询 - 添加非空验证确保coilIds参数有效时才进行in条件构建 - 保持原有单个coilId查询逻辑不变,实现向后兼容 - 提供更灵活的批量查询接口以提升数据检索效率
This commit is contained in:
@@ -123,5 +123,8 @@ public class WmsCoilPendingActionBo extends BaseEntity {
|
||||
|
||||
// 加工后的钢卷ids
|
||||
private String processedCoilIds;
|
||||
|
||||
// 钢卷ID列表(逗号分隔)
|
||||
private String coilIds;
|
||||
}
|
||||
|
||||
|
||||
@@ -96,6 +96,15 @@ public class WmsCoilPendingActionServiceImpl implements IWmsCoilPendingActionSer
|
||||
private QueryWrapper<WmsCoilPendingAction> buildQueryWrapperPlus(WmsCoilPendingActionBo bo) {
|
||||
QueryWrapper<WmsCoilPendingAction> qw = Wrappers.query();
|
||||
qw.eq(bo.getCoilId() != null, "wcpa.coil_id", bo.getCoilId());
|
||||
if (StringUtils.isNotBlank(bo.getCoilIds())) {
|
||||
List<Long> coilIdList = Arrays.stream(bo.getCoilIds().split(","))
|
||||
.filter(StringUtils::isNotBlank)
|
||||
.map(Long::parseLong)
|
||||
.collect(Collectors.toList());
|
||||
if (!coilIdList.isEmpty()) {
|
||||
qw.in("wcpa.coil_id", coilIdList);
|
||||
}
|
||||
}
|
||||
qw.like(StringUtils.isNotBlank(bo.getCurrentCoilNo()), "wcpa.current_coil_no", bo.getCurrentCoilNo());
|
||||
if (bo.getActionTypes() != null && !bo.getActionTypes().isEmpty()) {
|
||||
qw.in("wcpa.action_type", bo.getActionTypes());
|
||||
|
||||
Reference in New Issue
Block a user