瀏覽代碼

Add function to calculate cumulative expediture

Modify PNL Report, Financial Status Report and Cost and Expense Report
tags/Baseline_30082024_BACKEND_UAT
MSI\2Fi 1 年之前
父節點
當前提交
d68c8fa7c2
共有 1 個文件被更改,包括 25 次插入0 次删除
  1. +25
    -0
      src/main/java/com/ffii/tsms/modules/report/web/ReportController.kt

+ 25
- 0
src/main/java/com/ffii/tsms/modules/report/web/ReportController.kt 查看文件

@@ -38,6 +38,7 @@ import org.apache.commons.logging.Log
import org.apache.commons.logging.LogFactory
import org.springframework.data.domain.Example
import org.springframework.data.domain.ExampleMatcher
import java.math.BigDecimal
import java.time.YearMonth
import java.util.*

@@ -346,4 +347,28 @@ class ReportController(
// 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
// }

}

Loading…
取消
儲存