Sfoglia il codice sorgente

update overconsum report

tags/Baseline_30082024_BACKEND_UAT
MSI\derek 1 anno fa
parent
commit
c7c11eb2fb
1 ha cambiato i file con 10 aggiunte e 13 eliminazioni
  1. +10
    -13
      src/main/java/com/ffii/tsms/modules/report/service/ReportService.kt

+ 10
- 13
src/main/java/com/ffii/tsms/modules/report/service/ReportService.kt Vedi File

@@ -1415,7 +1415,7 @@ open class ReportService(
columnIndex = 0

// val currRow = generalCreateReportIndexed(sheet, result, rowIndex, columnIndex)
generalCreateReportIndexed(sheet, result, rowIndex, columnIndex)
rowIndex = generalCreateReportIndexed(sheet, result, rowIndex, columnIndex)

val sheetCF = sheet.sheetConditionalFormatting
val rule1 = sheetCF.createConditionalFormattingRule("AND(K7 >= $lowerLimit, K7 <= 1)")
@@ -1853,19 +1853,16 @@ open class ReportService(
if (args.containsKey("status"))
statusFilter = when (args.get("status")) {
"Potential Overconsumption" -> "and " +
" ((COALESCE((tns.totalConsumed * sa.hourlyRate), 0) / p.expectedTotalFee) >= 0.9 " +
" (COALESCE((tns.totalConsumed * sa.hourlyRate), 0) / p.expectedTotalFee) >= :lowerLimit " +
" and (COALESCE((tns.totalConsumed * sa.hourlyRate), 0) / p.expectedTotalFee) <= 1 " +
" or (COALESCE(tns.totalConsumed, 0) / COALESCE(p.totalManhour, 0)) >= 0.9 " +
" and (COALESCE(tns.totalConsumed, 0) / COALESCE(p.totalManhour, 0)) <= 1)"

"Overconsumption" -> "and " +
" ((COALESCE((tns.totalConsumed * sa.hourlyRate), 0) / p.expectedTotalFee) >= 1 " +
" or (COALESCE(tns.totalConsumed, 0) / COALESCE(p.totalManhour, 0)) >= 1) "

"Within Budget" -> "and " +
" ((COALESCE((tns.totalConsumed * sa.hourlyRate), 0) / p.expectedTotalFee) < 0.9 " +
" and " +
" (COALESCE(tns.totalConsumed, 0) / COALESCE(p.totalManhour, 0)) <= 0.9 "
" or (COALESCE(tns.totalConsumed, 0) / COALESCE(p.totalManhour, 0)) >= :lowerLimit " +
" and (COALESCE(tns.totalConsumed, 0) / COALESCE(p.totalManhour, 0)) <= 1 "
"All" -> "and " +
" (COALESCE((tns.totalConsumed * sa.hourlyRate), 0) / p.expectedTotalFee) >= :lowerLimit " +
" or (COALESCE(tns.totalConsumed, 0) / COALESCE(p.totalManhour, 0)) >= :lowerLimit "
// "Overconsumption" -> "and " +
// " ((COALESCE((tns.totalConsumed * sa.hourlyRate), 0) / p.expectedTotalFee) >= 1 " +
// " or (COALESCE(tns.totalConsumed, 0) / COALESCE(p.totalManhour, 0)) >= 1) "

else -> ""
}


Caricamento…
Annulla
Salva