Commit e0506198 authored by sakshi gupta's avatar sakshi gupta
Browse files

no message

parent 5d79f707
......@@ -536,6 +536,12 @@ public class ReportServiceImpl implements ReportService{
List<DBObject> percentageWiseAssessmentReport=quizResultRepo.getPercentageWiseAssessmentReport(stDate, enDate, assessmentId,subLobId);
Integer grandTotal=0;
Map<String, Integer> hashMap = new HashMap<String,Integer>();
hashMap.put("0-35", 0);
hashMap.put("36-50", 0) ;
hashMap.put("51-70", 0) ;
hashMap.put("71-80", 0) ;
hashMap.put("81-100", 0) ;
hashMap.put("Grand Total", grandTotal);
for(DBObject result:percentageWiseAssessmentReport) {
int score=(Integer)result.get("quizScore");
if(score>0&score<35) {
......@@ -543,37 +549,29 @@ public class ReportServiceImpl implements ReportService{
if(hashMap.containsKey("0-35")) {
hashMap.put("0-35", hashMap.get("0-35")+1) ;
}
else
hashMap.put("0-35", 1) ;
}else if(score>=36&score<=50){
grandTotal++;
if(hashMap.containsKey("36-50")) {
hashMap.put("36-50", hashMap.get("36-50")+1) ;
}
else
hashMap.put("36-50", 1) ;
}else if(score>=51&score<=70){
grandTotal++;
if(hashMap.containsKey("51-70")) {
hashMap.put("51-70", hashMap.get("51-70")+1) ;
}
else
hashMap.put("51-70", 1) ;
}else if(score>=71&score<=80){
grandTotal++;
if(hashMap.containsKey("71-80")) {
hashMap.put("71-80", hashMap.get("71-80")+1) ;
}
else
hashMap.put("71-80", 1) ;
}else if(score>=81&score<=100){
grandTotal++;
if(hashMap.containsKey("81-100")) {
hashMap.put("81-100", hashMap.get("81-100")+1) ;
}
else
hashMap.put("81-100", 1) ;
}
}
hashMap.put("Grand Total", grandTotal);
}
if(hashMap.size()>0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment