feat(warehouse): 添加仓库使用次数统计功能
- 在WmsMaterialCoilMapper中新增selectWarehouseIdCount方法用于统计仓库钢卷数量 - 在WmsWarehouseBo中新增orderByUseCount字段支持按使用次数排序 - 修改WmsWarehouseServiceImpl实现按使用次数或序号排序逻辑 - 创建WarehouseUseCountTask定时任务每晚1点更新仓库使用次数 - 实现定时计算各仓库中钢卷数量并更新到useCount字段功能
This commit is contained in:
@@ -924,5 +924,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<!-- 统计仓库使用次数(按warehouse_id出现次数排序) -->
|
||||
<select id="selectWarehouseIdCount" resultType="java.util.Map">
|
||||
SELECT warehouse_id, COUNT(*) AS coil_count
|
||||
FROM wms_material_coil
|
||||
WHERE del_flag = 0
|
||||
AND warehouse_id IN
|
||||
<foreach collection="list" item="wid" open="(" separator="," close=")">
|
||||
#{wid}
|
||||
</foreach>
|
||||
GROUP BY warehouse_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user