فهرست منبع

违规处理-决定书

haogh 6 ماه پیش
والد
کامیت
f4fe9fbe71

BIN
WebRoot/fonts/STFANGSO.TTF


+ 4 - 4
WebRoot/newjudgewritten/index.html

@@ -118,7 +118,7 @@
 			<div class="login"  ng-if="currStep == 'LoginName'">
 				<div class="box">
 					<div class="title">
-						 {{getParamValue('JudgeLoginTitleText','武汉启明禾木软件服务有限公司')}}
+						 {{getParamValue('JudgeLoginTitleText','武汉启明泰和软件服务有限公司')}}
 					</div>
 					<div class="tips">
 						<!-- {{getParamValue('JudgeLoginMajorText','武汉启明禾木软件服务有限公司')}}  -->
@@ -145,10 +145,10 @@
 			<div class="login-confirm"  ng-if="currStep == 'ConfrimJudge'">
 				<div class="box">
 					<div class="title">
-						 {{getParamValue('JudgeLoginTitleText','武汉启明禾木软件服务有限公司')}}
+						 {{getParamValue('JudgeLoginTitleText','武汉启明泰和软件服务有限公司')}}
 					</div>
 					<div class="tips">
-						{{getParamValue('JudgeLoginMajorText','武汉启明禾木软件服务有限公司')}} 
+						{{getParamValue('JudgeLoginMajorText','武汉启明泰和软件服务有限公司')}}
 					</div>
 					 <div class="info">
 						 <div class="name">评阅项目</div>
@@ -180,7 +180,7 @@
 			<div class="top-nav" ng-if="currStep == 'Examing' || currStep == 'ConfirmScore'" >
 				<div class="logo">
 					<!-- <img src="img/logo.png" > -->
-					{{getParamValue('SchoolName','中央美术学院2024年附中优秀人才选拔考试')}}
+					{{getParamValue('SchoolName','中央美术学院2025年附中优秀人才选拔考试')}}
 				</div>
 				<div>
 					<span ng-if="groupParam && groupParam.clock_num>=1"  ng-class="{'text-danger': groupParam.clock_1_seconds == clock_1_seconds, 'text-success': groupParam.clock_1_seconds !== clock_1_seconds}"  ng-click="clockCountDown(groupParam.clock_1_seconds,1)"><img src="./img/clock.png" width="20" height="20" > <span class="ml-2" style="font-size:18px;cursor:pointer">{{clock_1_seconds}}</span>&nbsp;&nbsp;</span> 

+ 4 - 4
WebRoot/newjudgeym/index.html

@@ -118,7 +118,7 @@
 			<div class="login"  ng-if="currStep == 'LoginName'">
 				<div class="box">
 					<div class="title">
-						 {{getParamValue('JudgeLoginTitleText','武汉启明禾木软件服务有限公司')}}
+						 {{getParamValue('JudgeLoginTitleText','武汉启明泰和软件服务有限公司')}}
 					</div>
 					<div class="tips">
 						<!-- {{getParamValue('JudgeLoginMajorText','武汉启明禾木软件服务有限公司')}}  -->
@@ -145,10 +145,10 @@
 			<div class="login-confirm"  ng-if="currStep == 'ConfrimJudge'">
 				<div class="box">
 					<div class="title">
-						 {{getParamValue('JudgeLoginTitleText','武汉启明禾木软件服务有限公司')}}
+						 {{getParamValue('JudgeLoginTitleText','武汉启明泰和软件服务有限公司')}}
 					</div>
 					<div class="tips">
-						{{getParamValue('JudgeLoginMajorText','武汉启明禾木软件服务有限公司')}} 
+						{{getParamValue('JudgeLoginMajorText','武汉启明泰和软件服务有限公司')}}
 					</div>
 					 <div class="info">
 						 <div class="name">评阅项目</div>
@@ -180,7 +180,7 @@
 			<div class="top-nav" ng-if="currStep == 'Examing' || currStep == 'ConfirmScore'" >
 				<div class="logo">
 					<!-- <img src="img/logo.png" > -->
