using Admin.NET.Plugin.AiDOP.Dto.SmartOps; using Admin.NET.Plugin.AiDOP.Entity; namespace Admin.NET.Plugin.AiDOP.SmartOps; public interface IKpiTargetConfigStore { Task FindKpiAsync(long tenantId, string metricCode, CancellationToken ct = default); Task> ListAsync(long tenantId, string metricCode, long? factoryId, CancellationToken ct = default); Task> ListActiveScopeAsync(long tenantId, long factoryId, string metricCode, CancellationToken ct = default); Task GetByIdAsync(long tenantId, long id, CancellationToken ct = default); Task InsertAsync(AdoSmartOpsKpiTargetConfig row, CancellationToken ct = default); Task UpdateAsync(AdoSmartOpsKpiTargetConfig row, CancellationToken ct = default); Task IsReferencedByDailyAsync(long tenantId, long configId, CancellationToken ct = default); Task CountCommittedHashAsync(long tenantId, string sha256, CancellationToken ct = default); Task InsertBatchAsync(AdoSmartOpsKpiTargetImportBatch batch, CancellationToken ct = default); Task GetBatchAsync(long tenantId, long batchId, CancellationToken ct = default); Task UpdateBatchAsync(AdoSmartOpsKpiTargetImportBatch batch, CancellationToken ct = default); } public interface IKpiTargetResolver { Task ResolveAsync( long tenantId, long factoryId, string metricCode, string moduleCode, DateTime bizDate, CancellationToken ct = default); } public interface ILegacyKpiTargetProvider { Task TryResolveLegacyAsync( long tenantId, long factoryId, string metricCode, string moduleCode, DateTime bizDate, CancellationToken ct = default); } public interface IKpiDailyTargetReader { Task GetCurrentTargetAsync(long tenantId, long factoryId, string moduleCode, string metricCode, DateTime bizDate, CancellationToken ct = default); Task GetPriorTargetAsync(long tenantId, long factoryId, string moduleCode, string metricCode, DateTime bizDate, CancellationToken ct = default); }