| | |
| | | import com.ruoyi.system.service.ITTestService; |
| | | |
| | | /** 以测试动作边界筛选来源历史,并以数据库游标保证补采可恢复。 */ |
| | | @Service |
| | | public class TestBackfillServiceImpl implements ITestBackfillService |
| | | { |
| | | private static final int PAGE_SIZE = 1000; |
| | |
| | | if (testScoped != null) |
| | | { |
| | | if (!testScoped.equalsIgnoreCase(HexFormat.of().formatHex(hash))) |
| | | mapper.insertBackfillConflict(test.getTestId(), binding.getChannelId(), |
| | | mapper.insertSampleConflict(test.getTestId(), binding.getChannelId(), |
| | | "测试内采样内容冲突 seqid=" + sample.sequenceId()); |
| | | return; |
| | | } |
| | | String old = mapper.selectSampleContentHash(binding.getChannelId(), btsTestId, sample.sequenceId()); |
| | | if (old != null && !old.equalsIgnoreCase(HexFormat.of().formatHex(hash))) |
| | | { |
| | | mapper.insertBackfillConflict(test.getTestId(), binding.getChannelId(), |
| | | mapper.insertSampleConflict(test.getTestId(), binding.getChannelId(), |
| | | "BTS testid=" + btsTestId + ", seqid=" + sample.sequenceId()); |
| | | return; |
| | | } |
| | |
| | | record.sequenceId(), record.metricCode()); |
| | | if (old != null && !old.equalsIgnoreCase(HexFormat.of().formatHex(hash))) |
| | | { |
| | | mapper.insertBackfillConflict(test.getTestId(), null, |
| | | mapper.insertSampleConflict(test.getTestId(), null, |
| | | "采集器=" + record.collectorCode() + ", seqid=" + record.sequenceId()); |
| | | return; |
| | | } |