fix: 产线负载改成未来负载

This commit is contained in:
JR
2025-07-30 17:18:56 +08:00
parent b74c977c60
commit f7a31c07d6
2 changed files with 5 additions and 4 deletions

View File

@@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT
line_id AS lineId,
COUNT(*) AS planDetailCount,
SUM(DATEDIFF(end_date, start_date) + 1) AS totalPlanDays
SUM(DATEDIFF(end_date, GREATEST(start_date, CURDATE())) + 1) AS totalPlanDays
FROM
wms_schedule_plan_detail
WHERE
@@ -30,6 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<foreach collection="lineIds" item="lineId" open="(" separator="," close=")">
#{lineId}
</foreach>
AND end_date >= CURDATE()
AND del_flag = 0
GROUP BY
line_id