Browse Source

告知书和决定书

haogh 6 months ago
parent
commit
b37eb0d121

BIN
WebRoot/template/模版-线上考试违纪考生.xls


+ 6 - 0
WebRoot/ymbk/routes/std/material/std_material.html

@@ -37,6 +37,12 @@
 		</div>
 
 	</div>
+
+	<div class="ui-card" style="padding:20px">
+		<div class="ui-title" style="margin-top: 0px !important;">
+			<span style="line-height:25px;">提供虚假信息,取消考试资格。</span><br>
+		</div>
+	</div>
 	
 <div class="button-sp-area">
 		<a href="javascript:void(0);" class="weui-btn weui-btn_primary" ng-click="goWechat()">首页</a>

+ 14 - 23
WebRoot/ymbk/routes/std/reg/std_reg.html

@@ -575,22 +575,7 @@
 					</div>
 				</div>
 				
-				<div class="weui-cell">
-					<div class="weui-cell__hd">
-						<label class="weui-label">紧急联系人</label>
-					</div>
-					<div class="weui-cell__bd">
-						<input class="weui-input" type="text" placeholder="请输入紧急联系人" maxlength="128" ng-model="StdReg.link_man">
-					</div>
-				</div>				
-				<div class="weui-cell">
-					<div class="weui-cell__hd">
-						<label class="weui-label">联系人手机</label>
-					</div>
-					<div class="weui-cell__bd">
-						<input class="weui-input" type="text" placeholder="多个请用英文分号分割" maxlength="100" ng-model="StdReg.link_mobile" >
-					</div>
-				</div>
+
 				
 				<!-- 通信地址 -->
 				<div class="weui-cell" ng-if="getParamValue('EnrolReg_LinkAddr','Active') == 'Active'">
@@ -621,22 +606,28 @@
 						<input class="weui-input" type="text" placeholder="请输入电子邮箱" maxlength="60" ng-model="StdReg.email">
 					</div>
 				</div>
-				<!--<div class="weui-cell" ng-if="getParamValue('EnrolReg_ShowLinkAddr','true') == 'true'">
+
+				<div class="weui-cell">
 					<div class="weui-cell__hd">
-						<label class="weui-label">试卷邮寄地址</label>
+						<label class="weui-label">紧急联系人</label>
 					</div>
 					<div class="weui-cell__bd">
-						<input class="weui-input" type="text" placeholder="请输入邮寄地址" maxlength="128" ng-model="StdReg.link_addr">
+						<input class="weui-input" type="text" placeholder="请输入紧急联系人" maxlength="128" ng-model="StdReg.link_man">
 					</div>
 				</div>
-				<div class="weui-cell" ng-if="getParamValue('EnrolReg_ShowLinkPostal','true') == 'true'">
+
+				<div class="weui-cell">
 					<div class="weui-cell__hd">
-						<label class="weui-label">邮政编码</label>
+						<label class="weui-label">联系人手机</label>
 					</div>
 					<div class="weui-cell__bd">
-						<input class="weui-input" type="text" placeholder="请输入邮政编码" maxlength="6" ng-model="StdReg.link_postal">
+						<input class="weui-input" type="text" placeholder="多个请用英文分号分割" maxlength="100" ng-model="StdReg.link_mobile" >
 					</div>
-				</div>-->
+				</div>
+
+				<div>
+					<span style="line-height:25px; font-size: 16px; color: grey;padding-left: 30px;" >提供虚假信息,取消考试资格。</span>
+				</div>
 
 			</div>
 

+ 6 - 0
WebRoot/ymfz/routes/std/material/std_material.html

@@ -38,6 +38,12 @@
 
 	</div>
 
+	<div class="ui-card" style="padding:20px">
+		<div class="ui-title" style="margin-top: 0px !important;">
+			<span style="line-height:25px;">提供虚假信息,取消考试资格。</span><br>
+		</div>
+	</div>
+
 	<div class="button-sp-area">
 		<a href="javascript:void(0);" class="weui-btn weui-btn_primary" ng-click="goWechat()">首页</a>
 	</div>

+ 39 - 29
WebRoot/ymfz/routes/std/reg/std_reg.html

@@ -898,35 +898,7 @@
           </div>
         </div>
 