-					{{getParamValue('SchoolName','中央美术学院2024年附中优秀人才选拔考试')}}
+					{{getParamValue('SchoolName','中央美术学院2025年附中优秀人才选拔考试')}}
 				</div>
 				<div>
 					<span ng-if="groupParam && groupParam.clock_num>=1"  ng-class="{'text-danger': groupParam.clock_1_seconds == clock_1_seconds, 'text-success': groupParam.clock_1_seconds !== clock_1_seconds}"  ng-click="clockCountDown(groupParam.clock_1_seconds,1)"><img src="./img/clock.png" width="20" height="20" > <span class="ml-2" style="font-size:18px;cursor:pointer">{{clock_1_seconds}}</span>&nbsp;&nbsp;</span> 

+ 7 - 0
src/cn/hmsoft/art/constants/StdMaterialType.java

@@ -64,5 +64,12 @@ public class StdMaterialType {
 	 * 证件照片-国徽页
 	 */
 	public final static String IdCardOther ="IdCardOther";
+
+	/*********************
+	 * 违规处理-决定书
+	 */
+	public final static String Decision ="Decision";
+
+
 	
 }

+ 56 - 13
src/cn/hmsoft/art/control/score/ScoreYmControl.java

@@ -1,25 +1,16 @@
 package cn.hmsoft.art.control.score;
 
-import java.time.LocalDateTime;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.CrossOrigin;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.multipart.MultipartFile;
-
 import cn.hmsoft.application.web.Ajax;
 import cn.hmsoft.art.control.ArtControl;
+import cn.hmsoft.art.data.dao.sc.ScScoreYmDao;
 import cn.hmsoft.art.data.dao.std.StdLogDao;
 import cn.hmsoft.art.data.dao.std.StdRegDao;
-import cn.hmsoft.art.data.model.sc.ScStdAspect;
-import cn.hmsoft.art.data.model.sc.ScStdSubject;
+import cn.hmsoft.art.data.model.sc.ScScoreYm;
 import cn.hmsoft.art.data.model.std.StdEnrol;
 import cn.hmsoft.art.data.model.std.StdReg;
+import cn.hmsoft.art.enrol.business.decision.DecisionHelper;
 import cn.hmsoft.frame.constants.FrameThreadCallbackType;
+import cn.hmsoft.frame.constants.FrameThreadStatus;
 import cn.hmsoft.frame.data.model.FrameOptr;
 import cn.hmsoft.frame.data.model.FrameThread;
 import cn.hmsoft.frame.exception.BusinessException;
@@ -28,6 +19,15 @@ import cn.hmsoft.frame.util.FrameAssertUtil;
 import cn.hmsoft.helper.StringHelper;
 import cn.hmsoft.helper.excel.ExcelReaderHelper;
 import cn.hmsoft.jdbc.entity.QueryOrder;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.CrossOrigin;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.File;
