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