feat(warehouse): 添加仓库使用次数统计功能

- 在WmsMaterialCoilMapper中新增selectWarehouseIdCount方法用于统计仓库钢卷数量
- 在WmsWarehouseBo中新增orderByUseCount字段支持按使用次数排序
- 修改WmsWarehouseServiceImpl实现按使用次数或序号排序逻辑
- 创建WarehouseUseCountTask定时任务每晚1点更新仓库使用次数
- 实现定时计算各仓库中钢卷数量并更新到useCount字段功能
This commit is contained in:
2026-04-16 14:25:54 +08:00
parent 623e78629d
commit e99d7709d2
5 changed files with 92 additions and 2 deletions

View File

@@ -104,5 +104,13 @@ List<WmsMaterialCoilDeliveryExportVo> selectDeliveryExportListByCoilIds(@Param("
* @return 统计结果Map包含totalGrossWeight, totalNetWeight
*/
Map<String, Object> selectStatistics(@Param("ew") QueryWrapper<WmsMaterialCoil> qw);
/**
* 统计仓库使用次数按warehouse_id出现次数排序
*
* @param warehouseIds 仓库ID列表
* @return 每个仓库的钢卷数量
*/
List<Map<String, Object>> selectWarehouseIdCount(@Param("list") List<Long> warehouseIds);
}