From 29de50484de71d91b2c9fd1dcaafdbefff5baa78 Mon Sep 17 00:00:00 2001
From: 赵士淞 <zhaoss@yhzhg.cn>
Date: Thu, 09 Feb 2023 03:00:57 +0000
Subject: [PATCH] 项目任务、任务、任务分配、任务日报中的工时上限提升到一万

---
 eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/task/repository/TaskDaliyRepository.java |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 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 74e53f0..a9e83f4 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
@@ -106,6 +106,14 @@
     List<TaskDailyInterface> collectByProjectIdAndFillDateLessThanGroupByUserIdAndFillDate(Long projectId, Timestamp fillDate);
 
     /**
+     * 根据项目ID查询任务日报信息
+     * @param projectId
+     * @return
+     */
+    @Query(value = "SELECT user_id AS userId, fill_date AS fillDate, COALESCE(SUM(consumed_hours), 0) AS consumedHours FROM task_daliy WHERE project_id = ?1 GROUP BY user_id, fill_date", nativeQuery = true)
+    List<TaskDailyInterface> collectByProjectIdGroupByUserIdAndFillDate(Long projectId);
+
+    /**
      * 根据项目ID、任务ID查询
      * @param projectId
      * @param taskId
@@ -117,7 +125,6 @@
     /**
      * 根据项目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 <= ?2 GROUP BY user_id, task_id", nativeQuery = true)
@@ -141,7 +148,7 @@
      * @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)
+    @Query(value = "SELECT id,project_id,task_id,user_id,fill_date,consumed_workload,task_progress,settlement_status,SUM( consumed_hours ) AS consumed_hours,remarks,create_by,create_time,update_by,update_time 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);
 
     /**

--
Gitblit v1.9.3