From 7eb7874266af0886a6441410ae42b50522d64786 Mon Sep 17 00:00:00 2001
From: weicd <weicd@yhzhg.cn>
Date: Mon, 30 Jan 2023 09:16:09 +0000
Subject: [PATCH] 首页,公司管理
---
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/repository/TaskDaliyRepository.java | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/repository/TaskDaliyRepository.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/repository/TaskDaliyRepository.java
index 88817c2..752b499 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/repository/TaskDaliyRepository.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/repository/TaskDaliyRepository.java
@@ -23,6 +23,7 @@
import org.springframework.data.jpa.repository.Query;
import java.sql.Timestamp;
+import java.time.LocalDate;
import java.util.Date;
import java.util.List;
import java.util.Map;
@@ -132,4 +133,14 @@
*/
@Query(value = "SELECT COALESCE(SUM(consumed_hours), 0) AS consumedHours, COALESCE(SUM(consumed_workload), 0) AS consumedWorkload, COALESCE(MAX(task_progress), 0) AS taskProgress FROM task_daliy WHERE project_id = ?1 AND task_id = ?2 AND user_id = ?3", nativeQuery = true)
TaskDailyInterface findSumConsumedHoursAndSumConsumedWorkloadAndMaxTaskProgressByProjectIdAndTaskIdAndUserId(Long projectId, Long taskId, Long userId);
+
+ /**
+ * 根据userId,开始时间结束时间范围查询日志表
+ * @param userId
+ * @param startDate
+ * @param endDate
+ * @return
+ */
+ @Query(value = "SELECT * from task_daliy where user_id = ?1 and fill_date <= ?3 and fill_date >= ?2 group by fill_date", nativeQuery = true)
+ List<TaskDaliy> findAllByUserAndDate(Long userId, LocalDate startDate, LocalDate endDate);
}
\ No newline at end of file
--
Gitblit v1.9.3