yeg
2026-08-30 20b346ef9d4fcbbbe05abfe08e4f4f0303b0812e
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TTestMapper.java
@@ -13,6 +13,7 @@
import com.ruoyi.system.domain.TTestWarningThreshold;
import com.ruoyi.system.domain.TTestCollectorSource;
import com.ruoyi.system.domain.TTestCollectorExceptionInterval;
import com.ruoyi.system.domain.TTestReceptionInterval;
import com.ruoyi.system.domain.TDetectionChannel;
import com.ruoyi.system.domain.vo.TestBatteryOptionVo;
import com.ruoyi.system.domain.vo.TestChannelOptionVo;
@@ -49,6 +50,8 @@
    List<TTestChannelBinding> selectTestChannelBindings(Long testId);
    List<TTestCollectorChannel> selectTestCollectorChannels(Long testId);
    List<TTestWarningThreshold> selectTestThresholds(Long testId);
    /** 按来源和起始边界顺序返回测试接收区间。 */
    List<TTestReceptionInterval> selectTestReceptionIntervals(Long testId);
    List<TTestResult> selectTestResults(TTestResult result);
    int countTestTypeEnabled(Long testTypeId);
    int countUserEnabled(Long userId);
@@ -75,6 +78,14 @@
    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);
    /** 为每个绑定来源追加一个开放接收区间;区间关闭后仅保留历史事实。 */
    int insertReceptionInterval(@Param("testId") Long testId, @Param("bindingId") Long bindingId,
            @Param("sourceType") String sourceType, @Param("sourceId") Long sourceId,
            @Param("sourceChannelCode") String sourceChannelCode, @Param("actionAtUtc") Date actionAtUtc,
            @Param("boundaryNote") String boundaryNote);
    /** 在停止动作事务内关闭该测试全部开放区间,返回实际关闭数量。 */
    int closeOpenReceptionIntervals(@Param("testId") Long testId, @Param("endBoundaryAtUtc") Date endBoundaryAtUtc,
            @Param("boundaryNote") String boundaryNote);
    int deleteChannelLeasesByTestId(Long testId);
    int deleteCollectorChannelLeasesByTestId(Long testId);
    int hasReceivingTestForAdapter(@Param("adapterCode") String adapterCode);