| | |
| | | @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)); |
| | | } |