+import java.time.LocalDateTime;
+import java.util.List;
 
 /**
  * 分数合成-包括科目分合成 和 专业分合成
@@ -37,12 +37,16 @@ public class ScoreYmControl extends ArtControl {
 
 	@Autowired
 	private StdRegDao daoStd;
+
 	@Autowired
 	private StdLogDao daoLog;
 
 	@Autowired
 	private ScoreYmService sYm;
 
+	@Autowired
+	private ScScoreYmDao scoreYmDao;
+
 	//本科初复试成绩查询
 	@RequestMapping("score/ym/fina/page")
 	public Ajax ymScorePage(String query, Integer limit, Integer start, String order, String type) {
@@ -235,5 +239,44 @@ public class ScoreYmControl extends ArtControl {
 		String sql = "select aspect_id,aspect_name,count(1) aspect_total,sum(case when SCHOOL_EMS_ID is not null then 1 else 0 end) school_ems_total,sum(case when std_confirm_time is not null then 1 else 0 end) std_confirm_total,sum(case when std_ems_id is not null then 1 else 0 end) std_ems_total,sum(case when school_confirm_time is not null then 1 else 0 end) school_confirm_total,max(STD_CONFIRM_TIME) std_confirm_time,max(school_ems_time) school_ems_time,max(school_confirm_time) school_confirm_time from std_enrol where agent_id=30 group by aspect_id,aspect_name order by aspect_id";
 		return new Ajax(this.daoLog.listMapBySql(sql));
 	}
+
+	/**
+	 *  批量和单个生成违规处理决定书
+	 */
+	@RequestMapping("score/ym/make/decision")
+	public Ajax make(String cert_id, String aspect_name, String batch) {
+		//单个生成
+		if (StringHelper.isNotEmpty(cert_id)) {
+			String sql =
+					"SELECT cs.std_name,r.std_sex,cs.cert_id,cs.aspect_name,cs.ticket_no,p.province_name,remark, cs.batch FROM sc_score_ym cs,std_reg r,cf_enrol_province p"
+							+ " where cs.std_id=r.std_id AND r.std_province=p.PROVINCE_ID AND WEI_GUI='是' and cs.cert_id=? and cs.aspect_name=? and cs.batch=? ";
+			ScScoreYm scScoreYm = scoreYmDao.findBySql(sql, cert_id, aspect_name, batch);
+			File file = DecisionHelper.makeDecision(scoreYmDao, scScoreYm);
+			this.downloadFile(file, file.getName());
+			return new Ajax();
+		} else { // 批量生成
+			FrameThread thread = FrameThreadHelper.createThread("违规处理决定书", "生成违规处理决定书开始:准备数据......",
+					FrameThreadCallbackType.Swal, "违规处理决定书已全部生成", this.getFrameOptr());
+			new Thread(() -> {
+				String sql =
+						" SELECT cs.std_name,r.std_sex,cs.cert_id,cs.aspect_name,cs.ticket_no,p.province_name,remark, cs.batch FROM sc_score_ym cs,std_reg r,cf_enrol_province p "
+								+ " WHERE cs.std_id=r.std_id AND r.std_province=p.PROVINCE_ID AND WEI_GUI='是' ORDER BY TICKET_NO";
+				List<ScScoreYm> scoreList = daoStd.listBySql(ScScoreYm.class, sql);
+				int speed = 1;
+				FrameThreadHelper.updateThread(thread, speed, "一共有【" + scoreList.size() + "】个违规考生需要生成", FrameThreadStatus.Running);
+				for (ScScoreYm scScoreYm : scoreList) {
+					DecisionHelper.makeDecision(scoreYmDao, scScoreYm);
+					speed++;
+					if (speed % 10 == 0) {
+						FrameThreadHelper.updateThread(thread, speed * 100 / scoreList.size(), "生成了【" + speed + "】个违规考生",
+								FrameThreadStatus.Running);
+					}
+				}
+				FrameThreadHelper.completeThread(thread, "生成成功");
+			}).start();
+			return new Ajax(thread);
+		}
+
+	}
 	
 }

+ 20 - 0
src/cn/hmsoft/art/data/model/sc/ScScoreYm.java

@@ -190,4 +190,24 @@ public class ScScoreYm implements Serializable,Comparable<ScScoreYm> {
 	public void setEms_no(String ems_no) {
 		this.ems_no = ems_no;
 	}
+
+	protected String std_sex; //考生性别
+
+	protected String province_name; //考生所在省份
+
+	public String getStd_sex() {
+		return std_sex;
+	}
+
+	public void setStd_sex(String std_sex) {
+		this.std_sex = std_sex;
+	}
+
+	public String getProvince_name() {
+		return province_name;
+	}
+
+	public void setProvince_name(String province_name) {
+		this.province_name = province_name;
+	}
 }

+ 123 - 0
src/cn/hmsoft/art/enrol/business/decision/DecisionHelper.java

