|
|
|
@ -76,12 +76,9 @@ public class TeachingGradeController { |
|
|
|
|
@GetMapping(value = "/getGradeData",produces = {"application/text;charset=UTF-8"}) |
|
|
|
|
@ResponseBody |
|
|
|
|
@SuppressWarnings("all") |
|
|
|
|
public void getGradeData(HttpServletRequest request, HttpServletResponse response) { |
|
|
|
|
public void getGradeData( String issueId,Integer totalNum, String caseId, HttpServletResponse response) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String issueId = request.getParameter("issueId"); |
|
|
|
|
String totalNumStr = request.getParameter("totalNum"); |
|
|
|
|
String projectId = request.getParameter("caseId");//项目id
|
|
|
|
|
Integer totalNum = Integer.valueOf(totalNumStr); |
|
|
|
|
|
|
|
|
|
JSONObject json = new JSONObject(); |
|
|
|
|
try { |
|
|
|
@ -89,7 +86,7 @@ public class TeachingGradeController { |
|
|
|
|
int answerCount= assessUserService.selectCountByByIssueId(issueId); |
|
|
|
|
//获取案例信息
|
|
|
|
|
HashOperations<String, String, ExamPaperDto> examPaperOpsForHash = redisTemplate.opsForHash(); |
|
|
|
|
ExamPaperDto examPaperDto = examPaperOpsForHash.get(YyyfConstant.EXAM_PAPER_KEY, projectId); |
|
|
|
|
ExamPaperDto examPaperDto = examPaperOpsForHash.get(YyyfConstant.EXAM_PAPER_KEY, caseId); |
|
|
|
|
List<TrainCaseTargetDto> trainCaseTargeList = examPaperDto.getTrainCaseTargeList(); |
|
|
|
|
|
|
|
|
|
Map<String, Object> wrongStatistics = null;//错误信息
|
|
|
|
@ -177,7 +174,7 @@ public class TeachingGradeController { |
|
|
|
|
errorCount++; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
double errorRate = (double) (errorCount) / (double) (totalNum) * 100;//计算错误率
|
|
|
|
|
errorRate = Double.valueOf(String.format("%.2f", errorRate));//四舍五入保留两位小数
|
|
|
|
@ -221,6 +218,7 @@ public class TeachingGradeController { |
|
|
|
|
minErrorRateInfo.put("errorRate", errorRate); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
i++; |
|
|
|
|
} |
|
|
|
|
wrongStatistics.put("maxErrorRateInfo", maxErrorRateInfo); |
|
|
|
|
wrongStatistics.put("minErrorRateInfo", minErrorRateInfo); |
|
|
|
|