| | |
| | | package com.gkhy.exam.system.service.impl; |
| | | |
| | | import cn.hutool.core.lang.Snowflake; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.RandomUtil; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.exam.common.api.CommonPage; |
| | |
| | | //生成考试证书编号 |
| | | 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); |
| | | String timestamp = String.valueOf(System.currentTimeMillis()).substring(9, 13); |
| | | paperStudent.setNumber("AQSC-"+format+"-"+timestamp); |
| | | } |
| | | |
| | | |
| | | if (exPaperStudent.getScore()>paperStudent.getScore()){ |
| | | if (exPaperStudent.getScore()>=paperStudent.getScore()){ |
| | | paperStudent.setScore(exPaperStudent.getScore()); |
| | | paperStudent.setNumber(exPaperStudent.getNumber()); |
| | | } |
| | | } |
| | | int row=baseMapper.updateById(paperStudent); |