Parcourir la source

Fix PnL Report duplicate month range when the range is 1.

add_swagger
MSI\2Fi il y a 9 mois
Parent
révision
1e23ce35c4
1 fichiers modifiés avec 11 ajouts et 8 suppressions
  1. +11
    -8
      src/main/java/com/ffii/tsms/modules/report/service/ReportService.kt

+ 11
- 8
src/main/java/com/ffii/tsms/modules/report/service/ReportService.kt Voir le fichier

@@ -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<String, Any> = manhoursSpent.first() { it.containsKey("info") }["info"] as Map<String, Any>
val staffInfoList: List<Map<String, Any>> =


Chargement…
Annuler
Enregistrer