Explorar el Código

update

tags/Baseline_30082024_BACKEND_UAT
MSI\derek hace 1 año
padre
commit
6f19567dbf
Se han modificado 1 ficheros con 7 adiciones y 0 borrados
  1. +7
    -0
      src/main/java/com/ffii/tsms/modules/timesheet/entity/TimesheetRepository.kt

+ 7
- 0
src/main/java/com/ffii/tsms/modules/timesheet/entity/TimesheetRepository.kt Ver fichero

@@ -2,7 +2,10 @@ package com.ffii.tsms.modules.timesheet.entity;

import com.ffii.core.support.AbstractRepository
import com.ffii.tsms.modules.data.entity.Staff
import com.ffii.tsms.modules.data.entity.projections.StaffSearchInfo
import com.ffii.tsms.modules.project.entity.Project
import com.ffii.tsms.modules.project.entity.StaffAllocation
import com.ffii.tsms.modules.timesheet.entity.projections.MonthlyHours
import com.ffii.tsms.modules.timesheet.entity.projections.TimesheetHours
import com.ffii.tsms.modules.project.entity.ProjectTask
import org.springframework.data.jpa.repository.Query
@@ -18,4 +21,8 @@ interface TimesheetRepository : AbstractRepository<Timesheet, Long> {

@Query("SELECT new com.ffii.tsms.modules.timesheet.entity.projections.TimesheetHours(IFNULL(SUM(normalConsumed), 0), IFNULL(SUM(otConsumed), 0)) FROM Timesheet t JOIN ProjectTask pt on t.projectTask = pt WHERE pt.project = ?1")
fun totalHoursConsumedByProject(project: Project): TimesheetHours

fun findByStaffAndRecordDateBetweenOrderByRecordDate(staff: Staff, start: LocalDate, end: LocalDate): List<Timesheet>

fun findDistinctProjectTaskByStaffAndRecordDateBetweenOrderByRecordDate(staff: Staff, start: LocalDate, end: LocalDate): List<Timesheet>
}

Cargando…
Cancelar
Guardar