From 8672904b4fae96838b58cdabd65a6826893cbdc7 Mon Sep 17 00:00:00 2001 From: "Mac\\David" Date: Fri, 14 Jun 2024 17:51:46 +0800 Subject: [PATCH] updated --- .../com/ffii/tsms/modules/data/service/DashboardService.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/ffii/tsms/modules/data/service/DashboardService.kt b/src/main/java/com/ffii/tsms/modules/data/service/DashboardService.kt index 9c7cb08..69f4567 100644 --- a/src/main/java/com/ffii/tsms/modules/data/service/DashboardService.kt +++ b/src/main/java/com/ffii/tsms/modules/data/service/DashboardService.kt @@ -1669,7 +1669,7 @@ open class DashboardService( + " from staff s" + " left join staff_allocation sa on sa.staff_id = s.id" + " left join project p on sa.project_id = p.id" - + " left join timesheet t on p.id = t.projectId" + + " left join timesheet t on p.id = t.projectId and s.id = t.staffId " + " where s.id = :staffId" + " and t.recordDate = :startdate" ) @@ -1696,7 +1696,7 @@ open class DashboardService( + " from staff s" + " left join staff_allocation sa on sa.staff_id = s.id" + " left join project p on sa.project_id = p.id" - + " left join timesheet t on p.id = t.projectId" + + " left join timesheet t on p.id = t.projectId and s.id = t.staffId" + " where s.id = :staffId" + " and t.recordDate >= :startdate" + " and t.recordDate <= :enddate" @@ -1725,7 +1725,7 @@ open class DashboardService( + " from staff s" + " left join staff_allocation sa on sa.staff_id = s.id" + " left join project p on sa.project_id = p.id" - + " left join timesheet t on p.id = t.projectId" + + " left join timesheet t on p.id = t.projectId and s.id = t.staffId" + " where s.id = :staffId" + " and t.recordDate >= :startdate" + " and t.recordDate <= last_day(:startdate)"