feat(delivery): 添加查询已绑定钢卷列表功能

- 在 IWmsDeliveryWaybillDetailService 中新增 getBoundCoilIds 方法
- 在 WmsDeliveryWaybillDetailController 中新增 boundCoilList 接口
- 实现 WmsDeliveryWaybillDetailServiceImpl 的 getBoundCoilIds 查询逻辑
- 集成 WmsMaterialCoilService 查询已发货绑定的钢卷信息
- 添加钢卷 ID 去重处理确保数据准确性
- 支持分页查询返回 TableDataInfo 格式数据
This commit is contained in:
2026-03-05 09:57:00 +08:00
parent 28839275d2
commit dfd2ba15d9
3 changed files with 38 additions and 0 deletions

View File

@@ -211,4 +211,20 @@ public class WmsDeliveryWaybillDetailServiceImpl implements IWmsDeliveryWaybillD
}
return baseMapper.deleteBatchIds(ids) > 0;
}
/**
* 查询所有已绑定的钢卷 ID 列表
*/
@Override
public List<Long> getBoundCoilIds() {
LambdaQueryWrapper<WmsDeliveryWaybillDetail> lqw = Wrappers.lambdaQuery();
lqw.isNotNull(WmsDeliveryWaybillDetail::getCoilId);
lqw.eq(WmsDeliveryWaybillDetail::getDelFlag, 0);
lqw.select(WmsDeliveryWaybillDetail::getCoilId);
// Deleted:lqw.distinct();
List<WmsDeliveryWaybillDetail> list = baseMapper.selectList(lqw);
return list.stream().map(WmsDeliveryWaybillDetail::getCoilId).distinct().collect(Collectors.toList());
}
}