|
@@ -38,6 +38,7 @@ import org.apache.commons.logging.Log |
|
|
import org.apache.commons.logging.LogFactory |
|
|
import org.apache.commons.logging.LogFactory |
|
|
import org.springframework.data.domain.Example |
|
|
import org.springframework.data.domain.Example |
|
|
import org.springframework.data.domain.ExampleMatcher |
|
|
import org.springframework.data.domain.ExampleMatcher |
|
|
|
|
|
import java.math.BigDecimal |
|
|
import java.time.YearMonth |
|
|
import java.time.YearMonth |
|
|
import java.util.* |
|
|
import java.util.* |
|
|
|
|
|
|
|
@@ -346,4 +347,28 @@ class ReportController( |
|
|
// return ResponseEntity.noContent().build() |
|
|
// return ResponseEntity.noContent().build() |
|
|
// } |
|
|
// } |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// API for testing data of total cumulative expenditure |
|
|
|
|
|
// @GetMapping("/test") |
|
|
|
|
|
// fun testApi(@RequestParam teamLeadId: Long): Map<String, BigDecimal>{ |
|
|
|
|
|
// val manhoursSpent = excelReportService.getManHoursSpentByTeam(teamLeadId) |
|
|
|
|
|
// val salaryEffectiveMap = excelReportService.getSalaryEffectiveByTeamLead(teamLeadId) |
|
|
|
|
|
// val updatedTimesheetData = excelReportService.updateTimesheetDataWithEffectiveSalary(manhoursSpent, salaryEffectiveMap) |
|
|
|
|
|
// val projectStaffExpenditures = excelReportService.sumTimesheetDataByMonth(updatedTimesheetData) |
|
|
|
|
|
// val projectExpenditure = excelReportService.calculateProjectExpenditures(updatedTimesheetData) |
|
|
|
|
|
// |
|
|
|
|
|
// return projectExpenditure |
|
|
|
|
|
// } |
|
|
|
|
|
// @GetMapping("/test2") |
|
|
|
|
|
// |
|
|
|
|
|
// fun testApi2(@RequestParam teamLeadId: Long): Map<String, ReportService.ProjectSummary>{ |
|
|
|
|
|
// val manhoursSpent = excelReportService.getManHoursSpentByTeam(teamLeadId) |
|
|
|
|
|
// val salaryEffectiveMap = excelReportService.getSalaryEffectiveByTeamLead(teamLeadId) |
|
|
|
|
|
// val updatedTimesheetData = excelReportService.updateTimesheetDataWithEffectiveSalary(manhoursSpent, salaryEffectiveMap) |
|
|
|
|
|
// val projectStaffExpenditures = excelReportService.sumTimesheetDataByMonth(updatedTimesheetData) |
|
|
|
|
|
// val projectExpenditure = excelReportService.calculateProjectExpenditures(updatedTimesheetData) |
|
|
|
|
|
// |
|
|
|
|
|
// return projectStaffExpenditures |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
} |
|
|
} |