|
@@ -329,6 +329,185 @@ public class WrittenMaterial10047FZ extends WrittenMaterialDefault {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //布展核对单
|
|
|
+ public File makeBoothSign(FrameThread thread, File tempFile, LyGroup group, List<LySubject> subjectArray, int start, int end) {
|
|
|
+ Document doc = null;
|
|
|
+ try {
|
|
|
+ tempFile.getParentFile().mkdirs();
|
|
|
+ doc = pageModel.prepareDocument(tempFile);
|
|
|
+ doc.setMargins(30, 20, 20, 20);
|
|
|
+ doc.setFont(getSchoolFont());
|
|
|
+ List<LyRoomWritten> roomArray = this.daoRoom.listRoom(group.getLy_group_id());
|
|
|
+ Map<LyRoomWritten, List<Map<String, Object>>> roomStdMap = new LinkedHashMap<>();
|
|
|
+
|
|
|
+ FrameThreadHelper.updateThread(thread, 1, "一共有【" + roomArray.size() + "】个笔试考场", FrameThreadStatus.Running);
|
|
|
+
|
|
|
+ for (LyRoomWritten room : roomArray) {
|
|
|
+ List<Map<String, Object>> sArray = this.daoRoom.listRoomStd(group.getLy_group_id(), room);
|
|
|
+ if (sArray.isEmpty()) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ roomStdMap.put(room, sArray);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 每页考生的数量
|
|
|
+ int pageStdCount = 15;
|
|
|
+ LyAgent agent = this.daoGroup.find(LyAgent.class, group.getLy_agent_id());
|
|
|
+
|
|
|
+ // 计算每个考生的margin
|
|
|
+ // 每行考生数
|
|
|
+ float[] mainCols = new float[5];
|
|
|
+ Arrays.fill(mainCols, (float) 100 / mainCols.length);
|
|
|
+
|
|
|
+ int roomIndex = 0;
|
|
|
+ int fontSize;
|
|
|
+ // 布展签到单
|
|
|
+ List<Map<String, Object>> array = daoRoom.listStdBySeq(start, end);
|
|
|
+ Table mainTable = new Table(mainCols).setMarginTop(10);
|
|
|
+ // 宽度及无边框设置
|
|
|
+ mainTable.setWidthPercent(100).setBorder(null).setMarginTop(-10);
|
|
|
+ this.createSignNewPage(doc, group, subjectArray, null);
|
|
|
+
|
|
|
+ boolean hasStd = false;
|
|
|
+ for (int stdIndex = 0; stdIndex < array.size(); stdIndex++) {
|
|
|
+ Map<String, Object> std = array.get(stdIndex);
|
|
|
+ //字体大小设置
|
|
|
+ if (std.get("std_name").toString().length() > 6) {
|
|
|
+ fontSize = 6;
|
|
|
+ } else {
|
|
|
+ fontSize = 10;
|
|
|
+ }
|
|
|
+ Table stdTable = new Table(new float[] { 2.2f, 3f }).setWidthPercent(100).setBorder(null);
|
|
|
+ // 考生头像
|
|
|
+ Image imgStdUpload = ArtFileHelper.generateStdImage(std.containsKey("std_image") ? std.get("std_image").toString() : "cert.jpg");
|
|
|
+
|
|
|
+ int row_margin = -2;
|
|
|
+
|
|
|
+ stdTable.addCell(new Cell(1, 2).setBorder(null).add(imgStdUpload.scaleAbsolute(72, 90))
|
|
|
+ .setMarginTop(0).setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
+ .setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE)
|
|
|
+ .setMarginLeft(15));
|
|
|
+
|
|
|
+ // 身份证证号
|
|
|
+ stdTable.addCell(new Cell(1, 2).add(std.get("cert_id").toString()).setMarginTop(0).setFontSize(9)
|
|
|
+ .setBorder(null)).setTextAlignment(TextAlignment.CENTER).setBold()
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE);
|
|
|
+ // 准考证号
|
|
|
+ stdTable.addCell(new Cell(1, 1).add(" 准考证:").setBorder(null).setMarginTop(row_margin)
|
|
|
+ .setHorizontalAlignment(HorizontalAlignment.RIGHT)
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(8).setMarginLeft(6));
|
|
|
+ stdTable.addCell(new Cell(1, 1).add(std.get("aspect_ticket_num").toString()).setBorder(null)
|
|
|
+ .setMarginTop(row_margin).setHorizontalAlignment(HorizontalAlignment.LEFT).setMarginLeft(-2)
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(10)
|
|
|
+ .setTextAlignment(TextAlignment.LEFT).setBold());
|
|
|
+ // 姓名
|
|
|
+ stdTable.addCell(new Cell(1, 1).add(" 姓 名:").setBorder(null).setMarginTop(row_margin)
|
|
|
+ .setHorizontalAlignment(HorizontalAlignment.RIGHT)
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(8).setMarginLeft(6));
|
|
|
+ stdTable.addCell(new Cell(1, 1).add(std.get("std_name").toString()).setBorder(null)
|
|
|
+ .setMarginTop(row_margin).setHorizontalAlignment(HorizontalAlignment.LEFT).setMarginLeft(-2)
|
|
|
+ .setBold().setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(fontSize)
|
|
|
+ .setTextAlignment(TextAlignment.LEFT));
|
|
|
+
|
|
|
+ // 性别
|
|
|
+ stdTable.addCell(new Cell(1, 1).add(" 性 别:").setBorder(null).setMarginTop(row_margin)
|
|
|
+ .setHorizontalAlignment(HorizontalAlignment.RIGHT)
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(8).setMarginLeft(6));
|
|
|
+ stdTable.addCell(new Cell(1, 1).add(std.get("std_sex").toString()).setBorder(null)
|
|
|
+ .setMarginTop(row_margin).setHorizontalAlignment(HorizontalAlignment.LEFT).setMarginLeft(-2)
|
|
|
+ .setBold().setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(10)
|
|
|
+ .setTextAlignment(TextAlignment.LEFT));
|
|
|
+
|
|
|
+ //布展号
|
|
|
+ stdTable.addCell(new Cell(1, 1).add(" 展位号:").setBorder(null).setMarginTop(row_margin)
|
|
|
+ .setHorizontalAlignment(HorizontalAlignment.RIGHT)
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(8).setMarginLeft(6));
|
|
|
+ stdTable.addCell(new Cell(1, 1).add(std.get("real_checkin_seq").toString()).setBorder(null)
|
|
|
+ .setMarginTop(row_margin).setHorizontalAlignment(HorizontalAlignment.LEFT).setMarginLeft(-2)
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(10)
|
|
|
+ .setTextAlignment(TextAlignment.LEFT).setBold());
|
|
|
+
|
|
|
+ if (group.getGroup_name().contains("美术鉴赏与写作(美术学)")) {
|
|
|
+ stdTable.addCell(new Cell(1, 2).add(group.getShow_aspect_name() + ":").setBorder(null).setMarginTop(2)
|
|
|
+ .setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(8));
|
|
|
+ stdTable.addCell(new Cell(1, 2).add("________________").setBorder(null).setMarginTop(0)
|
|
|
+ .setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(8));
|
|
|
+ } else if (group.getGroup_name().contains("美术鉴赏(美术学中外综合办学)")) {
|
|
|
+ stdTable.addCell(new Cell(1, 2).add("笔试:________________").setBorder(null).setMarginTop(2)
|
|
|
+ .setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(8));
|
|
|
+ stdTable.addCell(new Cell(1, 2).add("面试:________________").setBorder(null).setMarginTop(2)
|
|
|
+ .setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(8));
|
|
|
+ } else {
|
|
|
+ stdTable.addCell(new Cell(1, 2).add("签字:________________").setBorder(null).setMarginTop(2)
|
|
|
+ .setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(8));
|
|
|
+ // stdTable.addCell(new Cell(1, 2).add("下午:________________").setBorder(null).setMarginTop(2)
|
|
|
+ // .setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
+ // .setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(8));
|
|
|
+ }
|
|
|
+ mainTable.addCell(new Cell().add(stdTable).setMarginTop(13).setBorder(null));
|
|
|
+
|
|
|
+ FrameThreadHelper.updateThread(thread, roomIndex * 100 / roomArray.size() - 3, "材料生成中......",
|
|
|
+ FrameThreadStatus.Running);
|
|
|
+ if (stdIndex > 0) {
|
|
|
+ // 判断分页
|
|
|
+ if ((stdIndex + 1) % pageStdCount == 0) {
|
|
|
+ doc.add(mainTable.setMarginTop(0));
|
|
|
+ doc.add(new Paragraph("监考员签字:______________________").setFontSize(12).setBold()
|
|
|
+ .setTextAlignment(TextAlignment.RIGHT).setFixedPosition(260, 20, 300));
|
|
|
+ // 判断本考场是否还有考生
|
|
|
+ if (stdIndex != array.size() - 1) {
|
|
|
+ doc.add(new AreaBreak());
|
|
|
+ this.createSignNewPage(doc, group, subjectArray, null);
|
|
|
+ // this.createSignNewPage2(doc, null, group, subjectArray, room);
|
|
|
+ hasStd = true;
|
|
|
+ } else {
|
|
|
+ // 没考生了
|
|
|
+ hasStd = false;
|
|
|
+ }
|
|
|
+ mainTable = new Table(mainCols);
|
|
|
+ // 宽度 及无边框设置
|
|
|
+ mainTable.setWidthPercent(100).setBorder(null);
|
|
|
+ } else {
|
|
|
+ if (stdIndex == array.size() - 1) {
|
|
|
+ doc.add(new Paragraph("监考员签字:______________________").setFontSize(12).setBold()
|
|
|
+ .setTextAlignment(TextAlignment.RIGHT).setFixedPosition(260, 20, 300));
|
|
|
+ doc.add(mainTable);
|
|
|
+ hasStd = false;
|
|
|
+ mainTable = new Table(new float[] { 1, 1, 1 }).setWidthPercent(100).setBorder(null);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if (hasStd) {
|
|
|
+ doc.add(mainTable.setMarginTop(10));
|
|
|
+ }
|
|
|
+ if (!hasStd && roomIndex == roomStdMap.keySet().size() - 1) {
|
|
|
+ doc.add(mainTable.setMarginTop(10));
|
|
|
+ }
|
|
|
+ if (roomIndex < roomStdMap.keySet().size() - 1)
|
|
|
+ doc.add(new AreaBreak());
|
|
|
+ roomIndex++;
|
|
|
+
|
|
|
+ ItextPdfHelper.closePdf(doc);
|
|
|
+ Thread.sleep(3000);
|
|
|
+ FrameThreadHelper.completeThread(thread, "考务材料已生成!");
|
|
|
+ return tempFile;
|
|
|
+ } catch (Exception e) {
|
|
|
+ ItextPdfHelper.closePdf(doc);
|
|
|
+ FrameThreadHelper.completeThread(thread, "材料生成出现内部错误,请检查字体大小设置是否正确", FrameThreadStatus.Error);
|
|
|
+ LogHelper.error(e);
|
|
|
+ throw new BusinessException("无法生成pdf文件,请联系系统管理员");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
public File makeWriteSign(FrameThread thread, File tempFile, LyGroup group, List<LySubject> subjectArray, Integer subject_id) {
|
|
|
Document doc = null;
|
|
@@ -361,13 +540,16 @@ public class WrittenMaterial10047FZ extends WrittenMaterialDefault {
|
|
|
|
|
|
int roomIndex = 0;
|
|
|
int fontSize;
|
|
|
- //List<Map<String, Object>> array = daoRoom.listStdBySeq(68,118);
|
|
|
- for (LyRoomWritten room : roomStdMap.keySet()) {
|
|
|
- List<Map<String, Object>> array = roomStdMap.get(room);
|
|
|
+ // 布展签到单
|
|
|
+ List<Map<String, Object>> array = daoRoom.listStdBySeq(45,100);
|
|
|
+// for (LyRoomWritten room : roomStdMap.keySet()) {
|
|
|
+ //临时注释
|
|
|
+// List<Map<String, Object>> array = roomStdMap.get(room);
|
|
|
Table mainTable = new Table(mainCols).setMarginTop(10);
|
|
|
// 宽度及无边框设置
|
|
|
mainTable.setWidthPercent(100).setBorder(null).setMarginTop(-10);
|
|
|
- this.createSignNewPage(doc, group, subjectArray, room);
|
|
|
+ this.createSignNewPage(doc, group, subjectArray, null);
|
|
|
+// this.createSignNewPage2(doc, null, group, subjectArray, room);
|
|
|
|
|
|
boolean hasStd = false;
|
|
|
for (int stdIndex = 0; stdIndex < array.size(); stdIndex++) {
|
|
@@ -419,6 +601,15 @@ public class WrittenMaterial10047FZ extends WrittenMaterialDefault {
|
|
|
.setBold().setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(10)
|
|
|
.setTextAlignment(TextAlignment.LEFT));
|
|
|
|
|
|
+// // 布展号
|
|
|
+ stdTable.addCell(new Cell(1, 1).add(" 展位号:").setBorder(null).setMarginTop(row_margin)
|
|
|
+ .setHorizontalAlignment(HorizontalAlignment.RIGHT)
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(8).setMarginLeft(6));
|
|
|
+ stdTable.addCell(new Cell(1, 1).add(std.get("real_checkin_seq").toString()).setBorder(null)
|
|
|
+ .setMarginTop(row_margin).setHorizontalAlignment(HorizontalAlignment.LEFT).setMarginLeft(-2)
|
|
|
+ .setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(10)
|
|
|
+ .setTextAlignment(TextAlignment.LEFT).setBold());
|
|
|
+
|
|
|
if (group.getGroup_name().contains("美术鉴赏与写作(美术学)")) {
|
|
|
stdTable.addCell(new Cell(1, 2).add(group.getShow_aspect_name() + ":").setBorder(null).setMarginTop(2)
|
|
|
.setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
@@ -434,12 +625,12 @@ public class WrittenMaterial10047FZ extends WrittenMaterialDefault {
|
|
|
.setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
.setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(8));
|
|
|
} else {
|
|
|
- stdTable.addCell(new Cell(1, 2).add("上午:________________").setBorder(null).setMarginTop(2)
|
|
|
- .setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
- .setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(8));
|
|
|
- stdTable.addCell(new Cell(1, 2).add("下午:________________").setBorder(null).setMarginTop(2)
|
|
|
+ stdTable.addCell(new Cell(1, 2).add("签字:________________").setBorder(null).setMarginTop(2)
|
|
|
.setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
.setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(8));
|
|
|
+// stdTable.addCell(new Cell(1, 2).add("下午:________________").setBorder(null).setMarginTop(2)
|
|
|
+// .setHorizontalAlignment(HorizontalAlignment.CENTER)
|
|
|
+// .setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(8));
|
|
|
}
|
|
|
mainTable.addCell(new Cell().add(stdTable).setMarginTop(13).setBorder(null));
|
|
|
|
|
@@ -454,7 +645,8 @@ public class WrittenMaterial10047FZ extends WrittenMaterialDefault {
|
|
|
// 判断本考场是否还有考生
|
|
|
if (stdIndex != array.size() - 1) {
|
|
|
doc.add(new AreaBreak());
|
|
|
- this.createSignNewPage(doc, group, subjectArray, room);
|
|
|
+ this.createSignNewPage(doc, group, subjectArray, null);
|
|
|
+// this.createSignNewPage2(doc, null, group, subjectArray, room);
|
|
|
hasStd = true;
|
|
|
} else {
|
|
|
// 没考生了
|
|
@@ -486,7 +678,7 @@ public class WrittenMaterial10047FZ extends WrittenMaterialDefault {
|
|
|
if (roomIndex < roomStdMap.keySet().size() - 1)
|
|
|
doc.add(new AreaBreak());
|
|
|
roomIndex++;
|
|
|
- }
|
|
|
+// }
|
|
|
|
|
|
ItextPdfHelper.closePdf(doc);
|
|
|
Thread.sleep(3000);
|
|
@@ -500,6 +692,32 @@ public class WrittenMaterial10047FZ extends WrittenMaterialDefault {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ private void createSignNewPage2(Document doc, LyAgent agent, LyGroup group, List<LySubject> subjectArray,
|
|
|
+ LyRoomWritten room) {
|
|
|
+ // 中央美术学院2020年本科招生专业考试信息核对单
|
|
|
+ Paragraph p1 = new Paragraph("中央美术学院" + ArtParamHelper.ArtYear + "年附中优秀人才选拔考试考生信息核对单").setFontSize(16).setBold()
|
|
|
+ .setTextAlignment(TextAlignment.CENTER);
|
|
|
+ doc.add(p1);
|
|
|
+ Table table = new Table(new float[] { 1f, 2f, 1.5f, 1.5f, 1.5f, 1.5f }).setWidthPercent(100).setMarginLeft(15);
|
|
|
+ table.addCell(new Cell(1,1).add("考点名称:").setTextAlignment(TextAlignment.RIGHT).setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(11).setBold().setBorder(null));
|
|
|
+ table.addCell(new Cell(1,1).add("中央美术学院燕郊校区").setTextAlignment(TextAlignment.LEFT).setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(11).setBorder(null));
|
|
|
+ table.addCell(new Cell(1,1).add("笔试地点:").setTextAlignment(TextAlignment.RIGHT).setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(11).setBold().setBorder(null));
|
|
|
+ table.addCell(new Cell(1,1).add(room.getRoom_addr()).setTextAlignment(TextAlignment.LEFT).setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(11).setBorder(null));
|
|
|
+ table.addCell(new Cell(1,1).add("考场号码:").setTextAlignment(TextAlignment.RIGHT).setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(11).setBold().setBorder(null));
|
|
|
+ table.addCell(new Cell(1,1).add(room.getRoom_name()).setTextAlignment(TextAlignment.LEFT).setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(11).setBorder(null));
|
|
|
+
|
|
|
+ table.addCell(new Cell(1,1).add("考试日期:").setTextAlignment(TextAlignment.RIGHT).setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(11).setBold().setBorder(null));
|
|
|
+ table.addCell(new Cell(1,1).add("2024年12月28日").setTextAlignment(TextAlignment.LEFT).setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(11).setBorder(null));
|
|
|
+ table.addCell(new Cell(1,1).add("考试时间:").setTextAlignment(TextAlignment.RIGHT).setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(11).setBold().setBorder(null));
|
|
|
+ ;
|
|
|
+ table.addCell(new Cell(1,1).add(LocalDateHelper.formatHourMinute(subjectArray.get(0).getExam_start_time())+"-"+ LocalDateHelper.formatHourMinute(subjectArray.get(0).getExam_end_time()))
|
|
|
+ .setTextAlignment(TextAlignment.LEFT).setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(11).setBorder(null));
|
|
|
+ table.addCell(new Cell(1,1).add("考试科目:").setTextAlignment(TextAlignment.RIGHT).setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(11).setBold().setBorder(null));
|
|
|
+ table.addCell(new Cell(1,1).add(group.getGroup_name()).setTextAlignment(TextAlignment.LEFT).setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(11).setBorder(null));
|
|
|
+ doc.add(table);
|
|
|
+ }
|
|
|
+
|
|
|
/********************
|
|
|
* 考场记录单
|
|
|
*/
|
|
@@ -630,63 +848,34 @@ public class WrittenMaterial10047FZ extends WrittenMaterialDefault {
|
|
|
+ " ( select subject_id from ly_subject where ly_group_id=?) and ts.aspect_id=p.aspect_id", group.getLy_group_id());
|
|
|
|
|
|
//准考证号段
|
|
|
- Map<String, Object> mainStd = this.daoRoom.getTicketSerailNum(room.getLy_room_id(), 1);
|
|
|
- Map<String, Object> hkStd = this.daoRoom.getTicketSerailNum(room.getLy_room_id(), 2);
|
|
|
- Map<String, Object> otherStd = this.daoRoom.getTicketSerailNum(room.getLy_room_id(), 3);
|
|
|
- int num = 0;
|
|
|
- int height = 25;
|
|
|
- if (StringHelper.isNotEmpty(mainStd))
|
|
|
- num++;
|
|
|
- if (StringHelper.isNotEmpty(hkStd))
|
|
|
- num++;
|
|
|
- if (StringHelper.isNotEmpty(otherStd))
|
|
|
- num++;
|
|
|
- String value = "";
|
|
|
+ List<Map<String, Object>> stdList = this.daoRoom.listAspectTicketNum(room.getLy_room_id());
|
|
|
+
|
|
|
+ int num = stdList.size();
|
|
|
+ int height = 0;
|
|
|
+ StringBuilder value = new StringBuilder();
|
|
|
if (num == 1) {
|
|
|
- value = aspect.getAspect_name() + " " + room.getMin_ticket_no() + " --- " + room.getMax_ticket_no();
|
|
|
- if (FrameStatus.Active.toString().equals(group.getAspect_num_flag())) {
|
|
|
- value = aspect.getAspect_name() + " " + room.getMin_aspect_ticket_num() + " --- " + room.getMax_aspect_ticket_num();
|
|
|
- }
|
|
|
+ height = 25;
|
|
|
} else if (num == 2) {
|
|
|
height = 23;
|
|
|
- if (StringHelper.isNotEmpty(mainStd) && StringHelper.isNotEmpty(hkStd)) {
|
|
|
- value = aspect.getAspect_name() + " " + mainStd.get("start_num") + (mainStd.get("start_num").equals(mainStd.get("end_num")) ?
|
|
|
- "\n" :
|
|
|
- "---" + mainStd.get("end_num") + "\n");
|
|
|
- value += aspect.getAspect_name() + " " + hkStd.get("start_num") + (hkStd.get("start_num").equals(hkStd.get("end_num")) ?
|
|
|
- "" :
|
|
|
- "---" + hkStd.get("end_num"));
|
|
|
- }
|
|
|
- if (StringHelper.isNotEmpty(mainStd) && StringHelper.isNotEmpty(otherStd)) {
|
|
|
- value = aspect.getAspect_name() + " " + mainStd.get("start_num") + (mainStd.get("start_num").equals(mainStd.get("end_num")) ?
|
|
|
- "\n" :
|
|
|
- "---" + mainStd.get("end_num") + "\n");
|
|
|
- value += aspect.getAspect_name() + " " + otherStd.get("start_num") + (otherStd.get("start_num").equals(otherStd.get("end_num")) ?
|
|
|
- "" :
|
|
|
- "---" + otherStd.get("end_num"));
|
|
|
- }
|
|
|
- if (StringHelper.isNotEmpty(hkStd) && StringHelper.isNotEmpty(otherStd)) {
|
|
|
- value = aspect.getAspect_name() + " " + hkStd.get("start_num") + (hkStd.get("start_num").equals(hkStd.get("end_num")) ?
|
|
|
- "\n" :
|
|
|
- "---" + hkStd.get("end_num") + "\n");
|
|
|
- value += aspect.getAspect_name() + " " + otherStd.get("start_num") + (otherStd.get("start_num").equals(otherStd.get("end_num")) ?
|
|
|
- "" :
|
|
|
- "---" + otherStd.get("end_num"));
|
|
|
- }
|
|
|
-
|
|
|
} else if (num == 3) {
|
|
|
height = 21;
|
|
|
- value = aspect.getAspect_name() + " " + mainStd.get("start_num") + (mainStd.get("start_num").equals(mainStd.get("end_num")) ?
|
|
|
- "\n" :
|
|
|
- "---" + mainStd.get("end_num") + "\n");
|
|
|
- value += aspect.getAspect_name() + " " + hkStd.get("start_num") + (hkStd.get("start_num").equals(hkStd.get("end_num")) ?
|
|
|
- "\n" :
|
|
|
- "---" + hkStd.get("end_num") + "\n");
|
|
|
- value += aspect.getAspect_name() + " " + otherStd.get("start_num") + (otherStd.get("start_num").equals(otherStd.get("end_num")) ?
|
|
|
- "" :
|
|
|
- "---" + otherStd.get("end_num"));
|
|
|
}
|
|
|
+ int row = 0;
|
|
|
+ for(Map<String,Object> map : stdList) {
|
|
|
+ row++;
|
|
|
+ String startTicketNo = map.get("start_num")+"";
|
|
|
+ String endTicketNo = map.get("end_num")+"";
|
|
|
+ String aspectName = map.get("aspect_name")+"";
|
|
|
+ if(!startTicketNo.equals(endTicketNo)) {
|
|
|
+ value.append(aspectName).append(" ").append(startTicketNo).append(" --- ").append(endTicketNo);
|
|
|
+ } else {
|
|
|
+ value.append(aspectName).append(" ").append(startTicketNo);
|
|
|
+ }
|
|
|
+ if(row != stdList.size()) {
|
|
|
+ value.append("\n");
|
|
|
+ }
|
|
|
|
|
|
+ }
|
|
|
|
|
|
/* String value = "";
|
|
|
// 需要和专业关联,要得急,临时处理
|
|
@@ -716,7 +905,7 @@ public class WrittenMaterial10047FZ extends WrittenMaterialDefault {
|
|
|
value+= "书法学 FZ2405067";
|
|
|
}*/
|
|
|
|
|
|
- table.addCell(new Cell(1, 5).add(value).setTextAlignment(TextAlignment.LEFT)
|
|
|
+ table.addCell(new Cell(1, 5).add(value.toString()).setTextAlignment(TextAlignment.LEFT)
|
|
|
.setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(10).setBold());
|
|
|
|
|
|
doc.add(table);
|
|
@@ -1037,7 +1226,8 @@ public class WrittenMaterial10047FZ extends WrittenMaterialDefault {
|
|
|
}
|
|
|
|
|
|
private void createSignNewPage(Document doc, LyGroup group, List<LySubject> subjectArray, LyRoomWritten room) {
|
|
|
- Paragraph p1 = new Paragraph("中央美术学院" + ArtParamHelper.ArtYear + "年附中优秀人才选拔考试考生签到单").setFontSize(16).setBold()
|
|
|
+ //年附中优秀人才选拔考试考生签到单
|
|
|
+ Paragraph p1 = new Paragraph("中央美术学院" + ArtParamHelper.ArtYear + "附中优秀人才选拔考试考生信息核对单").setFontSize(16).setBold()
|
|
|
.setTextAlignment(TextAlignment.CENTER);
|
|
|
doc.add(p1);
|
|
|
|
|
@@ -1052,7 +1242,7 @@ public class WrittenMaterial10047FZ extends WrittenMaterialDefault {
|
|
|
.setFontSize(11).setBorder(null));
|
|
|
table.addCell(new Cell(1, 1).add("布展地点:").setTextAlignment(TextAlignment.RIGHT).setVerticalAlignment(VerticalAlignment.MIDDLE)
|
|
|
.setFontSize(11).setBold().setBorder(null));
|
|
|
- table.addCell(new Cell(1, 1).add("美术馆").setTextAlignment(TextAlignment.LEFT).setVerticalAlignment(VerticalAlignment.MIDDLE)
|
|
|
+ table.addCell(new Cell(1, 1).add("美术馆1层").setTextAlignment(TextAlignment.LEFT).setVerticalAlignment(VerticalAlignment.MIDDLE)
|
|
|
.setFontSize(11).setBorder(null));
|
|
|
table.addCell(new Cell(1, 1).add("布展日期:").setTextAlignment(TextAlignment.RIGHT).setVerticalAlignment(VerticalAlignment.MIDDLE)
|
|
|
.setFontSize(11).setBold().setBorder(null));
|