Добавить возможность импорта отчётов StatReport 2.46 [9040]

Спасибо за отзыв!

Пожелания в дальнейшем можете оставлять в этой теме. Я оставлю её пока открытой.

Доброго времени суток! Подскажите пожалуйста, ругается на не поддерживаемую версию API. StatReport 2.46, ЛЭРС 3.35.3 офис правда 2007-й. Что нужно подправить?
111.jpg

Добрый день!

Модуль полагается на API ЛЭРС УЧЁТ версии 3.36 и выше. Нужно будет обновить сервер, чтобы импортировать данные.

Спасибо большое! Заработало)

Здравствуйте! импорт выдает такие сообщения, что и как исправить?

C:StatReportImportStatReport>.ImportStatReport --infile C:StatReport*.xlsx --server http://111.111.111.111:10000 --login 1111 --password 1111111
Найдено 3 файлов, соответствующих указанной маске.
Авторизован на http://111.111.111.111:10000 как …
Поиск точек учёта для импорта.
HTTP Response:



Lers.Api.LersException: Could not deserialize the response body stream as Lers.Api.GetMeasurePointListResponseParameters.

Status: 200
Response:

—> Newtonsoft.Json.JsonSerializationException: Unexpected token StartArray when parsing enum. Path ‘equipmentModels[0].dataInterface.driver.supportedDataTypes’, line 1, position 1212873.
at Newtonsoft.Json.Converters.StringEnumConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader)
at Lers.Api.MeasurePointsClient.ReadObjectResponseAsync[T](HttpResponseMessage response, IReadOnlyDictionary2 headers) --- End of inner exception stack trace --- at Lers.Api.MeasurePointsClient.ReadObjectResponseAsync[T](HttpResponseMessage response, IReadOnlyDictionary2 headers)
at Lers.Api.MeasurePointsClient.GetMeasurePointsAsync(Nullable1 getEquipment, Nullable1 getAttributes, Nullable`1 type, CancellationToken cancellationToken)
at ImportStatReport.LersServerSaver.FindMeasurePoints(Int32 deviceModel)
at ImportStatReport.Program.Entry(Options options)

Скачайте новую версию утилиты. Это связано с изменением в REST API.

Спасибо, работает!

Хорошо!
Я закрою эту тему, так как исходная задача была решена. Если возникнут вопросы, пожалуйста, создайте новую тему в разделе “Внешние модули”.