@@ -0,0 +1,123 @@
+package cn.hmsoft.art.enrol.business.decision;
+
+import cn.hmsoft.application.SpringHelper;
+import cn.hmsoft.art.constants.StdMaterialType;
+import cn.hmsoft.art.data.dao.sc.ScScoreYmDao;
+import cn.hmsoft.art.data.model.sc.ScScoreYm;
+import cn.hmsoft.art.enrol.helper.EnrolMaterialHelper;
+import cn.hmsoft.art.helper.ArtParamHelper;
+import cn.hmsoft.helper.pdf.ItextPdfHelper;
+import cn.hmsoft.log.LogHelper;
+import com.itextpdf.io.font.PdfEncodings;
+import com.itextpdf.kernel.font.PdfFont;
+import com.itextpdf.kernel.font.PdfFontFactory;
+import com.itextpdf.layout.Document;
+import com.itextpdf.layout.element.Paragraph;
+import com.itextpdf.layout.element.Text;
+import com.itextpdf.layout.property.TextAlignment;
+
+import java.io.File;
+
+/**
+ * @Description 中央美术学院-违规处理决定书生成帮助类
+ */
+public abstract class DecisionHelper {
+
+    public static File makeDecision(ScScoreYmDao scoreYmDao, ScScoreYm score) {
+        String file_name = EnrolMaterialHelper.generateMaterialName(StdMaterialType.Decision, score.getCert_id()) + ".pdf";
+        File file = new File(EnrolMaterialHelper.getEnrolMaterialLocalPath() + file_name);
+        file.getParentFile().mkdirs();
+        if (file.exists())
+            file.delete();
+
+        Document doc = null;
+        try {
+            // 设置密码
+            doc = ItextPdfHelper.createPdf(file, "hmosft_" + ArtParamHelper.SchoolCode);
+
+            doc.setBorder(null);
+            doc.setMargins(30, 50, 30, 50);
+            PdfFont font = PdfFontFactory.createFont(
+                    SpringHelper.WebServletContext.getRealPath("/") + "fonts" + File.separator + "STFANGSO.TTF",
+                    PdfEncodings.IDENTITY_H, true);
+            doc.setFont(font);
+            Paragraph p1;
+
+            float fontSize = 16f;
+            float lineHeight = 1.65f;
+            p1 = new Paragraph("中央美术学院" + ArtParamHelper.ArtYear + "年本科招生线上考试\n违规处理决定书")
+                    .setFontSize(22).setBold().setTextAlignment(TextAlignment.CENTER);
+            doc.add(p1);
+
+            Text underlineText = new Text("YM2024001").setUnderline();
+            p1 = new Paragraph("编号:").add(underlineText).setFontSize(fontSize).setTextAlignment(TextAlignment.CENTER);
+            doc.add(p1);
+
+            underlineText = new Text("  " + score.getStd_name() + "  ").setUnderline();
+            p1 = new Paragraph(underlineText).add(":").setFontSize(fontSize).setTextAlignment(TextAlignment.LEFT);
+            doc.add(p1);
+
+            //第一段
+            Text stdSex = new Text("  " + score.getStd_sex() + "  ").setUnderline();
+            Text certId = new Text("  " + score.getCert_id() + "  ").setUnderline();
+            Text province = new Text("  " + score.getProvince_name() + "考生").setUnderline();
+            Text aspectName = new Text("  " + score.getAspect_name() + "  ").setUnderline();
+            Text ticketNo = new Text("  " + score.getTicket_no() + "  ").setUnderline();
+            p1 = new Paragraph(underlineText).add(",").add(stdSex).add(",").add("身份证号:").add(certId).add(",").add(province)
+                    .add(",").add("报考专业:").add(aspectName).add(",").add("准考证号:").add(ticketNo).add("。")
+                    .setFontSize(fontSize).setTextAlignment(TextAlignment.LEFT).setFixedLeading(8)
+                    .setMultipliedLeading(lineHeight).setFirstLineIndent(30f);
+            doc.add(p1);
+
+            //第二段
+            Text year = new Text("  " + ArtParamHelper.ArtYear + "  ").setUnderline();
+            Text month = new Text("  " + ArtParamHelper.getParamValue("ExamMonth", "1") + "  ").setUnderline();
+            Text day = new Text("  " + ArtParamHelper.getParamValue("ExamDay", "17") + "  ").setUnderline();
+            Text subjectName = new Text("  " + "《命题创作》" + "  ").setUnderline();
+            Text remark = new Text("  " + "携带并使用电子设备" + "  ").setUnderline();
+            Text rule = new Text("  " + "《中央美术学院" + ArtParamHelper.ArtYear + "年本科招生线上考试考场规则》第十二条第1款" + "  ").setUnderline();
+            p1 = new Paragraph("你在参加").add(year).add("年").add(month).add("月").add(day)
+                    .add("中央美术学院" + ArtParamHelper.ArtYear + " 年本科招生线上考试")
+                    .add(subjectName).add("考试中,有").add(remark).add("的作弊行为,").add("违反")
+                    .add(rule).add("现对你作出如下处理:")
+                    .setFontSize(fontSize).setTextAlignment(TextAlignment.LEFT).setFixedLeading(8)
+                    .setMultipliedLeading(lineHeight).setFirstLineIndent(30f);
+            doc.add(p1);
+
+            //第三段
+            Text text = new Text("所报名参加我校" + ArtParamHelper.ArtYear
+                    + " 年本科招生线上考试的各阶段、各科成绩无效;三年禁止报考中央美术学院;相关材料上报生源所在省份教育考试院。");
+            p1 = new Paragraph(text).setFontSize(fontSize).setTextAlignment(TextAlignment.LEFT).setFixedLeading(8)
+                    .setMultipliedLeading(lineHeight).setFirstLineIndent(30f);
+            doc.add(p1);
+
+            //第四段
+            text = new Text("你收到违规处理通知单之日起十五日内,已向中央美术学院提出复核与申诉申请。经复核,作弊认定无误。如你对本决定不服,可在以下两种渠道维护自身合法权益:1.可在收到处理决定之日起六十日内"
+                    + "向上级行政部门申请行政复议;2.可在收到处理决定之日起六个月内直接向北京市朝阳区人民法院提起行政诉讼。逾期视为放弃权利。");
+            p1 = new Paragraph(text).setFontSize(fontSize).setTextAlignment(TextAlignment.LEFT).setFixedLeading(8)
+                    .setMultipliedLeading(lineHeight).setFirstLineIndent(30f);
+            doc.add(p1);
+
+            doc.add(new Paragraph(""));
+            doc.add(new Paragraph("中央美术学院").setFontSize(fontSize).setTextAlignment(TextAlignment.RIGHT).setPaddingRight(30f));
+            doc.add(new Paragraph(ArtParamHelper.ArtYear + " 年 " + ArtParamHelper.getParamValue("HandleMonth", "4")
+                    + "  月 " + ArtParamHelper.getParamValue("HandleDay", "17") + " 日")
+                    .setFontSize(fontSize).setTextAlignment(TextAlignment.RIGHT).setPaddingRight(20f));
+            ItextPdfHelper.closePdf(doc);
+
+            //更新文件路径
+            String sql = "update sc_score_ym set aspect_image=? where cert_id=? and aspect_name=? and batch=? ";
+            scoreYmDao.updateBySql(sql, file_name, score.getCert_id(), score.getAspect_name(), score.getBatch());
+
+        } catch (Exception e) {
+            try {
+                ItextPdfHelper.closePdf(doc);
+            } catch (Exception ex) {
+                LogHelper.error(ex.getMessage());
+            }
+            file.delete();
+        }
+        return file;
+    }
+
+}

