|
@@ -8,6 +8,7 @@ import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
+import cn.hmsoft.log.LogHelper;
|
|
|
import com.itextpdf.io.image.ImageDataFactory;
|
|
|
import com.itextpdf.kernel.font.PdfFont;
|
|
|
import com.itextpdf.layout.Document;
|
|
@@ -49,8 +50,8 @@ public class Ticket10047 extends TicketHelper {
|
|
|
|
|
|
/**
|
|
|
* @Description: 组装考试时间
|
|
|
- * @param start_time
|
|
|
- * @param end_time
|
|
|
+ * @param start_time 考试考试时间
|
|
|
+ * @param end_time 考试结束时间
|
|
|
* @date 2024-01-09 11:24:31
|
|
|
*/
|
|
|
private String getExamTime(LocalDateTime start_time, LocalDateTime end_time) {
|
|
@@ -75,7 +76,7 @@ public class Ticket10047 extends TicketHelper {
|
|
|
|
|
|
|
|
|
//央美本科准考证(初试)
|
|
|
- protected void makePdfFile_BKCS(LyStdTicketDao daoTicket, LyStdTicket ticket, StdReg std, LyAgent lyAgent, CfAgent agent,
|
|
|
+ protected void makePdfFile(LyStdTicketDao daoTicket, LyStdTicket ticket, StdReg std, LyAgent lyAgent, CfAgent agent,
|
|
|
CfCategory category, Image imgStdUpload, Document doc, PdfFont pdfFont) {
|
|
|
doc.setMargins(30, 50, 20, 50);
|
|
|
Table headTable = new Table(new float[] { 2, 5 });
|
|
@@ -91,7 +92,7 @@ public class Ticket10047 extends TicketHelper {
|
|
|
imageLogo = new Image(ImageDataFactory.create(path)).scaleAbsolute(120, 70);
|
|
|
scissorImg = new Image(ImageDataFactory.create(scissor_path)).scaleAbsolute(15, 15);
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ LogHelper.error(e.getMessage());
|
|
|
}
|
|
|
headTable.addCell(new Cell(3, 1).add(imageLogo).setVerticalAlignment(VerticalAlignment.MIDDLE).setMarginLeft(10)
|
|
|
.setHorizontalAlignment(HorizontalAlignment.CENTER).setBorder(null));
|
|
@@ -115,12 +116,10 @@ public class Ticket10047 extends TicketHelper {
|
|
|
Table stdTable = new Table(new float[] { 4, 3,3,3});
|
|
|
stdTable.setWidthPercent(100);
|
|
|
// 准考证号,姓名
|
|
|
- float leftTitlFont = 15;
|
|
|
+ float leftTitleFont = 15;
|
|
|
float std_font = 12;
|
|
|
- float std_name_font = 12;
|
|
|
- if (std.getStd_name().length() < 5) {
|
|
|
-
|
|
|
- } else if (std.getStd_name().length() == 5) {
|
|
|
+ float std_name_font;
|
|
|
+ if (std.getStd_name().length() <= 5) {
|
|
|
std_name_font = 12;
|
|
|
} else if (std.getStd_name().length() == 6) {
|
|
|
std_name_font = 11;
|
|
@@ -210,7 +209,7 @@ public class Ticket10047 extends TicketHelper {
|
|
|
try {
|
|
|
AspectNoQrCode = ItextPdfHelper.createQrCode(ticket.getTicket_no(), doc, 100);//准考证号
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ LogHelper.error(e.getMessage());
|
|
|
}
|
|
|
topTab.addCell(new Cell(1, 1).add(AspectNoQrCode).setMarginLeft(0).setVerticalAlignment(VerticalAlignment.MIDDLE)
|
|
|
.setTextAlignment(TextAlignment.CENTER).setMarginTop(5).setBorder(null));
|
|
@@ -218,7 +217,7 @@ public class Ticket10047 extends TicketHelper {
|
|
|
topTab.addCell(new Cell(1, 1).add(imgStdUpload).setMarginLeft(5).setVerticalAlignment(VerticalAlignment.MIDDLE)
|
|
|
.setTextAlignment(TextAlignment.CENTER).setMarginTop(5).setBorder(null));
|
|
|
|
|
|
- firstTab.addCell(new Cell(1, 1).add("第一联").setFontSize(leftTitlFont).setMarginLeft(-13).setBold().setBorder(null)
|
|
|
+ firstTab.addCell(new Cell(1, 1).add("第一联").setFontSize(leftTitleFont).setMarginLeft(-13).setBold().setBorder(null)
|
|
|
.setVerticalAlignment(VerticalAlignment.MIDDLE).setTextAlignment(TextAlignment.CENTER));
|
|
|
firstTab.addCell(new Cell(1, 1).add(topTab).setBorder(null));
|
|
|
doc.add(firstTab.setMarginTop(12).setMarginRight(20));
|
|
@@ -282,7 +281,7 @@ public class Ticket10047 extends TicketHelper {
|
|
|
List<StdEnrolSubject> sbList = daoTicket.listBySql(StdEnrolSubject.class, sql, std.getStd_id());
|
|
|
|
|
|
//书法学,单独处理
|
|
|
- if(enrol.getAspect_id().intValue() == 20102 && sbList.size()> 0 ) {
|
|
|
+ if(enrol.getAspect_id() == 20102 && !sbList.isEmpty()) {
|
|
|
sbList.add(sbList.get(0));
|
|
|
}
|
|
|
|
|
@@ -304,7 +303,7 @@ public class Ticket10047 extends TicketHelper {
|
|
|
try {
|
|
|
subject1QrCode = ItextPdfHelper.createQrCode(ticket.getTicket_no(), doc, 90);//准考证
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ LogHelper.error(e.getMessage());
|
|
|
}
|
|
|
|
|
|
stdTable1.addCell(new Cell(1, 1).add("考生姓名:").setFontSize(std_font)
|
|
@@ -327,7 +326,7 @@ public class Ticket10047 extends TicketHelper {
|
|
|
.setBorder(null));
|
|
|
|
|
|
sub1Table.addCell(new Cell(1, 1).add(subject1QrCode).setVerticalAlignment(VerticalAlignment.MIDDLE)
|
|
|
- .setTextAlignment(TextAlignment.CENTER).setBorder(null));//TODO ..
|
|
|
+ .setTextAlignment(TextAlignment.CENTER).setBorder(null));
|
|
|
sub1Table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE).setPadding(0).setMargin(0).setBorder(null));
|
|
|
sub1Table.addCell(new Cell(1, 1).add(stdTable1).setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE).setPadding(0).setMargin(0).setBorder(null));
|
|
|
sub1Table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE).setPadding(0).setMargin(0).setBorder(null));
|
|
@@ -345,7 +344,7 @@ public class Ticket10047 extends TicketHelper {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- thirdTab.addCell(new Cell(1, 1).add("\n第二联").setFontSize(leftTitlFont).setMarginLeft(-13).setBold().setBorder(null)
|
|
|
+ thirdTab.addCell(new Cell(1, 1).add("\n第二联").setFontSize(leftTitleFont).setMarginLeft(-13).setBold().setBorder(null)
|
|
|
.setVerticalAlignment(VerticalAlignment.MIDDLE).setTextAlignment(TextAlignment.CENTER));
|
|
|
thirdTab.addCell(new Cell(1, 1).add(buttomTab).setBorder(null));
|
|
|
doc.add(thirdTab.setMarginTop(30).setMarginRight(20));
|
|
@@ -374,7 +373,7 @@ public class Ticket10047 extends TicketHelper {
|
|
|
|
|
|
|
|
|
//*************************中间部分-专业信息、大二维码(只有美术学府中法才有这一栏)**************************************************************
|
|
|
- if(faceList != null && faceList.size() > 0) {
|
|
|
+ if(!faceList.isEmpty()) {
|
|
|
|
|
|
doc.add(new Paragraph("请沿虚线将第三联剪下粘贴到快递外包装上").setMarginLeft(50).setMarginTop(20).setFontSize(10));
|
|
|
|
|
@@ -462,12 +461,12 @@ public class Ticket10047 extends TicketHelper {
|
|
|
try {
|
|
|
aspectQrCode = ItextPdfHelper.createQrCode(ticket.getTicket_no(), doc, 100);
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ LogHelper.error(e.getMessage());
|
|
|
}
|
|
|
// 二维码
|
|
|
middleTab.addCell(new Cell(1, 1).add(aspectQrCode).setMarginLeft(5).setVerticalAlignment(VerticalAlignment.MIDDLE)
|
|
|
.setMarginTop(-10).setBorder(null));
|
|
|
- secondTab.addCell(new Cell(1, 1).add("第三联").setFontSize(leftTitlFont).setMarginLeft(-13).setBold().setBorder(null)
|
|
|
+ secondTab.addCell(new Cell(1, 1).add("第三联").setFontSize(leftTitleFont).setMarginLeft(-13).setBold().setBorder(null)
|
|
|
.setVerticalAlignment(VerticalAlignment.MIDDLE).setTextAlignment(TextAlignment.CENTER));
|
|
|
secondTab.addCell(new Cell(1, 1).add(middleTab).setBorder(null));
|
|
|
doc.add(secondTab.setMarginTop(6).setMarginRight(20));
|
|
@@ -481,7 +480,7 @@ public class Ticket10047 extends TicketHelper {
|
|
|
|
|
|
|
|
|
//本科准考证生成方法-复试
|
|
|
- protected void makePdfFile(LyStdTicketDao daoTicket, LyStdTicket ticket, StdReg std, LyAgent lyAgent, CfAgent agent,
|
|
|
+ protected void makePdfFile_BKFS(LyStdTicketDao daoTicket, LyStdTicket ticket, StdReg std, LyAgent lyAgent, CfAgent agent,
|
|
|
CfCategory category, Image imgStdUpload, Document doc, PdfFont pdfFont) {
|
|
|
doc.setMargins(30, 50, 20, 50);
|
|
|
doc.setFont(getSchoolFont("10047"));
|
|
@@ -495,6 +494,7 @@ public class Ticket10047 extends TicketHelper {
|
|
|
+ File.separator + "10047.png";
|
|
|
imageLogo = new Image(ImageDataFactory.create(path)).scaleAbsolute(120, 80);
|
|
|
} catch (Exception e) {
|
|
|
+ LogHelper.error(e.getMessage());
|
|
|
|
|
|
}
|
|
|
headTable.addCell(new Cell(3, 1).add(imageLogo).setVerticalAlignment(VerticalAlignment.MIDDLE).setMarginLeft(10)
|
|
@@ -556,13 +556,11 @@ public class Ticket10047 extends TicketHelper {
|
|
|
}
|
|
|
}
|
|
|
//区分考点
|
|
|
- if(enrol.getAspect_name().equals("造型艺术")) {
|
|
|
- agentName = "中央美术学院燕郊校区";
|
|
|
- } else {
|
|
|
- agentName = "燕京理工学院";
|
|
|
- }
|
|
|
-
|
|
|
- stdTable.addCell(new Cell(1, 1).add(std.getStd_name()).setFontSize(std_name_font).setBold().setMarginLeft(-5)
|
|
|
+ if (enrol != null && enrol.getAspect_name().equals("造型艺术")) {
|
|
|
+ agentName = "中央美术学院燕郊校区";
|
|
|
+ }
|
|
|
+
|
|
|
+ stdTable.addCell(new Cell(1, 1).add(std.getStd_name()).setFontSize(std_name_font).setBold().setMarginLeft(-5)
|
|
|
.setHorizontalAlignment(HorizontalAlignment.LEFT).setVerticalAlignment(VerticalAlignment.MIDDLE)
|
|
|
.setBorder(null));
|
|
|
|
|
@@ -605,6 +603,7 @@ public class Ticket10047 extends TicketHelper {
|
|
|
try {
|
|
|
qrCodeAsImage = ItextPdfHelper.createQrCode(ticket.getTicket_no(), doc, 92);
|
|
|
} catch (Exception e) {
|
|
|
+ LogHelper.error(e.getMessage());
|
|
|
}
|
|
|
// 二维码
|
|
|
table.addCell(new Cell(1, 1).add(qrCodeAsImage).setMarginLeft(5).setVerticalAlignment(VerticalAlignment.MIDDLE)
|
|
@@ -632,10 +631,10 @@ public class Ticket10047 extends TicketHelper {
|
|
|
table.setWidthPercent(100).setBorder(null);
|
|
|
Integer ly_room_id = null;
|
|
|
int rownum = 0;
|
|
|
- if(writtenList.size() >0 && faceList.size() > 0) { //既有笔试科目,又有面试科目
|
|
|
+ if(!writtenList.isEmpty() && !faceList.isEmpty()) { //既有笔试科目,又有面试科目
|
|
|
rownum = 6 + writtenList.size();
|
|
|
}
|
|
|
- if(writtenList.size() > 0 && faceList.size() == 0) { // 只有笔试科目,没有面试科目
|
|
|
+ if(!writtenList.isEmpty() && faceList.isEmpty()) { // 只有笔试科目,没有面试科目
|
|
|
rownum = 3 + writtenList.size();
|
|
|
}
|
|
|
|
|
@@ -653,10 +652,10 @@ public class Ticket10047 extends TicketHelper {
|
|
|
|
|
|
|
|
|
//第二行
|
|
|
- table.addCell(new Cell(rownum, 1).add(enrol.getAspect_name().replace("(", "\n(")).setFontSize(bFontSize)
|
|
|
+ table.addCell(new Cell(rownum, 1).add(enrol.getAspect_name().replace("(", "\n(")).setFontSize(bFontSize)
|
|
|
.setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
.setTextAlignment(TextAlignment.CENTER));
|
|
|
- table.addCell(new Cell(1, 1).add("考试日期").setBold().setFontSize(bFontSize)
|
|
|
+ table.addCell(new Cell(1, 1).add("考试日期").setBold().setFontSize(bFontSize)
|
|
|
.setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
.setTextAlignment(TextAlignment.CENTER));
|
|
|
table.addCell(new Cell(1, 1).add("考试时间").setBold().setFontSize(bFontSize)
|
|
@@ -734,7 +733,7 @@ public class Ticket10047 extends TicketHelper {
|
|
|
.setTextAlignment(TextAlignment.CENTER));
|
|
|
|
|
|
//如果复试有面试的话
|
|
|
- if(faceList != null && faceList.size() > 0) {
|
|
|
+ if(!faceList.isEmpty()) {
|
|
|
LyRoomInterview roomInterview = this.daoSubject.find(LyRoomInterview.class, faceList.get(0).getLy_room_id());
|
|
|
//第五行
|
|
|
table.addCell(new Cell(1, 1).add(String.valueOf(getExamDate(faceList.get(0).getLy_exam_date()))).setFontSize(bFontSize)
|
|
@@ -771,26 +770,36 @@ public class Ticket10047 extends TicketHelper {
|
|
|
noticeTable.addCell(new Cell(1, 1).add("考生须知").setFontSize(bFontSize).setTextAlignment(TextAlignment.LEFT)
|
|
|
.setBold().setBorder(null));
|
|
|
|
|
|
- Paragraph p1 = new Paragraph("1.考生凭本人《准考证》和有效身份证原件按规定时间和地点参加考试,主动接受考点工作人员按规定对其进行的身份验证和随身物品检查等。").setFixedLeading(8)
|
|
|
+ Paragraph p1 = new Paragraph(
|
|
|
+ "1.考生凭本人《准考证》和有效身份证原件按规定时间和地点参加考试,主动接受考点工作人员按规定对其进行的身份验证和随身物品检查等。").setFixedLeading(8)
|
|
|
.setMultipliedLeading(1.2f);
|
|
|
noticeTable.addCell(new Cell(1, 1).add(p1).setTextAlignment(TextAlignment.LEFT).setBorder(null));
|
|
|
- p1 = new Paragraph("2.取得线上考试合格的考生在现场考试当日参加第一科考试入场时将线上考试纸质试卷交给所在考场的监考员。").setMarginTop(0).setFixedLeading(8).setMultipliedLeading(1.2f);
|
|
|
+ p1 = new Paragraph("2.取得线上考试合格的考生在现场考试当日参加第一科考试入场时将线上考试纸质试卷交给所在考场的监考员。").setMarginTop(0)
|
|
|
+ .setFixedLeading(8).setMultipliedLeading(1.2f);
|
|
|
noticeTable.addCell(new Cell(1, 1).add(p1).setTextAlignment(TextAlignment.LEFT).setBorder(null));
|
|
|
- p1 = new Paragraph("3.考生只准携带考试规定以内的考试用品参加笔试,如绘画工具、画板、画架、颜料、黑色签字笔、铅笔、橡皮、笔墨工具及毡子等。不得携带任何书刊、报纸、稿纸、图片、资料、具有通讯功能的工具(如手机、照相设备、扫描设备、智能设备等)或者有存储、编程、查询功能的电子用品以及涂改液、色卡、修正带等物品进入考场。").setMarginTop(0).setFixedLeading(8).setMultipliedLeading(1.2f);
|
|
|
+ p1 = new Paragraph(
|
|
|
+ "3.考生只准携带考试规定以内的考试用品参加笔试,如绘画工具、画板、画架、颜料、黑色签字笔、铅笔、橡皮、笔墨工具及毡子等。不得携带任何书刊、报纸、稿纸、图片、资料、具有通讯功能的工具(如手机、照相设备、扫描设备、智能设备等)或者有存储、编程、查询功能的电子用品以及涂改液、色卡、修正带等物品进入考场。").setMarginTop(
|
|
|
+ 0).setFixedLeading(8).setMultipliedLeading(1.2f);
|
|
|
noticeTable.addCell(new Cell(1, 1).add(p1).setTextAlignment(TextAlignment.LEFT).setBorder(null));
|
|
|
- p1 = new Paragraph("4.考生应自觉遵守考场纪律,服从考场安排。造型艺术、中国画专业考生入场后,抽签入座,考试抽签位置为前排的考生在使用画架时,高度以不遮挡后排考生为原则。文物保护与修复、书法学、实验与科技、艺术设计、艺术设计学、城市艺术设计、建筑学、美术学、美术学(中外合作办学)专业考生使用桌椅类考场考试,禁止使用画架。 ")
|
|
|
+ p1 = new Paragraph(
|
|
|
+ "4.考生应自觉遵守考场纪律,服从考场安排。造型艺术、中国画专业考生入场后,抽签入座,考试抽签位置为前排的考生在使用画架时,高度以不遮挡后排考生为原则。文物保护与修复、书法学、实验与科技、艺术设计、艺术设计学、城市艺术设计、建筑学、美术学、美术学(中外合作办学)专业考生使用桌椅类考场考试,禁止使用画架。 ")
|
|
|
.setMarginTop(0).setFixedLeading(8).setMultipliedLeading(1.2f);
|
|
|
noticeTable.addCell(new Cell(1, 1).add(p1).setTextAlignment(TextAlignment.LEFT).setBorder(null));
|
|
|
- p1 = new Paragraph("5.考生在考试过程中应按照《中央美术学院2024年本科校考专业招生简章》要求,规范使用绘画工具及材料。考生可以使用圆规、直尺、三角尺、定画液。不得使用油画颜料、各种图文数字模板模具、喷枪、以及需外接电源的绘画辅助工具及设备。《准考证》正、反两面在使用期间均不得涂改或书写。 ").setMarginTop(0).setFixedLeading(8)
|
|
|
+ p1 = new Paragraph(
|
|
|
+ "5.考生在考试过程中应按照《中央美术学院2024年本科校考专业招生简章》要求,规范使用绘画工具及材料。考生可以使用圆规、直尺、三角尺、定画液。不得使用油画颜料、各种图文数字模板模具、喷枪、以及需外接电源的绘画辅助工具及设备。《准考证》正、反两面在使用期间均不得涂改或书写。 ").setMarginTop(
|
|
|
+ 0).setFixedLeading(8)
|
|
|
.setMultipliedLeading(1.2f);
|
|
|
noticeTable.addCell(new Cell(1, 1).add(p1).setTextAlignment(TextAlignment.LEFT).setBorder(null));
|
|
|
/*p1 = new Paragraph("6. ").setMarginTop(0).setFixedLeading(8).setMultipliedLeading(1.2f);
|
|
|
noticeTable.addCell(new Cell(1, 1).add(p1).setTextAlignment(TextAlignment.LEFT).setBorder(null));*/
|
|
|
p1 = new Paragraph("6.开考15分钟后,迟到考生不准进入考场参加考试。考试中途不可离开考场。").setMarginTop(0).setFixedLeading(8).setMultipliedLeading(1.2f);
|
|
|
noticeTable.addCell(new Cell(1, 1).add(p1).setTextAlignment(TextAlignment.LEFT).setBorder(null));
|
|
|
- p1 = new Paragraph("7.考生交卷出场时间不得早于考试结束前60分钟,交卷出场后不得再进场续考,也不得在考点规定的区域逗留或者交谈。").setMarginTop(0).setFixedLeading(8).setMultipliedLeading(1.2f);
|
|
|
+ p1 = new Paragraph("7.考生交卷出场时间不得早于考试结束前60分钟,交卷出场后不得再进场续考,也不得在考点规定的区域逗留或者交谈。").setMarginTop(0)
|
|
|
+ .setFixedLeading(8).setMultipliedLeading(1.2f);
|
|
|
noticeTable.addCell(new Cell(1, 1).add(p1).setTextAlignment(TextAlignment.LEFT).setBorder(null));
|
|
|
- p1 = new Paragraph("8.考生不遵守考场规则,不服从考务工作人员管理,有违纪、作弊等行为的,将按照《中华人民共和国教育法》以及《国家教育考试违规处理办法》进行处理,并记入国家教育考试考生诚信档案;涉嫌违法的,移送司法机关,依照《中华人民共和国刑法》等追究法律责任。").setMarginTop(0).setFixedLeading(8).setMultipliedLeading(1.2f);
|
|
|
+ p1 = new Paragraph(
|
|
|
+ "8.考生不遵守考场规则,不服从考务工作人员管理,有违纪、作弊等行为的,将按照《中华人民共和国教育法》以及《国家教育考试违规处理办法》进行处理,并记入国家教育考试考生诚信档案;涉嫌违法的,移送司法机关,依照《中华人民共和国刑法》等追究法律责任。").setMarginTop(
|
|
|
+ 0).setFixedLeading(8).setMultipliedLeading(1.2f);
|
|
|
noticeTable.addCell(new Cell(1, 1).add(p1).setTextAlignment(TextAlignment.LEFT).setBorder(null));
|
|
|
|
|
|
doc.add(noticeTable.setMarginLeft(20).setMarginTop(10).setMarginRight(20));
|