Administrator
2021-07-22 fd72a9045a8fc437b8c28bac0bdc98e0d29aa441
src/main/java/org/springblade/modules/exam/controller/ExamScoreController.java
@@ -13,9 +13,6 @@
import org.springblade.modules.exam.vo.ExamScoreVO;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
import java.util.List;
/**
 * @author zhongrj
 * @time 2021-07-16
@@ -85,7 +82,15 @@
   @PostMapping("/updateExamScore")
   public R updateExamScore(@RequestBody ExamScore examScore) {
      if (null!=examScore.getLearnGrade() && null!=examScore.getTheoryGrade()){
         examScore.setAllGrade(examScore.getLearnGrade()+examScore.getTheoryGrade());
         if (examScore.getTheoryGrade()>=60 && examScore.getLearnGrade()>=60){
            //合格
            examScore.setQualified(0);
         }else {
            //不合格
            examScore.setQualified(1);
         }
         int totalSocre = examScore.getLearnGrade()+examScore.getTheoryGrade();
         examScore.setAllGrade(Math.round(totalSocre/2));
      }
      return R.status(examScoreService.updateById(examScore));
   }
@@ -120,5 +125,4 @@
      //返回
      return R.data(detail);
   }
}