|
@@ -421,7 +421,7 @@ public class TEExamController {
|
|
@RequestMapping(value = "/prop/count", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/prop/count", method = RequestMethod.POST)
|
|
@ApiResponses({@ApiResponse(code = 200, message = "考试属性信息", response = ExamPropCountDto.class)})
|
|
@ApiResponses({@ApiResponse(code = 200, message = "考试属性信息", response = ExamPropCountDto.class)})
|
|
public Result propCount(@ApiParam(value = "考试id", required = true) @RequestParam Long examId) {
|
|
public Result propCount(@ApiParam(value = "考试id", required = true) @RequestParam Long examId) {
|
|
- long start = System.currentTimeMillis();
|
|
|
|
|
|
+// long start = System.currentTimeMillis();
|
|
if (Objects.isNull(examId) || Objects.equals(examId, "")) {
|
|
if (Objects.isNull(examId) || Objects.equals(examId, "")) {
|
|
throw new BusinessException(ExceptionResultEnum.EXAM_ID_IS_NULL);
|
|
throw new BusinessException(ExceptionResultEnum.EXAM_ID_IS_NULL);
|
|
}
|
|
}
|
|
@@ -482,15 +482,15 @@ public class TEExamController {
|
|
examPropCountDto.get().setExamCount(list.get(1));
|
|
examPropCountDto.get().setExamCount(list.get(1));
|
|
examPropCountDto.get().setAlreadyComplete(list.get(2));
|
|
examPropCountDto.get().setAlreadyComplete(list.get(2));
|
|
}
|
|
}
|
|
|
|
+ Integer notComplete = examPropCountDto.get().getAllCount() - examPropCountDto.get().getAlreadyComplete();
|
|
|
|
+ BigDecimal completionRate = new BigDecimal(examPropCountDto.get().getAlreadyComplete())
|
|
|
|
+ .divide(new BigDecimal(examPropCountDto.get().getAllCount()), 2, BigDecimal.ROUND_HALF_UP)
|
|
|
|
+ .setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
|
+ examPropCountDto.get().setNotComplete(notComplete);
|
|
|
|
+ examPropCountDto.get().setCompletionRate(completionRate);
|
|
}
|
|
}
|
|
- Integer notComplete = examPropCountDto.get().getAllCount() - examPropCountDto.get().getAlreadyComplete();
|
|
|
|
- BigDecimal completionRate = new BigDecimal(examPropCountDto.get().getAlreadyComplete())
|
|
|
|
- .divide(new BigDecimal(examPropCountDto.get().getAllCount()), 2, BigDecimal.ROUND_HALF_UP)
|
|
|
|
- .setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
|
- examPropCountDto.get().setNotComplete(notComplete);
|
|
|
|
- examPropCountDto.get().setCompletionRate(completionRate);
|
|
|
|
- long end = System.currentTimeMillis();
|
|
|
|
- log.info("============prop/count耗时============:{}秒", (end - start) / 1000);
|
|
|
|
|
|
+// long end = System.currentTimeMillis();
|
|
|
|
+// log.info("============prop/count耗时============:{}秒", (end - start) / 1000);
|
|
return ResultUtil.ok(examPropCountDto);
|
|
return ResultUtil.ok(examPropCountDto);
|
|
}
|
|
}
|
|
|
|
|