fix(delivery-plan): 修正配送计划查询的分组逻辑
- 在统计查询中添加按计划日期分组,确保相同计划名称但不同日期的数据正确分离 - 为日期范围查询结果添加按计划日期分组,避免数据重复统计 - 优化GROUP BY子句以提高查询准确性和性能
This commit is contained in:
@@ -161,7 +161,7 @@
|
||||
<if test="endTime != null">
|
||||
AND wcpa.create_time <= #{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 <= #{endTime}
|
||||
</if>
|
||||
GROUP BY dp.plan_date
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user