|
@@ -141,7 +141,7 @@ fun downloadLateStartReport(@RequestBody @Valid request: LateStartReportRequest) |
|
|
val customer = customerRepository.findByName(request.customer).orElseThrow() |
|
|
val customer = customerRepository.findByName(request.customer).orElseThrow() |
|
|
// ?: throw Exception("Customer not found with name: ${request.customer}") |
|
|
// ?: throw Exception("Customer not found with name: ${request.customer}") |
|
|
|
|
|
|
|
|
val projects = projectRepository.findAllByDateRange(request.remainedDateFrom, request.remainedDateTo) |
|
|
|
|
|
|
|
|
val projects = projectRepository.findAllByPlanStartLessThanEqualAndPlanEndGreaterThanEqual(request.remainedDateFrom, request.remainedDateTo) |
|
|
if (projects.isEmpty()) { |
|
|
if (projects.isEmpty()) { |
|
|
throw Exception("No projects found for the given date: ${request.reportDate}") |
|
|
throw Exception("No projects found for the given date: ${request.reportDate}") |
|
|
} |
|
|
} |
|
|