|
@@ -0,0 +1,365 @@
|
|
|
|
+package cn.hmsoft.art.enrol.business.ticket;
|
|
|
|
+
|
|
|
|
+import cn.hmsoft.application.SpringHelper;
|
|
|
|
+import cn.hmsoft.art.constants.ConfSubjectType;
|
|
|
|
+import cn.hmsoft.art.data.dao.ly.LyStdTicketDao;
|
|
|
|
+import cn.hmsoft.art.data.model.cf.CfAgent;
|
|
|
|
+import cn.hmsoft.art.data.model.cf.CfCategory;
|
|
|
|
+import cn.hmsoft.art.data.model.ly.*;
|
|
|
|
+import cn.hmsoft.art.data.model.std.StdEnrol;
|
|
|
|
+import cn.hmsoft.art.data.model.std.StdReg;
|
|
|
|
+import cn.hmsoft.art.helper.ArtParamHelper;
|
|
|
|
+import cn.hmsoft.frame.util.FrameZoneUtil;
|
|
|
|
+import cn.hmsoft.helper.LocalDateHelper;
|
|
|
|
+import cn.hmsoft.helper.pdf.ItextPdfHelper;
|
|
|
|
+import cn.hmsoft.log.LogHelper;
|
|
|
|
+import com.itextpdf.io.image.ImageDataFactory;
|
|
|
|
+import com.itextpdf.kernel.font.PdfFont;
|
|
|
|
+import com.itextpdf.layout.Document;
|
|
|
|
+import com.itextpdf.layout.element.Cell;
|
|
|
|
+import com.itextpdf.layout.element.Image;
|
|
|
|
+import com.itextpdf.layout.element.Paragraph;
|
|
|
|
+import com.itextpdf.layout.element.Table;
|
|
|
|
+import com.itextpdf.layout.property.HorizontalAlignment;
|
|
|
|
+import com.itextpdf.layout.property.TextAlignment;
|
|
|
|
+import com.itextpdf.layout.property.VerticalAlignment;
|
|
|
|
+
|
|
|
|
+import java.io.File;
|
|
|
|
+import java.time.LocalDate;
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @Description 附中准考证
|
|
|
|
+ */
|
|
|
|
+public class Ticket10047FZ extends TicketHelper {
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ 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);
|
|
|
|
+ doc.setFont(getSchoolFont("10047"));
|
|
|
|
+ //ItextPdfHelper.scaleImage(imgStdUpload, 60, 68);
|
|
|
|
+ imgStdUpload.scaleAbsolute(60, 68);
|
|
|
|
+ Table headTable = new Table(new float[] { 2, 5 });
|
|
|
|
+ headTable.setWidthPercent(100).setBorder(null);
|
|
|
|
+
|
|
|
|
+ // 学校logo
|
|
|
|
+ Image imageLogo = null;
|
|
|
|
+ try {
|
|
|
|
+ String path = SpringHelper.WebServletContext.getRealPath("/") + "fonts" + File.separator + "school"
|
|
|
|
+ + 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)
|
|
|
|
+ .setHorizontalAlignment(HorizontalAlignment.CENTER).setBorder(null));
|
|
|
|
+ headTable.addCell(new Cell(1, 1).add("").setBorder(null));
|
|
|
|
+ // 添加标题
|
|
|
|
+ String title = ArtParamHelper.getParamValue("PdfTitle", "附中优秀人才选拔考试");
|
|
|
|
+ headTable.addCell(new Cell(1, 1).add(new Paragraph(ArtParamHelper.ArtYear + title).setFontSize(20)
|
|
|
|
+ .setTextAlignment(TextAlignment.CENTER)).setBorder(null));
|
|
|
|
+ headTable.addCell(new Cell(1, 1)
|
|
|
|
+ .add(new Paragraph("准 考 证").setFontSize(25).setBold().setTextAlignment(TextAlignment.CENTER))
|
|
|
|
+ .setBorder(null));
|
|
|
|
+ doc.add(headTable);
|
|
|
|
+
|
|
|
|
+ doc.add(new Paragraph("_____________________________________________________________________________________________________")
|
|
|
|
+ .setMarginLeft(20).setMarginTop(-5).setMarginRight(20).setFontSize(8));
|
|
|
|
+
|
|
|
|
+ Table table = new Table(new float[] { 5f, 2f, 2f });
|
|
|
|
+ table.setWidthPercent(100);
|
|
|
|
+
|
|
|
|
+ Table stdTable = new Table(new float[] { 5, 5, 3, 3 });
|
|
|
|
+ stdTable.setWidthPercent(100).setBorder(null);
|
|
|
|
+
|
|
|
|
+ // 准考证号,姓名
|
|
|
|
+ float std_font = 13;
|
|
|
|
+ stdTable.addCell(new Cell(1, 1).add("姓 名:").setFontSize(std_font)
|
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.RIGHT)
|
|
|
|
+ .setTextAlignment(TextAlignment.LEFT).setBorder(null));
|
|
|
|
+ float std_name_font;
|
|
|
|
+ if (std.getStd_name().length() < 5) {
|
|
|
|
+ std_name_font = 13;
|
|
|
|
+ } else if (std.getStd_name().length() == 5) {
|
|
|
|
+ std_name_font = 12;
|
|
|
|
+ } else if (std.getStd_name().length() == 6) {
|
|
|
|
+ std_name_font = 11;
|
|
|
|
+ } else if (std.getStd_name().length() == 7) {
|
|
|
|
+ std_name_font = 10;
|
|
|
|
+ } else if (std.getStd_name().length() == 8) {
|
|
|
|
+ std_name_font = 9;
|
|
|
|
+ } else {
|
|
|
|
+ std_name_font = 8;
|
|
|
|
+ }
|
|
|
|
+ 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));
|
|
|
|
+
|
|
|
|
+ //考生性别
|
|
|
|
+ stdTable.addCell(new Cell(1, 1).add("性别:").setFontSize(std_font).setVerticalAlignment(VerticalAlignment.MIDDLE)
|
|
|
|
+ .setHorizontalAlignment(HorizontalAlignment.RIGHT).setTextAlignment(TextAlignment.LEFT)
|
|
|
|
+ .setBorder(null));
|
|
|
|
+ stdTable.addCell(
|
|
|
|
+ new Cell(1, 1).add(std.getStd_sex()).setFontSize(std_font).setBold().setMarginLeft(-5).setBorder(null));
|
|
|
|
+
|
|
|
|
+ // 证件号码
|
|
|
|
+ stdTable.addCell(new Cell(1, 1).add("证件号码:").setFontSize(std_font)
|
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.RIGHT)
|
|
|
|
+ .setTextAlignment(TextAlignment.LEFT).setBorder(null));
|
|
|
|
+ stdTable.addCell(
|
|
|
|
+ new Cell(1, 3).add(std.getCert_id()).setFontSize(std_font).setBold().setMarginLeft(-5).setBorder(null));
|
|
|
|
+
|
|
|
|
+ // 省份
|
|
|
|
+ stdTable.addCell(new Cell(1, 1).add("省 份:").setFontSize(std_font)
|
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.RIGHT)
|
|
|
|
+ .setTextAlignment(TextAlignment.LEFT).setBorder(null));
|
|
|
|
+ stdTable.addCell(
|
|
|
|
+ new Cell(1, 3).add(FrameZoneUtil.getProvinceName(std.getStd_province())).setFontSize(std_font).setBold().setMarginLeft(-5).setBorder(null));
|
|
|
|
+
|
|
|
|
+ //考生号
|
|
|
|
+ stdTable.addCell(new Cell(1, 1).add("考 生 号:").setFontSize(std_font).setVerticalAlignment(VerticalAlignment.MIDDLE)
|
|
|
|
+ .setHorizontalAlignment(HorizontalAlignment.RIGHT).setTextAlignment(TextAlignment.LEFT)
|
|
|
|
+ .setBorder(null));
|
|
|
|
+ stdTable.addCell(new Cell(1, 3).add(std.getExam_id() == null ? "" : std.getExam_id()).setFontSize(std_font)
|
|
|
|
+ .setBold().setMarginLeft(-5).setBorder(null));
|
|
|
|
+
|
|
|
|
+ //考点
|
|
|
|
+ String agentName = ArtParamHelper.getParamValue("ticketAgentName", "中央美术学院燕郊校区");
|
|
|
|
+ stdTable.addCell(new Cell(1, 1).add("考 点:").setFontSize(std_font).setVerticalAlignment(VerticalAlignment.MIDDLE)
|
|
|
|
+ .setHorizontalAlignment(HorizontalAlignment.RIGHT).setTextAlignment(TextAlignment.LEFT)
|
|
|
|
+ .setBorder(null));
|
|
|
|
+ stdTable.addCell(new Cell(1, 3).add(agentName).setFontSize(12).setBold()
|
|
|
|
+ .setMarginLeft(-8).setBorder(null));
|
|
|
|
+
|
|
|
|
+ // 考生信息
|
|
|
|
+ table.addCell(new Cell(1, 1).add(stdTable).setPadding(0).setMargin(0).setBorder(null));
|
|
|
|
+ // 二维码
|
|
|
|
+ Image qrCodeAsImage = null;
|
|
|
|
+ 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)
|
|
|
|
+ .setMarginTop(-5).setBorder(null));
|
|
|
|
+
|
|
|
|
+ // 考生照片
|
|
|
|
+ table.addCell(new Cell(1, 1).add(imgStdUpload).setMarginLeft(5).setVerticalAlignment(VerticalAlignment.MIDDLE)
|
|
|
|
+ .setMarginTop(-8).setBorder(null));
|
|
|
|
+
|
|
|
|
+ doc.add(table.setMarginLeft(17).setMarginTop(12).setMarginRight(20));
|
|
|
|
+
|
|
|
|
+ StdEnrol enrol = this.daoSubject.findBySql(StdEnrol.class, "select * from std_enrol where std_id=? and pay_status='Active'", std.getStd_id());
|
|
|
|
+ List<LyStdSubject> ssList = daoSubject.listBySql(LyStdSubject.class, "select * from ly_std_subject where ly_room_id is not null and std_id=?",
|
|
|
|
+ std.getStd_id());
|
|
|
|
+ // 笔试结果
|
|
|
|
+ List<LyStdSubject> writtenList = new ArrayList<>();
|
|
|
|
+ // 面试结果
|
|
|
|
+ List<LyStdSubject> faceList = new ArrayList<>();
|
|
|
|
+ for (LyStdSubject ss : ssList) {
|
|
|
|
+ if (ss.getSubject_type().equals(ConfSubjectType.Interview.toString())) {
|
|
|
|
+ faceList.add(ss);
|
|
|
|
+ } else if (ss.getSubject_type().equals(ConfSubjectType.Written.toString())) {
|
|
|
|
+ writtenList.add(ss);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //中间部分
|
|
|
|
+ float fontSize = 10, bFontSize = 11;
|
|
|
|
+ table = new Table(new float[] { 2.5f, 2.5f, 2.5f, 2.5f });
|
|
|
|
+ table.setWidthPercent(100).setBorder(null);
|
|
|
|
+
|
|
|
|
+ int rownum = 0;
|
|
|
|
+ if (!writtenList.isEmpty() && !faceList.isEmpty()) { //既有笔试科目,又有面试科目
|
|
|
|
+ rownum = 6 + writtenList.size();
|
|
|
|
+ }
|
|
|
|
+ if (!writtenList.isEmpty() && faceList.isEmpty()) { // 只有笔试科目,没有面试科目L
|
|
|
|
+ rownum = 3 + writtenList.size();
|
|
|
|
+ }
|
|
|
|
+ //第一行表头
|
|
|
|
+ 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)
|
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
|
+ .setTextAlignment(TextAlignment.CENTER));
|
|
|
|
+ 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)
|
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
|
+ .setTextAlignment(TextAlignment.CENTER));
|
|
|
|
+ //第二行
|
|
|
|
+ table.addCell(new Cell(rownum, 1).add(enrol.getAspect_name().replace("(", "\r\n(")).setFontSize(fontSize)
|
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
|
+ .setTextAlignment(TextAlignment.CENTER));
|
|
|
|
+ table.addCell(new Cell(1, 1).add(ticket.getTicket_no()).setFontSize(fontSize)
|
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
|
+ .setTextAlignment(TextAlignment.CENTER));
|
|
|
|
+ String showDate = ArtParamHelper.getParamValue("ticketShowDate", "2024年1月2日");
|
|
|
|
+ table.addCell(new Cell(1, 1).add(showDate).setFontSize(fontSize)
|
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
|
+ .setTextAlignment(TextAlignment.CENTER));
|
|
|
|
+ table.addCell(new Cell(1, 1).add("美术馆" + (!writtenList.isEmpty() ? writtenList.get(0).getReal_checkin_seq() : "") + "号").setFontSize(fontSize)
|
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
|
+ .setTextAlignment(TextAlignment.CENTER));
|
|
|
|
+
|
|
|
|
+ //第三行表头
|
|
|
|
+ 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)
|
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
|
+ .setTextAlignment(TextAlignment.CENTER));
|
|
|
|
+ table.addCell(new Cell(1, 1).add("笔试时间").setBold().setFontSize(bFontSize)
|
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
|
+ .setTextAlignment(TextAlignment.CENTER));
|
|
|
|
+
|
|
|
|
+ //第四行
|
|
|
|
+ LocalDate examDate = writtenList.get(0).getLy_exam_date();
|
|
|
|
+ String str = LocalDateHelper.format(examDate);
|
|
|
|
+ String[] arr = str.split("-");
|
|
|
|
+ table.addCell(new Cell(writtenList.size(), 1).add(arr[0] + "年" + getMonthDay(arr[1]) + "月" + getMonthDay(arr[2]) + "日").setFontSize(fontSize)
|
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
|
+ .setTextAlignment(TextAlignment.CENTER));
|
|
|
|
+ for (LyStdSubject ws : writtenList) {
|
|
|
|
+ table.addCell(new Cell(1, 1).add(ws.getSubject_name()).setFontSize(fontSize)
|
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
|
+ .setTextAlignment(TextAlignment.CENTER));
|
|
|
|
+ table.addCell(new Cell(1, 1).add(LocalDateHelper.formatHourMinute(ws.getExam_start_time()) + "-" +
|
|
|
|
+ LocalDateHelper.formatHourMinute(ws.getExam_end_time()))
|
|
|
|
+ .setFontSize(fontSize)
|
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
|
+ .setTextAlignment(TextAlignment.CENTER));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ LyRoomWritten roomWritten = daoSubject.find(LyRoomWritten.class, writtenList.get(0).getLy_room_id());
|
|
|
|
+ //第六行
|
|
|
|
+ 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(roomWritten.getRoom_name()).setFontSize(fontSize)
|
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
|
+ .setTextAlignment(TextAlignment.CENTER));
|
|
|
|
+ table.addCell(new Cell(1, 1).add(roomWritten.getRoom_addr()).setFontSize(fontSize)
|
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
|
+ .setTextAlignment(TextAlignment.CENTER));
|
|
|
|
+
|
|
|
|
+ LyRoomInterview roomFace = daoSubject.find(LyRoomInterview.class, faceList.get(0).getLy_room_id());
|
|
|
|
+ if (!faceList.isEmpty()) {
|
|
|
|
+ LocalDate faceDate = faceList.get(0).getLy_exam_date();
|
|
|
|
+ String temp = LocalDateHelper.format(faceDate);
|
|
|
|
+ String[] faceArr = temp.split("-");
|
|
|
|
+ //第七行
|
|
|
|
+ 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(faceArr[0] + "年" + getMonthDay(faceArr[1]) + "月" + getMonthDay(faceArr[2]) + "日").setFontSize(fontSize)
|
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
|
+ .setTextAlignment(TextAlignment.CENTER));
|
|
|
|
+ table.addCell(new Cell(1, 1).add(LocalDateHelper.formatHourMinute(faceList.get(0).getExam_start_time()) + "开始")
|
|
|
|
+ .setFontSize(fontSize)
|
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
|
+ .setTextAlignment(TextAlignment.CENTER));
|
|
|
|
+ //第八行
|
|
|
|
+ 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("第" + roomFace.getRoom_seq() + "考场").setFontSize(fontSize)
|
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
|
+ .setTextAlignment(TextAlignment.CENTER));
|
|
|
|
+ table.addCell(new Cell(1, 1).add(roomFace.getRoom_addr()).setFontSize(fontSize)
|
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
|
+ .setTextAlignment(TextAlignment.CENTER));
|
|
|
|
+ //第九行
|
|
|
|
+ table.addCell(new Cell(1, 1).add("候考地点").setBold().setFontSize(bFontSize)
|
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
|
+ .setTextAlignment(TextAlignment.CENTER));
|
|
|
|
+ table.addCell(new Cell(1, 2).add(faceList.get(0).getLy_room_waiting_addr()).setFontSize(fontSize)
|
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
|
+ .setTextAlignment(TextAlignment.CENTER));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ doc.add(table.setMarginLeft(20).setMarginTop(7).setMarginRight(20));
|
|
|
|
+
|
|
|
|
+ // 添加须知
|
|
|
|
+ Table noticeTable = new Table(1).setBorder(null);
|
|
|
|
+ noticeTable.setFontSize(9);
|
|
|
|
+ noticeTable.addCell(new Cell(1, 1).add("考生须知").setFontSize(bFontSize).setTextAlignment(TextAlignment.LEFT)
|
|
|
|
+ .setBold().setBorder(null));
|
|
|
|
+
|
|
|
|
+ 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);
|
|
|
|
+ noticeTable.addCell(new Cell(1, 1).add(p1).setTextAlignment(TextAlignment.LEFT).setBorder(null));
|
|
|
|
+
|
|
|
|
+ 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.考生应自觉遵守考场纪律,服从考场安排。考生入场后,抽签入座,考试抽签位置为前排的考生在使用画架时,高度以不遮挡后排考生为原则。 ")
|
|
|
|
+ .setMarginTop(0).setFixedLeading(8).setMultipliedLeading(1.2f);
|
|
|
|
+ noticeTable.addCell(new Cell(1, 1).add(p1).setTextAlignment(TextAlignment.LEFT).setBorder(null));
|
|
|
|
+
|
|
|
|
+ p1 = new Paragraph("5.开考15分钟后,迟到考生不准进入考场参加当科考试。考试中途不可离开考场。《准考证》正、反两面在使用期间均不得涂改或书写。 ")
|
|
|
|
+ .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("7.考生需对在面试过程中获悉的面试内容进行保密,考生在面试前后不得相互询问、交流,否则取消面试资格,按违规处理。")
|
|
|
|
+ .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));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private String getMonthDay(String value) {
|
|
|
|
+ String result = "";
|
|
|
|
+ switch (value) {
|
|
|
|
+ case "01":
|
|
|
|
+ result = "1";
|
|
|
|
+ break;
|
|
|
|
+ case "02":
|
|
|
|
+ result = "2";
|
|
|
|
+ break;
|
|
|
|
+ case "03":
|
|
|
|
+ result = "3";
|
|
|
|
+ break;
|
|
|
|
+ case "04":
|
|
|
|
+ result = "4";
|
|
|
|
+ break;
|
|
|
|
+ case "05":
|
|
|
|
+ result = "5";
|
|
|
|
+ break;
|
|
|
|
+ case "06":
|
|
|
|
+ result = "6";
|
|
|
|
+ break;
|
|
|
|
+ case "07":
|
|
|
|
+ result = "7";
|
|
|
|
+ break;
|
|
|
|
+ case "08":
|
|
|
|
+ result = "8";
|
|
|
|
+ break;
|
|
|
|
+ case "09":
|
|
|
|
+ result = "9";
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ result = value;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+}
|