|
@@ -3705,6 +3705,7 @@ open class ReportService( |
|
|
templatePath: String ) |
|
|
templatePath: String ) |
|
|
: Workbook |
|
|
: Workbook |
|
|
{ |
|
|
{ |
|
|
|
|
|
// println(manhourSummary) |
|
|
val resource = ClassPathResource(templatePath) |
|
|
val resource = ClassPathResource(templatePath) |
|
|
val templateInputStream = resource.inputStream |
|
|
val templateInputStream = resource.inputStream |
|
|
val workbook: Workbook = XSSFWorkbook(templateInputStream) |
|
|
val workbook: Workbook = XSSFWorkbook(templateInputStream) |
|
@@ -3719,7 +3720,7 @@ open class ReportService( |
|
|
// .takeWhile { it.isBefore(endMonth) || it.isEqual(endMonth) } |
|
|
// .takeWhile { it.isBefore(endMonth) || it.isEqual(endMonth) } |
|
|
.mapIndexed { index, month -> |
|
|
.mapIndexed { index, month -> |
|
|
// Format the month as "MMM-yyyy" |
|
|
// Format the month as "MMM-yyyy" |
|
|
val formattedMonth = month.format(DateTimeFormatter.ofPattern("MMM-yyyy")) |
|
|
|
|
|
|
|
|
val formattedMonth = month.format(DateTimeFormatter.ofPattern("MMM-yyyy", Locale.ENGLISH)) |
|
|
// Calculate the value for this month |
|
|
// Calculate the value for this month |
|
|
formattedMonth to (startValue + index) |
|
|
formattedMonth to (startValue + index) |
|
|
} |
|
|
} |
|
@@ -3787,6 +3788,9 @@ open class ReportService( |
|
|
tempCell.setCellValue(curr["client"].toString()) |
|
|
tempCell.setCellValue(curr["client"].toString()) |
|
|
for ( month in monthList) { |
|
|
for ( month in monthList) { |
|
|
var manhour = 0.0 |
|
|
var manhour = 0.0 |
|
|
|
|
|
// println("curr-rM ${curr["recordMonth"]}") |
|
|
|
|
|
// println("curr ${curr}") |
|
|
|
|
|
// println("month $month") |
|
|
if (curr.containsKey(month.key.toString())) { |
|
|
if (curr.containsKey(month.key.toString())) { |
|
|
manhour = curr[month.key.toString()] as Double |
|
|
manhour = curr[month.key.toString()] as Double |
|
|
} |
|
|
} |
|
|