考试申请功能添加考试编号。

This commit is contained in:
Renpc-kilig 2021-05-10 11:23:25 +08:00
parent 46b87b0e6e
commit 77363e9610

View File

@ -62,9 +62,16 @@ public class ExamApplyServiceImpl extends DefaultBaseService implements IExamApp
@Override @Override
public String saveReturnId(String token, ExamApplyVO examApplyVO) { public String saveReturnId(String token, ExamApplyVO examApplyVO) {
String examApplyId = UUIDUtil.getUUID(); String examApplyId = UUIDUtil.getUUID();
// 考场分配状态0未分配1已分配
examApplyVO.setStatus(0); examApplyVO.setStatus(0);
// 监考老师分配状态0未分配1已分配
examApplyVO.setUserStatus(0); examApplyVO.setUserStatus(0);
// 考试申请审核状态0未审核1审核通过2审核驳回
examApplyVO.setCheckStatus(0); examApplyVO.setCheckStatus(0);
// 获取当前时间戳
Long startTs = System.currentTimeMillis();
String endData = examApplyVO.getExamId().substring(30, examApplyVO.getExamId().length());
examApplyVO.setExamApplyNum(startTs + endData);
Map<String, Object> params = HashMapUtil.beanToMap(examApplyVO); Map<String, Object> params = HashMapUtil.beanToMap(examApplyVO);
params.put("examApplyId", examApplyId); params.put("examApplyId", examApplyId);
if (StringUtils.isBlank(token)) { if (StringUtils.isBlank(token)) {