-        <div class="weui-cell">
-          <!--  ng-if="getParamValue('EnrolReg_ShowLinkMan','true') == 'true'" -->
-          <div class="weui-cell__hd">
-            <label class="weui-label">紧急联系人</label>
-          </div>
-          <div class="weui-cell__bd">
-            <input
-              class="weui-input"
-              type="text"
-              placeholder="请输入紧急联系人"
-              maxlength="128"
-              ng-model="StdReg.link_man"
-            />
-          </div>
-        </div>
-        <div class="weui-cell">
-          <div class="weui-cell__hd">
-            <label class="weui-label">联系人手机</label>
-          </div>
-          <div class="weui-cell__bd">
-            <input
-              class="weui-input"
-              type="text"
-              placeholder="多个请用英文分号分割"
-              maxlength="100"
-              ng-model="StdReg.link_mobile"
-            />
-          </div>
-        </div>
+
 
         <!-- 通信地址 -->
         <div
@@ -980,8 +952,46 @@
             />
           </div>
         </div>
+
+        <div class="weui-cell">
+          <div class="weui-cell__hd">
+            <label class="weui-label">紧急联系人</label>
+          </div>
+          <div class="weui-cell__bd">
+            <input
+                    class="weui-input"
+                    type="text"
+                    placeholder="请输入紧急联系人"
+                    maxlength="128"
+                    ng-model="StdReg.link_man"
+            />
+          </div>
+        </div>
+
+        <div class="weui-cell">
+          <div class="weui-cell__hd">
+            <label class="weui-label">联系人手机</label>
+          </div>
+          <div class="weui-cell__bd">
+            <input
+                    class="weui-input"
+                    type="text"
+                    placeholder="多个请用英文分号分割"
+                    maxlength="100"
+                    ng-model="StdReg.link_mobile"
+            />
+          </div>
+        </div>
+
+        <div>
+          <span style="line-height:25px; font-size: 16px; color: grey;padding-left: 30px;" >提供虚假信息,取消考试资格。</span>
+        </div>
+
       </div>
 
+
+
+
       <div class="button-sp-area">
         <a
           href="javascript:;"

+ 5 - 1
sql/update.sql

@@ -173,8 +173,12 @@ CREATE TABLE `sc_score_ym_violation`
     `violation_remark` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '违规行为',
     `country_rule`     varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '国家处理办法',
     `school_rule`      varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '学校处理办法',
+    `batch`            varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci  NULL DEFAULT NULL COMMENT '批次,first,final',
     PRIMARY KEY (`id`) USING BTREE
 ) ENGINE = InnoDB
   CHARACTER SET = utf8
   COLLATE = utf8_general_ci COMMENT = '违纪考生'
-  ROW_FORMAT = Dynamic;
+  ROW_FORMAT = Dynamic;
+
+-- 2024-12-09
+ALTER TABLE `sc_score_ym` ADD COLUMN `NOTICE_FILE` varchar(255) NULL COMMENT '告知书地址' AFTER `RECOVERY_TIME`;

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

@@ -75,6 +75,11 @@ public class StdMaterialType {
 	 */
 	public final static String ReviewLog ="ReviewLog";
 
+	/*********************
+	 * 违规处理-告知书
+	 */
+	public final static String Notice ="Notice";
+
 
 	
 }

+ 1 - 1
src/cn/hmsoft/art/control/score/ScScoreYmViolationControl.java

