|
@@ -167,7 +167,7 @@ public class StageControlService {
|
|
|
int count = markTaskRepo.countByWorkIdAndSubjectAndStageAndResult(workId, markSubject.getSubject(), MarkStage.LEVEL, targetLevel.getCode());
|
|
|
int total = markTaskRepo.countByWorkIdAndSubjectAndStage(workId, markSubject.getSubject(), MarkStage.LEVEL);
|
|
|
|
|
|
- if ((count + 1.0D) / total * 1.0D > pt / 100.D) {
|
|
|
+ if ((count * 1.0D) / total * 1.0D > pt / 100.D) {
|
|
|
statusMap.put(markSubject.getId(), false);
|
|
|
throw new RuntimeException(targetLevel.getCode() + "档已满,占比总阀值已达" + pt + "%。");
|
|
|
}
|
|
@@ -177,7 +177,7 @@ public class StageControlService {
|
|
|
for (ExamQuestion examQuestion : examQuestions) {
|
|
|
int kdcount = markTaskRepo.countByWorkIdAndSubjectAndStageAndQuestionIdAndResult(workId, markSubject.getSubject(), MarkStage.LEVEL, examQuestion.getId(), targetLevel.getCode());
|
|
|
int kdtotal = markTaskRepo.countByWorkIdAndSubjectAndStageAndQuestionId(workId, markSubject.getSubject(), MarkStage.LEVEL, examQuestion.getId());
|
|
|
- if ((kdcount + 1.0D) / kdtotal * 1.0D > kdpt / 100.D) {
|
|
|
+ if ((kdcount * 1.0D) / kdtotal * 1.0D > kdpt / 100.D) {
|
|
|
statusMap.put(markSubject.getId(), false);
|
|
|
throw new RuntimeException(targetLevel.getCode() + "档已满,考点阀值已达" + kdpt + "%。");
|
|
|
}
|