From a2a8908f2d9d4e19201423ff58ee23c65a8df670 Mon Sep 17 00:00:00 2001
From: yeg <1347747024@qq.com>
Date: 星期六, 29 八月 2026 20:51:10 +0800
Subject: [PATCH] 实现测试原子开始接收
---
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TTestMapper.java | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TTestMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TTestMapper.java
index 4ed76f8..47cd067 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TTestMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TTestMapper.java
@@ -1,6 +1,7 @@
package com.ruoyi.system.mapper;
import java.util.List;
+import java.util.Date;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.system.domain.TTest;
import com.ruoyi.system.domain.TTestBattery;
@@ -10,6 +11,8 @@
import com.ruoyi.system.domain.TTestPlanStep;
import com.ruoyi.system.domain.TTestResult;
import com.ruoyi.system.domain.TTestWarningThreshold;
+import com.ruoyi.system.domain.TDetectionChannel;
+import com.ruoyi.system.domain.TTestReceptionInterval;
import com.ruoyi.system.domain.vo.TestBatteryOptionVo;
import com.ruoyi.system.domain.vo.TestChannelOptionVo;
import com.ruoyi.system.domain.vo.TestCollectorOptionVo;
@@ -60,4 +63,19 @@
int insertTestAudit(@Param("testId") Long testId, @Param("eventType") String eventType,
@Param("actorId") Long actorId, @Param("actorName") String actorName,
@Param("previousValue") String previousValue, @Param("newValue") String newValue);
+
+ /** 锁定检测柜通道的最新可观测事实,供接收边界确认使用。 */
+ TDetectionChannel selectReceptionChannelForUpdate(Long channelId);
+ /** 锁定当前检测柜通道租约;返回空表示可接入。 */
+ TTestChannelBinding selectChannelLeaseForUpdate(Long channelId);
+ int insertChannelLease(@Param("channelId") Long channelId, @Param("testId") Long testId,
+ @Param("bindingId") Long bindingId, @Param("acquiredBy") Long acquiredBy,
+ @Param("acquiredAtUtc") Date acquiredAtUtc);
+ int insertCollectorChannelLease(@Param("collectorId") Long collectorId, @Param("channelCode") String channelCode,
+ @Param("testId") Long testId, @Param("bindingId") Long bindingId,
+ @Param("acquiredBy") Long acquiredBy, @Param("acquiredAtUtc") Date acquiredAtUtc);
+ boolean collectorOnline(Long collectorId);
+ int updateReceptionStarted(@Param("testId") Long testId, @Param("startedAtUtc") Date startedAtUtc,
+ @Param("updateBy") String updateBy);
+ int insertReceptionInterval(TTestReceptionInterval interval);
}
--
Gitblit v1.7.1