Quellcode durchsuchen

update

tags/Baseline_30082024_BACKEND_UAT
MSI\derek vor 1 Jahr
Ursprung
Commit
a96b9b2511
1 geänderte Dateien mit 6 neuen und 6 gelöschten Zeilen
  1. +6
    -6
      src/main/java/com/ffii/tsms/modules/report/service/ReportService.kt

+ 6
- 6
src/main/java/com/ffii/tsms/modules/report/service/ReportService.kt Datei anzeigen

@@ -2091,13 +2091,13 @@ open class ReportService(
+ " sum(t.consumedBudget) as actualConsumedBudget, "
+ " COALESCE(p.totalManhour, 0) as plannedManhour, "
+ " sum(t.normalConsumed + COALESCE(t.otConsumed, 0)) as actualConsumedManhour, "
+ " sum(t.consumedBudget) / (p.expectedTotalFee - ifnull(p.subContractFee, 0)) * 0.8 as budgetConsumptionRate, "
+ " sum(t.consumedBudget) / ((p.expectedTotalFee - ifnull(p.subContractFee, 0)) * 0.8) as budgetConsumptionRate, "
+ " sum(t.normalConsumed + COALESCE(t.otConsumed, 0)) / COALESCE(p.totalManhour, 0) as manhourConsumptionRate, "
+ " case "
+ " when sum(t.consumedBudget) / (p.expectedTotalFee - ifnull(p.subContractFee, 0)) * 0.8 >= :lowerLimit and sum(t.consumedBudget) / (p.expectedTotalFee - ifnull(p.subContractFee, 0)) * 0.8 <= 1 "
+ " when sum(t.consumedBudget) / ((p.expectedTotalFee - ifnull(p.subContractFee, 0)) * 0.8) >= :lowerLimit and sum(t.consumedBudget) / ((p.expectedTotalFee - ifnull(p.subContractFee, 0)) * 0.8) <= 1 "
+ " or (sum(t.normalConsumed + COALESCE(t.otConsumed, 0)) / COALESCE(p.totalManhour, 0)) >= :lowerLimit and (sum(t.normalConsumed + COALESCE(t.otConsumed, 0)) / COALESCE(p.totalManhour, 0)) <= 1 "
+ " then 'Potential Overconsumption' "
+ " when sum(t.consumedBudget) / (p.expectedTotalFee - ifnull(p.subContractFee, 0)) * 0.8 >= 1 "
+ " when sum(t.consumedBudget) / ((p.expectedTotalFee - ifnull(p.subContractFee, 0)) * 0.8) >= 1 "
+ " or (sum(t.normalConsumed + COALESCE(t.otConsumed, 0)) / COALESCE(p.totalManhour, 0)) >= 1 "
+ " then 'Overconsumption' "
+ " else 'Within Budget' "
@@ -2127,13 +2127,13 @@ open class ReportService(
if (args.containsKey("status"))
statusFilter = when (args.get("status")) {
"Potential Overconsumption" -> " having " +
" sum(t.consumedBudget) / (p.expectedTotalFee - ifnull(p.subContractFee, 0)) * 0.8 >= :lowerLimit " +
" and sum(t.consumedBudget) / (p.expectedTotalFee - ifnull(p.subContractFee, 0)) * 0.8 <= 1 " +
" sum(t.consumedBudget) / ((p.expectedTotalFee - ifnull(p.subContractFee, 0)) * 0.8) >= :lowerLimit " +
" and sum(t.consumedBudget) / ((p.expectedTotalFee - ifnull(p.subContractFee, 0)) * 0.8) <= 1 " +
" or (sum(t.normalConsumed + COALESCE(t.otConsumed, 0)) / COALESCE(p.totalManhour, 0)) >= :lowerLimit " +
" and (sum(t.normalConsumed + COALESCE(t.otConsumed, 0)) / COALESCE(p.totalManhour, 0)) <= 1 "

"All" -> " having " +
" sum(t.consumedBudget) / (p.expectedTotalFee - ifnull(p.subContractFee, 0)) * 0.8 >= :lowerLimit " +
" sum(t.consumedBudget) / ((p.expectedTotalFee - ifnull(p.subContractFee, 0)) * 0.8) >= :lowerLimit " +
" or (sum(t.normalConsumed + COALESCE(t.otConsumed, 0)) / COALESCE(p.totalManhour, 0)) >= :lowerLimit "

else -> ""


Laden…
Abbrechen
Speichern