+ 109 - 199
src/cn/hmsoft/art/service/ly/material/written/WrittenMaterial10047.java

@@ -1,29 +1,18 @@
 package cn.hmsoft.art.service.ly.material.written;
 
 import java.io.File;
-import java.time.LocalDate;
 import java.time.LocalDateTime;
 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.Map;
 
 import com.itextpdf.io.font.PdfEncodings;
 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.PdfFontFactory;
 import com.itextpdf.layout.Document;
 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.TextAlignment;
 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.exception.BusinessException;
 import cn.hmsoft.frame.thread.FrameThreadHelper;
-import cn.hmsoft.helper.CollectionHelper;
 import cn.hmsoft.helper.LocalDateHelper;
 import cn.hmsoft.helper.StringHelper;
 import cn.hmsoft.helper.pdf.ItextDocumentModel;
@@ -71,7 +59,7 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
 				LyRoomWritten room = roomArray.get(roomIndex);
 				if (room.getReal_std_total() < 1)
 					continue;
-				Paragraph p1 = null;
+				Paragraph p1;
 				Table mainTable = new Table(new float[] {1,3}).setWidthPercent(100).setBorder(Border.NO_BORDER);
 				Image imageLogo = null;
 				try {
@@ -79,7 +67,7 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
 							+ File.separator + "10047.png";
 					imageLogo = new Image(ImageDataFactory.create(path)).scaleAbsolute(120, 80);
 				} catch (Exception e) {
-
+					LogHelper.error(e.getMessage());
 				}
 				//doc.add(imageLogo);
 				//标题部分
@@ -93,29 +81,31 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
 				//考场地址和考场编号部分
 				int fontsize = 60;
 				String roomName = room.getRoom_name();
