Add living house UO import
This commit is contained in:
@ -58,7 +58,6 @@ namespace Hcs.Client.Api
|
|||||||
return await request.ExecuteAsync(contractRootGuid, token);
|
return await request.ExecuteAsync(contractRootGuid, token);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Импорт лицевого счета
|
/// Импорт лицевого счета
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -71,6 +70,17 @@ namespace Hcs.Client.Api
|
|||||||
return await request.ExecuteAsync(payload, token);
|
return await request.ExecuteAsync(payload, token);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Импорт данных дома
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="payload">Пейлоад данных дома</param>
|
||||||
|
/// <param name="token">Токен отмены</param>
|
||||||
|
/// <returns>true, если операция выполнена успешно, иначе - false</returns>
|
||||||
|
public async Task<bool> ImportHouseUODataAsync(ImportLivingHouseUODataPayload payload, CancellationToken token = default)
|
||||||
|
{
|
||||||
|
var request = new ImportHouseUODataRequest(client);
|
||||||
|
return await request.ExecuteAsync(payload, token);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Импорт новости для информирования граждан
|
/// Импорт новости для информирования граждан
|
||||||
@ -84,7 +94,6 @@ namespace Hcs.Client.Api
|
|||||||
return await request.ExecuteAsync(payload, token);
|
return await request.ExecuteAsync(payload, token);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Импорт договора ресурсоснабжения с РСО
|
/// Импорт договора ресурсоснабжения с РСО
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -0,0 +1,94 @@
|
|||||||
|
using Hcs.Service.Async.HouseManagement;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Hcs.Client.Api.Payload.HouseManagement
|
||||||
|
{
|
||||||
|
// http://open-gkh.ru/HouseManagement/importHouseUORequest/LivingHouse/LivingHouseToCreate.html
|
||||||
|
// http://open-gkh.ru/HouseManagement/HouseBasicUOType.html
|
||||||
|
public class ImportLivingHouseUODataPayload
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Глобальный уникальный идентификатор дома по ФИАС
|
||||||
|
/// </summary>
|
||||||
|
public Guid fiasHouseGuid;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Общая площадь здания
|
||||||
|
/// </summary>
|
||||||
|
public decimal totalSquare;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Состояние (НСИ 24)
|
||||||
|
/// </summary>
|
||||||
|
public nsiRef state;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Необязательное. Стадия жизненного цикла (НСИ 338).
|
||||||
|
/// </summary>
|
||||||
|
public nsiRef lifeCycleStage;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Год ввода в эксплуатацию. До 2215 включительно.
|
||||||
|
/// </summary>
|
||||||
|
public short usedYear;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Количество этажей. До 999 включительно.
|
||||||
|
/// </summary>
|
||||||
|
public int floorCount;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Необязательное. ОКТМО (обязательное для всех территорий, за исключением города и космодрома
|
||||||
|
/// "Байконур"). Значение из ФИАС при наличии.
|
||||||
|
/// </summary>
|
||||||
|
public OKTMORefType oktmo;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Часовая зона. Справочник 32.
|
||||||
|
/// </summary>
|
||||||
|
public nsiRef olsonTZ;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Наличие у дома статуса объекта культурного наследия
|
||||||
|
/// </summary>
|
||||||
|
public bool culturalHeritage;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Необязательное. Данные ОЖФ
|
||||||
|
/// </summary>
|
||||||
|
public OGFData[] ogfData;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Необязательное. Дом находится в муниципальной собственности и в полном объеме используется
|
||||||
|
/// в качестве общежития. Принимает только false.
|
||||||
|
/// </summary>
|
||||||
|
public bool isMunicipalProperty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Необязательное. Дом находится в собственности субъекта Российской Федерации и в полном объеме
|
||||||
|
/// используется в качестве общежития. Принимает только false.
|
||||||
|
/// </summary>
|
||||||
|
public bool isRegionProperty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Кадастровый номер
|
||||||
|
/// </summary>
|
||||||
|
public string cadastralNumber;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Условный номер. При указании в ГИС ЖКХ осуществляется привязка к ЕГРП (поиск в ЕГРП выполняется
|
||||||
|
/// по условному номеру).
|
||||||
|
/// </summary>
|
||||||
|
public string conditionalNumber;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Необязательное. Жилой дом блокированной застройки (если не указан - аналог false).
|
||||||
|
/// </summary>
|
||||||
|
public bool hasBlocks;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Необязательное. Несколько жилых домов с одинаковым адресом (если не указан - аналог false)
|
||||||
|
/// </summary>
|
||||||
|
public bool hasMultipleHousesWithSameAddress;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -3,7 +3,7 @@
|
|||||||
namespace Hcs.Client.Api.Registry
|
namespace Hcs.Client.Api.Registry
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// НСИ "Тарифицируемый ресурс" (реестровый номер 239)
|
/// НСИ "Тарифицируемый ресурс" (реестровый номер 239).
|
||||||
/// Взято из https://dom.gosuslugi.ru/opendataapi/nsi-239/v1.
|
/// Взято из https://dom.gosuslugi.ru/opendataapi/nsi-239/v1.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class Registry239
|
public static class Registry239
|
||||||
|
|||||||
47
Hcs.Client/Client/Api/Registry/Registry24.cs
Normal file
47
Hcs.Client/Client/Api/Registry/Registry24.cs
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
using Hcs.Service.Async.HouseManagement;
|
||||||
|
|
||||||
|
namespace Hcs.Client.Api.Registry
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// НСИ "Состояние дома" (реестровый номер 24).
|
||||||
|
/// Взято из https://dom.gosuslugi.ru/opendataapi/nsi-24/v1.
|
||||||
|
/// </summary>
|
||||||
|
public static class Registry24
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Аварийный
|
||||||
|
/// </summary>
|
||||||
|
public static nsiRef Element1 => new()
|
||||||
|
{
|
||||||
|
Code = "1",
|
||||||
|
GUID = "cbe05853-a91b-43cc-a2cb-06cdfa97d492"
|
||||||
|
};
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Исправный
|
||||||
|
/// </summary>
|
||||||
|
public static nsiRef Element2 => new()
|
||||||
|
{
|
||||||
|
Code = "2",
|
||||||
|
GUID = "2d3ae73e-6c72-4740-9122-9c632d1893a7"
|
||||||
|
};
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Ветхий
|
||||||
|
/// </summary>
|
||||||
|
public static nsiRef Element3 => new()
|
||||||
|
{
|
||||||
|
Code = "3",
|
||||||
|
GUID = "bf083ae4-e4ec-4ace-b190-4d009e5cd1a1"
|
||||||
|
};
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Не выбран
|
||||||
|
/// </summary>
|
||||||
|
public static nsiRef Element4 => new()
|
||||||
|
{
|
||||||
|
Code = "4",
|
||||||
|
GUID = "4ee07c0b-82d6-41f4-a8c5-2cff784bbd9c"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -3,7 +3,7 @@
|
|||||||
namespace Hcs.Client.Api.Registry
|
namespace Hcs.Client.Api.Registry
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// НСИ "Показатели качества коммунальных ресурсов" (реестровый номер 276)
|
/// НСИ "Показатели качества коммунальных ресурсов" (реестровый номер 276).
|
||||||
/// Взято из https://dom.gosuslugi.ru/opendataapi/nsi-276/v1.
|
/// Взято из https://dom.gosuslugi.ru/opendataapi/nsi-276/v1.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class Registry276
|
public static class Registry276
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
namespace Hcs.Client.Api.Registry
|
namespace Hcs.Client.Api.Registry
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// НСИ "Вид коммунальной услуги" (реестровый номер 3)
|
/// НСИ "Вид коммунальной услуги" (реестровый номер 3).
|
||||||
/// Взято из https://dom.gosuslugi.ru/opendataapi/nsi-3/v1.
|
/// Взято из https://dom.gosuslugi.ru/opendataapi/nsi-3/v1.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class Registry3
|
public static class Registry3
|
||||||
|
|||||||
20
Hcs.Client/Client/Api/Registry/Registry32.cs
Normal file
20
Hcs.Client/Client/Api/Registry/Registry32.cs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
using Hcs.Service.Async.HouseManagement;
|
||||||
|
|
||||||
|
namespace Hcs.Client.Api.Registry
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// НСИ "Часовые зоны по Olson" (реестровый номер 32).
|
||||||
|
/// Взято из https://dom.gosuslugi.ru/opendataapi/nsi-32/v1.
|
||||||
|
/// </summary>
|
||||||
|
public static class Registry32
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Иркутск
|
||||||
|
/// </summary>
|
||||||
|
public static nsiRef Element11 => new()
|
||||||
|
{
|
||||||
|
Code = "11",
|
||||||
|
GUID = "244ae392-0b96-46f2-80ea-4dac32e7326a"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
74
Hcs.Client/Client/Api/Registry/Registry338.cs
Normal file
74
Hcs.Client/Client/Api/Registry/Registry338.cs
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
using Hcs.Service.Async.HouseManagement;
|
||||||
|
|
||||||
|
namespace Hcs.Client.Api.Registry
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// НСИ "Стадия жизненного цикла" (реестровый номер 338).
|
||||||
|
/// Взято из https://dom.gosuslugi.ru/opendataapi/nsi-338/v1.
|
||||||
|
/// </summary>
|
||||||
|
public static class Registry338
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Эксплуатация
|
||||||
|
/// </summary>
|
||||||
|
public static nsiRef Element1 => new()
|
||||||
|
{
|
||||||
|
Code = "1",
|
||||||
|
GUID = "29b18683-5195-4ef4-83fc-71bf45597d46"
|
||||||
|
};
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Реконструкция
|
||||||
|
/// </summary>
|
||||||
|
public static nsiRef Element2 => new()
|
||||||
|
{
|
||||||
|
Code = "2",
|
||||||
|
GUID = "75764145-f181-47e5-bff1-1306a46eb20e"
|
||||||
|
};
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Капитальный ремонт с отселением
|
||||||
|
/// </summary>
|
||||||
|
public static nsiRef Element3 => new()
|
||||||
|
{
|
||||||
|
Code = "3",
|
||||||
|
GUID = "dee170df-db42-4cd6-9e5e-b62be91b3663"
|
||||||
|
};
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Капитальный ремонт без отселения
|
||||||
|
/// </summary>
|
||||||
|
public static nsiRef Element4 => new()
|
||||||
|
{
|
||||||
|
Code = "4",
|
||||||
|
GUID = "91dc91e2-6883-4c84-b711-53f57f28dbe2"
|
||||||
|
};
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Снос
|
||||||
|
/// </summary>
|
||||||
|
public static nsiRef Element5 => new()
|
||||||
|
{
|
||||||
|
Code = "5",
|
||||||
|
GUID = "cc358aa9-10b3-4d6a-bbec-c5f6b14950f6"
|
||||||
|
};
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Не эксплуатируется, расселен
|
||||||
|
/// </summary>
|
||||||
|
public static nsiRef Element6 => new()
|
||||||
|
{
|
||||||
|
Code = "6",
|
||||||
|
GUID = "4bed3d7e-6015-428e-b4b4-7b7aec171c0d"
|
||||||
|
};
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Выведен из эксплуатации
|
||||||
|
/// </summary>
|
||||||
|
public static nsiRef Element7 => new()
|
||||||
|
{
|
||||||
|
Code = "7",
|
||||||
|
GUID = "f3edc065-c1a1-4110-96fa-03313ae7a039"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,105 @@
|
|||||||
|
using Hcs.Client.Api.Payload.HouseManagement;
|
||||||
|
using Hcs.Client.Api.Request.Exception;
|
||||||
|
using Hcs.Client.Internal;
|
||||||
|
using Hcs.Service.Async.HouseManagement;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Hcs.Client.Api.Request.HouseManagement
|
||||||
|
{
|
||||||
|
internal class ImportHouseUODataRequest(ClientBase client) : HouseManagementRequestBase(client)
|
||||||
|
{
|
||||||
|
protected override bool CanBeRestarted => false;
|
||||||
|
|
||||||
|
internal async Task<bool> ExecuteAsync(ImportLivingHouseUODataPayload payload, CancellationToken token)
|
||||||
|
{
|
||||||
|
// TODO: Добавить проверку пейлоада
|
||||||
|
|
||||||
|
// http://open-gkh.ru/HouseManagement/importHouseUORequest.html
|
||||||
|
var request = new importHouseUORequest
|
||||||
|
{
|
||||||
|
Id = Constants.SIGNED_XML_ELEMENT_ID,
|
||||||
|
version = "13.2.3.2",
|
||||||
|
Item = GetLivingHouseFromPayload(payload)
|
||||||
|
};
|
||||||
|
|
||||||
|
var result = await SendAndWaitResultAsync(request, async asyncClient =>
|
||||||
|
{
|
||||||
|
var response = await asyncClient.importHouseUODataAsync(CreateRequestHeader(), request);
|
||||||
|
return response.AckRequest.Ack;
|
||||||
|
}, token);
|
||||||
|
|
||||||
|
result.Items.OfType<ErrorMessageType>().ToList().ForEach(error =>
|
||||||
|
{
|
||||||
|
throw RemoteException.CreateNew(error.ErrorCode, error.Description);
|
||||||
|
});
|
||||||
|
|
||||||
|
var importResults = result.Items.OfType<getStateResultImportResult>();
|
||||||
|
var commonResults = GetCommonResults(importResults);
|
||||||
|
foreach (var commonResult in commonResults)
|
||||||
|
{
|
||||||
|
if (commonResult.ItemElementName == ItemChoiceType26.ImportHouseUO)
|
||||||
|
{
|
||||||
|
return commonResult.Item is OGFImportStatusType;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private importHouseUORequestLivingHouse GetLivingHouseFromPayload(ImportLivingHouseUODataPayload payload)
|
||||||
|
{
|
||||||
|
var livingHouse = new importHouseUORequestLivingHouseLivingHouseToCreate()
|
||||||
|
{
|
||||||
|
TransportGUID = Guid.NewGuid().ToString(),
|
||||||
|
BasicCharacteristicts = new HouseBasicUOType()
|
||||||
|
{
|
||||||
|
FIASHouseGuid = payload.fiasHouseGuid.ToString(),
|
||||||
|
TotalSquare = payload.totalSquare,
|
||||||
|
State = payload.state,
|
||||||
|
LifeCycleStage = payload.lifeCycleStage,
|
||||||
|
UsedYear = payload.usedYear,
|
||||||
|
FloorCount = payload.floorCount,
|
||||||
|
OKTMO = payload.oktmo,
|
||||||
|
OlsonTZ = payload.olsonTZ,
|
||||||
|
CulturalHeritage = payload.culturalHeritage,
|
||||||
|
OGFData = payload.ogfData,
|
||||||
|
// TODO: Разобраться с кадастровым номером
|
||||||
|
Items = [true, payload.conditionalNumber],
|
||||||
|
ItemsElementName = [ItemsChoiceType3.NoCadastralNumber, ItemsChoiceType3.ConditionalNumber]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!payload.isMunicipalProperty)
|
||||||
|
{
|
||||||
|
livingHouse.BasicCharacteristicts.IsMunicipalProperty = false;
|
||||||
|
livingHouse.BasicCharacteristicts.IsMunicipalPropertySpecified = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!payload.isRegionProperty)
|
||||||
|
{
|
||||||
|
livingHouse.BasicCharacteristicts.IsRegionProperty = false;
|
||||||
|
livingHouse.BasicCharacteristicts.IsRegionPropertySpecified = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (payload.hasBlocks)
|
||||||
|
{
|
||||||
|
livingHouse.HasBlocks = true;
|
||||||
|
livingHouse.HasBlocksSpecified = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (payload.hasMultipleHousesWithSameAddress)
|
||||||
|
{
|
||||||
|
livingHouse.HasMultipleHousesWithSameAddress = true;
|
||||||
|
livingHouse.HasMultipleHousesWithSameAddressSpecified = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new importHouseUORequestLivingHouse()
|
||||||
|
{
|
||||||
|
Item = livingHouse
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -70,11 +70,15 @@
|
|||||||
<Compile Include="Client\Api\NsiCommonApi.cs" />
|
<Compile Include="Client\Api\NsiCommonApi.cs" />
|
||||||
<Compile Include="Client\Api\OrgRegistryCommonApi.cs" />
|
<Compile Include="Client\Api\OrgRegistryCommonApi.cs" />
|
||||||
<Compile Include="Client\Api\Payload\HouseManagement\ImportAccountDataPayload.cs" />
|
<Compile Include="Client\Api\Payload\HouseManagement\ImportAccountDataPayload.cs" />
|
||||||
|
<Compile Include="Client\Api\Payload\HouseManagement\ImportLivingHouseUODataPayload.cs" />
|
||||||
<Compile Include="Client\Api\Payload\HouseManagement\ImportNotificationDataPayload.cs" />
|
<Compile Include="Client\Api\Payload\HouseManagement\ImportNotificationDataPayload.cs" />
|
||||||
<Compile Include="Client\Api\Payload\HouseManagement\ImportSupplyResourceContractDataPayload.cs" />
|
<Compile Include="Client\Api\Payload\HouseManagement\ImportSupplyResourceContractDataPayload.cs" />
|
||||||
<Compile Include="Client\Api\Registry\Registry239.cs" />
|
<Compile Include="Client\Api\Registry\Registry239.cs" />
|
||||||
|
<Compile Include="Client\Api\Registry\Registry24.cs" />
|
||||||
<Compile Include="Client\Api\Registry\Registry276.cs" />
|
<Compile Include="Client\Api\Registry\Registry276.cs" />
|
||||||
<Compile Include="Client\Api\Registry\Registry3.cs" />
|
<Compile Include="Client\Api\Registry\Registry3.cs" />
|
||||||
|
<Compile Include="Client\Api\Registry\Registry32.cs" />
|
||||||
|
<Compile Include="Client\Api\Registry\Registry338.cs" />
|
||||||
<Compile Include="Client\Api\Registry\Registry58.cs" />
|
<Compile Include="Client\Api\Registry\Registry58.cs" />
|
||||||
<Compile Include="Client\Api\Request\Adapter\IGetStateResult.cs" />
|
<Compile Include="Client\Api\Request\Adapter\IGetStateResult.cs" />
|
||||||
<Compile Include="Client\Api\Request\Adapter\IGetStateResultMany.cs" />
|
<Compile Include="Client\Api\Request\Adapter\IGetStateResultMany.cs" />
|
||||||
@ -92,6 +96,7 @@
|
|||||||
<Compile Include="Client\Api\Request\HouseManagement\ExportSupplyResourceContractObjectAddressDataRequest.cs" />
|
<Compile Include="Client\Api\Request\HouseManagement\ExportSupplyResourceContractObjectAddressDataRequest.cs" />
|
||||||
<Compile Include="Client\Api\Request\HouseManagement\HouseManagementRequestBase.cs" />
|
<Compile Include="Client\Api\Request\HouseManagement\HouseManagementRequestBase.cs" />
|
||||||
<Compile Include="Client\Api\Request\HouseManagement\ImportAccountDataRequest.cs" />
|
<Compile Include="Client\Api\Request\HouseManagement\ImportAccountDataRequest.cs" />
|
||||||
|
<Compile Include="Client\Api\Request\HouseManagement\ImportHouseUODataRequest.cs" />
|
||||||
<Compile Include="Client\Api\Request\HouseManagement\ImportNotificationDataRequest.cs" />
|
<Compile Include="Client\Api\Request\HouseManagement\ImportNotificationDataRequest.cs" />
|
||||||
<Compile Include="Client\Api\Request\HouseManagement\ImportSupplyResourceContractDataRequest.cs" />
|
<Compile Include="Client\Api\Request\HouseManagement\ImportSupplyResourceContractDataRequest.cs" />
|
||||||
<Compile Include="Client\Api\Request\NsiCommon\ExportNsiItemRequest.cs" />
|
<Compile Include="Client\Api\Request\NsiCommon\ExportNsiItemRequest.cs" />
|
||||||
|
|||||||
@ -50,6 +50,8 @@ namespace Hcs.TestApp
|
|||||||
|
|
||||||
//houseManagementScenario.ImportAccountData();
|
//houseManagementScenario.ImportAccountData();
|
||||||
|
|
||||||
|
//houseManagementScenario.ImportLivingHouseUOData();
|
||||||
|
|
||||||
//houseManagementScenario.ImportNotificationData();
|
//houseManagementScenario.ImportNotificationData();
|
||||||
|
|
||||||
//houseManagementScenario.ImportSupplyResourceContractData();
|
//houseManagementScenario.ImportSupplyResourceContractData();
|
||||||
|
|||||||
@ -34,6 +34,94 @@ namespace Hcs.TestApp.Scenario
|
|||||||
Console.WriteLine("Scenario execution " + (result != null ? "succeeded" : "failed"));
|
Console.WriteLine("Scenario execution " + (result != null ? "succeeded" : "failed"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal void ImportAccountData()
|
||||||
|
{
|
||||||
|
var payload = new ImportAccountDataPayload()
|
||||||
|
{
|
||||||
|
accountNumber = "385635479641",
|
||||||
|
accountReasons = new AccountReasonsImportType()
|
||||||
|
{
|
||||||
|
SupplyResourceContract =
|
||||||
|
[
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
Items = ["0aca4ebc-8d5c-4a39-801c-e25f0867adc6"],
|
||||||
|
ItemsElementName = [ItemsChoiceType17.ContractGUID]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
accountType = ImportAccountDataPayload.AccountType.RC,
|
||||||
|
livingPersonsNumber = 1,
|
||||||
|
totalSquare = 29.3m,
|
||||||
|
residentialSquare = 29.3m,
|
||||||
|
heatedArea = 29.3m,
|
||||||
|
accomodations =
|
||||||
|
[
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
Item = "db041c58-4a14-45ce-8ecc-d99727e9683f",
|
||||||
|
ItemElementName = ItemChoiceType9.FIASHouseGuid
|
||||||
|
}
|
||||||
|
],
|
||||||
|
payerInfo = new AccountTypePayerInfo()
|
||||||
|
{
|
||||||
|
IsRenter = true,
|
||||||
|
IsRenterSpecified = true,
|
||||||
|
Item = new AccountIndType()
|
||||||
|
{
|
||||||
|
Item = "62392021264",
|
||||||
|
FirstName = "Имя",
|
||||||
|
Surname = "Фамилия",
|
||||||
|
Patronymic = "Отчество"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var result = client.HouseManagement.ImportAccountDataAsync(payload).Result;
|
||||||
|
Console.WriteLine("Scenario execution " + (result ? "succeeded" : "failed"));
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void ImportLivingHouseUOData()
|
||||||
|
{
|
||||||
|
var payload = new ImportLivingHouseUODataPayload()
|
||||||
|
{
|
||||||
|
fiasHouseGuid = Guid.Parse("db041c58-4a14-45ce-8ecc-d99727e9683f"),
|
||||||
|
totalSquare = 29.3m,
|
||||||
|
state = Registry24.Element2,
|
||||||
|
lifeCycleStage = Registry338.Element1,
|
||||||
|
usedYear = 2000,
|
||||||
|
floorCount = 1,
|
||||||
|
oktmo = new OKTMORefType()
|
||||||
|
{
|
||||||
|
code = "98641101001"
|
||||||
|
},
|
||||||
|
olsonTZ = Registry32.Element11,
|
||||||
|
culturalHeritage = false,
|
||||||
|
isMunicipalProperty = false,
|
||||||
|
isRegionProperty = false,
|
||||||
|
conditionalNumber = "1234567890"
|
||||||
|
};
|
||||||
|
var result = client.HouseManagement.ImportHouseUODataAsync(payload).Result;
|
||||||
|
Console.WriteLine("Scenario execution " + (result ? "succeeded" : "failed"));
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void ImportNotificationData()
|
||||||
|
{
|
||||||
|
var payload = new ImportNotificationDataPayload()
|
||||||
|
{
|
||||||
|
topic = "Тема новости",
|
||||||
|
isImportant = true,
|
||||||
|
content = "Содержимое новости",
|
||||||
|
destinations =
|
||||||
|
[
|
||||||
|
new(ItemsChoiceType29.IsAll, true)
|
||||||
|
],
|
||||||
|
isNotLimit = true,
|
||||||
|
isShipOff = true
|
||||||
|
};
|
||||||
|
var result = client.HouseManagement.ImportNotificationDataAsync(payload).Result;
|
||||||
|
Console.WriteLine("Scenario execution " + (result ? "succeeded" : "failed"));
|
||||||
|
}
|
||||||
|
|
||||||
internal void ImportSupplyResourceContractData()
|
internal void ImportSupplyResourceContractData()
|
||||||
{
|
{
|
||||||
var signingDate = new DateTime(2017, 01, 01);
|
var signingDate = new DateTime(2017, 01, 01);
|
||||||
@ -136,69 +224,5 @@ namespace Hcs.TestApp.Scenario
|
|||||||
var result = client.HouseManagement.ImportSupplyResourceContractDataAsync(payload).Result;
|
var result = client.HouseManagement.ImportSupplyResourceContractDataAsync(payload).Result;
|
||||||
Console.WriteLine("Scenario execution " + (result != null ? "succeeded" : "failed"));
|
Console.WriteLine("Scenario execution " + (result != null ? "succeeded" : "failed"));
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void ImportNotificationData()
|
|
||||||
{
|
|
||||||
var payload = new ImportNotificationDataPayload()
|
|
||||||
{
|
|
||||||
topic = "Тема новости",
|
|
||||||
isImportant = true,
|
|
||||||
content = "Содержимое новости",
|
|
||||||
destinations =
|
|
||||||
[
|
|
||||||
new(ItemsChoiceType29.IsAll, true)
|
|
||||||
],
|
|
||||||
isNotLimit = true,
|
|
||||||
isShipOff = true
|
|
||||||
};
|
|
||||||
var result = client.HouseManagement.ImportNotificationDataAsync(payload).Result;
|
|
||||||
Console.WriteLine("Scenario execution " + (result ? "succeeded" : "failed"));
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void ImportAccountData()
|
|
||||||
{
|
|
||||||
var payload = new ImportAccountDataPayload()
|
|
||||||
{
|
|
||||||
accountNumber = "385635479641",
|
|
||||||
accountReasons = new AccountReasonsImportType()
|
|
||||||
{
|
|
||||||
SupplyResourceContract =
|
|
||||||
[
|
|
||||||
new()
|
|
||||||
{
|
|
||||||
Items = ["0aca4ebc-8d5c-4a39-801c-e25f0867adc6"],
|
|
||||||
ItemsElementName = [ItemsChoiceType17.ContractGUID]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
accountType = ImportAccountDataPayload.AccountType.RC,
|
|
||||||
livingPersonsNumber = 1,
|
|
||||||
totalSquare = 29.3m,
|
|
||||||
residentialSquare = 29.3m,
|
|
||||||
heatedArea = 29.3m,
|
|
||||||
accomodations =
|
|
||||||
[
|
|
||||||
new()
|
|
||||||
{
|
|
||||||
Item = "db041c58-4a14-45ce-8ecc-d99727e9683f",
|
|
||||||
ItemElementName = ItemChoiceType9.FIASHouseGuid
|
|
||||||
}
|
|
||||||
],
|
|
||||||
payerInfo = new AccountTypePayerInfo()
|
|
||||||
{
|
|
||||||
IsRenter = true,
|
|
||||||
IsRenterSpecified = true,
|
|
||||||
Item = new AccountIndType()
|
|
||||||
{
|
|
||||||
Item = "62392021264",
|
|
||||||
FirstName = "Имя",
|
|
||||||
Surname = "Фамилия",
|
|
||||||
Patronymic = "Отчество"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
var result = client.HouseManagement.ImportAccountDataAsync(payload).Result;
|
|
||||||
Console.WriteLine("Scenario execution " + (result ? "succeeded" : "failed"));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user