Add supply contracts export executor

This commit is contained in:
2025-11-24 11:17:03 +09:00
parent f798c0c80f
commit 46ff771dd6
8 changed files with 181 additions and 2 deletions

View File

@ -1,4 +1,5 @@
using Hcs.Broker;
using Hcs.WebApp.BackgroundServices.OperationExecutors.HouseManagement;
using Hcs.WebApp.BackgroundServices.OperationExecutors.Nsi;
using Hcs.WebApp.BackgroundServices.OperationExecutors.NsiCommon;
using Hcs.WebApp.Data.Hcs;
@ -13,6 +14,7 @@ namespace Hcs.WebApp.BackgroundServices.OperationExecutors
{
Operation.OperationType.Nsi_ExportNsiItem_15_7_0_1 => new ExportDataProviderNsiItemExecutor_15_7_0_1(client, scope, operation),
Operation.OperationType.NsiCommon_ExportNsiItem_15_7_0_1 => new ExportNsiItemExecutor_15_7_0_1(client, scope, operation),
Operation.OperationType.HouseManagement_ExportSupplyResourceContractData_15_7_0_1 => new ExportSupplyResourceContractDataExecutor_15_7_0_1(client, scope, operation),
Operation.OperationType.ParseHousesData_15_7_0_1 => throw new ArgumentException($"Нельзя использовать операцию с типом {operation.Type} для обращения к ГИС ЖКХ")
};

View File

@ -0,0 +1,13 @@
using Hcs.Broker;
using Hcs.WebApp.Data.Hcs;
namespace Hcs.WebApp.BackgroundServices.OperationExecutors.HouseManagement
{
public class ExportSupplyResourceContractDataExecutor_15_7_0_1(IClient client, IServiceScope scope, Operation operation) : ExecutorBase(client, scope, operation)
{
public override async Task<string> ExecuteAsync(CancellationToken cancellationToken)
{
return await client.HouseManagement.RequestExportSupplyResourceContractDataAsync(operation.ExportGuid, cancellationToken);
}
}
}