-				if(roomName.length()>12 && roomName.length()<16) {
+				if (roomName.length() > 12 && roomName.length() < 16) {
 					fontsize = 50;
-				} else if(roomName.length()>16) {
+				} else if (roomName.length() > 16) {
 					fontsize = 43;
 				}
 				p1 = new Paragraph(roomName).setFontSize(fontsize).setBold().setTextAlignment(TextAlignment.CENTER);
 				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);
 				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 ticketFontSize= 40;
+
+				int ticketFontSize = 40;
 				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;
-				} else if(num == 3) {
+				} else if (num == 3) {
 					ticketFontSize = 32;
 				}
 				// 准考证范围
@@ -173,14 +163,14 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
 	 */
 	@Override
 	public File makeWriteSeat(FrameThread thread, File tempFile, LyGroup group, boolean image_flag) {
-		Document doc = null;
+		Document doc;
 		try {
 			doc = pageModel.prepareDocument(tempFile);
 			doc.setMargins(0, 20, 10, 15);
 			doc.setBorder(null);
 			doc.setFont(getSchoolFont());
 			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);
 			for (LyRoomWritten room : roomArray) {
@@ -608,12 +598,12 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
 			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<LyRoomWritten, List<Map<String, Object>>>();
+			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.size() == 0)
+				if (sArray.isEmpty())
 					continue;
 				roomStdMap.put(room, sArray);
 			}
@@ -623,8 +613,7 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
 			// 计算每个考生的margin
 			// 每行考生数
 			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 fontSize = 8;
@@ -639,7 +628,7 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
 				for (int stdIndex = 0; stdIndex < array.size(); 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;
 					} else {
 						fontSize = 10;
@@ -783,11 +772,8 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
 			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",
 					group.getLy_group_id());
-			// String aspect_names = CollectionHelper.join(aspectArray, "aspect_name", "、");
 			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("色彩(造型艺术)")) {
 				agentName = "中央美术学院燕郊校区";
 			} else {
@@ -808,11 +794,10 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
 					if (i > 0) {
 						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);
-					//附中优秀人才选拔考试
+
 					p1 = new Paragraph(ArtParamHelper.ArtYear + "年本科招生现场考试考场记录").setFontSize(18)
 									.setBold().setTextAlignment(TextAlignment.CENTER).setMarginTop(-2);
 					doc.add(p1);
@@ -824,7 +809,7 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
 						marginLeft = -25;
 					}
 					
-					Table tableTitle= null;
+					Table tableTitle;
 					if(agentName.equals("中央美术学院燕郊校区")) {
 						tableTitle= new Table(new float[] { 1.2f, 1.4f, 1.2f}).setWidthPercent(100);
 					} 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.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;
-					} 
-					if(subject.getSubject_name().length()>8) {
+					}
+					if (subject.getSubject_name().length() > 8) {
 						fontsize = 9;
 					}
 					
@@ -908,9 +888,12 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
 					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++;
+					if (StringHelper.isNotEmpty(mainStd))
+						num++;
+					if (StringHelper.isNotEmpty(hkStd))
+						num++;
+					if (StringHelper.isNotEmpty(otherStd))
+						num++;
 					String value = "";
 					if(num ==1) {
 						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"));
 					}
 					
-					
-				/*	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)
 							.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, 6).add("考生违规记录").setPaddingLeft(10)
 							.setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE).setMarginTop(2).setBorderTop(null).setBorderBottom(null));
 					table2.addCell((new Cell(1, 1).add("准考证号")
@@ -1011,7 +964,7 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
 							.setTextAlignment(TextAlignment.CENTER).setVerticalAlignment(VerticalAlignment.MIDDLE)));
 					table2.addCell((new Cell(1, 1).add("考生签字")
 							.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, 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));
 					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()
 							.setTextAlignment(TextAlignment.LEFT));
 				}
@@ -1067,7 +1008,7 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
 			ItextDocumentModel pageModel = new ItextDocumentModel();
 			pageModel.rotate();
 			
-			String agentName ="燕京理工学院";
+			String agentName;
 			if(group.getGroup_name().equals("素描(造型艺术)") || group.getGroup_name().equals("色彩(造型艺术)")) {
 				agentName = "中央美术学院燕郊校区";
 			} else {
@@ -1077,18 +1018,18 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
 			doc = pageModel.prepareDocument(tempFile);
 			doc.setMargins(40, 40, 30, 40);
 			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());
+			String aspect_names = CollectionHelper.join(aspectArray, "aspect_name", "、"); */
 			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",
 					group.getLy_group_id());
