|
@@ -2127,14 +2127,14 @@ open class ReportService( |
|
|
if (args.containsKey("status")) |
|
|
if (args.containsKey("status")) |
|
|
statusFilter = when (args.get("status")) { |
|
|
statusFilter = when (args.get("status")) { |
|
|
"Potential Overconsumption" -> " having " + |
|
|
"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) >= :lowerLimit " + |
|
|
|
|
|
" and (sum(t.consumedBudget) / p.expectedTotalFee) <= 1 " + |
|
|
" or (sum(t.normalConsumed + COALESCE(t.otConsumed, 0)) / COALESCE(p.totalManhour, 0)) >= :lowerLimit " + |
|
|
" 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 " |
|
|
" and (sum(t.normalConsumed + COALESCE(t.otConsumed, 0)) / COALESCE(p.totalManhour, 0)) <= 1 " |
|
|
|
|
|
|
|
|
"All" -> " having " + |
|
|
"All" -> " having " + |
|
|
" sum(t.consumedBudget) / (p.expectedTotalFee - ifnull(p.subContractFee, 0)) * 0.8 >= :lowerLimit " + |
|
|
|
|
|
" or sum(t.consumedBudget) / (p.expectedTotalFee - ifnull(p.subContractFee, 0)) * 0.8 >= :lowerLimit " |
|
|
|
|
|
|
|
|
" (sum(t.consumedBudget) / p.expectedTotalFee) >= :lowerLimit " + |
|
|
|
|
|
" or (sum(t.normalConsumed + COALESCE(t.otConsumed, 0)) / COALESCE(p.totalManhour, 0)) >= :lowerLimit " |
|
|
|
|
|
|
|
|
else -> "" |
|
|
else -> "" |
|
|
} |
|
|
} |
|
|