From 6225c567da0bfeb08d97333f8b5999e5afc552ad Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: 星期五, 18 七月 2025 14:11:14 +0800
Subject: [PATCH] 修改权限问题
---
multi-system/src/main/java/com/gkhy/exam/system/service/impl/ExPaperStudentServiceImpl.java | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/ExPaperStudentServiceImpl.java b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/ExPaperStudentServiceImpl.java
index 63de6e3..3892fd2 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/ExPaperStudentServiceImpl.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/ExPaperStudentServiceImpl.java
@@ -24,6 +24,8 @@
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;
@@ -306,6 +308,12 @@
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);
--
Gitblit v1.9.2