fix(delivery-plan): 修正配送计划查询的分组逻辑

- 在统计查询中添加按计划日期分组,确保相同计划名称但不同日期的数据正确分离
- 为日期范围查询结果添加按计划日期分组,避免数据重复统计
- 优化GROUP BY子句以提高查询准确性和性能
This commit is contained in:
2026-01-14 14:19:44 +08:00
parent 821681c0ed
commit 3624426259

View File

@@ -161,7 +161,7 @@
<if test="endTime != null">
AND wcpa.create_time &lt;= #{endTime}
</if>
GROUP BY dp.plan_name
GROUP BY dp.plan_name, dp.plan_date
ORDER BY taskCount DESC
</select>
@@ -195,6 +195,7 @@
<if test="endTime != null">
AND wcpa.create_time &lt;= #{endTime}
</if>
GROUP BY dp.plan_date
</select>
</mapper>