From 95cd39d71cfb15489b7ce1819748e7522832a1f2 Mon Sep 17 00:00:00 2001
From: weicd <weicd@yhzhg.cn>
Date: Wed, 18 Jan 2023 01:35:43 +0000
Subject: [PATCH] Merge branch 'master' of http://192.168.1.110:5678/r/pms-upgrade into weicd

---
 eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/repository/TaskDaliyRepository.java |   27 +++++++++++++++++++++++++++
 1 files changed, 27 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 a2259ff..edcc646 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
@@ -81,6 +81,33 @@
     List<TaskDaliy> findByProjectIdAndTaskId(Long projectId, Long taskId);
 
     /**
+     * 根据项目ID查询任务日报信息
+     * @param projectId
+     * @return
+     */
+    @Query(value = "SELECT * FROM task_daliy WHERE project_id = ?1 ORDER BY user_id, fill_date ASC", nativeQuery = true)
+    List<TaskDaliy> findByProjectId(Long projectId);
+
+    /**
+     * 根据项目ID、任务ID查询
+     * @param projectId
+     * @param taskId
+     * @return
+     */
+    @Query(value = "SELECT user_id AS userId, COALESCE(SUM(consumed_hours), 0) AS consumedHours FROM task_daliy WHERE project_id = ?1 GROUP BY user_id", nativeQuery = true)
+	List<TaskDailyInterface> collectCostByProjectIdGroupUser(Long projectId);
+
+    /**
+     * 根据项目ID、任务ID查询
+     * @param projectId
+     * @param taskId
+     * @return
+     */
+    @Query(value = "SELECT user_id AS userId, task_id AS taskId, COALESCE(MAX(task_progress), 0) AS TaskProgress FROM task_daliy WHERE project_id = ?1 AND fill_date BETWEEN ?2 AND ?3 GROUP BY user_id, task_id", nativeQuery = true)
+	List<TaskDailyInterface> collectCostByProjectIdAndFillDateBetweenGroupUserAndTaskId(Long projectId, String sdate, String edate);
+
+
+    /**
      * 根据项目ID、任务ID、用户ID查询总消耗工时、总消耗工作量、最大任务进度
      * @param projectId
      * @param taskId

--
Gitblit v1.9.3