From 7a801892626a895bb9b259e68074e91d252f76cc Mon Sep 17 00:00:00 2001 From: huababa1 <2037205722@qq.com> Date: Thu, 11 Sep 2025 13:51:02 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E6=9C=AA?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exam/exam/service/wpsword/docx4j/DocxMaster.java | 6 +++--- .../exam/service/wpsword/docx4j/paragraph/Paragraphs.java | 2 +- .../exam/exam/service/wpsword/docx4j/paragraph/RunText.java | 4 ---- src/main/resources/mapper/error/ExamErrorQuestionMapper.xml | 2 +- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/example/exam/exam/service/wpsword/docx4j/DocxMaster.java b/src/main/java/com/example/exam/exam/service/wpsword/docx4j/DocxMaster.java index 874f4af..c7c9270 100644 --- a/src/main/java/com/example/exam/exam/service/wpsword/docx4j/DocxMaster.java +++ b/src/main/java/com/example/exam/exam/service/wpsword/docx4j/DocxMaster.java @@ -9,6 +9,7 @@ import com.example.exam.exam.service.wpsword.docx4j.paragraph.Paragraphs; import com.example.exam.exam.service.wpsword.docx4j.paragraph.RunText; import com.example.exam.exam.service.wpsword.docx4j.section.SectionPage; import com.example.exam.exam.service.wpsword.docx4j.table.TableIng; +import com.example.exam.exam.service.wpsword.docx4j.text.TextInfo; import com.example.exam.exam.service.wpsword.docx4j.utils.WpsWordNameSpaces; import com.example.exam.exam.service.wpsword.docx4j.utils.XmlUtil; import com.example.exam.exam.service.wpsword.docx4j.vo.JudgementWordsVO; @@ -146,7 +147,7 @@ public class DocxMaster { ++i; SectPr sectPr = section.getSectPr(); - if (sectPr != null && firstName.contains("节")) { + if (sectPr != null && firstName.contains("节")) { if (i == Integer.parseInt(indexParm)) { // 构造一个伪段落,包裹 sectPr 传入方法 P dummyP = new P(); @@ -462,7 +463,7 @@ public class DocxMaster { if (anchor != null) { // 反射调用文本框处理方法(传 Anchor) - Class textClass = pc.exam.pp.module.judgement.utils.wps_word.docx4j.text.TextInfo.class; + Class textClass = TextInfo.class; String value = null; try { Method method = textClass.getMethod(function, List.class, @@ -634,7 +635,6 @@ public class DocxMaster { e.printStackTrace(); } - break; // 找到指定表格就退出 } diff --git a/src/main/java/com/example/exam/exam/service/wpsword/docx4j/paragraph/Paragraphs.java b/src/main/java/com/example/exam/exam/service/wpsword/docx4j/paragraph/Paragraphs.java index 72fe8cd..d9bff5c 100644 --- a/src/main/java/com/example/exam/exam/service/wpsword/docx4j/paragraph/Paragraphs.java +++ b/src/main/java/com/example/exam/exam/service/wpsword/docx4j/paragraph/Paragraphs.java @@ -1,4 +1,4 @@ -package pc.exam.pp.module.judgement.utils.wps_word.docx4j.paragraph; +package com.example.exam.exam.service.wpsword.docx4j.paragraph; import com.example.exam.exam.service.wpsword.docx4j.paragraph.Convert; import com.example.exam.exam.service.wpsword.docx4j.utils.ColorUtils; diff --git a/src/main/java/com/example/exam/exam/service/wpsword/docx4j/paragraph/RunText.java b/src/main/java/com/example/exam/exam/service/wpsword/docx4j/paragraph/RunText.java index 1b47a84..bccf7eb 100644 --- a/src/main/java/com/example/exam/exam/service/wpsword/docx4j/paragraph/RunText.java +++ b/src/main/java/com/example/exam/exam/service/wpsword/docx4j/paragraph/RunText.java @@ -330,8 +330,6 @@ public class RunText { if (run == null) continue; RPr rPr = run.getRPr(); if (rPr != null && rPr.getU() != null && rPr.getU().getColor() != null) { - System.out.println("============================================================"); - System.out.println(ColorUtils.getChineseColorName(rPr.getU().getColor())+"''''''''''''''''''''''''''''''''''''"); return ColorUtils.getChineseColorName(rPr.getU().getColor()); } } @@ -345,8 +343,6 @@ public class RunText { Style style = stylePart.getStyleById(styleId); if (style != null && style.getRPr() != null && style.getRPr().getU() != null && style.getRPr().getU().getColor() != null) { - System.out.println("============================================================"); - System.out.println(ColorUtils.getChineseColorName(style.getRPr().getU().getColor())); return ColorUtils.getChineseColorName(style.getRPr().getU().getColor()); } } catch (Exception e) { diff --git a/src/main/resources/mapper/error/ExamErrorQuestionMapper.xml b/src/main/resources/mapper/error/ExamErrorQuestionMapper.xml index 1778fc9..b9ed7e9 100644 --- a/src/main/resources/mapper/error/ExamErrorQuestionMapper.xml +++ b/src/main/resources/mapper/error/ExamErrorQuestionMapper.xml @@ -4,7 +4,7 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + DELETE FROM exam_error_question WHERE qu_id = #{quId}