Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -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 Down Expand Up @@ -108,6 +109,29 @@ 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;

/**
* Колонки
*/
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
@@ -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
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
* 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;

import com.github._1c_syntax.bsl.types.EnumWithName;
import com.github._1c_syntax.bsl.types.MultiName;
import lombok.Getter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.util.Locale;
import java.util.Map;

/**
* Вид ключа строки динамического списка.
* Определяет, чем список адресует свою строку
*/
@ToString(of = "fullName")
public enum DynamicListKeyType implements EnumWithName {
AUTO("Auto", "Авто"),
FIELD_VALUE("FieldValue", "ЗначениеПоля"),
ROW_KEY("RowKey", "КлючСтроки"),
ROW_NUMBER("RowNumber", "НомерСтроки"),
UNKNOWN("unknown", "неизвестный");

private static final Map<String, DynamicListKeyType> KEYS = EnumWithName.computeKeys(values());

@Getter
@Accessors(fluent = true)
private final MultiName fullName;

DynamicListKeyType(String nameEn, String nameRu) {
this.fullName = MultiName.create(nameEn, nameRu);
}

/**
* Ищет элемент перечисления по именам (рус, анг)
*
* @param string Имя искомого элемента
* @return Найденное значение, если не найден - то UNKNOWN
*/
public static DynamicListKeyType valueByName(String string) {
return KEYS.getOrDefault(string.toLowerCase(Locale.ROOT), UNKNOWN);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
* 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;

import com.github._1c_syntax.bsl.types.EnumWithName;
import com.github._1c_syntax.bsl.types.MultiName;
import lombok.Getter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.util.Locale;
import java.util.Map;

/**
* Тип данных таблицы внешнего источника данных.
* Определяет, есть ли у записи таблицы ссылка
*/
@ToString(of = "fullName")
public enum TableDataType implements EnumWithName {
OBJECT_DATA("ObjectData", "ОбъектныеДанные"),
NONOBJECT_DATA("NonobjectData", "НеобъектныеДанные"),
UNKNOWN("unknown", "неизвестный");

private static final Map<String, TableDataType> KEYS = EnumWithName.computeKeys(values());

@Getter
@Accessors(fluent = true)
private final MultiName fullName;

TableDataType(String nameEn, String nameRu) {
this.fullName = MultiName.create(nameEn, nameRu);
}

/**
* Ищет элемент перечисления по именам (рус, анг)
*
* @param string Имя искомого элемента
* @return Найденное значение, если не найден - то UNKNOWN
*/
public static TableDataType valueByName(String string) {
return KEYS.getOrDefault(string.toLowerCase(Locale.ROOT), UNKNOWN);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@
import com.github._1c_syntax.bsl.mdo.storage.form.FormAdditionalColumnsAttribute;
import com.github._1c_syntax.bsl.mdo.storage.form.FormAttribute;
import com.github._1c_syntax.bsl.mdo.storage.form.FormDynamicListAttribute;
import com.github._1c_syntax.bsl.mdo.storage.form.FormDynamicListField;
import com.github._1c_syntax.bsl.mdo.storage.form.FormItem;
import com.github._1c_syntax.bsl.mdo.storage.form.FormSimpleAttribute;
import com.github._1c_syntax.bsl.mdo.storage.form.FormTableAttribute;
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 Down Expand Up @@ -120,6 +122,27 @@ public class FormAttributeWrapper implements FormItem, ValueTypeOwner {
@Default
String queryText = "";

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

/**
* Вид ключа строки динамического списка.
* Заполняется только для реквизитов с типом {@code ДинамическийСписок}
*/
@Default
DynamicListKeyType keyType = DynamicListKeyType.AUTO;

/**
* Поля ключа строки динамического списка.
* Заполняются только для реквизитов с типом {@code ДинамическийСписок}
*/
@Singular("addKeyFields")
List<String> keyFields;

/**
* Колонки таблицы
*/
Expand Down Expand Up @@ -213,6 +236,9 @@ private FormAttribute dispatch(List<FormAttribute> columns) {
.mainTable(mainTable)
.customQuery(customQuery)
.queryText(queryText)
.fields(fields)
.keyType(keyType)
.keyFields(keyFields)
.columns(columns)
.build();
}
Expand Down
Loading
Loading