Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
11 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,14 @@
@Default
int orderLength = 0;

/**
* Максимальное количество субконто у счета.
* Задает предел и для конфигурации, и для пользовательского режима.
* Если равно 0, то субконто у счетов нет.
*/
@Default
int maxExtDimensionCount = 0;

Check warning on line 246 in src/main/java/com/github/_1c_syntax/bsl/mdo/ChartOfAccounts.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this initialization to "0", the compiler will do that for you.

See more on https://sonarcloud.io/project/issues?id=1c-syntax_mdclasses&issues=AaA-bJpQmzimDEfWkZ63&open=AaA-bJpQmzimDEfWkZ63&pullRequest=703

/**
* Основное представление плана счетов.
* Значение по умолчанию: {@link DefaultPresentation#AS_CODE}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ public class ExternalDataSourceCubeDimensionTable implements MDChild, ModuleOwne
@Default
DataLockControlMode dataLockControlMode = DataLockControlMode.AUTOMATIC;

/**
* Иерархическая ли таблица: у записи иерархической таблицы есть родитель
*/
boolean hierarchical;

@Override
public List<Attribute> getAllAttributes() {
return Collections.unmodifiableList(fields);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import com.github._1c_syntax.bsl.mdo.support.DefaultFormKind;
import com.github._1c_syntax.bsl.mdo.support.ObjectBelonging;
import com.github._1c_syntax.bsl.mdo.support.RoleRight;
import com.github._1c_syntax.bsl.mdo.support.TableDataType;
import com.github._1c_syntax.bsl.mdo.utils.LazyLoader;
import com.github._1c_syntax.bsl.support.SupportVariant;
import com.github._1c_syntax.bsl.types.MDOType;
Expand Down Expand Up @@ -165,6 +166,12 @@ public class ExternalDataSourceTable implements MDChild, ModuleOwner, CommandOwn
@Default
DataLockControlMode dataLockControlMode = DataLockControlMode.AUTOMATIC;

/**
* Тип данных таблицы: объектные данные или необъектные
*/
@Default
TableDataType tableDataType = TableDataType.OBJECT_DATA;

@Override
public List<Attribute> getAllAttributes() {
return Collections.unmodifiableList(fields);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@ default Map<String, FormAttribute> getPlainAttributes() {
return Map.of();
}

/**
* Пути к данным, названные в условном оформлении формы: и оформляемые поля,
* и поля условий ({@code Список.ПометкаУдаления}, {@code Объект.Том}).
* Форма читает такое поле независимо от того, показывает ли его элемент
*/
default List<String> getConditionalAppearanceFields() {
return List.of();
}

/**
* Плоское представление обработчиков событий формы,
* где ключ — имя события
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* Реализация содержимого управляемой формы
*/
@Value
@Builder
@Builder(toBuilder = true)
public class ManagedFormData implements FormData {

/**
Expand Down Expand Up @@ -83,6 +83,12 @@ public class ManagedFormData implements FormData {
@Singular("addParameters")
List<FormParameter> parameters;

/**
* Пути к данным, названные в условном оформлении формы
*/
@Singular("addConditionalAppearanceFields")
List<String> conditionalAppearanceFields;

/**
* Все элементы формы (включая вложенные)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ public class FormAdditionalColumnsAttribute implements FormAttribute {
@Singular("addColumns")
List<FormAttribute> columns;

/**
* Пути к данным полей, помеченных «использовать всегда»
*/
@Singular("addUseAlwaysFields")
List<String> useAlwaysFields;

@Override
public ValueTypeDescription getValueType() {
return type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,11 @@ public interface FormAttribute extends FormItem, ValueTypeOwner {
* Колонки (включая дополнительные колонки табличной части)
*/
List<FormAttribute> getColumns();

/**
* Пути к данным полей реквизита, помеченных «использовать всегда»
* ({@code Список.Ссылка}). Форма читает такое поле независимо от того,
* показывает ли его хоть один элемент
*/
List<String> getUseAlwaysFields();
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
*/
package com.github._1c_syntax.bsl.mdo.storage.form;

import com.github._1c_syntax.bsl.mdo.support.DynamicListKeyType;
import com.github._1c_syntax.bsl.mdo.support.FillChecking;
import com.github._1c_syntax.bsl.types.MultiLanguageString;
import com.github._1c_syntax.bsl.types.ValueTypeDescription;
Expand All @@ -36,7 +37,7 @@
* Динамический список формы (реквизит типа динамический список)
*/
@Value
@Builder
@Builder(toBuilder = true)
@ToString(of = "name")
public class FormDynamicListAttribute implements FormAttribute {

Expand Down Expand Up @@ -108,12 +109,49 @@ public class FormDynamicListAttribute implements FormAttribute {
@Default
String queryText = "";

/**
* Состав полей динамического списка - поля, которые список объявляет поверх
* основной таблицы или текста запроса.
* Заполняется только для реквизитов с типом {@code ДинамическийСписок}
*/
@Singular("addFields")
List<FormDynamicListField> fields;

/**
* Вид ключа строки: чем список адресует свою строку.
* Значение по умолчанию: {@link DynamicListKeyType#AUTO}
*/
@Default
DynamicListKeyType keyType = DynamicListKeyType.AUTO;

/**
* Поля ключа строки. Заполняются при виде ключа
* {@link DynamicListKeyType#FIELD_VALUE} и {@link DynamicListKeyType#ROW_KEY};
* полей бывает несколько
*/
@Singular("addKeyFields")
List<String> keyFields;

/**
* Колонки
*/
@Singular("addColumns")
List<FormAttribute> columns;

/**
* Пути к данным полей, помеченных «использовать всегда»
*/
@Singular("addUseAlwaysFields")
List<String> useAlwaysFields;

/**
* Поля, названные в настройках самого списка: в отборе, порядке и условном
* оформлении. Имена даны относительно списка ({@code ПометкаУдаления}),
* а список читает такое поле независимо от того, показывает ли его элемент
*/
@Singular("addSettingsFields")
List<String> settingsFields;

@Override
public ValueTypeDescription getValueType() {
return type;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/*
* This file is a part of MDClasses.
*
* Copyright (c) 2019 - 2026
* Tymko Oleg <olegtymko@yandex.ru>, Maximov Valery <maximovvalery@gmail.com> and contributors
*
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* MDClasses is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
* MDClasses is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with MDClasses.
*/
package com.github._1c_syntax.bsl.mdo.storage.form;

import com.github._1c_syntax.bsl.mdo.ValueTypeOwner;
import com.github._1c_syntax.bsl.mdo.support.DynamicListFieldKind;
import com.github._1c_syntax.bsl.types.ValueTypeDescription;
import lombok.Builder;
import lombok.Builder.Default;
import lombok.ToString;
import lombok.Value;

/**
* Поле состава динамического списка - запись, которой список объявляет
* доступное поле поверх основной таблицы или текста запроса
*/
@Value
@Builder
@ToString(of = "dataPath")
public class FormDynamicListField implements FormDataPathOwner, ValueTypeOwner {

/**
* Вид записи: собственно поле, вложенный набор данных или папка.
* Значение по умолчанию: {@link DynamicListFieldKind#FIELD}
*/
@Default
DynamicListFieldKind kind = DynamicListFieldKind.FIELD;

/**
* Путь к данным поля
*/
@Default
String dataPath = "";

/**
* Имя поля набора данных.
* Совпадает с путем к данным везде, кроме полей, сгруппированных под общим
* префиксом: у такого поля путь {@code СубконтоДт.СубконтоДт1}, а имя - {@code СубконтоДт1}
*/
@Default
String name = "";

/**
* Тип значения. Заполняется, только если поле объявляет его явно
*/
@Default
ValueTypeDescription type = ValueTypeDescription.EMPTY;

@Override
public ValueTypeDescription getValueType() {
return type;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ public class FormSimpleAttribute implements FormAttribute {
@Singular("addColumns")
List<FormAttribute> columns;

/**
* Пути к данным полей, помеченных «использовать всегда»
*/
@Singular("addUseAlwaysFields")
List<String> useAlwaysFields;

@Override
public ValueTypeDescription getValueType() {
return type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@ public class FormTable implements FormElement, FormElementOwner, FormDataPathOwn
@Default
String comment = "";

/**
* Путь к данным поля, из которого таблица берёт картинку строки
* ({@code Список.ИндексКартинки}). Колонки у такого поля нет — картинку
* рисует сама таблица, но данные она читает.
* <p>
* Отдаётся так, как записан: тильда в начале — пометка битого свойства,
* то есть путь ведёт туда, чего нет
*/
@Default
String rowPictureDataPath = "";

@Singular("addEventHandlers")
List<FormEventHandler> eventHandlers;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ public class FormTableAttribute implements FormAttribute {
@Singular("addColumns")
List<FormAttribute> columns;

/**
* Пути к данным полей, помеченных «использовать всегда»
*/
@Singular("addUseAlwaysFields")
List<String> useAlwaysFields;

@Override
public ValueTypeDescription getValueType() {
return type;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* This file is a part of MDClasses.
*
* Copyright (c) 2019 - 2026
* Tymko Oleg <olegtymko@yandex.ru>, Maximov Valery <maximovvalery@gmail.com> and contributors
*
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* MDClasses is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
* MDClasses is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with MDClasses.
*/
package com.github._1c_syntax.bsl.mdo.support;

/**
* Вид записи состава полей динамического списка
*/
public enum DynamicListFieldKind {
/**
* Поле набора данных
*/
FIELD,

/**
* Вложенный набор данных - группа, под которой лежат поля с составным путем
* к данным ({@code Планы.ЦФО})
*/
NESTED_DATA_SET,

/**
* Папка полей
*/
FOLDER
}
Loading
Loading