feat(wms): 添加按时间范围查询已绑定钢卷ID功能

- 在 IWmsDeliveryWaybillDetailService 接口中新增 getBoundCoilIdsByTimeRange 方法
- 在控制器中添加 startTime 和 endTime 参数支持时间范围查询
- 实现服务层方法根据时间段筛选已绑定的钢卷ID列表
- 使用 LambdaQueryWrapper 构建时间范围查询条件
- 对查询结果进行空值检查和去重处理
- 保持原有无时间范围查询的兼容性逻辑
This commit is contained in:
2026-04-03 13:48:54 +08:00
parent e6d63ef4f7
commit 47198a0d01
3 changed files with 45 additions and 5 deletions

View File

@@ -2,6 +2,7 @@ package com.klp.controller;
import java.util.List;
import java.util.Arrays;
import java.util.Date;
import com.klp.domain.vo.WmsMaterialCoilBindVo;
import lombok.RequiredArgsConstructor;
@@ -115,8 +116,17 @@ public class WmsDeliveryWaybillDetailController extends BaseController {
* 查询已发货绑定的钢卷列表
*/
@GetMapping("/boundCoilList")
public TableDataInfo<WmsMaterialCoilBindVo> boundCoilList(WmsMaterialCoilBo bo, PageQuery pageQuery) {
List<Long> boundCoilIds = iWmsDeliveryWaybillDetailService.getBoundCoilIds();
public TableDataInfo<WmsMaterialCoilBindVo> boundCoilList(
WmsMaterialCoilBo bo,
PageQuery pageQuery,
@RequestParam(required = false) Date startTime,
@RequestParam(required = false) Date endTime) {
List<Long> boundCoilIds;
if (startTime != null || endTime != null) {
boundCoilIds = iWmsDeliveryWaybillDetailService.getBoundCoilIdsByTimeRange(startTime, endTime);
} else {
boundCoilIds = iWmsDeliveryWaybillDetailService.getBoundCoilIds();
}
if (boundCoilIds == null || boundCoilIds.isEmpty()) {
return new TableDataInfo<>();
}