From f2d256f8323860e203f738e17d9c6268661b26f4 Mon Sep 17 00:00:00 2001 From: "HOME-LAPTOP\\kshkulev" Date: Wed, 10 Sep 2025 16:18:42 +0900 Subject: [PATCH] Fix metering device import --- Hcs.Client/Client/Api/Registry/Registry2.cs | 16 ++++++++++++++++ Hcs.Client/Hcs.Client.csproj | 1 + Hcs.TestApp/TestApp/Program.cs | 1 + .../TestApp/Scenario/HouseManagementScenario.cs | 4 ++-- 4 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 Hcs.Client/Client/Api/Registry/Registry2.cs diff --git a/Hcs.Client/Client/Api/Registry/Registry2.cs b/Hcs.Client/Client/Api/Registry/Registry2.cs new file mode 100644 index 0000000..dc8b4ef --- /dev/null +++ b/Hcs.Client/Client/Api/Registry/Registry2.cs @@ -0,0 +1,16 @@ +namespace Hcs.Client.Api.Registry +{ + /// + /// НСИ "Коммунальный ресурс" (реестровый номер 2). + /// Взято из https://dom.gosuslugi.ru/opendataapi/nsi-2/v1. + /// + public static class Registry2 + { + /// + /// Тепловая энергия + /// + public static RegistryElement Element5 => new( + "5", + "25a29bae-e430-4424-8f34-8ad83c578657"); + } +} diff --git a/Hcs.Client/Hcs.Client.csproj b/Hcs.Client/Hcs.Client.csproj index 0fef525..d294d3d 100644 --- a/Hcs.Client/Hcs.Client.csproj +++ b/Hcs.Client/Hcs.Client.csproj @@ -77,6 +77,7 @@ + diff --git a/Hcs.TestApp/TestApp/Program.cs b/Hcs.TestApp/TestApp/Program.cs index a80cf3f..30e5996 100644 --- a/Hcs.TestApp/TestApp/Program.cs +++ b/Hcs.TestApp/TestApp/Program.cs @@ -56,6 +56,7 @@ namespace Hcs.TestApp //houseManagementScenario.ImportAccountData(); //houseManagementScenario.ImportContractData(); //houseManagementScenario.ImportLivingHouseUOData(); + //houseManagementScenario.ImportMeteringDeviceData(); //houseManagementScenario.ImportNotificationData(); //houseManagementScenario.ImportSupplyResourceContractData(); diff --git a/Hcs.TestApp/TestApp/Scenario/HouseManagementScenario.cs b/Hcs.TestApp/TestApp/Scenario/HouseManagementScenario.cs index 0e9e594..606d422 100644 --- a/Hcs.TestApp/TestApp/Scenario/HouseManagementScenario.cs +++ b/Hcs.TestApp/TestApp/Scenario/HouseManagementScenario.cs @@ -217,8 +217,8 @@ namespace Hcs.TestApp.Scenario { MunicipalResource = new nsiRef() { - Code = Registry239.Element4.Code, - GUID = Registry239.Element4.GUID + Code = Registry2.Element5.Code, + GUID = Registry2.Element5.GUID }, MeteringValue = "0" }]