@@ -31,7 +31,7 @@ public class ScScoreYmViolationControl extends ArtControl {
     @CrossOrigin
     @RequestMapping("score/ym/violation/upload")
     public Ajax upload(MultipartFile file) throws Exception {
-        List<List<String>> values = ExcelReaderHelper.readSheet(Objects.requireNonNull(file.getOriginalFilename()), file.getInputStream(), 1, 10);
+        List<List<String>> values = ExcelReaderHelper.readSheet(Objects.requireNonNull(file.getOriginalFilename()), file.getInputStream(), 1, 11);
         scScoreYmViolationService.upload(values, getFrameOptr());
         return new Ajax();
     }

+ 41 - 16
src/cn/hmsoft/art/control/score/ScoreYmControl.java

@@ -29,6 +29,7 @@ import org.springframework.web.multipart.MultipartFile;
 import java.io.File;
 import java.time.LocalDateTime;
 import java.util.List;
+import java.util.Map;
 import java.util.Objects;
 
 /**
@@ -251,10 +252,10 @@ public class ScoreYmControl extends ArtControl {
 	public Ajax makeDecision(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);
+			String sql = " SELECT v.*,r.std_sex,r.exam_id,p.province_name FROM sc_score_ym_violation v,sc_score_ym y,std_reg r,cf_enrol_province p ";
+			sql += " WHERE v.cert_id=y.cert_id AND v.aspect_name=y.aspect_name AND y.cert_id=r.cert_id AND r.std_province=p.province_id ";
+			sql +="  AND v.cert_id=? AND v.aspect_name=? AND y.batch=? ";
+			Map<String,Object> scScoreYm = scoreYmDao.findMapBySql(sql, cert_id, aspect_name, batch);
 			File file = DecisionHelper.makeDecision(scoreYmDao, scScoreYm);
 			this.downloadFile(file, file.getName());
 			return new Ajax();
@@ -262,13 +263,12 @@ public class ScoreYmControl extends ArtControl {
 			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);
+				String sql =  " SELECT distinct v.*,r.std_sex,r.exam_id,p.province_name FROM sc_score_ym_violation v,sc_score_ym y,std_reg r,cf_enrol_province p ";
+				sql += " WHERE v.cert_id=y.cert_id AND v.aspect_name=y.aspect_name AND y.cert_id=r.cert_id AND r.std_province=p.province_id ";
+				List<Map<String,Object>> scoreList = daoStd.listMapBySql(sql);
 				int speed = 1;
 				FrameThreadHelper.updateThread(thread, speed, "一共有【" + scoreList.size() + "】个违规考生需要生成", FrameThreadStatus.Running);
-				for (ScScoreYm scScoreYm : scoreList) {
+				for (Map<String,Object> scScoreYm : scoreList) {
 					DecisionHelper.makeDecision(scoreYmDao, scScoreYm);
 					speed++;
 					if (speed % 10 == 0) {
@@ -280,25 +280,50 @@ public class ScoreYmControl extends ArtControl {
 			}).start();
 			return new Ajax(thread);
 		}
-
 	}
 
 	/**
-	 *  生成违规处理结果
+	 *  生成违规处理告知
 	 * @param cert_id 证件号码
 	 * @param aspect_name 专业名称
 	 * @param batch 批次
 	 * @return ajax
 	 */
-	@RequestMapping("score/ym/make/decision/result")
-	public Ajax makeDecisionResult(String cert_id, String aspect_name, String batch) {
+	@RequestMapping("score/ym/make/notice")
+	public Ajax makeDecisionNotice(String cert_id, String aspect_name, String batch) {
 		// 单个生成
 		if(StringHelper.isNotEmpty(cert_id)) {
-
+			String sql = " SELECT v.*,r.std_sex,r.exam_id,p.province_name FROM sc_score_ym_violation v,sc_score_ym y,std_reg r,cf_enrol_province p ";
+			sql += " WHERE v.cert_id=y.cert_id AND v.aspect_name=y.aspect_name AND y.cert_id=r.cert_id AND r.std_province=p.province_id ";
+			sql +="  AND v.cert_id=? AND v.aspect_name=? AND y.batch=? ";
+			Map<String,Object> map = scoreYmDao.findMapBySql(sql, cert_id, aspect_name, batch);
+			if(map == null || map.isEmpty()) {
+				throw new BusinessException("考生不存在");
+			}
+			File file = DecisionHelper.makeNotice(scoreYmDao, map);
+			this.downloadFile(file, file.getName());
+			return new Ajax();
 		} else { //批量生成
-
+			FrameThread thread = FrameThreadHelper.createThread("违规处理告知书", "生成违规处理告知书开始:准备数据......",
+					FrameThreadCallbackType.Swal, "违规处理告知书已全部生成", this.getFrameOptr());
+			new Thread(() -> {
+				String sql =  " SELECT distinct v.*,r.std_sex,r.exam_id,p.province_name FROM sc_score_ym_violation v,sc_score_ym y,std_reg r,cf_enrol_province p ";
+				sql += " WHERE v.cert_id=y.cert_id AND v.aspect_name=y.aspect_name AND y.cert_id=r.cert_id AND r.std_province=p.province_id ";
+				List<Map<String,Object>> scoreList = daoStd.listMapBySql(sql);
+				int speed = 1;
+				FrameThreadHelper.updateThread(thread, speed, "一共有【" + scoreList.size() + "】个违规考生需要生成", FrameThreadStatus.Running);
+				for (Map<String,Object> scScoreYm : scoreList) {
+					DecisionHelper.makeNotice(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);
 		}
-		return new Ajax();
 	}
 
 

+ 5 - 4
src/cn/hmsoft/art/data/dao/sc/ScScoreYmViolationDao.java

@@ -10,15 +10,16 @@ import org.springframework.stereotype.Repository;
 @Repository
 public class ScScoreYmViolationDao extends PlatformDaoSupport<ScScoreYmViolation> {
 
-    public Pager pageViolation(String query, Integer start, Integer limit, QueryOrder queryOrder) {
-        String sql = "select v.*,r.std_sex,p.province_name,r.exam_id from sc_score_ym_violation v, std_reg r,cf_enrol_province p ";
+    public Pager pageViolation(String query, Integer start, Integer limit, QueryOrder queryOrder, String batch) {
+        String sql = "select v.*,r.std_sex,p.province_name,r.exam_id,sy.aspect_image,sy.review_log_file,sy.notice_file from  std_reg r,cf_enrol_province p,sc_score_ym_violation v ";
+        sql += " left join sc_score_ym sy on sy.cert_id=v.cert_id and sy.std_name=v.std_name and sy.aspect_name=v.aspect_name and sy.batch=?";
         sql += " where v.cert_id=r.cert_id and r.std_province=p.province_id ";
         if (StringHelper.isEmpty(query)) {
-            return this.pageMapBySql(queryOrder, start, limit, sql);
+            return this.pageMapBySql(queryOrder, start, limit, sql, batch);
         }
         String value = this.generateLikeParamter(query);
         sql += " and (v.cert_id like ? or v.std_name like ?  or v.ticket_no like ?)";
-        return this.pageMapBySql(queryOrder, start, limit, sql, value, value, value);
+        return this.pageMapBySql(queryOrder, start, limit, sql, batch, value, value, value);
     }
 
     public ScScoreYmViolation findByCertAndAspect(String certId, String aspectName) {

+ 11 - 0
src/cn/hmsoft/art/data/model/sc/ScScoreYmViolation.java

@@ -44,6 +44,9 @@ public class ScScoreYmViolation implements Serializable {
     //学校处理办法
     private String school_rule;
 
+    //批次
+    private String batch;
+
     public Integer getId() {
         return id;
     }
@@ -131,4 +134,12 @@ public class ScScoreYmViolation implements Serializable {
     public void setSchool_rule(String school_rule) {
         this.school_rule = school_rule;
     }
+
+    public String getBatch() {
+        return batch;
+    }
+
+    public void setBatch(String batch) {
+        this.batch = batch;
+    }
 }

+ 159 - 31
src/cn/hmsoft/art/enrol/business/decision/DecisionHelper.java

@@ -33,14 +33,15 @@ import com.itextpdf.layout.property.VerticalAlignment;
 
 import java.io.File;
 import java.util.List;
+import java.util.Map;
 
 /**
  * @Description 中央美术学院-违规处理决定书生成帮助类
  */
 public abstract class DecisionHelper {
 
-    public static File makeDecision(ScScoreYmDao scoreYmDao, ScScoreYm score) {
-        String file_name = EnrolMaterialHelper.generateMaterialName(StdMaterialType.Decision, score.getCert_id()) + ".pdf";
+    public static File makeDecision(ScScoreYmDao scoreYmDao, Map<String,Object> score) {
+        String file_name = EnrolMaterialHelper.generateMaterialName(StdMaterialType.Decision, "" + score.get("cert_id")) + ".pdf";
         File file = new File(EnrolMaterialHelper.getEnrolMaterialLocalPath() + file_name);
         file.getParentFile().mkdirs();
         if (file.exists())
@@ -65,65 +66,83 @@ public abstract class DecisionHelper {
                     .setFontSize(22).setBold().setTextAlignment(TextAlignment.CENTER);
             doc.add(p1);
 
-            Text underlineText = new Text("YM2024001").setUnderline();
+            Text underlineText = new Text("" + score.get("violation_no")).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);
+            // 空行
+            p1 = new Paragraph(" ");
             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)
+            Text stdName = new Text("  " + score.get("std_name") + "  ").setUnderline();
+            Text stdSex = new Text("  " + score.get("std_sex") + "  ").setUnderline();
+            Text certId = new Text("  " + score.get("cert_id") + "  ").setUnderline();
+            Text province = new Text("  " + score.get("province_name")).setUnderline();
+            Text aspectName = new Text("  " + score.get("aspect_name")+ "  ").setUnderline();
+            Text ticketNo = new Text("  " + score.get("ticket_no") + "  ").setUnderline();
+            Text examId = new Text("  " + score.get("exam_id") + "  ").setUnderline();
+            p1 = new Paragraph("考生:").add(stdName).add(",").add(stdSex).add(",").add("身份证号:").add(certId).add(",生源地:").add(province)
+                    .add(",").add("高考报名号:").add(examId)
                     .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("现对你作出如下处理:")
+            String examDate = (String) score.get("exam_date");
+            String[] dates = examDate.split("-");
+            Text year = new Text("  " + dates[0] + "  ").setUnderline();
+            Text month = new Text("  " + Integer.parseInt(dates[1]) + "  ").setUnderline();
+            Text day = new Text("  " + Integer.parseInt(dates[2]) + "  ").setUnderline();
+            Text subjectName = new Text("  " + score.get("exam_subject") + "  ").setUnderline();
+            Text remark = new Text("  " + score.get("violation_remark") + "  ").setUnderline();
+            Text countryRule = new Text("  " + score.get("country_rule") + "  ").setUnderline();
+            Text schoolRule = new Text("  " + score.get("school_rule") + "  ").setUnderline();
+            p1 = new Paragraph("你在").add(year).add("年").add(month).add("月").add(day).add("日").add("参加")
+                    .add(subjectName).add("中,有").add(remark).add("的行为,").add("违反")
+                    .add(countryRule).add("和").add(schoolRule).add("的规定。")
                     .setFontSize(fontSize).setTextAlignment(TextAlignment.LEFT).setFixedLeading(8)
                     .setMultipliedLeading(lineHeight).setFirstLineIndent(30f);
             doc.add(p1);
 
             //第三段
-            Text text = new Text("所报名参加我校" + ArtParamHelper.ArtYear
-                    + " 年本科招生线上考试的各阶段、各科成绩无效;三年禁止报考中央美术学院;相关材料上报生源所在省份教育考试院。");
+            Text text = new Text("根据《国家教育考试违规处理办法》及《中央美术学院2024年本科招生线上考试考场规则》相关规定,现给予你如下处理:");
             p1 = new Paragraph(text).setFontSize(fontSize).setTextAlignment(TextAlignment.LEFT).setFixedLeading(8)
                     .setMultipliedLeading(lineHeight).setFirstLineIndent(30f);
             doc.add(p1);
 
             //第四段
-            text = new Text("你收到违规处理通知单之日起十五日内,已向中央美术学院提出复核与申诉申请。经复核,作弊认定无误。如你对本决定不服,可在以下两种渠道维护自身合法权益:1.可在收到处理决定之日起六十日内"
-                    + "向上级行政部门申请行政复议;2.可在收到处理决定之日起六个月内直接向北京市朝阳区人民法院提起行政诉讼。逾期视为放弃权利。");
+            text = new Text("所报名参加中央美术学院" + ArtParamHelper.ArtYear
+                    + "年本科招生线上考试的各阶段、各科成绩无效;3年内禁止报考(不予录取)中央美术学院;同时将违规情况报送至生源所在省级招生考试机构做进一步处理。");
+            p1 = new Paragraph(text).setFontSize(fontSize).setTextAlignment(TextAlignment.LEFT).setFixedLeading(8)
+                    .setMultipliedLeading(lineHeight).setFirstLineIndent(30f);
+            doc.add(p1);
+
+            //第五段
+            text = new Text("本次违规处理决定书采用电子送达方式,成绩复核结果查询时接受违规处理决定书,视为已送达。");
+            p1 = new Paragraph(text).setFontSize(fontSize).setTextAlignment(TextAlignment.LEFT).setFixedLeading(8)
+                    .setMultipliedLeading(lineHeight).setFirstLineIndent(30f);
+            doc.add(p1);
+
+            //第六段
+            text = new Text("如对处理决定不服,你有权在接受违规处理决定书之日起15日内向教育部提出书面申述;或在接受处理决定之日起6个月内向北京市朝阳区人民法院申请行政诉讼。未提出申述、诉讼或者逾期提出申述、诉讼的,视为你认可处理决定。");
             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));
+            doc.add(new Paragraph(ArtParamHelper.ArtYear + " 年 " + ArtParamHelper.getParamValue("HandleDecisionMonth", "4")
+                    + "  月 " + ArtParamHelper.getParamValue("HandleDecisionDay", "17") + " 日")
+                    .setFontSize(fontSize).setTextAlignment(TextAlignment.RIGHT).setPaddingRight(16f));
+
             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());
+            scoreYmDao.updateBySql(sql, file_name, score.get("cert_id"), score.get("aspect_name"), score.get("batch"));
 
         } catch (Exception e) {
             try {
@@ -137,8 +156,117 @@ public abstract class DecisionHelper {
     }
 
 
-    public static File makeDecisionResult(ScScoreYmDao scoreYmDao, ScScoreYm score) {
-        return null;
+    public static File makeNotice(ScScoreYmDao scoreYmDao, Map<String,Object> score) {
+        String file_name = EnrolMaterialHelper.generateMaterialName(StdMaterialType.Notice, "" + score.get("cert_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 = 17f;
+            float lineHeight = 1.65f;
+            p1 = new Paragraph("中央美术学院" + ArtParamHelper.ArtYear + "年本科招生线上考试\n违规处理告知书")
+                    .setFontSize(22).setBold().setTextAlignment(TextAlignment.CENTER);
+            doc.add(p1);
+
+            Text underlineText = new Text("" + score.get("violation_no")).setUnderline();
+            p1 = new Paragraph("编号:").add(underlineText).setFontSize(fontSize).setTextAlignment(TextAlignment.CENTER);
+            doc.add(p1);
+
+            // 空行
+            p1 = new Paragraph(" ");
+            doc.add(p1);
+
+            //第一段
+            Text stdName = new Text("  " + score.get("std_name") + "  ").setUnderline();
+            Text stdSex = new Text("  " + score.get("std_sex") + "  ").setUnderline();
+            Text certId = new Text("  " + score.get("cert_id") + "  ").setUnderline();
+            Text province = new Text("  " + score.get("province_name")).setUnderline();
+            Text aspectName = new Text("  " + score.get("aspect_name")+ "  ").setUnderline();
+            Text ticketNo = new Text("  " + score.get("ticket_no") + "  ").setUnderline();
+            Text examId = new Text("  " + score.get("exam_id") + "  ").setUnderline();
+            p1 = new Paragraph("考生:").add(stdName).add(",").add(stdSex).add(",").add("身份证号:").add(certId).add(",生源地:").add(province)
+                    .add(",").add("高考报名号:").add(examId)
+                    .add(",").add("报考专业:").add(aspectName).add(",").add("准考证号:").add(ticketNo).add("。")
+                    .setFontSize(fontSize).setTextAlignment(TextAlignment.LEFT).setFixedLeading(8)
+                    .setMultipliedLeading(lineHeight).setFirstLineIndent(30f);
+            doc.add(p1);
+
+            //第二段
+            String examDate = (String) score.get("exam_date");
+            String[] dates = examDate.split("-");
+            Text year = new Text("  " + dates[0] + "  ").setUnderline();
+            Text month = new Text("  " + Integer.parseInt(dates[1]) + "  ").setUnderline();
+            Text day = new Text("  " + Integer.parseInt(dates[2]) + "  ").setUnderline();
+            Text subjectName = new Text("  " + score.get("exam_subject") + "  ").setUnderline();
+            Text remark = new Text("  " + score.get("violation_remark") + "  ").setUnderline();
+            Text countryRule = new Text("  " + score.get("country_rule") + "  ").setUnderline();
+            Text schoolRule = new Text("  " + score.get("school_rule") + "  ").setUnderline();
+            p1 = new Paragraph("你在").add(year).add("年").add(month).add("月").add(day).add("日").add("参加")
+                    .add(subjectName).add("中,有").add(remark).add("的行为,").add("违反")
+                    .add(countryRule).add("和").add(schoolRule).add("规定。")
+                    .setFontSize(fontSize).setTextAlignment(TextAlignment.LEFT).setFixedLeading(8)
+                    .setMultipliedLeading(lineHeight).setFirstLineIndent(30f);
+            doc.add(p1);
+
+            //第三段
+            Text text = new Text("根据《国家教育考试违规处理办法》及《中央美术学院2024年本科招生线上考试考场规则》相关规定,拟对你作出如下处理:");
+            p1 = new Paragraph(text).setFontSize(fontSize).setTextAlignment(TextAlignment.LEFT).setFixedLeading(8)
+                    .setMultipliedLeading(lineHeight).setFirstLineIndent(30f);
+            doc.add(p1);
+
+            //第四段
+            text = new Text("所报名参加中央美术学院" + ArtParamHelper.ArtYear
+                    + "年本科招生线上考试的各阶段、各科成绩无效;3年内禁止报考(不予录取)中央美术学院;同时将违规情况报送至生源所在省级招生考试机构做进一步处理。");
+            p1 = new Paragraph(text).setFontSize(fontSize).setTextAlignment(TextAlignment.LEFT).setFixedLeading(8)
+                    .setMultipliedLeading(lineHeight).setFirstLineIndent(30f);
+            doc.add(p1);
+
+            //第五段
+            text = new Text("本次违规处理告知书采用电子送达方式,成绩查询时接受违规处理告知书,视为已送达。");
+            p1 = new Paragraph(text).setFontSize(fontSize).setTextAlignment(TextAlignment.LEFT).setFixedLeading(8)
+                    .setMultipliedLeading(lineHeight).setFirstLineIndent(30f);
+            doc.add(p1);
+
+            //第六段
+            text = new Text("对上述告知事项,你有权在接受违规处理告知书之日起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(16f));
+            ItextPdfHelper.closePdf(doc);
+
+            //更新文件下载字段
+            String sql = "update sc_score_ym set notice_file=? where cert_id=? and aspect_name=? and batch=? ";
+            scoreYmDao.updateBySql(sql, file_name, score.get("cert_id"), score.get("aspect_name"), score.get("batch"));
+
+        } catch (Exception e) {
+            try {
+                ItextPdfHelper.closePdf(doc);
+            } catch (Exception ex) {
+                LogHelper.error(ex.getMessage());
+            }
+            file.delete();
+        }
+        return file;
     }
 
     public static File makeReviewLog(ScScoreYmDao scoreYmDao, ScScoreYm score) {

+ 11 - 1
src/cn/hmsoft/art/service/score/ScScoreYmViolationService.java

@@ -40,7 +40,7 @@ public class ScScoreYmViolationService extends ArtService {
     private LyStdTicketDao stdTicketDao;
 
     public Pager page(String query, Integer start, Integer limit, QueryOrder queryOrder) {
-        return scScoreYmViolationDao.pageViolation(query, start, limit, queryOrder);
+        return scScoreYmViolationDao.pageViolation(query, start, limit, queryOrder, "first");
     }
 
     public void upload(List<List<String>> values, FrameOptr optr) {
@@ -57,6 +57,7 @@ public class ScScoreYmViolationService extends ArtService {
             String violation_remark = list.get(7) == null ? null : list.get(7).trim();
             String country_rule = list.get(8) == null ? null : list.get(8).trim();
             String school_rule = list.get(9) == null ? null : list.get(9).trim();
+            String batch = list.get(10) == null ? null : list.get(10).trim();
 
             if (StringHelper.isEmpty(std_name)) {
                 throw new BusinessException("第【" + row + "】行,考生姓名不能为空");
@@ -157,6 +158,13 @@ public class ScScoreYmViolationService extends ArtService {
                 throw new BusinessException("第【" + row + "】行,学校处理办法过长");
             }
 
+            if(StringHelper.isEmpty(batch)) {
+                throw new BusinessException("第【" + row + "】行,批次不能为空");
+            }
+            if(!batch.equals("初试") && !batch.equals("复试")) {
+                throw new BusinessException("第【" + row + "】行,批次填写错误 只能为初试或复试");
+            }
+
             //判断是否已经存在
             ScScoreYmViolation existViolation = scScoreYmViolationDao.findByCertAndAspect(cert_id, aspect_name);
             if (existViolation != null) {
@@ -167,6 +175,7 @@ public class ScScoreYmViolationService extends ArtService {
                 existViolation.setViolation_remark(violation_remark);
                 existViolation.setCountry_rule(country_rule);
                 existViolation.setSchool_rule(school_rule);
+                existViolation.setBatch(batch.equals("初试") ? "first" : "final");
                 scScoreYmViolationDao.update(existViolation);
             } else {
                 ScScoreYmViolation violation = new ScScoreYmViolation();
@@ -180,6 +189,7 @@ public class ScScoreYmViolationService extends ArtService {
                 violation.setViolation_remark(violation_remark);
                 violation.setCountry_rule(country_rule);
                 violation.setSchool_rule(school_rule);
+                violation.setBatch(batch.equals("初试") ? "first" : "final");
                 scScoreYmViolationDao.insert(violation);
             }
             row++;