-			//String aspect_names = CollectionHelper.join(aspectArray, "aspect_name", "、");
 			List<LyRoomWritten> roomArray = this.daoRoom.listRoom(group.getLy_group_id());
 			int index = 0;
 			int fontSize = 9;
-			int subjectFontSize = 9;
+			int subjectFontSize;
 			int sum = 0;
-			if(group.getShow_aspect_name().length()>8) {
+			if (group.getShow_aspect_name().length() > 8) {
 				subjectFontSize = 8;
 			} else {
 				subjectFontSize = 9;
@@ -1103,10 +1044,6 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
 					if (i > 0) {
 						doc.add(new AreaBreak());
 					}
-					// 中央美术学院2020年本科招生专业考试试卷收发单
-					// 中央美术学院2020年本科招生专业考试试卷收发单
-					//年附中优秀人才选拔考试试卷收发单
-					//本科招生专业考试
 					Paragraph p1 = new Paragraph("中央美术学院" + ArtParamHelper.ArtYear + "年本科招生现场考试试卷收发单").setFontSize(18)
 							.setBold().setTextAlignment(TextAlignment.CENTER);
 					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(getExamDate(subject.getExam_start_time())+getExamDateType(subject.getExam_start_time())).setTextAlignment(TextAlignment.RIGHT)
 							.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);
 					
 					
@@ -1152,8 +1086,7 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
 							.setVerticalAlignment(VerticalAlignment.MIDDLE).setBold());
 					table.addCell(new Cell(1, 1).add("作弊").setTextAlignment(TextAlignment.CENTER)
 							.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) {
 						sum += room.getReal_std_total();
 						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>  otherStd = this.daoRoom.getTicketSerailNum(room.getLy_room_id(),3);
 						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 = "";
 						
-//						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 += 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"));
 							}
-//						} 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) {
 						// 结束了
-						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));
@@ -1263,7 +1178,7 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
 	
 	
 	private void createSeatTitle(Document doc, LyGroup group, LyRoomWritten room) {
-		String agentName ="燕京理工学院";
+		String agentName;
 		if(group.getGroup_name().equals("素描(造型艺术)") || group.getGroup_name().equals("色彩(造型艺术)")) {
 			agentName = "中央美术学院燕郊校区";
 		} else {
@@ -1284,9 +1199,7 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
 	
 	private void createSignNewPage(Document doc, LyAgent agent, LyGroup group, List<LySubject> subjectArray,
 			LyRoomWritten room) {
-		// 中央美术学院2020年本科招生专业考试信息核对单
-		//年附中优秀人才选拔考试考生信息核对单"
-		String agentName ="燕京理工学院";
+		String agentName;
 		if(group.getGroup_name().equals("素描(造型艺术)") || group.getGroup_name().equals("色彩(造型艺术)")) {
 			agentName = "中央美术学院燕郊校区";
 		} else {
@@ -1404,14 +1317,14 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
 			doc.setBorder(null);
 			doc.setMargins(20, 30, 30, 30);
 			doc.setFont(getSchoolFont());
-			Paragraph p1 = null;
-			int height = 20;
+			Paragraph p1;
+			int height;
 			int titleSize = 10;
 			int stdSize = 9;
 			String agentName = getAgentName(group);
 			
 			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) {
 				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();
 				if (room.getReal_std_total() < 1)
 					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);
 				doc.add(p1);
@@ -1495,17 +1411,15 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
 	
 	
 	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) {
 			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("美术学")
-			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;
 	}
 
@@ -1559,11 +1473,7 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
 				doc.add(fhTable);
 				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);
 			return tempFile;
 		} catch (Exception e) {
@@ -1656,7 +1566,7 @@ public class WrittenMaterial10047 extends WrittenMaterialDefault {
 			throw new BusinessException("无法生成pdf文件,请联系系统管理员");
 		}
 	}
-	
-	
+
+
 
 }