baolhyhzhg
2025-01-24 7e5d3af2e5e253e0e92ab412065c4608e7f73fc2
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/repository/TaskDaliyRepository.java
@@ -238,4 +238,7 @@
    List<Long> findByTaskId(Long taskId);
    List<TaskDaliy> findByTaskIdAndUserId(Long taskId, Long userId);
    @Query(value = "select COALESCE(SUM(td.consumed_hours), 0) AS consumedHours, project_id as projectId, user_id as userId from task_daliy where fill_date <= ?2 and fill_date >= ?1 group by project_id, user_id order by user_id",nativeQuery = true)
    List<Map> calcTotalConsumedHours(LocalDate startDate, LocalDate endDate);
}