From 1e23ce35c4b1666809b22fb090074a484cc36e39 Mon Sep 17 00:00:00 2001 From: "MSI\\2Fi" Date: Thu, 21 Nov 2024 11:17:58 +0800 Subject: [PATCH] Fix PnL Report duplicate month range when the range is 1. --- .../modules/report/service/ReportService.kt | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/ffii/tsms/modules/report/service/ReportService.kt b/src/main/java/com/ffii/tsms/modules/report/service/ReportService.kt index 7e28ece..9a50c3e 100644 --- a/src/main/java/com/ffii/tsms/modules/report/service/ReportService.kt +++ b/src/main/java/com/ffii/tsms/modules/report/service/ReportService.kt @@ -2683,6 +2683,7 @@ open class ReportService( tempList.add(mapOf("info" to info)) tempList.add(mapOf("staffInfoList" to staffInfoList)) +// println("================== $tempList =====================") return tempList } @@ -2949,14 +2950,14 @@ open class ReportService( val financialYears = getHalfYearFinancialPeriods(queryStartMonth, queryEndMonth, 10) var currentDate = startDate - if (currentDate == endDate) { - monthRange.add( - mapOf( - "display" to YearMonth.of(currentDate.year, currentDate.month).format(monthFormat), - "date" to currentDate - ) - ) - } +// if (currentDate == endDate) { +// monthRange.add( +// mapOf( +// "display" to YearMonth.of(currentDate.year, currentDate.month).format(monthFormat), +// "date" to currentDate +// ) +// ) +// } while (!currentDate.isAfter(endDate)) { monthRange.add( mapOf( @@ -2967,6 +2968,8 @@ open class ReportService( currentDate = currentDate.plusMonths(1) } +// println("============ MonthRange ======================= ") +// println(monthRange) val info: Map = manhoursSpent.first() { it.containsKey("info") }["info"] as Map val staffInfoList: List> =