| | |
| | | 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 |
| | |
| | | @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)); |
| | | } |
| | |
| | | //返回 |
| | | return R.data(detail); |
| | | } |
| | | |
| | | } |