|
@@ -1,29 +1,18 @@
|
|
package cn.hmsoft.art.service.ly.material.written;
|
|
package cn.hmsoft.art.service.ly.material.written;
|
|
|
|
|
|
import java.io.File;
|
|
import java.io.File;
|
|
-import java.time.LocalDate;
|
|
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
import java.time.format.DateTimeFormatter;
|
|
import java.time.format.DateTimeFormatter;
|
|
-import java.util.ArrayList;
|
|
|
|
-import java.util.Iterator;
|
|
|
|
-import java.util.LinkedHashMap;
|
|
|
|
|
|
+import java.util.*;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
-import java.util.Map;
|
|
|
|
|
|
|
|
import com.itextpdf.io.font.PdfEncodings;
|
|
import com.itextpdf.io.font.PdfEncodings;
|
|
import com.itextpdf.io.image.ImageDataFactory;
|
|
import com.itextpdf.io.image.ImageDataFactory;
|
|
-import com.itextpdf.kernel.color.Color;
|
|
|
|
-import com.itextpdf.kernel.color.DeviceRgb;
|
|
|
|
import com.itextpdf.kernel.font.PdfFont;
|
|
import com.itextpdf.kernel.font.PdfFont;
|
|
import com.itextpdf.kernel.font.PdfFontFactory;
|
|
import com.itextpdf.kernel.font.PdfFontFactory;
|
|
import com.itextpdf.layout.Document;
|
|
import com.itextpdf.layout.Document;
|
|
import com.itextpdf.layout.border.Border;
|
|
import com.itextpdf.layout.border.Border;
|
|
-import com.itextpdf.layout.border.SolidBorder;
|
|
|
|
-import com.itextpdf.layout.element.AreaBreak;
|
|
|
|
-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.element.*;
|
|
import com.itextpdf.layout.property.HorizontalAlignment;
|
|
import com.itextpdf.layout.property.HorizontalAlignment;
|
|
import com.itextpdf.layout.property.TextAlignment;
|
|
import com.itextpdf.layout.property.TextAlignment;
|
|
import com.itextpdf.layout.property.VerticalAlignment;
|
|
import com.itextpdf.layout.property.VerticalAlignment;
|
|
@@ -43,7 +32,6 @@ import cn.hmsoft.frame.constants.FrameThreadStatus;
|
|
import cn.hmsoft.frame.data.model.FrameThread;
|
|
import cn.hmsoft.frame.data.model.FrameThread;
|
|
import cn.hmsoft.frame.exception.BusinessException;
|
|
import cn.hmsoft.frame.exception.BusinessException;
|
|
import cn.hmsoft.frame.thread.FrameThreadHelper;
|
|
import cn.hmsoft.frame.thread.FrameThreadHelper;
|
|
-import cn.hmsoft.helper.CollectionHelper;
|
|
|
|
import cn.hmsoft.helper.LocalDateHelper;
|
|
import cn.hmsoft.helper.LocalDateHelper;
|
|
import cn.hmsoft.helper.StringHelper;
|
|
import cn.hmsoft.helper.StringHelper;
|
|
import cn.hmsoft.helper.pdf.ItextDocumentModel;
|
|
import cn.hmsoft.helper.pdf.ItextDocumentModel;
|
|
@@ -71,7 +59,7 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
LyRoomWritten room = roomArray.get(roomIndex);
|
|
LyRoomWritten room = roomArray.get(roomIndex);
|
|
if (room.getReal_std_total() < 1)
|
|
if (room.getReal_std_total() < 1)
|
|
continue;
|
|
continue;
|
|
- Paragraph p1 = null;
|
|
|
|
|
|
+ Paragraph p1;
|
|
Table mainTable = new Table(new float[] {1,3}).setWidthPercent(100).setBorder(Border.NO_BORDER);
|
|
Table mainTable = new Table(new float[] {1,3}).setWidthPercent(100).setBorder(Border.NO_BORDER);
|
|
Image imageLogo = null;
|
|
Image imageLogo = null;
|
|
try {
|
|
try {
|
|
@@ -79,7 +67,7 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
+ File.separator + "10047.png";
|
|
+ File.separator + "10047.png";
|
|
imageLogo = new Image(ImageDataFactory.create(path)).scaleAbsolute(120, 80);
|
|
imageLogo = new Image(ImageDataFactory.create(path)).scaleAbsolute(120, 80);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
-
|
|
|
|
|
|
+ LogHelper.error(e.getMessage());
|
|
}
|
|
}
|
|
//doc.add(imageLogo);
|
|
//doc.add(imageLogo);
|
|
//标题部分
|
|
//标题部分
|
|
@@ -93,29 +81,31 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
//考场地址和考场编号部分
|
|
//考场地址和考场编号部分
|
|
int fontsize = 60;
|
|
int fontsize = 60;
|
|
String roomName = room.getRoom_name();
|
|
String roomName = room.getRoom_name();
|
|
- if(roomName.length()>12 && roomName.length()<16) {
|
|
|
|
|
|
+ if (roomName.length() > 12 && roomName.length() < 16) {
|
|
fontsize = 50;
|
|
fontsize = 50;
|
|
- } else if(roomName.length()>16) {
|
|
|
|
|
|
+ } else if (roomName.length() > 16) {
|
|
fontsize = 43;
|
|
fontsize = 43;
|
|
}
|
|
}
|
|
p1 = new Paragraph(roomName).setFontSize(fontsize).setBold().setTextAlignment(TextAlignment.CENTER);
|
|
p1 = new Paragraph(roomName).setFontSize(fontsize).setBold().setTextAlignment(TextAlignment.CENTER);
|
|
doc.add(p1);
|
|
doc.add(p1);
|
|
// 考场地址
|
|
// 考场地址
|
|
- p1 = new Paragraph(room.getRoom_addr()).setFontSize(40).setBold().setMarginTop(-10)
|
|
|
|
- .setTextAlignment(TextAlignment.CENTER);
|
|
|
|
|
|
+ p1 = new Paragraph(room.getRoom_addr()).setFontSize(40).setBold().setMarginTop(-10).setTextAlignment(TextAlignment.CENTER);
|
|
doc.add(p1);
|
|
doc.add(p1);
|
|
Map<String,Object> mainStd = this.daoRoom.getTicketSerailNum(room.getLy_room_id(),1);
|
|
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> hkStd = this.daoRoom.getTicketSerailNum(room.getLy_room_id(),2);
|
|
Map<String,Object> otherStd = this.daoRoom.getTicketSerailNum(room.getLy_room_id(),3);
|
|
Map<String,Object> otherStd = this.daoRoom.getTicketSerailNum(room.getLy_room_id(),3);
|
|
-
|
|
|
|
- int ticketFontSize= 40;
|
|
|
|
|
|
+
|
|
|
|
+ int ticketFontSize = 40;
|
|
int num = 0;
|
|
int num = 0;
|
|
- if(StringHelper.isNotEmpty(mainStd) )num++;
|
|
|
|
- if(StringHelper.isNotEmpty(hkStd) )num++;
|
|
|
|
- if(StringHelper.isNotEmpty(otherStd) )num++;
|
|
|
|
- if(num == 2) {
|
|
|
|
|
|
+ if (StringHelper.isNotEmpty(mainStd))
|
|
|
|
+ num++;
|
|
|
|
+ if (StringHelper.isNotEmpty(hkStd))
|
|
|
|
+ num++;
|
|
|
|
+ if (StringHelper.isNotEmpty(otherStd))
|
|
|
|
+ num++;
|
|
|
|
+ if (num == 2) {
|
|
ticketFontSize = 35;
|
|
ticketFontSize = 35;
|
|
- } else if(num == 3) {
|
|
|
|
|
|
+ } else if (num == 3) {
|
|
ticketFontSize = 32;
|
|
ticketFontSize = 32;
|
|
}
|
|
}
|
|
// 准考证范围
|
|
// 准考证范围
|
|
@@ -173,14 +163,14 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public File makeWriteSeat(FrameThread thread, File tempFile, LyGroup group, boolean image_flag) {
|
|
public File makeWriteSeat(FrameThread thread, File tempFile, LyGroup group, boolean image_flag) {
|
|
- Document doc = null;
|
|
|
|
|
|
+ Document doc;
|
|
try {
|
|
try {
|
|
doc = pageModel.prepareDocument(tempFile);
|
|
doc = pageModel.prepareDocument(tempFile);
|
|
doc.setMargins(0, 20, 10, 15);
|
|
doc.setMargins(0, 20, 10, 15);
|
|
doc.setBorder(null);
|
|
doc.setBorder(null);
|
|
doc.setFont(getSchoolFont());
|
|
doc.setFont(getSchoolFont());
|
|
List<LyRoomWritten> roomArray = this.daoRoom.listRoom(group.getLy_group_id());
|
|
List<LyRoomWritten> roomArray = this.daoRoom.listRoom(group.getLy_group_id());
|
|
- Map<LyRoomWritten, List<Map<String, Object>>> roomStdMap = new LinkedHashMap<LyRoomWritten, List<Map<String, Object>>>();
|
|
|
|
|
|
+ Map<LyRoomWritten, List<Map<String, Object>>> roomStdMap = new LinkedHashMap<>();
|
|
|
|
|
|
FrameThreadHelper.updateThread(thread, 1, "一共有【" + roomArray.size() + "】个笔试考场", FrameThreadStatus.Running);
|
|
FrameThreadHelper.updateThread(thread, 1, "一共有【" + roomArray.size() + "】个笔试考场", FrameThreadStatus.Running);
|
|
for (LyRoomWritten room : roomArray) {
|
|
for (LyRoomWritten room : roomArray) {
|
|
@@ -608,12 +598,12 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
doc.setMargins(30, 20, 20, 20);
|
|
doc.setMargins(30, 20, 20, 20);
|
|
doc.setFont(getSchoolFont());
|
|
doc.setFont(getSchoolFont());
|
|
List<LyRoomWritten> roomArray = this.daoRoom.listRoom(group.getLy_group_id());
|
|
List<LyRoomWritten> roomArray = this.daoRoom.listRoom(group.getLy_group_id());
|
|
- Map<LyRoomWritten, List<Map<String, Object>>> roomStdMap = new LinkedHashMap<LyRoomWritten, List<Map<String, Object>>>();
|
|
|
|
|
|
+ Map<LyRoomWritten, List<Map<String, Object>>> roomStdMap = new LinkedHashMap<>();
|
|
|
|
|
|
FrameThreadHelper.updateThread(thread, 1, "一共有【" + roomArray.size() + "】个笔试考场", FrameThreadStatus.Running);
|
|
FrameThreadHelper.updateThread(thread, 1, "一共有【" + roomArray.size() + "】个笔试考场", FrameThreadStatus.Running);
|
|
for (LyRoomWritten room : roomArray) {
|
|
for (LyRoomWritten room : roomArray) {
|
|
List<Map<String, Object>> sArray = this.daoRoom.listRoomStd(group.getLy_group_id(), room);
|
|
List<Map<String, Object>> sArray = this.daoRoom.listRoomStd(group.getLy_group_id(), room);
|
|
- if (sArray.size() == 0)
|
|
|
|
|
|
+ if (sArray.isEmpty())
|
|
continue;
|
|
continue;
|
|
roomStdMap.put(room, sArray);
|
|
roomStdMap.put(room, sArray);
|
|
}
|
|
}
|
|
@@ -623,8 +613,7 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
// 计算每个考生的margin
|
|
// 计算每个考生的margin
|
|
// 每行考生数
|
|
// 每行考生数
|
|
float[] mainCols = new float[5];
|
|
float[] mainCols = new float[5];
|
|
- for (int i = 0; i < mainCols.length; i++)
|
|
|
|
- mainCols[i] = 100 / mainCols.length;
|
|
|
|
|
|
+ Arrays.fill(mainCols, (float) 100 / mainCols.length);
|
|
|
|
|
|
int roomIndex = 0;
|
|
int roomIndex = 0;
|
|
int fontSize = 8;
|
|
int fontSize = 8;
|
|
@@ -639,7 +628,7 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
for (int stdIndex = 0; stdIndex < array.size(); stdIndex++) {
|
|
for (int stdIndex = 0; stdIndex < array.size(); stdIndex++) {
|
|
Map<String, Object> std = array.get(stdIndex);
|
|
Map<String, Object> std = array.get(stdIndex);
|
|
//字体大小设置
|
|
//字体大小设置
|
|
- if(std.get("std_name").toString().length()>6) {
|
|
|
|
|
|
+ if (std.get("std_name").toString().length() > 6) {
|
|
fontSize = 6;
|
|
fontSize = 6;
|
|
} else {
|
|
} else {
|
|
fontSize = 10;
|
|
fontSize = 10;
|
|
@@ -783,11 +772,8 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
List<LySubject> subjectArray = this.daoGroup.listBySql(LySubject.class,
|
|
List<LySubject> subjectArray = this.daoGroup.listBySql(LySubject.class,
|
|
"select cf.subject_name,s.exam_start_time,s.exam_end_time from cf_subject cf,ly_subject s where cf.subject_id=s.subject_id and s.ly_group_id=? order by exam_start_time",
|
|
"select cf.subject_name,s.exam_start_time,s.exam_end_time from cf_subject cf,ly_subject s where cf.subject_id=s.subject_id and s.ly_group_id=? order by exam_start_time",
|
|
group.getLy_group_id());
|
|
group.getLy_group_id());
|
|
- // String aspect_names = CollectionHelper.join(aspectArray, "aspect_name", "、");
|
|
|
|
List<LyRoomWritten> roomArray = this.daoRoom.listRoom(group.getLy_group_id());
|
|
List<LyRoomWritten> roomArray = this.daoRoom.listRoom(group.getLy_group_id());
|
|
- /*LyAgent agent = this.daoGroup.find(LyAgent.class, group.getLy_agent_id());
|
|
|
|
- String title = ArtParamHelper.getParamValue("PdfTitle", "招生考试");*/
|
|
|
|
- String agentName = null;
|
|
|
|
|
|
+ String agentName;
|
|
if(group.getGroup_name().equals("素描(造型艺术)") || group.getGroup_name().equals("色彩(造型艺术)")) {
|
|
if(group.getGroup_name().equals("素描(造型艺术)") || group.getGroup_name().equals("色彩(造型艺术)")) {
|
|
agentName = "中央美术学院燕郊校区";
|
|
agentName = "中央美术学院燕郊校区";
|
|
} else {
|
|
} else {
|
|
@@ -808,11 +794,10 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
if (i > 0) {
|
|
if (i > 0) {
|
|
doc.add(new AreaBreak());
|
|
doc.add(new AreaBreak());
|
|
}
|
|
}
|
|
- // 中央美术学院2020年本科招生专业考试考场记录
|
|
|
|
- Paragraph p1 = new Paragraph("中央美术学院").setFontSize(18)
|
|
|
|
- .setBold().setTextAlignment(TextAlignment.CENTER);
|
|
|
|
|
|
+
|
|
|
|
+ Paragraph p1 = new Paragraph("中央美术学院").setFontSize(18).setBold().setTextAlignment(TextAlignment.CENTER);
|
|
doc.add(p1);
|
|
doc.add(p1);
|
|
- //附中优秀人才选拔考试
|
|
|
|
|
|
+
|
|
p1 = new Paragraph(ArtParamHelper.ArtYear + "年本科招生现场考试考场记录").setFontSize(18)
|
|
p1 = new Paragraph(ArtParamHelper.ArtYear + "年本科招生现场考试考场记录").setFontSize(18)
|
|
.setBold().setTextAlignment(TextAlignment.CENTER).setMarginTop(-2);
|
|
.setBold().setTextAlignment(TextAlignment.CENTER).setMarginTop(-2);
|
|
doc.add(p1);
|
|
doc.add(p1);
|
|
@@ -824,7 +809,7 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
marginLeft = -25;
|
|
marginLeft = -25;
|
|
}
|
|
}
|
|
|
|
|
|
- Table tableTitle= null;
|
|
|
|
|
|
+ Table tableTitle;
|
|
if(agentName.equals("中央美术学院燕郊校区")) {
|
|
if(agentName.equals("中央美术学院燕郊校区")) {
|
|
tableTitle= new Table(new float[] { 1.2f, 1.4f, 1.2f}).setWidthPercent(100);
|
|
tableTitle= new Table(new float[] { 1.2f, 1.4f, 1.2f}).setWidthPercent(100);
|
|
} else {
|
|
} else {
|
|
@@ -840,16 +825,11 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
|
|
|
|
|
|
|
|
Table table = new Table(new float[] { 1, 1, 1, 1, 1, 1 }).setWidthPercent(100);
|
|
Table table = new Table(new float[] { 1, 1, 1, 1, 1, 1 }).setWidthPercent(100);
|
|
- /* table.addCell(new Cell(1, 3)
|
|
|
|
- .add("考点:" + agent.getLy_agent_name() + " 考场编号:" + group.getGroup_name() +
|
|
|
|
- '-'
|
|
|
|
- + room.getRoom_name())
|
|
|
|
- .setTextAlignment(TextAlignment.LEFT).setVerticalAlignment(VerticalAlignment.MIDDLE)
|
|
|
|
- .setBorder(null));*/
|
|
|
|
- if(subject.getSubject_name().length()>6 ) {
|
|
|
|
|
|
+
|
|
|
|
+ if (subject.getSubject_name().length() > 6) {
|
|
fontsize = 11;
|
|
fontsize = 11;
|
|
- }
|
|
|
|
- if(subject.getSubject_name().length()>8) {
|
|
|
|
|
|
+ }
|
|
|
|
+ if (subject.getSubject_name().length() > 8) {
|
|
fontsize = 9;
|
|
fontsize = 9;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -908,9 +888,12 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
Map<String,Object> otherStd = this.daoRoom.getTicketSerailNum(room.getLy_room_id(),3);
|
|
Map<String,Object> otherStd = this.daoRoom.getTicketSerailNum(room.getLy_room_id(),3);
|
|
int num = 0;
|
|
int num = 0;
|
|
int height =25;
|
|
int height =25;
|
|
- if(StringHelper.isNotEmpty(mainStd) )num++;
|
|
|
|
- if(StringHelper.isNotEmpty(hkStd) )num++;
|
|
|
|
- if(StringHelper.isNotEmpty(otherStd) )num++;
|
|
|
|
|
|
+ if (StringHelper.isNotEmpty(mainStd))
|
|
|
|
+ num++;
|
|
|
|
+ if (StringHelper.isNotEmpty(hkStd))
|
|
|
|
+ num++;
|
|
|
|
+ if (StringHelper.isNotEmpty(otherStd))
|
|
|
|
+ num++;
|
|
String value = "";
|
|
String value = "";
|
|
if(num ==1) {
|
|
if(num ==1) {
|
|
value = aspect.getAspect_name()+" "+room.getMin_ticket_no() + " --- " + room.getMax_ticket_no();
|
|
value = aspect.getAspect_name()+" "+room.getMin_ticket_no() + " --- " + room.getMax_ticket_no();
|
|
@@ -939,35 +922,6 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
value += aspect.getAspect_name() + " " + otherStd.get("start_num") + (otherStd.get("start_num").equals(otherStd.get("end_num")) ? "" : "---" + otherStd.get("end_num"));
|
|
value += aspect.getAspect_name() + " " + otherStd.get("start_num") + (otherStd.get("start_num").equals(otherStd.get("end_num")) ? "" : "---" + otherStd.get("end_num"));
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
- /* String value = "";
|
|
|
|
- //TODO 需要和专业关联,要得急,临时处理
|
|
|
|
- if(room.getRoom_seq() == 1) {
|
|
|
|
- value = "艺术设计 FZ2406068-FZ2406080";
|
|
|
|
- } else if(room.getRoom_seq() == 2) {
|
|
|
|
- value = "艺术设计 FZ2406081-FZ2406093";
|
|
|
|
- } else if(room.getRoom_seq() == 3) {
|
|
|
|
- value = "艺术设计 FZ2406094-FZ2406097\n";
|
|
|
|
- value+= "城市艺术设计 FZ2407098-FZ2407106";
|
|
|
|
- } else if(room.getRoom_seq() == 4) {
|
|
|
|
- value = "城市艺术设计 FZ2407107-FZ2407117\n";
|
|
|
|
- value+= "建筑学 FZ2408118";
|
|
|
|
- } else if(room.getRoom_seq() == 5) {
|
|
|
|
- value = "造型艺术 FZ2401001-FZ2401014";
|
|
|
|
- } else if(room.getRoom_seq() == 6) {
|
|
|
|
- value = "造型艺术 FZ2401015-FZ2401028";
|
|
|
|
- } else if(room.getRoom_seq() == 7) {
|
|
|
|
- value = "造型艺术 FZ2401029-FZ2401041";
|
|
|
|
- } else if(room.getRoom_seq() == 8) {
|
|
|
|
- value = "造型艺术 FZ2401042-FZ2401050\n";
|
|
|
|
- value+= "中国画 FZ2402051-FZ2402054";
|
|
|
|
- } else if(room.getRoom_seq() == 9) {
|
|
|
|
- value = "中国画 FZ2402055-FZ2402057\n";
|
|
|
|
- value+= "实验与科技 FZ2403058-FZ2403062\n";
|
|
|
|
- value+= "文物保护与修复 FZ2404063-FZ2404066\n";
|
|
|
|
- value+= "书法学 FZ2405067";
|
|
|
|
- }*/
|
|
|
|
-
|
|
|
|
table.addCell(new Cell(1, 5).add(value).setTextAlignment(TextAlignment.LEFT)
|
|
table.addCell(new Cell(1, 5).add(value).setTextAlignment(TextAlignment.LEFT)
|
|
.setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(10).setBold());
|
|
.setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(10).setBold());
|
|
|
|
|
|
@@ -1000,7 +954,6 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
table2.addCell(new Cell(1, 1).add(" ").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE).setHeight(height));
|
|
table2.addCell(new Cell(1, 1).add(" ").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE).setHeight(height));
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
table2.addCell(new Cell(1, 6).add("考生违规记录").setPaddingLeft(10)
|
|
table2.addCell(new Cell(1, 6).add("考生违规记录").setPaddingLeft(10)
|
|
.setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE).setMarginTop(2).setBorderTop(null).setBorderBottom(null));
|
|
.setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE).setMarginTop(2).setBorderTop(null).setBorderBottom(null));
|
|
table2.addCell((new Cell(1, 1).add("准考证号")
|
|
table2.addCell((new Cell(1, 1).add("准考证号")
|
|
@@ -1011,7 +964,7 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
.setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE)));
|
|
.setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE)));
|
|
table2.addCell((new Cell(1, 1).add("考生签字")
|
|
table2.addCell((new Cell(1, 1).add("考生签字")
|
|
.setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE)));
|
|
.setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE)));
|
|
- for(int temp=0;temp<=4;temp++) {
|
|
|
|
|
|
+ for (int temp = 0; temp <= 4; temp++) {
|
|
table2.addCell(new Cell(1, 1).add(" ").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE).setHeight(height));
|
|
table2.addCell(new Cell(1, 1).add(" ").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE).setHeight(height));
|
|
table2.addCell(new Cell(1, 1).add(" ").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE).setHeight(height));
|
|
table2.addCell(new Cell(1, 1).add(" ").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE).setHeight(height));
|
|
table2.addCell(new Cell(1, 3).add(" ").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE).setHeight(height));
|
|
table2.addCell(new Cell(1, 3).add(" ").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE).setHeight(height));
|
|
@@ -1028,18 +981,6 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
.setTextAlignment(TextAlignment.LEFT).setVerticalAlignment(VerticalAlignment.MIDDLE).setMarginTop(2));
|
|
.setTextAlignment(TextAlignment.LEFT).setVerticalAlignment(VerticalAlignment.MIDDLE).setMarginTop(2));
|
|
doc.add(table2);
|
|
doc.add(table2);
|
|
|
|
|
|
-
|
|
|
|
- /* Table table3 = new Table(new float[] { 1, 1, 1, 1 }).setWidthPercent(100);
|
|
|
|
- table3.addCell(new Cell(1, 6).add("考场情况:").setPaddingLeft(10)
|
|
|
|
- .setTextAlignment(TextAlignment.LEFT).setVerticalAlignment(VerticalAlignment.MIDDLE)
|
|
|
|
- .setMarginBottom(10).setMarginTop(2).setBorderTop(null).setBorderBottom(null));
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- table3.addCell(new Cell(1, 6).add("监考员签字:__________________").setPaddingRight(10)
|
|
|
|
- .setTextAlignment(TextAlignment.RIGHT).setVerticalAlignment(VerticalAlignment.MIDDLE)
|
|
|
|
- .setMarginBottom(10).setMarginTop(20).setBorderTop(null));
|
|
|
|
- doc.add(table3);*/
|
|
|
|
-
|
|
|
|
doc.add(new Paragraph("注:每考场一份,由学校留存至考试结束后6个月。 ").setFontSize(12).setBold()
|
|
doc.add(new Paragraph("注:每考场一份,由学校留存至考试结束后6个月。 ").setFontSize(12).setBold()
|
|
.setTextAlignment(TextAlignment.LEFT));
|
|
.setTextAlignment(TextAlignment.LEFT));
|
|
}
|
|
}
|
|
@@ -1067,7 +1008,7 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
ItextDocumentModel pageModel = new ItextDocumentModel();
|
|
ItextDocumentModel pageModel = new ItextDocumentModel();
|
|
pageModel.rotate();
|
|
pageModel.rotate();
|
|
|
|
|
|
- String agentName ="燕京理工学院";
|
|
|
|
|
|
+ String agentName;
|
|
if(group.getGroup_name().equals("素描(造型艺术)") || group.getGroup_name().equals("色彩(造型艺术)")) {
|
|
if(group.getGroup_name().equals("素描(造型艺术)") || group.getGroup_name().equals("色彩(造型艺术)")) {
|
|
agentName = "中央美术学院燕郊校区";
|
|
agentName = "中央美术学院燕郊校区";
|
|
} else {
|
|
} else {
|
|
@@ -1077,18 +1018,18 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
doc = pageModel.prepareDocument(tempFile);
|
|
doc = pageModel.prepareDocument(tempFile);
|
|
doc.setMargins(40, 40, 30, 40);
|
|
doc.setMargins(40, 40, 30, 40);
|
|
doc.setFont(getSchoolFont());
|
|
doc.setFont(getSchoolFont());
|
|
- String sql = "select cf.aspect_name,cf.aspect_code,cf.aspect_id from cf_aspect_subject sb,cf_aspect cf ,ly_subject s where sb.aspect_id=cf.aspect_id and sb.subject_id=s.subject_id and s.ly_group_id=? group by cf.aspect_name,cf.aspect_code,cf.aspect_id";
|
|
|
|
|
|
+ /*String sql = "select cf.aspect_name,cf.aspect_code,cf.aspect_id from cf_aspect_subject sb,cf_aspect cf ,ly_subject s where sb.aspect_id=cf.aspect_id and sb.subject_id=s.subject_id and s.ly_group_id=? group by cf.aspect_name,cf.aspect_code,cf.aspect_id";
|
|
List<CfAspect> aspectArray = this.daoGroup.listBySql(CfAspect.class, sql, group.getLy_group_id());
|
|
List<CfAspect> aspectArray = this.daoGroup.listBySql(CfAspect.class, sql, group.getLy_group_id());
|
|
|
|
+ String aspect_names = CollectionHelper.join(aspectArray, "aspect_name", "、"); */
|
|
List<LySubject> subjectArray = this.daoGroup.listBySql(LySubject.class,
|
|
List<LySubject> subjectArray = this.daoGroup.listBySql(LySubject.class,
|
|
"select cf.subject_name,s.exam_start_time,cf.subject_id from cf_subject cf,ly_subject s where cf.subject_id=s.subject_id and s.ly_group_id=? order by exam_start_time",
|
|
"select cf.subject_name,s.exam_start_time,cf.subject_id from cf_subject cf,ly_subject s where cf.subject_id=s.subject_id and s.ly_group_id=? order by exam_start_time",
|
|
group.getLy_group_id());
|
|
group.getLy_group_id());
|
|
- //String aspect_names = CollectionHelper.join(aspectArray, "aspect_name", "、");
|
|
|
|
List<LyRoomWritten> roomArray = this.daoRoom.listRoom(group.getLy_group_id());
|
|
List<LyRoomWritten> roomArray = this.daoRoom.listRoom(group.getLy_group_id());
|
|
int index = 0;
|
|
int index = 0;
|
|
int fontSize = 9;
|
|
int fontSize = 9;
|
|
- int subjectFontSize = 9;
|
|
|
|
|
|
+ int subjectFontSize;
|
|
int sum = 0;
|
|
int sum = 0;
|
|
- if(group.getShow_aspect_name().length()>8) {
|
|
|
|
|
|
+ if (group.getShow_aspect_name().length() > 8) {
|
|
subjectFontSize = 8;
|
|
subjectFontSize = 8;
|
|
} else {
|
|
} else {
|
|
subjectFontSize = 9;
|
|
subjectFontSize = 9;
|
|
@@ -1103,10 +1044,6 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
if (i > 0) {
|
|
if (i > 0) {
|
|
doc.add(new AreaBreak());
|
|
doc.add(new AreaBreak());
|
|
}
|
|
}
|
|
- // 中央美术学院2020年本科招生专业考试试卷收发单
|
|
|
|
- // 中央美术学院2020年本科招生专业考试试卷收发单
|
|
|
|
- //年附中优秀人才选拔考试试卷收发单
|
|
|
|
- //本科招生专业考试
|
|
|
|
Paragraph p1 = new Paragraph("中央美术学院" + ArtParamHelper.ArtYear + "年本科招生现场考试试卷收发单").setFontSize(18)
|
|
Paragraph p1 = new Paragraph("中央美术学院" + ArtParamHelper.ArtYear + "年本科招生现场考试试卷收发单").setFontSize(18)
|
|
.setBold().setTextAlignment(TextAlignment.CENTER);
|
|
.setBold().setTextAlignment(TextAlignment.CENTER);
|
|
doc.add(p1);
|
|
doc.add(p1);
|
|
@@ -1118,10 +1055,7 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
titleTable.addCell(new Cell(1,1).add("考试日期:").setTextAlignment(TextAlignment.RIGHT).setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(11).setBold().setBorder(null).setPaddingRight(-120));
|
|
titleTable.addCell(new Cell(1,1).add("考试日期:").setTextAlignment(TextAlignment.RIGHT).setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(11).setBold().setBorder(null).setPaddingRight(-120));
|
|
titleTable.addCell(new Cell(1,1).add(getExamDate(subject.getExam_start_time())+getExamDateType(subject.getExam_start_time())).setTextAlignment(TextAlignment.RIGHT)
|
|
titleTable.addCell(new Cell(1,1).add(getExamDate(subject.getExam_start_time())+getExamDateType(subject.getExam_start_time())).setTextAlignment(TextAlignment.RIGHT)
|
|
.setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(11).setBorder(null).setPaddingRight(0));
|
|
.setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(11).setBorder(null).setPaddingRight(0));
|
|
- /*
|
|
|
|
- titleTable.addCell(new Cell(1,1).add("考试科目:").setTextAlignment(TextAlignment.RIGHT).setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(11).setBold().setBorder(null));
|
|
|
|
- titleTable.addCell(new Cell(1,1).add(subject.getSubject_name()).setTextAlignment(TextAlignment.LEFT).setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(11).setBorder(null));
|
|
|
|
- */
|
|
|
|
|
|
+
|
|
doc.add(titleTable);
|
|
doc.add(titleTable);
|
|
|
|
|
|
|
|
|
|
@@ -1152,8 +1086,7 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
.setVerticalAlignment(VerticalAlignment.MIDDLE).setBold());
|
|
.setVerticalAlignment(VerticalAlignment.MIDDLE).setBold());
|
|
table.addCell(new Cell(1, 1).add("作弊").setTextAlignment(TextAlignment.CENTER)
|
|
table.addCell(new Cell(1, 1).add("作弊").setTextAlignment(TextAlignment.CENTER)
|
|
.setVerticalAlignment(VerticalAlignment.MIDDLE).setBold());
|
|
.setVerticalAlignment(VerticalAlignment.MIDDLE).setBold());
|
|
- List<LyRoomWritten> vArray = roomArray.subList(i * 16,
|
|
|
|
- (i + 1) * 16 > roomArray.size() ? roomArray.size() : (i + 1) * 16);
|
|
|
|
|
|
+ List<LyRoomWritten> vArray = roomArray.subList(i * 16, Math.min((i + 1) * 16, roomArray.size()));
|
|
for (LyRoomWritten room : vArray) {
|
|
for (LyRoomWritten room : vArray) {
|
|
sum += room.getReal_std_total();
|
|
sum += room.getReal_std_total();
|
|
if (room.getReal_std_total() < 1)
|
|
if (room.getReal_std_total() < 1)
|
|
@@ -1167,75 +1100,57 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
Map<String,Object> hkStd = this.daoRoom.getTicketSerailNum(room.getLy_room_id(),2);
|
|
Map<String,Object> hkStd = this.daoRoom.getTicketSerailNum(room.getLy_room_id(),2);
|
|
Map<String,Object> otherStd = this.daoRoom.getTicketSerailNum(room.getLy_room_id(),3);
|
|
Map<String,Object> otherStd = this.daoRoom.getTicketSerailNum(room.getLy_room_id(),3);
|
|
int num = 0;
|
|
int num = 0;
|
|
- if(StringHelper.isNotEmpty(mainStd) )num++;
|
|
|
|
- if(StringHelper.isNotEmpty(hkStd) )num++;
|
|
|
|
- if(StringHelper.isNotEmpty(otherStd) )num++;
|
|
|
|
|
|
+ if (StringHelper.isNotEmpty(mainStd))
|
|
|
|
+ num++;
|
|
|
|
+ if (StringHelper.isNotEmpty(hkStd))
|
|
|
|
+ num++;
|
|
|
|
+ if (StringHelper.isNotEmpty(otherStd))
|
|
|
|
+ num++;
|
|
String value = "";
|
|
String value = "";
|
|
|
|
|
|
-// if (FrameStatus.Active.toString().equals(group.getAspect_num_flag())) {
|
|
|
|
- /*table.addCell(new Cell(1, 1) .add(room.getMin_aspect_ticket_num() + " - " + room.getMax_aspect_ticket_num())
|
|
|
|
- .setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(fontSize));*/
|
|
|
|
- if(num ==1) {
|
|
|
|
- value = room.getMin_ticket_no() + " --- " + room.getMax_ticket_no();
|
|
|
|
- if (FrameStatus.Active.toString().equals(group.getAspect_num_flag())) {
|
|
|
|
- value = room.getMin_aspect_ticket_num() + " --- " + room.getMax_aspect_ticket_num();
|
|
|
|
- }
|
|
|
|
- } else if(num == 2) {
|
|
|
|
- if(StringHelper.isNotEmpty(mainStd) && StringHelper.isNotEmpty(hkStd)) {
|
|
|
|
- value = mainStd.get("start_num") + (mainStd.get("start_num").equals(mainStd.get("end_num")) ? "\n" : "---" + mainStd.get("end_num")+"\n");
|
|
|
|
- value += 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 = mainStd.get("start_num") + (mainStd.get("start_num").equals(mainStd.get("end_num")) ? "\n" : "---" + mainStd.get("end_num")+"\n");
|
|
|
|
- value += 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 = hkStd.get("start_num") + (hkStd.get("start_num").equals(hkStd.get("end_num")) ? "\n" : "---" + hkStd.get("end_num")+"\n");
|
|
|
|
- value += otherStd.get("start_num") + (otherStd.get("start_num").equals(otherStd.get("end_num")) ? "" : "---" + otherStd.get("end_num"));
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- } else if(num == 3) {
|
|
|
|
|
|
+
|
|
|
|
+ if(num == 1) {
|
|
|
|
+ value = room.getMin_ticket_no() + " --- " + room.getMax_ticket_no();
|
|
|
|
+ if (FrameStatus.Active.toString().equals(group.getAspect_num_flag())) {
|
|
|
|
+ value = room.getMin_aspect_ticket_num() + " --- " + room.getMax_aspect_ticket_num();
|
|
|
|
+ }
|
|
|
|
+ } else if(num == 2) {
|
|
|
|
+ if(StringHelper.isNotEmpty(mainStd) && StringHelper.isNotEmpty(hkStd)) {
|
|
value = mainStd.get("start_num") + (mainStd.get("start_num").equals(mainStd.get("end_num")) ? "\n" : "---" + mainStd.get("end_num")+"\n");
|
|
value = mainStd.get("start_num") + (mainStd.get("start_num").equals(mainStd.get("end_num")) ? "\n" : "---" + mainStd.get("end_num")+"\n");
|
|
- value += hkStd.get("start_num") + (hkStd.get("start_num").equals(hkStd.get("end_num")) ? "\n" : "---" + hkStd.get("end_num")+"\n");
|
|
|
|
|
|
+ value += 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 = mainStd.get("start_num") + (mainStd.get("start_num").equals(mainStd.get("end_num")) ? "\n" : "---" + mainStd.get("end_num")+"\n");
|
|
|
|
+ value += 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 = hkStd.get("start_num") + (hkStd.get("start_num").equals(hkStd.get("end_num")) ? "\n" : "---" + hkStd.get("end_num")+"\n");
|
|
value += otherStd.get("start_num") + (otherStd.get("start_num").equals(otherStd.get("end_num")) ? "" : "---" + otherStd.get("end_num"));
|
|
value += otherStd.get("start_num") + (otherStd.get("start_num").equals(otherStd.get("end_num")) ? "" : "---" + otherStd.get("end_num"));
|
|
}
|
|
}
|
|
-// } else {
|
|
|
|
-// table.addCell(new Cell(1, 1).add(room.getMin_ticket_no() + " - " + room.getMax_ticket_no())
|
|
|
|
-// .setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(fontSize));
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
- table.addCell(new Cell(1, 1) .add(value).setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(fontSize));
|
|
|
|
- table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE).setFontSize(fontSize));
|
|
|
|
- table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER) .setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
|
- table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER) .setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
|
- table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER) .setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
|
- table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER) .setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
|
- table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER) .setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
|
- table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER) .setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
|
|
|
+
|
|
|
|
+ } else if(num == 3) {
|
|
|
|
+ value = mainStd.get("start_num") + (mainStd.get("start_num").equals(mainStd.get("end_num")) ? "\n" : "---" + mainStd.get("end_num")+"\n");
|
|
|
|
+ value += hkStd.get("start_num") + (hkStd.get("start_num").equals(hkStd.get("end_num")) ? "\n" : "---" + hkStd.get("end_num")+"\n");
|
|
|
|
+ value += otherStd.get("start_num") + (otherStd.get("start_num").equals(otherStd.get("end_num")) ? "" : "---" + otherStd.get("end_num"));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ table.addCell(new Cell(1, 1).add(value).setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE)
|
|
|
|
+ .setFontSize(fontSize));
|
|
|
|
+ table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE)
|
|
|
|
+ .setFontSize(fontSize));
|
|
|
|
+ table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
|
+ table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
|
+ table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
|
+ table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
|
+ table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
|
+ table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
}
|
|
}
|
|
|
|
|
|
-// table.addCell(new Cell(1, 3).add("本页小计").setTextAlignment(TextAlignment.CENTER)
|
|
|
|
-// .setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
|
-// table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER)
|
|
|
|
-// .setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
|
-// table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER)
|
|
|
|
-// .setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
|
-// table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER)
|
|
|
|
-// .setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
|
-// table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER)
|
|
|
|
-// .setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
|
-// table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER)
|
|
|
|
-// .setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
|
-// table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER)
|
|
|
|
-// .setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
|
-// table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER)
|
|
|
|
-// .setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
|
-// table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER)
|
|
|
|
-// .setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
|
if (i == pageCount - 1) {
|
|
if (i == pageCount - 1) {
|
|
// 结束了
|
|
// 结束了
|
|
- table.addCell(new Cell(1, 3).add("总计").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE).setBold());
|
|
|
|
- table.addCell(new Cell(1, 1).add(sum+"").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
|
|
|
|
+ table.addCell(
|
|
|
|
+ new Cell(1, 3).add("总计").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE).setBold());
|
|
|
|
+ table.addCell(new Cell(1, 1).add(sum + "").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
table.addCell(new Cell(1, 1).add("").setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE));
|
|
@@ -1263,7 +1178,7 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
|
|
|
|
|
|
|
|
private void createSeatTitle(Document doc, LyGroup group, LyRoomWritten room) {
|
|
private void createSeatTitle(Document doc, LyGroup group, LyRoomWritten room) {
|
|
- String agentName ="燕京理工学院";
|
|
|
|
|
|
+ String agentName;
|
|
if(group.getGroup_name().equals("素描(造型艺术)") || group.getGroup_name().equals("色彩(造型艺术)")) {
|
|
if(group.getGroup_name().equals("素描(造型艺术)") || group.getGroup_name().equals("色彩(造型艺术)")) {
|
|
agentName = "中央美术学院燕郊校区";
|
|
agentName = "中央美术学院燕郊校区";
|
|
} else {
|
|
} else {
|
|
@@ -1284,9 +1199,7 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
|
|
|
|
private void createSignNewPage(Document doc, LyAgent agent, LyGroup group, List<LySubject> subjectArray,
|
|
private void createSignNewPage(Document doc, LyAgent agent, LyGroup group, List<LySubject> subjectArray,
|
|
LyRoomWritten room) {
|
|
LyRoomWritten room) {
|
|
- // 中央美术学院2020年本科招生专业考试信息核对单
|
|
|
|
- //年附中优秀人才选拔考试考生信息核对单"
|
|
|
|
- String agentName ="燕京理工学院";
|
|
|
|
|
|
+ String agentName;
|
|
if(group.getGroup_name().equals("素描(造型艺术)") || group.getGroup_name().equals("色彩(造型艺术)")) {
|
|
if(group.getGroup_name().equals("素描(造型艺术)") || group.getGroup_name().equals("色彩(造型艺术)")) {
|
|
agentName = "中央美术学院燕郊校区";
|
|
agentName = "中央美术学院燕郊校区";
|
|
} else {
|
|
} else {
|
|
@@ -1404,14 +1317,14 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
doc.setBorder(null);
|
|
doc.setBorder(null);
|
|
doc.setMargins(20, 30, 30, 30);
|
|
doc.setMargins(20, 30, 30, 30);
|
|
doc.setFont(getSchoolFont());
|
|
doc.setFont(getSchoolFont());
|
|
- Paragraph p1 = null;
|
|
|
|
- int height = 20;
|
|
|
|
|
|
+ Paragraph p1;
|
|
|
|
+ int height;
|
|
int titleSize = 10;
|
|
int titleSize = 10;
|
|
int stdSize = 9;
|
|
int stdSize = 9;
|
|
String agentName = getAgentName(group);
|
|
String agentName = getAgentName(group);
|
|
|
|
|
|
List<LyRoomWritten> roomArray = this.daoRoom.listRoom(group.getLy_group_id());
|
|
List<LyRoomWritten> roomArray = this.daoRoom.listRoom(group.getLy_group_id());
|
|
- Map<LyRoomWritten, List<Map<String, Object>>> roomStdMap = new LinkedHashMap<LyRoomWritten, List<Map<String, Object>>>();
|
|
|
|
|
|
+ Map<LyRoomWritten, List<Map<String, Object>>> roomStdMap = new LinkedHashMap<>();
|
|
|
|
|
|
for (LyRoomWritten room : roomArray) {
|
|
for (LyRoomWritten room : roomArray) {
|
|
List<Map<String,Object>> list = this.daoRoom.listRoomStd(group.getLy_group_id(), room);
|
|
List<Map<String,Object>> list = this.daoRoom.listRoomStd(group.getLy_group_id(), room);
|
|
@@ -1426,11 +1339,14 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
LyRoomWritten room = itRoom.next();
|
|
LyRoomWritten room = itRoom.next();
|
|
if (room.getReal_std_total() < 1)
|
|
if (room.getReal_std_total() < 1)
|
|
continue;
|
|
continue;
|
|
-
|
|
|
|
|
|
+
|
|
//动态控制每行的高度
|
|
//动态控制每行的高度
|
|
- if(room.getReal_std_total()<=15) height= 25;
|
|
|
|
- else if(room.getReal_std_total()<=25) height= 22;
|
|
|
|
- else height=20;
|
|
|
|
|
|
+ if (room.getReal_std_total() <= 15)
|
|
|
|
+ height = 25;
|
|
|
|
+ else if (room.getReal_std_total() <= 25)
|
|
|
|
+ height = 22;
|
|
|
|
+ else
|
|
|
|
+ height = 20;
|
|
|
|
|
|
p1 = new Paragraph("中央美术学院"+ArtParamHelper.ArtYear +"年本科招生线上考试试卷回收记录").setFontSize(18).setBold().setTextAlignment(TextAlignment.CENTER);
|
|
p1 = new Paragraph("中央美术学院"+ArtParamHelper.ArtYear +"年本科招生线上考试试卷回收记录").setFontSize(18).setBold().setTextAlignment(TextAlignment.CENTER);
|
|
doc.add(p1);
|
|
doc.add(p1);
|
|
@@ -1495,17 +1411,15 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
|
|
|
|
|
|
|
|
private List<Map<String, Object>> filterStdList(List<Map<String, Object>> list) {
|
|
private List<Map<String, Object>> filterStdList(List<Map<String, Object>> list) {
|
|
- List<Map<String,Object>> result = new ArrayList<Map<String,Object>>();
|
|
|
|
|
|
+ List<Map<String,Object>> result = new ArrayList<>();
|
|
for(Map<String,Object> map : list) {
|
|
for(Map<String,Object> map : list) {
|
|
StdEnrol enrol = daoGroup.findBySql(StdEnrol.class, "select e.aspect_name,l.ticket_no from std_enrol e, ly_std_ticket_cs l where e.std_id=l.std_id and e.std_id=?", map.get("std_id"));
|
|
StdEnrol enrol = daoGroup.findBySql(StdEnrol.class, "select e.aspect_name,l.ticket_no from std_enrol e, ly_std_ticket_cs l where e.std_id=l.std_id and e.std_id=?", map.get("std_id"));
|
|
//|| enrol.getAspect_name().equals("建筑学") || enrol.getAspect_name().equals("美术学")
|
|
//|| enrol.getAspect_name().equals("建筑学") || enrol.getAspect_name().equals("美术学")
|
|
- if(enrol == null || enrol.getAspect_name().equals("美术学(中外合作办学)") )
|
|
|
|
- continue;
|
|
|
|
- else {
|
|
|
|
- map.put("ticket_no_cs", enrol.getTicket_no());
|
|
|
|
- result.add(map);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ if (enrol != null && !enrol.getAspect_name().equals("美术学(中外合作办学)")) {
|
|
|
|
+ map.put("ticket_no_cs", enrol.getTicket_no());
|
|
|
|
+ result.add(map);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1559,11 +1473,7 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
doc.add(fhTable);
|
|
doc.add(fhTable);
|
|
doc.add(new AreaBreak());
|
|
doc.add(new AreaBreak());
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
-// doc.add(new Paragraph("中央美学学院招生处").setFontSize(20).setBold().setTextAlignment(TextAlignment.RIGHT).setFixedPosition(260,70, 300));
|
|
|
|
-// doc.add(new Paragraph("2024年1月28日").setFontSize(20).setBold().setTextAlignment(TextAlignment.RIGHT).setFixedPosition(260, 35, 300));
|
|
|
|
-
|
|
|
|
|
|
+
|
|
ItextPdfHelper.closePdf(doc);
|
|
ItextPdfHelper.closePdf(doc);
|
|
return tempFile;
|
|
return tempFile;
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
@@ -1656,7 +1566,7 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
|
|
throw new BusinessException("无法生成pdf文件,请联系系统管理员");
|
|
throw new BusinessException("无法生成pdf文件,请联系系统管理员");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|