| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | paperStudent.setPassed(Constant.EXAM_UNPASS); |
| | | }else{ |
| | | paperStudent.setPassed(Constant.EXAM_PASS); |
| | | //生成考试证书编号 |
| | | DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | String format = LocalDate.now().format(dateTimeFormatter); |
| | | Long l = baseMapper.selectCount(Wrappers.<ExPaperStudent>lambdaQuery().eq(ExPaperStudent::getPassed, 1).eq(ExPaperStudent::getState,2)); |
| | | l+=1; |
| | | paperStudent.setNumber("AQSC-"+format+"-"+l); |
| | | } |
| | | } |
| | | int row=baseMapper.updateById(paperStudent); |