瀏覽代碼

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

add_swagger
MSI\2Fi 9 月之前
父節點
當前提交
1e23ce35c4
共有 1 個檔案被更改,包括 11 行新增8 行删除
  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 查看文件

@@ -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>> =


Loading…
取消
儲存