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;
|
import com.ruoyi.system.domain.TTestBatteryField;
|
import com.ruoyi.system.domain.TTestChannelBinding;
|
import com.ruoyi.system.domain.TTestCollectorChannel;
|
import com.ruoyi.system.domain.TTestPlanStep;
|
import com.ruoyi.system.domain.TTestResult;
|
import com.ruoyi.system.domain.TTestWarningThreshold;
|
import com.ruoyi.system.domain.TTestLogicStepMapping;
|
import com.ruoyi.system.domain.TDetectionChannel;
|
import com.ruoyi.system.domain.TTestDataRevisionAction;
|
import com.ruoyi.system.domain.TTestConsoleImportRecord;
|
import com.ruoyi.system.domain.TTestDataOverride;
|
import com.ruoyi.system.domain.vo.TestBatteryOptionVo;
|
import com.ruoyi.system.domain.vo.TestChannelOptionVo;
|
import com.ruoyi.system.domain.vo.TestCollectorOptionVo;
|
import com.ruoyi.system.domain.vo.TestTypeOptionVo;
|
import com.ruoyi.system.domain.vo.TestUserOptionVo;
|
|
/** 测试配置及其只追加审计的数据访问接口。 */
|
public interface TTestMapper
|
{
|
TTest selectTestById(Long testId);
|
TTest selectTestByIdForUpdate(Long testId);
|
List<TTest> selectTestList(TTest test);
|
List<TTestBattery> selectBatteryNosByTestIds(@Param("testIds") List<Long> testIds);
|
TTest selectTestByName(String testName);
|
int insertTest(TTest test);
|
int updateTest(TTest test);
|
int deleteTestById(@Param("testId") Long testId, @Param("updateBy") String updateBy);
|
int deleteTestBindingsByTestId(Long testId);
|
int deleteTestCollectorChannelsByTestId(Long testId);
|
int deleteTestPlanStepsByTestId(Long testId);
|
int deleteTestBatteriesByTestId(Long testId);
|
int deleteTestFieldsByTestId(Long testId);
|
int deleteTestThresholdsByTestId(Long testId);
|
int insertTestPlanStep(TTestPlanStep step);
|
int insertTestBattery(TTestBattery battery);
|
int insertTestBatteryField(TTestBatteryField field);
|
int insertTestChannelBinding(TTestChannelBinding binding);
|
int insertTestCollectorChannel(TTestCollectorChannel mapping);
|
int insertTestThreshold(TTestWarningThreshold threshold);
|
List<TTestPlanStep> selectTestPlanSteps(Long testId);
|
List<TTestBattery> selectTestBatteries(Long testId);
|
List<TTestBatteryField> selectTestBatteryFields(Long testId);
|
List<TTestChannelBinding> selectTestChannelBindings(Long testId);
|
List<TTestCollectorChannel> selectTestCollectorChannels(Long testId);
|
List<TTestWarningThreshold> selectTestThresholds(Long testId);
|
/** 查询当前正在接收的测试,供接收调度绑定测试事实。 */
|
List<Long> selectReceivingTestIds();
|
List<java.util.Map<String, Object>> selectPersistedRecords(@org.apache.ibatis.annotations.Param("testId") Long testId);
|
List<java.util.Map<String, Object>> selectPersistedSteps(@org.apache.ibatis.annotations.Param("testId") Long testId);
|
List<java.util.Map<String, Object>> selectPersistedCycles(@org.apache.ibatis.annotations.Param("testId") Long testId);
|
List<TTestResult> selectTestResults(TTestResult result);
|
String selectLogicStepMappingsJson(Long testId);
|
int updateLogicStepMappings(@Param("testId") Long testId, @Param("mappingsJson") String mappingsJson,
|
@Param("updateBy") String updateBy, @Param("updateTime") Date updateTime);
|
int countTestTypeEnabled(Long testTypeId);
|
int countUserEnabled(Long userId);
|
int countBatteryInEnabledGroup(@Param("groupId") Long groupId, @Param("batteryNo") String batteryNo);
|
int countRegisteredChannel(Long channelId);
|
int countCollectorEnabled(Long collectorId);
|
Integer selectCollectorChannelCount(Long collectorId);
|
String selectCollectorCode(Long collectorId);
|
List<TestUserOptionVo> selectEnabledUserOptions();
|
List<TestTypeOptionVo> selectEnabledTestTypeOptions();
|
List<TestBatteryOptionVo> selectEnabledBatteryOptions();
|
List<TestChannelOptionVo> selectRegisteredChannelOptions();
|
List<TestCollectorOptionVo> selectEnabledCollectorOptions();
|
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);
|
int hasReceivingTestForAdapter(@Param("adapterCode") String adapterCode);
|
List<TDetectionChannel> selectReceivingChannelsForAdapter(@Param("adapterCode") String adapterCode);
|
boolean collectorOnline(Long collectorId);
|
int updateReceptionStarted(@Param("testId") Long testId, @Param("startedAtUtc") Date startedAtUtc,
|
@Param("runtimeAttach") boolean runtimeAttach, @Param("updateBy") String updateBy);
|
int updateReceptionPaused(@Param("testId") Long testId, @Param("updateBy") String updateBy,
|
@Param("updatedAtUtc") Date updatedAtUtc);
|
int updateReceptionResumed(@Param("testId") Long testId, @Param("updateBy") String updateBy,
|
@Param("updatedAtUtc") Date updatedAtUtc);
|
int updateReceptionStopped(@Param("testId") Long testId, @Param("updateBy") String updateBy,
|
@Param("endedAtUtc") Date endedAtUtc);
|
|
String selectBtsSampleContentHash(@Param("channelId") Long channelId, @Param("btsTestId") String btsTestId,
|
@Param("sequenceId") Long sequenceId);
|
|
int insertBtsSample(@Param("testId") Long testId, @Param("bindingId") Long bindingId,
|
@Param("channelId") Long channelId,
|
@Param("btsTestId") String btsTestId, @Param("sequenceId") Long sequenceId,
|
@Param("deviceTimeUtc") Date deviceTimeUtc, @Param("deviceTimeRaw") String deviceTimeRaw,
|
@Param("receivedAtUtc") Date receivedAtUtc, @Param("cycleNo") Integer cycleNo,
|
@Param("stepNo") Integer stepNo, @Param("stepType") String stepType, @Param("stepName") String stepName,
|
@Param("testTimeMs") Long testTimeMs, @Param("voltageV") java.math.BigDecimal voltageV,
|
@Param("currentA") java.math.BigDecimal currentA, @Param("capacityAh") java.math.BigDecimal capacityAh,
|
@Param("energyWh") java.math.BigDecimal energyWh, @Param("contentSha256") byte[] contentSha256);
|
int insertBtsMeasurement(@Param("sampleId") Long sampleId, @Param("metricCode") String metricCode,
|
@Param("metricValue") java.math.BigDecimal metricValue, @Param("unit") String unit,
|
@Param("sourceType") String sourceType);
|
int insertCollectorSample(@Param("testId") Long testId, @Param("bindingId") Long bindingId,
|
@Param("collectorId") Long collectorId,
|
@Param("channelCode") String channelCode,
|
@Param("sequenceId") Long sequenceId, @Param("deviceTimeUtc") Date deviceTimeUtc,
|
@Param("deviceTimeRaw") String deviceTimeRaw, @Param("receivedAtUtc") Date receivedAtUtc,
|
@Param("metricCode") String metricCode, @Param("metricValue") java.math.BigDecimal metricValue,
|
@Param("unit") String unit, @Param("contentSha256") byte[] contentSha256);
|
int insertDataRevisionAction(TTestDataRevisionAction action);
|
List<TTestDataRevisionAction> selectDataRevisionActions(TTestDataRevisionAction query);
|
TTestDataRevisionAction selectDataRevisionActionById(Long actionId);
|
int upsertDataOverride(TTestDataOverride override);
|
List<TTestDataOverride> selectDataOverrides(@Param("testId") Long testId,
|
@Param("dataType") String dataType);
|
List<java.util.Map<String, Object>> selectConsoleImportRecords(@Param("testId") Long testId,
|
@Param("dataType") String dataType);
|
int deleteBtsSamplesByIds(@Param("testId") Long testId, @Param("sampleIds") List<Long> sampleIds);
|
int deleteBtsMeasurementsBySampleIds(@Param("sampleIds") List<Long> sampleIds);
|
int deleteCollectorSamplesByIds(@Param("testId") Long testId, @Param("sampleIds") List<Long> sampleIds);
|
Long selectBtsSampleIdByDeviceChannelSequence(@Param("testId") Long testId,
|
@Param("deviceId") Long deviceId, @Param("channelNo") Long channelNo,
|
@Param("sequenceId") Long sequenceId);
|
List<Long> selectBtsSampleIdsByDeviceChannelStep(@Param("testId") Long testId,
|
@Param("deviceId") Long deviceId, @Param("channelNo") Long channelNo,
|
@Param("cycleNo") Integer cycleNo, @Param("stepNo") Integer stepNo);
|
List<Long> selectBtsSampleIdsByDeviceChannelCycle(@Param("testId") Long testId,
|
@Param("deviceId") Long deviceId, @Param("channelNo") Long channelNo,
|
@Param("cycleNo") Integer cycleNo);
|
int insertConsoleImportRecord(TTestConsoleImportRecord record);
|
int insertSampleConflict(@Param("testId") Long testId, @Param("channelId") Long channelId,
|
@Param("detail") String detail);
|
int countTestBatteryNo(@Param("testId") Long testId, @Param("batteryNo") String batteryNo);
|
}
|