From a632c444fbcf6fd59a3085779a4298be79726745 Mon Sep 17 00:00:00 2001 From: "MSI\\letre" Date: Mon, 7 Jul 2025 22:12:59 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=20ppt+wind?= =?UTF-8?q?ows=E7=BD=91=E7=BB=9C=E8=AE=BE=E7=BD=AEbug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AutoForWinEdgeSettingServiceImpl.java | 6 ++++-- .../example/exam/exam/service/wpspptx/JudgementWpsPPT.java | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/example/exam/exam/service/autoForWinEdgeSetting/AutoForWinEdgeSettingServiceImpl.java b/src/main/java/com/example/exam/exam/service/autoForWinEdgeSetting/AutoForWinEdgeSettingServiceImpl.java index 3b7bc83..e4b33eb 100644 --- a/src/main/java/com/example/exam/exam/service/autoForWinEdgeSetting/AutoForWinEdgeSettingServiceImpl.java +++ b/src/main/java/com/example/exam/exam/service/autoForWinEdgeSetting/AutoForWinEdgeSettingServiceImpl.java @@ -184,7 +184,8 @@ public class AutoForWinEdgeSettingServiceImpl implements AutoForWinEdgeSettingSe stuPaperScoreDO.setContent(judgementStr); stuPaperScoreDO.setSort(educationPaperQu.getSort()); stuPaperScoreDO.setSubjectName("windows网络设置"); - stuPaperScoreDO.setIsTrue(oneScore == 0 ? 1 : oneScore == Double.parseDouble(quScore) ? 0 : 2); + int isTrue = oneScore == 0 ? 1 : oneScore == Double.parseDouble(quScore) ? 0 : 2; + stuPaperScoreDO.setIsTrue(isTrue); stuPaperScoreDO.setTrueScore(new BigDecimal(quScore)); stuPaperScoreDO.setTenantId(systemTenant.getId()); stuPaperScoreService.updateStuPaperScore(stuPaperScoreDO); @@ -197,7 +198,8 @@ public class AutoForWinEdgeSettingServiceImpl implements AutoForWinEdgeSettingSe insertInfo.setContent(judgementStr); insertInfo.setSort(educationPaperQu.getSort()); insertInfo.setSubjectName("windows网络设置"); - stuPaperScoreDO.setIsTrue(oneScore == 0 ? 1 : oneScore == Double.parseDouble(quScore) ? 0 : 2); + int isTrue = oneScore == 0 ? 1 : oneScore == Double.parseDouble(quScore) ? 0 : 2; + insertInfo.setIsTrue(isTrue); insertInfo.setTenantId(systemTenant.getId()); insertInfo.setTrueScore(new BigDecimal(quScore)); stuPaperScoreService.insertStuPaperScore(insertInfo); diff --git a/src/main/java/com/example/exam/exam/service/wpspptx/JudgementWpsPPT.java b/src/main/java/com/example/exam/exam/service/wpspptx/JudgementWpsPPT.java index 5a9d693..e7d7f0c 100644 --- a/src/main/java/com/example/exam/exam/service/wpspptx/JudgementWpsPPT.java +++ b/src/main/java/com/example/exam/exam/service/wpspptx/JudgementWpsPPT.java @@ -128,6 +128,9 @@ public class JudgementWpsPPT { else { // 通过递归调用 查询标签位置,可能出现得层级关系,避免出现一层不对得情况查询多个标签地址 Element element = XmlRecursiveFinder.findElement(doc, title); + if (element == null) { + return judgementList; + } List valuesList = new ArrayList<>(); if ("1".equals(isTrue)) { String value = element == null ? "否" : "是" ;