From 92f32acd847ea1700590bc669750f23ef499840e Mon Sep 17 00:00:00 2001
From: yeg <1347747024@qq.com>
Date: 星期六, 05 九月 2026 13:39:44 +0800
Subject: [PATCH] 清理旧测试结构并贯通最终业务数据链路

---
 battery-business/src/main/java/com/battery/business/service/impl/TestWarningExceptionService.java |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TestWarningExceptionService.java b/battery-business/src/main/java/com/battery/business/service/impl/TestWarningExceptionService.java
similarity index 81%
rename from ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TestWarningExceptionService.java
rename to battery-business/src/main/java/com/battery/business/service/impl/TestWarningExceptionService.java
index df120bf..3a6d632 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TestWarningExceptionService.java
+++ b/battery-business/src/main/java/com/battery/business/service/impl/TestWarningExceptionService.java
@@ -1,14 +1,14 @@
-package com.ruoyi.system.service.impl;
+package com.battery.business.service.impl;
 
 import java.math.BigDecimal;
 import java.util.Date;
 import com.alibaba.fastjson2.JSON;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-import com.ruoyi.system.domain.TTest;
-import com.ruoyi.system.domain.TTestWarningException;
-import com.ruoyi.system.domain.TTestWarningThreshold;
-import com.ruoyi.system.mapper.TTestMapper;
+import com.battery.business.domain.TTest;
+import com.battery.business.domain.TTestWarningException;
+import com.battery.business.domain.TTestWarningThreshold;
+import com.battery.business.mapper.TTestMapper;
 
 /** 对成功接收的测量值执行测试阈值判断;设备状态和缺失数据不经过此服务。 */
 @Service
@@ -26,16 +26,12 @@
         }
     }
 
-    /** 由测试负责人关闭开放异常,并在同一事务追加不可变的测试审计事实。 */
+    /** 由测试负责人关闭开放异常,处理内容保存在异常事实中。 */
     @Transactional(rollbackFor = Exception.class)
     public int close(Long exceptionId, Long actorId, String actorName, String handlingNote) {
         TTestWarningException exception = mapper.selectWarningExceptionById(exceptionId);
         if (exception == null) return 0;
         int rows = mapper.closeWarningException(exceptionId, actorId, actorName, new Date(), handlingNote);
-        if (rows == 1) {
-            mapper.insertTestAudit(exception.getTestId(), "WARNING_EXCEPTION_CLOSED", actorId, actorName, null,
-                    JSON.toJSONString(java.util.Map.of("exceptionId", exceptionId, "handlingNote", handlingNote)));
-        }
         return rows;
     }
     private boolean outside(BigDecimal value, BigDecimal min, BigDecimal max) { return (min != null && value.compareTo(min) < 0) || (max != null && value.compareTo(max) > 0); }

--
Gitblit v1.7.1