生成证书

This commit is contained in:
wuchunlei
2024-09-18 13:36:01 +08:00
parent 8e4da8be13
commit 41013f34c4
4 changed files with 108 additions and 96 deletions

View File

@@ -411,8 +411,8 @@ public class ClassController {
String endYear = DateUtil.year(classExamUser.getEndTime())+"";
String endMonth = DateUtil.month(classExamUser.getEndTime())+1+"";
String endDay = DateUtil.dayOfMonth(classExamUser.getEndTime())+"";
String description = endYear+""+endMonth+""+endDay+"日自考通过太湖学堂"+courseEntity.getTitle()+"课程考试,确认合格。";
String edes = "has past the online-examination study of "+courseEntity.getEtitle()+" Courses in Tai Hu Education online.";
String[] description= {endYear,endMonth,endDay,courseEntity.getTitle()};
String[] edes = {courseEntity.getEtitle()};
String url = userCertificateService.generateCertificate(type,certificateNo,photoUrl,realName, description, edes, endYear,endMonth,endDay);
userCertificate.setCertificateNo(certificateNo);
userCertificate.setCertificateUrl(url);
@@ -433,10 +433,10 @@ public class ClassController {
userCertificate.setCertificateNo(certificateNo);
double keshiTotal = (double)map.get("keshi");
String keshi = (keshiTotal+"").replace(".0","");
String description = ""+startYear+""+startMonth+""+startDay+"日至"+endYear+""+endMonth+""+endDay+"" +
"在太湖学堂"+classEntity.getTitle()+"学习,修完"+map.get("courseTitle")+"课程,共计"+keshi+"学时,确认合格。";
String edes = "Has satisfactorily completed an online courseTCM on "+map.get("courseETitle")+" with "+keshi+" course hours intotal, and has been recongnized eligibility without assessment.";
String url = userCertificateService.generateCertificate(type,certificateNo,photoUrl,realName, description, edes, endYear,endMonth,endDay);
String[] des = {startYear,startMonth,startDay,endYear,endMonth,endDay,
classEntity.getTitle(),map.get("courseTitle").toString(),keshi};
String[] edes = {map.get("courseETitle").toString(),keshi};
String url = userCertificateService.generateCertificate(type,certificateNo,photoUrl,realName,des, edes, endYear,endMonth,endDay);
userCertificate.setTitle(classEntity.getTitle());
userCertificate.setCertificateUrl(url);
userCertificate.setClassId(classEntity.getId());
@@ -464,19 +464,19 @@ public class ClassController {
String certificateNo = u0.getCertificateNo();
int no = Integer.parseInt(certificateNo.substring(certificateNo.indexOf("1")+1,certificateNo.indexOf("1")+7))+1;
if ("A".equals(type)){
res = "NO.A1"+String.format("%06d", no);
res = "NO."+String.format("%06d", no);
}else if ("B".equals(type)){
res = "NO.B1"+String.format("%06d", no);
res = "NO."+String.format("%06d", no);
}else if ("ZK".equals(type)){
res = "NO.ZK1"+String.format("%06d", no);
res = "NO.ZK"+String.format("%06d", no);
}
}else {
if ("A".equals(type)){
res = "NO.A1000001";
res = "NO.000001";
}else if ("B".equals(type)){
res = "NO.B1000001";
res = "NO.000001";
}else if ("ZK".equals(type)){
res = "NO.ZK1000001";
res = "NO.ZK000001";
}
}
return res+courseNamePinyin;