From 3c77645ca66d3f9ba95efcadf682adc93d89bb98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?DESKTOP-9ERGOBP=5C=E4=BB=BB=E7=BB=B4=E7=82=B3?= Date: Thu, 23 Oct 2025 17:36:18 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=20?= =?UTF-8?q?=E7=9B=91=E6=8E=A7=E7=AE=A1=E7=90=86=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E5=BC=BA=E5=88=B6=E4=BD=BF=E5=AD=A6=E7=94=9F=E7=BB=93=E6=9D=9F?= =?UTF-8?q?=E8=80=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/autoTools/AutoToolsController.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 1894ed4d..46853332 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 @@ -279,6 +279,7 @@ public class AutoToolsController { String interactiveTime = info.getInteractiveTime(); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); LocalDateTime targetTime = LocalDateTime.parse(interactiveTime, formatter); + // 获取当前时间 LocalDateTime currentTime = LocalDateTime.now(); Duration duration = Duration.between(currentTime, targetTime); // 两者相差的时间 @@ -414,9 +415,13 @@ public class AutoToolsController { * @return true */ @GetMapping("/stopExamForAdmin") - public CommonResult stopExamForAdmin(@RequestParam("userId") String userId) { + public CommonResult stopExamForAdmin(@RequestParam("userId") String userId, + @RequestParam("taskId") String taskId, + @RequestParam("paperNum") String paperNmu) { + String paperId = educationPaperService.selectPaperByPaperNum(paperNmu); + userId += "_" + taskId + "_" + paperId; // 删除对应的线程池 - taskManager.stopTaskByUserId(userId); + taskManager.stopTask(userId); return CommonResult.success(true); }