diff --git a/exam-module-exam/exam-module-exam-biz/pom.xml b/exam-module-exam/exam-module-exam-biz/pom.xml
index 9aa338e5..e05a08b2 100644
--- a/exam-module-exam/exam-module-exam-biz/pom.xml
+++ b/exam-module-exam/exam-module-exam-biz/pom.xml
@@ -127,7 +127,61 @@
org.apache.tika
tika-core
+
+
+ org.apache.poi
+ poi
+ 4.1.2
+
+
+ org.apache.poi
+ poi-ooxml
+ 4.1.2
+
+
+
+ org.apache.poi
+ ooxml-schemas
+ 1.4
+
+
+
+ cn.afterturn
+ easypoi-base
+ 4.4.0
+
+
+ org.apache.poi
+ poi
+
+
+
+ org.apache.poi
+ poi-ooxml
+
+
+ org.apache.poi
+ ooxml-schemas
+
+
+
+
+
+
+
+
+
+ org.apache.commons
+ commons-imaging
+ 1.0-alpha3
+
+
+
+ com.adobe.xmp
+ xmpcore
+ 6.1.11
+
diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/EducationPaperController.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/EducationPaperController.java
index 95ed42de..6cb0369c 100644
--- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/EducationPaperController.java
+++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/EducationPaperController.java
@@ -123,12 +123,12 @@ public class EducationPaperController
}
/**
- * 根据方案获取试卷
+ * 根据方案获取试卷下拉
*/
@GetMapping(value = "/getPaperByTaskId")
public CommonResult getPaperByTaskId(@RequestParam(value = "taskId") String taskId)
{
- return CommonResult.success(educationPaperService.selectPaperByTaskId(taskId));
+ return CommonResult.success(educationPaperService.selectPaperIdAndNumByTaskId(taskId));
}
@@ -216,4 +216,17 @@ public class EducationPaperController
return CommonResult.success(pageResult);
}
+
+ /**
+ * 下载试卷
+ * @param paperIds
+ * @return
+ */
+ @GetMapping("/addUpload/{paperIds}")
+ public void downLoad(@PathVariable String[] paperIds, HttpServletResponse response) throws Exception {
+ educationPaperService.downloadWord(paperIds,response);
+ }
+
+
+
}
diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/dto/PaperIdAndNum.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/dto/PaperIdAndNum.java
new file mode 100644
index 00000000..999c3461
--- /dev/null
+++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/dto/PaperIdAndNum.java
@@ -0,0 +1,13 @@
+package pc.exam.pp.module.exam.controller.admin.paper.dto;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class PaperIdAndNum {
+ private String num;
+ private String paperId;
+}
diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/EducationPaperScheme.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/EducationPaperScheme.java
index 2a13f6ee..b4201f4b 100644
--- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/EducationPaperScheme.java
+++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/EducationPaperScheme.java
@@ -73,6 +73,11 @@ public class EducationPaperScheme
// @Excel(name = "小计分数")
private String subtotalScore;
+ /**
+ * 试卷呆鹅题号
+ */
+ @TableField(exist = false)
+ private String upperCase;
}
diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/mysql/paper/EducationPaperMapper.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/mysql/paper/EducationPaperMapper.java
index 50555437..b80ebf1c 100644
--- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/mysql/paper/EducationPaperMapper.java
+++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/mysql/paper/EducationPaperMapper.java
@@ -2,6 +2,7 @@ package pc.exam.pp.module.exam.dal.mysql.paper;
import java.util.List;
+import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -9,6 +10,7 @@ import pc.exam.pp.framework.common.pojo.PageResult;
import pc.exam.pp.framework.mybatis.core.mapper.BaseMapperX;
import pc.exam.pp.framework.mybatis.core.query.LambdaQueryWrapperX;
import pc.exam.pp.module.exam.controller.admin.paper.dto.EducationPaperStuDto;
+import pc.exam.pp.module.exam.controller.admin.paper.dto.PaperIdAndNum;
import pc.exam.pp.module.exam.controller.admin.paper.vo.PaperPageVo;
import pc.exam.pp.module.exam.controller.admin.paper.vo.PaperTaskPageVo;
import pc.exam.pp.module.exam.dal.dataobject.EducationPaper;
@@ -93,7 +95,7 @@ public interface EducationPaperMapper extends BaseMapperX
String selectTaskIdByPaperId(String paperId);
- List selectPaperByTaskId(String taskId);
+ List selectPaperByTaskId(String taskId);
public int updateEducationByids(@Param("strings")List strings);
@@ -129,5 +131,8 @@ public interface EducationPaperMapper extends BaseMapperX
.eq(EducationPaper::getStatus, 0)
);
}
+
+ List selectPaperIdAndNumByTaskId(String taskId);
+
}
diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperServiceImpl.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperServiceImpl.java
index 6a4279da..9ee9caf7 100644
--- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperServiceImpl.java
+++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperServiceImpl.java
@@ -1,6 +1,9 @@
package pc.exam.pp.module.exam.service.paper;
+import cn.afterturn.easypoi.word.WordExportUtil;
+import jakarta.servlet.http.HttpServletResponse;
+import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -9,6 +12,7 @@ import pc.exam.pp.framework.security.core.util.SecurityFrameworkUtils;
import pc.exam.pp.framework.tenant.core.aop.TenantIgnore;
import pc.exam.pp.framework.tenant.core.context.TenantContextHolder;
import pc.exam.pp.module.exam.controller.admin.paper.dto.EducationPaperStuDto;
+import pc.exam.pp.module.exam.controller.admin.paper.dto.PaperIdAndNum;
import pc.exam.pp.module.exam.controller.admin.paper.vo.ExamPaperVo;
import pc.exam.pp.module.exam.controller.admin.paper.vo.PaperPageVo;
import pc.exam.pp.module.exam.controller.admin.paper.vo.StuInfoPaper;
@@ -18,6 +22,10 @@ import pc.exam.pp.module.exam.dal.mysql.question.ExamQuestionMapper;
import pc.exam.pp.module.exam.dal.mysql.question.SysFileMapper;
import pc.exam.pp.module.exam.utils.uuid.IdUtils;
+import java.io.File;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.sql.Time;
import java.util.*;
import static pc.exam.pp.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
@@ -456,6 +464,70 @@ public class EducationPaperServiceImpl implements IEducationPaperService
}
+ @Override
+ public void downloadWord(String[] paperIds, HttpServletResponse response) throws Exception {
+
+ String paperId1 = paperIds[0];
+ EducationPaper educationPaper = educationPaperMapper.selectEducationPaperByPaperId(paperId1);
+ String taskId = educationPaper.getTaskId();
+ EducationPaperParam educationPaperParam = educationPaperParamMapper.selectEducationPaperParamByTaskId(taskId);
+ List educationPaperSchemes = educationPaperSchemeMapper.selectEducationPaperTaskByTaskId(taskId);
+
+ String[] chineseNumbers = {"一", "二", "三", "四", "五", "六", "七", "八", "九", "十","十一","十二","十三","十四","十五","十六","十七","十八","十九","二十"};
+
+ for (int i = 0; i < educationPaperSchemes.size(); i++) {
+ if (i < chineseNumbers.length) {
+ educationPaperSchemes.get(i).setUpperCase((chineseNumbers[i]));
+ } else {
+ // 超过十个后可以追加逻辑,比如用“第十一”、“第十二”……
+ educationPaperSchemes.get(i).setUpperCase("第" + (i + 1) + "项");
+ }
+ }
+
+
+ //获取模板文档
+ String wordpath="/word/试卷1.docx";
+ String homeDir = System.getProperty("user.dir");
+ String wordrealpath=homeDir +wordpath;
+ File realPath = new File(wordrealpath);
+ //准备数据
+ Map params =new HashMap<>();
+
+ params.put("paperNum",educationPaper.getNum());
+ //获得考试时常
+ Time time = educationPaperParam.getExamTime();
+ int hours = time.getHours();
+ int minutes = time.getMinutes();
+ int totalMinutes = hours * 60 + minutes;
+
+
+
+ params.put("paperTime",totalMinutes);
+ params.put("paperScore",educationPaper.getPaperScore());
+ params.put("Schemes",educationPaperSchemes);
+ XWPFDocument word = WordExportUtil.exportWord07(realPath.getPath(),params);
+ System.out.println("wordxwpdf"+word);
+ String filename = educationPaper.getNum()+".docx";
+
+ response.setHeader("Content-disposition","attachment;filename:"+new String(filename.getBytes(),"UTF-8"));
+ response.setContentType("application/vnd.openxmlformats-officedocument.wordprocessingml.document");
+
+
+ try {
+ System.out.println("文件"+filename);
+ word.write(response.getOutputStream());
+
+ }catch(Exception e) {
+ e.printStackTrace();
+ System.out.println("错误"+e.getMessage());
+ }
+ }
+
+ @Override
+ public List selectPaperIdAndNumByTaskId(String taskId) {
+ return educationPaperMapper.selectPaperIdAndNumByTaskId(taskId);
+ }
+
}
diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/IEducationPaperService.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/IEducationPaperService.java
index 11429965..72b587b5 100644
--- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/IEducationPaperService.java
+++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/IEducationPaperService.java
@@ -1,14 +1,18 @@
package pc.exam.pp.module.exam.service.paper;
+import jakarta.servlet.http.HttpServletResponse;
import pc.exam.pp.framework.common.pojo.PageResult;
import pc.exam.pp.module.exam.controller.admin.paper.dto.EducationPaperStuDto;
+import pc.exam.pp.module.exam.controller.admin.paper.dto.PaperIdAndNum;
import pc.exam.pp.module.exam.controller.admin.paper.vo.ExamPaperVo;
import pc.exam.pp.module.exam.controller.admin.paper.vo.PaperPageVo;
import pc.exam.pp.module.exam.dal.dataobject.PaperListResponseVo;
import pc.exam.pp.module.exam.dal.dataobject.EducationPaper;
+import java.io.UnsupportedEncodingException;
import java.util.List;
+import java.util.Map;
/**
* 试卷Service接口
@@ -92,5 +96,11 @@ public interface IEducationPaperService
PageResult selectStuEducationPaperList(PaperPageVo paperPageVo);
ExamPaperVo stuInfoPaper(String taskid);
+
+ void downloadWord(String[] paperIds, HttpServletResponse response) throws Exception;
+
+
+ List selectPaperIdAndNumByTaskId(String taskId);
+
}
diff --git a/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperMapper.xml b/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperMapper.xml
index 8babb58f..18d98098 100644
--- a/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperMapper.xml
+++ b/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperMapper.xml
@@ -21,6 +21,11 @@
+
+
+
+
+
@@ -119,6 +124,9 @@ select task_id from education_paper where paper_id=#{paperId}
+
diff --git a/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperSchemeMapper.xml b/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperSchemeMapper.xml
index c97029a6..b650a959 100644
--- a/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperSchemeMapper.xml
+++ b/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperSchemeMapper.xml
@@ -42,7 +42,7 @@
where scheme_id = #{schemeId}
diff --git a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/Wps/WordController.java b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/Wps/WordController.java
index 956e9d0b..dacc0220 100644
--- a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/Wps/WordController.java
+++ b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/Wps/WordController.java
@@ -75,4 +75,11 @@ public class WordController {
return success(BeanUtils.toBean(word, WordRespVO.class));
}
+ @GetMapping("/listInfo")
+ @Operation(summary = "获取wps_word子数据列表")
+ public CommonResult> getWordInfoList(WordListReqVO reqVO) {
+ List list = wpsWordLinkService.getWordInfoList(reqVO);
+ return success(BeanUtils.toBean(list, WordRespVO.class));
+ }
+
}
diff --git a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/Wps/WpsController.java b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/Wps/WpsController.java
index 09c4938b..4eccd1a9 100644
--- a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/Wps/WpsController.java
+++ b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/Wps/WpsController.java
@@ -4,10 +4,10 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
import pc.exam.pp.framework.common.pojo.CommonResult;
+import pc.exam.pp.module.judgement.controller.admin.Wps.dto.WpsWordJudgementDto;
+import pc.exam.pp.module.judgement.controller.admin.Wps.dto.WpsWordReqDto;
import pc.exam.pp.module.judgement.service.wps_excel.JudgementWpsExcelService;
import pc.exam.pp.module.judgement.service.wps_pptx.JudgementWpsPptxService;
import pc.exam.pp.module.judgement.service.wps_word.JudgementWpsWordService;
@@ -16,6 +16,7 @@ import pc.exam.pp.module.judgement.utils.wps_excel.vo.xlsx_all.XlsxAllDataReqVo;
import pc.exam.pp.module.judgement.utils.wps_excel.vo.xlsx_drawing.XlsxInfoVo;
import pc.exam.pp.module.judgement.utils.wps_excel.vo.xlsx_style.XlsxStyleVO;
import pc.exam.pp.module.judgement.utils.wps_pptx.vo.PptxVO;
+import pc.exam.pp.module.judgement.utils.wps_word.vo.WordInfoReqVo;
import pc.exam.pp.module.judgement.utils.wps_word.vo.WordVO;
import java.util.List;
@@ -28,7 +29,7 @@ import java.util.List;
@RestController
@RequestMapping("/tool/wps")
-@Tag( name = "wps相关操作")
+@Tag( name = "测试判分 - wps相关操作")
@Validated
public class WpsController {
@@ -42,25 +43,26 @@ public class WpsController {
* wps word
* @return 判分
*/
- @GetMapping("/run_wps_word")
- public CommonResult> run_wps_word(String path) throws Exception {
- return CommonResult.success(judgementWpsWordService.programmingWpsWord(path));
- }
- /**
- * wps pptx
- * @return 判分
- */
- @GetMapping("/run_wps_pptx")
- public CommonResult> run_wps_pptx(String path) throws Exception {
- return CommonResult.success(judgementWpsPptxService.programmingWpsPptx(path));
- }
- /**
- * wps xlsx
- * @return 判分
- */
- @GetMapping("/run_wps_xlsx")
- public CommonResult> run_wps_xlsx(String path) throws Exception {
- return CommonResult.success(judgementWpsExcelService.programmingWpsExcel(path));
+ @PostMapping("/runWpsWordInfo")
+ public CommonResult> runWpsWordInfo(@RequestBody List wordReqDto) throws Exception {
+ return CommonResult.success(judgementWpsWordService.programmingInfo(wordReqDto));
}
+ /**
+ * wps word
+ * @return 判分
+ */
+ @GetMapping("/runWpsWord")
+ public CommonResult> runWpsWord(String path) throws Exception {
+ return CommonResult.success(judgementWpsWordService.programmingWpsWord(path));
+ }
+// /**
+// * wps xlsx
+// * @return 判分
+// */
+// @GetMapping("/run_wps_xlsx")
+// public CommonResult> run_wps_xlsx(String path) throws Exception {
+// return CommonResult.success(judgementWpsExcelService.programmingWpsExcel(path));
+// }
+
}
diff --git a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/Wps/dto/WpsWordChineseFunctionDto.java b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/Wps/dto/WpsWordChineseFunctionDto.java
new file mode 100644
index 00000000..f83b4c0d
--- /dev/null
+++ b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/Wps/dto/WpsWordChineseFunctionDto.java
@@ -0,0 +1,14 @@
+package pc.exam.pp.module.judgement.controller.admin.Wps.dto;
+
+import lombok.Data;
+
+/**
+ * @author REN
+ */
+@Data
+public class WpsWordChineseFunctionDto {
+
+ private String chineseName;
+ private String function;
+
+}
diff --git a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/Wps/dto/WpsWordJudgementDto.java b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/Wps/dto/WpsWordJudgementDto.java
new file mode 100644
index 00000000..3b788742
--- /dev/null
+++ b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/Wps/dto/WpsWordJudgementDto.java
@@ -0,0 +1,12 @@
+package pc.exam.pp.module.judgement.controller.admin.Wps.dto;
+
+import lombok.Data;
+
+/**
+ * @author REN
+ */
+@Data
+public class WpsWordJudgementDto {
+ private String function;
+ private String contentIn;
+}
diff --git a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/Wps/dto/WpsWordReqDto.java b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/Wps/dto/WpsWordReqDto.java
new file mode 100644
index 00000000..77e4c858
--- /dev/null
+++ b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/Wps/dto/WpsWordReqDto.java
@@ -0,0 +1,19 @@
+package pc.exam.pp.module.judgement.controller.admin.Wps.dto;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author REN
+ */
+@Data
+public class WpsWordReqDto {
+
+ private String chineseName;
+ private String englishName;
+ private String filePath;
+ private String type;
+ private List function;
+
+}
diff --git a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/Wps/vo/WordListReqVO.java b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/Wps/vo/WordListReqVO.java
index befd2965..e935a712 100644
--- a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/Wps/vo/WordListReqVO.java
+++ b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/Wps/vo/WordListReqVO.java
@@ -17,5 +17,7 @@ public class WordListReqVO {
*/
private Integer type;
+ private String nodeFunction;
+
private Integer belongTo;
}
diff --git a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/autoTools/AutoToolsController.java b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/autoTools/AutoToolsController.java
index 45327080..33f47e13 100644
--- a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/autoTools/AutoToolsController.java
+++ b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/autoTools/AutoToolsController.java
@@ -24,6 +24,9 @@ import pc.exam.pp.module.judgement.service.wps_word.JudgementWpsWordService;
import java.util.List;
+/**
+ * @author REN
+ */
@RestController
@RequestMapping("/tool")
@Tag( name = "测试判分")
@@ -53,7 +56,7 @@ public class AutoToolsController {
@GetMapping("/getTest")
public double gets(StuPaperReqVo stuPaperReqVo) throws Exception {
ExamQuestion examQuestion = examQuestionService.selectExamQuestionByQuId(stuPaperReqVo.getPaperId());
- return judgementWpsWordService.judgementWpsWord(15.0, "D:\\", "D:\\文档.docx", examQuestion);
+ return judgementWpsWordService.judgementWpsWord(15.0, "D:\\", "D:\\stu\\wps_word\\9f7d8f5d7c68cc2bfd03a23c19045efe7ba13a4bebeb833abece146908bcd0c6.docx", examQuestion);
}
@GetMapping("/getTests")
public double getss(StuPaperReqVo stuPaperReqVo) throws Exception {
diff --git a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/dal/mysql/wpsword/WpsWordLinkMapper.java b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/dal/mysql/wpsword/WpsWordLinkMapper.java
index 5338e04f..1594f148 100644
--- a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/dal/mysql/wpsword/WpsWordLinkMapper.java
+++ b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/dal/mysql/wpsword/WpsWordLinkMapper.java
@@ -17,6 +17,7 @@ public interface WpsWordLinkMapper extends BaseMapperX {
return selectList(new LambdaQueryWrapperX()
.likeIfPresent(WpsWordLinkDO::getName, reqVO.getName())
.eq(reqVO.getBelongTo() != null, WpsWordLinkDO::getBelongTo, reqVO.getBelongTo())
+ .eq(reqVO.getNodeFunction() != null, WpsWordLinkDO::getNodeFunction, reqVO.getNodeFunction())
.eqIfPresent(WpsWordLinkDO::getStatus, reqVO.getStatus()));
}
@@ -24,6 +25,15 @@ public interface WpsWordLinkMapper extends BaseMapperX {
return selectOne(WpsWordLinkDO::getParentId, parentId, WpsWordLinkDO::getName, name);
}
+ default WpsWordLinkDO selectByNodeFunction(String nodeFunction) {
+ return selectOne(WpsWordLinkDO::getNodeFunction, nodeFunction);
+ }
+
+ default List selectInfoList(Long id) {
+ return selectList(new LambdaQueryWrapperX()
+ .eqIfPresent(WpsWordLinkDO::getParentId, id));
+ }
+
default Long selectCountByParentId(Long parentId) {
return selectCount(WpsWordLinkDO::getParentId, parentId);
}
diff --git a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/service/c_programming/JudgementServiceImpl.java b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/service/c_programming/JudgementServiceImpl.java
index 9d27657e..98fe0f58 100644
--- a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/service/c_programming/JudgementServiceImpl.java
+++ b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/service/c_programming/JudgementServiceImpl.java
@@ -113,7 +113,7 @@ public class JudgementServiceImpl implements JudgementService
// 如果使用程序编译,进行程序编译
LogFileUtils.writeLine("✅ 正在使用-std=c99进行编译...");
// 使用C99 运行并得出结果
- String code_return = JudgementCUtils.run_code(code,null,"-std=c99", "编译通过运行");
+ String code_return = JudgementCUtils.run_code(pathC,code,null,"-std=c99", "编译通过运行");
if (!code_return.contains("error")) {
// 编译没有报错,加上编译分数
totalScore += pass_score;
@@ -133,7 +133,7 @@ public class JudgementServiceImpl implements JudgementService
LogFileUtils.writeLine("✅ 使用测试用例进行判分...");
for (ExamQuestionAnswer examQuestionAnswer : examQuestion.getAnswerList()) {
// 使用C99 运行并得出结果
- String code_return = JudgementCUtils.run_code(code, examQuestionAnswer.getContentIn(),"-std=c99",null);
+ String code_return = JudgementCUtils.run_code(pathC,code, examQuestionAnswer.getContentIn(),"-std=c99",null);
String actual = code_return.trim();
String expected = examQuestionAnswer.getContent().trim();
if (actual.equals(expected)) {
diff --git a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/service/wps_word/JudgementWpsWordService.java b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/service/wps_word/JudgementWpsWordService.java
index ba9072d6..1ed85705 100644
--- a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/service/wps_word/JudgementWpsWordService.java
+++ b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/service/wps_word/JudgementWpsWordService.java
@@ -3,6 +3,9 @@ package pc.exam.pp.module.judgement.service.wps_word;
import pc.exam.pp.module.exam.dal.dataobject.ExamQuestion;
+import pc.exam.pp.module.judgement.controller.admin.Wps.dto.WpsWordJudgementDto;
+import pc.exam.pp.module.judgement.controller.admin.Wps.dto.WpsWordReqDto;
+import pc.exam.pp.module.judgement.utils.wps_word.vo.WordInfoReqVo;
import pc.exam.pp.module.judgement.utils.wps_word.vo.WordVO;
import java.math.BigDecimal;
@@ -21,8 +24,9 @@ public interface JudgementWpsWordService {
* @return 文件内得考点及描述
* @throws Exception 异常
*/
- List programmingWpsWord(String path) throws Exception;
+ List programmingWpsWord(String path) throws Exception;
+ List programmingInfo(List wpsWordReqDtos) throws Exception;
/**
diff --git a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/service/wps_word/JudgementWpsWordServiceImpl.java b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/service/wps_word/JudgementWpsWordServiceImpl.java
index f97e1ed7..35ccda75 100644
--- a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/service/wps_word/JudgementWpsWordServiceImpl.java
+++ b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/service/wps_word/JudgementWpsWordServiceImpl.java
@@ -9,14 +9,19 @@ import pc.exam.pp.module.exam.dal.dataobject.ExamQuestionAnswer;
import pc.exam.pp.module.exam.utils.file.LogFileUtils;
import pc.exam.pp.module.infra.dal.dataobject.config.ConfigDO;
import pc.exam.pp.module.infra.service.config.ConfigService;
+import pc.exam.pp.module.judgement.controller.admin.Wps.dto.WpsWordChineseFunctionDto;
+import pc.exam.pp.module.judgement.controller.admin.Wps.dto.WpsWordJudgementDto;
+import pc.exam.pp.module.judgement.controller.admin.Wps.dto.WpsWordReqDto;
import pc.exam.pp.module.judgement.controller.admin.Wps.vo.WordListReqVO;
import pc.exam.pp.module.judgement.dal.dataobject.wpsword.WpsWordLinkDO;
import pc.exam.pp.module.judgement.dal.mysql.wpsword.WpsWordLinkMapper;
import pc.exam.pp.module.judgement.service.auto_tools.AutoToolsService;
import pc.exam.pp.module.judgement.utils.wps_word.WpsWordUtils;
+import pc.exam.pp.module.judgement.utils.wps_word.vo.WordInfoReqVo;
import pc.exam.pp.module.judgement.utils.wps_word.vo.WordVO;
import java.io.File;
+import java.util.ArrayList;
import java.util.List;
@Service
@@ -32,61 +37,82 @@ public class JudgementWpsWordServiceImpl implements JudgementWpsWordService {
ConfigService configService;
@Override
- public List programmingWpsWord(String path) throws Exception {
+ public List programmingWpsWord(String path) throws Exception {
// 1、获取文件临时下载路径
- ConfigDO config = configService.getConfigByKey("file_down_path");
+ ConfigDO config = configService.getConfigByKey("file_down_wps_word_path");
// 2、下载文件并返回文件完整路径
String pathName = autoToolsService.downloadStudentFile(path, config.getValue());
// 3、创建word考点tree
- WordListReqVO wordListReqVO = new WordListReqVO();
- wordListReqVO.setBelongTo(0);
- // 3-1、查询段落的标签
- List paragraphList = wpsWordLinkMapper.selectList(wordListReqVO);
- // 3-2、查询锚点的标签
- wordListReqVO.setBelongTo(3);
- List anchorList = wpsWordLinkMapper.selectList(wordListReqVO);
+// WordListReqVO wordListReqVO = new WordListReqVO();
+// wordListReqVO.setBelongTo(0);
+// // 3-1、查询段落的标签
+// List paragraphList = wpsWordLinkMapper.selectList(wordListReqVO);
+// // 3-2、查询锚点的标签
+// wordListReqVO.setBelongTo(3);
+// List anchorList = wpsWordLinkMapper.selectList(wordListReqVO);
// 4、docx文件读取并返回考点及说明信息
- List margins = WpsWordUtils.wps_word(pathName, paragraphList, anchorList);
+ List margins = WpsWordUtils.wpWord(pathName);
// 5、已经读取完得考点删除源文件
- File file = new File(pathName);
- file.delete();
+// File file = new File(pathName);
+// file.delete();
return margins;
}
+ @Override
+ public List programmingInfo(List wordReqDto) throws Exception {
+// List functionList = new ArrayList<>();
+// for (String function : wordReqDto.getFunction()) {
+// WpsWordChineseFunctionDto functionDto = new WpsWordChineseFunctionDto();
+// functionDto.setFunction(function);
+// WpsWordLinkDO wpsWordLinkDO = wpsWordLinkMapper.selectByNodeFunction(function);
+// functionDto.setChineseName(wpsWordLinkDO.getToChinese());
+// functionList.add(functionDto);
+// }
+ List judgementDtos = WpsWordUtils.getWordInfo(wordReqDto);
+ return judgementDtos;
+ }
+
@Override
public double judgementWpsWord(double sorce, String pathC, String path, ExamQuestion examQuestion) throws Exception {
// 创建log文件txt,用于记录
- File pathCDir = new File(pathC);
- File parentDir = pathCDir.getParentFile();
-
- // 拼接同级目录下的目标文件路径
- String targetFilePath = new File(parentDir, "WPS_Word判分过程.txt").getPath();
- LogFileUtils.createFile(targetFilePath);
+ LogFileUtils.createFile(pathC + "/WPS_Word判分过程.txt");
LogFileUtils.writeLine("✅ 开始WPS_Word判分");
double wps_word_sorce = 0;
- // 1、查询Word考点tree
- WordListReqVO wordListReqVO = new WordListReqVO();
- wordListReqVO.setBelongTo(0);
- // 3-1、查询段落的标签
- List paragraphList = wpsWordLinkMapper.selectList(wordListReqVO);
- // 3-2、查询锚点的标签
- wordListReqVO.setBelongTo(3);
- List anchorList = wpsWordLinkMapper.selectList(wordListReqVO);
// 2、docx文件读取并返回考点及说明信息
- List margins = WpsWordUtils.wps_word(path, paragraphList, anchorList);
+// List margins = WpsWordUtils.wps_word(path);
// 3、获取答案得组成
List answerList = examQuestion.getAnswerList();
// 4、进行关联判断
for (ExamQuestionAnswer examQuestionAnswer : answerList) {
+ // 拆分数据、
+ String[] wordInfos = examQuestionAnswer.getContent().split("-/");
+ String[] chineseName = examQuestionAnswer.getContentIn().split("-");
+ // 创建拼接数据
+ // 只取三层结构
+ List wordReqDto = new ArrayList<>();
+ WpsWordReqDto wpsWordReqDto = new WpsWordReqDto();
+ wpsWordReqDto.setChineseName(chineseName[0]);
+ wpsWordReqDto.setEnglishName(wordInfos[0]);
+ wpsWordReqDto.setType(wordInfos[0]);
+ wpsWordReqDto.setFilePath(path);
+ List functionList = new ArrayList<>();
+ for (int i = 1; i < 3; i++) {
+ WpsWordChineseFunctionDto functionDto = new WpsWordChineseFunctionDto();
+ functionDto.setFunction("/" + wordInfos[i]);
+ functionDto.setChineseName(chineseName[i]);
+ functionList.add(functionDto);
+ }
+ wpsWordReqDto.setFunction(functionList);
+ wordReqDto.add(wpsWordReqDto);
+ List judgementDtos = WpsWordUtils.getWordInfo(wordReqDto);
boolean flag = false;
double one_sorce = 0;
- for (WordVO wordVO : margins) {
- if (wordVO.getExamKeynote() != null) {
-
- for (String str : wordVO.getExamKeynote()) {
+ for (WpsWordJudgementDto wordJudgementDto : judgementDtos) {
+ if (wordJudgementDto.getFunction() != null) {
+// for (String str : wordJudgementDto.getFunction()) {
int index = 0;
- if ((index+str).equals(examQuestionAnswer.getContent())) {
+ if (wordJudgementDto.getFunction().equals(examQuestionAnswer.getContent())) {
flag = true;
// 得分 根据权重进行得分 每个选项分值 = 总分 / 总权重
@@ -98,7 +124,7 @@ public class JudgementWpsWordServiceImpl implements JudgementWpsWordService {
}
break;
}
- }
+// }
}
}
wps_word_sorce += one_sorce;
diff --git a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/service/wps_word/WpsWordLinkService.java b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/service/wps_word/WpsWordLinkService.java
index d0ae9c1e..8d87834a 100644
--- a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/service/wps_word/WpsWordLinkService.java
+++ b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/service/wps_word/WpsWordLinkService.java
@@ -61,6 +61,14 @@ public interface WpsWordLinkService {
*/
List getWordList(WordListReqVO reqVO);
+ /**
+ * 筛选节点列表
+ *
+ * @param reqVO 筛选条件请求 VO
+ * @return 节点列表
+ */
+ List getWordInfoList(WordListReqVO reqVO);
+
/**
* 获得指定编号的节点 Map
*
diff --git a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/service/wps_word/WpsWordLinkServiceImpl.java b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/service/wps_word/WpsWordLinkServiceImpl.java
index 0980469a..adacf0aa 100644
--- a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/service/wps_word/WpsWordLinkServiceImpl.java
+++ b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/service/wps_word/WpsWordLinkServiceImpl.java
@@ -170,6 +170,27 @@ public class WpsWordLinkServiceImpl implements WpsWordLinkService {
return list;
}
+ @Override
+ public List getWordInfoList(WordListReqVO reqVO) {
+ List wordList = new ArrayList<>();
+ WpsWordLinkDO data = wpsWordLinkMapper.selectByNodeFunction(reqVO.getNodeFunction());
+ if (data == null) {
+ return Collections.emptyList();
+ }
+ List wpsWordLinkDOS = wpsWordLinkMapper.selectInfoList(data.getId());
+ // 在依次判断是否还有子数据
+ for (WpsWordLinkDO wpsWordLinkDO : wpsWordLinkDOS) {
+ wordList.add(wpsWordLinkDO);
+ List datas = wpsWordLinkMapper.selectInfoList(wpsWordLinkDO.getId());
+ if (datas != null) {
+ for (WpsWordLinkDO wpsWordLinkDO1 : datas) {
+ wordList.add(wpsWordLinkDO1);
+ }
+ }
+ }
+ return wordList;
+ }
+
@Override
public List getChildWordList(Collection ids) {
List children = new LinkedList<>();
diff --git a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/utils/JudgementCUtils.java b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/utils/JudgementCUtils.java
index 8187cdea..3e0e79fe 100644
--- a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/utils/JudgementCUtils.java
+++ b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/utils/JudgementCUtils.java
@@ -66,18 +66,20 @@ public class JudgementCUtils
* @param standard 编译版本 C99
* @return 运行结果
*/
- public static String run_code(String code, String input, String standard, String text) {
+ public static String run_code(String pathC, String code, String input, String standard, String text) {
try {
boolean hasInput = code.contains("scanf") || code.contains("fgets") || code.contains("getchar");
System.out.println(System.getenv("PATH"));
+ String programC = pathC + "/program.c";
+ String programOut = pathC + "/program.out";
// 写入 C 源码到文件
- File file = new File("program.c");
+ File file = new File(programC);
try (FileWriter writer = new FileWriter(file)) {
writer.write(code);
}
// 编译代码
- ProcessBuilder compileBuilder = new ProcessBuilder("gcc", standard, "program.c", "-o", "program.out");
+ ProcessBuilder compileBuilder = new ProcessBuilder("gcc", standard, programC, "-o", programOut);
compileBuilder.redirectErrorStream(true);
Process compileProcess = compileBuilder.start();
@@ -91,7 +93,7 @@ public class JudgementCUtils
int compileResult = compileProcess.waitFor();
String outputLower = compileOutput.toString().toLowerCase();
- if (outputLower.contains("error:") || !Files.exists(Paths.get("program.out"))) {
+ if (outputLower.contains("error:") || !Files.exists(Paths.get(programOut))) {
// LogFileUtils.writeLine("❌ 编译失败:");
// LogFileUtils.writeLine(compileOutput.toString());
return "编译失败,输出:\n" + compileOutput.toString();
diff --git a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/utils/tree/TreeUtils.java b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/utils/tree/TreeUtils.java
index 0352a69f..7309cce0 100644
--- a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/utils/tree/TreeUtils.java
+++ b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/utils/tree/TreeUtils.java
@@ -3,6 +3,7 @@ package pc.exam.pp.module.judgement.utils.tree;
import pc.exam.pp.module.judgement.dal.dataobject.wpspptx.WpsPptxLinkDO;
import pc.exam.pp.module.judgement.dal.dataobject.wpsword.WpsWordLinkDO;
import pc.exam.pp.module.judgement.dal.dataobject.wpsxlsx.WpsXlsxLinkDO;
+import pc.exam.pp.module.judgement.utils.wps_word.vo.WordInfoReqVo;
import java.util.ArrayList;
import java.util.HashMap;
@@ -11,6 +12,28 @@ import java.util.Map;
public class TreeUtils {
+// public static List buildTreeWordInfo(List flatList) {
+// Map nodeMap = new HashMap<>();
+// List roots = new ArrayList<>();
+// // 先放入 map
+// for (WordInfoReqVo node : flatList) {
+// nodeMap.put(Math.toIntExact(node.getId()), node);
+// }
+//
+// // 构建树关系
+// for (WordInfoReqVo node : flatList) {
+// if (node.getParentId() == 0) {
+// roots.add(node);
+// } else {
+// WordInfoReqVo parent = nodeMap.get(node.getParentId().intValue());
+// if (parent != null) {
+// parent.getChildren().add(node);
+// }
+// }
+// }
+// return roots;
+// }
+
public static List buildTree(List flatList) {
Map nodeMap = new HashMap<>();
List roots = new ArrayList<>();
diff --git a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/utils/wps_word/WpsWordNameSpaces.java b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/utils/wps_word/WpsWordNameSpaces.java
new file mode 100644
index 00000000..9f9dc6ae
--- /dev/null
+++ b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/utils/wps_word/WpsWordNameSpaces.java
@@ -0,0 +1,35 @@
+package pc.exam.pp.module.judgement.utils.wps_word;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+@SuppressWarnings("all")
+public class WpsWordNameSpaces {
+
+ public static String getNameSpace(String xmlString) {
+ // 2、创建最全的命名空间
+ Pattern pattern = Pattern.compile("xmlns:(\\w+)=\"([^\"]+)\"");
+ Matcher matcher = pattern.matcher(xmlString);
+ Map namespaces = new HashMap<>();
+ while (matcher.find()) {
+ // 如 w, wp, a
+ String prefix = matcher.group(1);
+ // 如 http://schemas.openxmlformats.org/...
+ String uri = matcher.group(2);
+ namespaces.put(prefix, uri);
+ }
+ StringBuilder xpathBuilder = new StringBuilder();
+ namespaces.forEach((prefix, uri) ->
+ xpathBuilder.append("declare namespace ")
+ .append(prefix)
+ .append("='")
+ .append(uri)
+ .append("' ")
+ );
+ // 2-1、获取出来最全的命名空间
+ String allPathx = xpathBuilder.toString();
+ return allPathx;
+ }
+}
diff --git a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/utils/wps_word/WpsWordUtils.java b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/utils/wps_word/WpsWordUtils.java
index 0278ed57..a6a17b33 100644
--- a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/utils/wps_word/WpsWordUtils.java
+++ b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/utils/wps_word/WpsWordUtils.java
@@ -1,20 +1,272 @@
package pc.exam.pp.module.judgement.utils.wps_word;
-import jakarta.annotation.Resource;
import org.apache.poi.xwpf.usermodel.*;
import org.apache.xmlbeans.XmlCursor;
import org.apache.xmlbeans.XmlObject;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.*;
+import pc.exam.pp.module.judgement.controller.admin.Wps.dto.WpsWordChineseFunctionDto;
+import pc.exam.pp.module.judgement.controller.admin.Wps.dto.WpsWordJudgementDto;
+import pc.exam.pp.module.judgement.controller.admin.Wps.dto.WpsWordReqDto;
import pc.exam.pp.module.judgement.dal.dataobject.wpsword.WpsWordLinkDO;
-import pc.exam.pp.module.judgement.utils.tree.TreeUtils;
-import pc.exam.pp.module.judgement.utils.wps_word.vo.WordVO;
+import pc.exam.pp.module.judgement.utils.wps_word.vo.*;
+import pc.exam.pp.module.judgement.utils.zipfile.ZipXmlUtils;
+
+import javax.xml.namespace.QName;
import java.io.FileInputStream;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.IntStream;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+/**
+ * @author REN
+ */
public class WpsWordUtils {
+ public static String getStringRandom() {
+ String characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
+ Random random = new Random();
+ StringBuilder sb = new StringBuilder();
+
+ // 生成指定长度的随机字符字符串
+ for (int i = 0; i < 10; i++) {
+ int randomIndex = random.nextInt(characters.length());
+ // 随机字符
+ sb.append(characters.charAt(randomIndex));
+ }
+ return sb.toString();
+ }
+
+ public static List getWordInfo(List wpsWordReqDtos) throws Exception {
+ // 创建返回数组
+ List judgementList = new ArrayList<>();
+ // 创建文件路径数组
+ List