Skip to content

Commit

Permalink
Merge pull request #2071 from Pr-Mex/calculate-items
Browse files Browse the repository at this point in the history
Добавил счетчик ссылок в загруку данных
  • Loading branch information
Pr-Mex authored Mar 25, 2024
2 parents 662ab56 + c4997d7 commit ab2e5f9
Show file tree
Hide file tree
Showing 3 changed files with 158 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,9 @@
<v8:content>Parameters for upload ValueStorage to files</v8:content>
</v8:item>
</ToolTip>
<Group>Vertical</Group>
<Group>AlwaysHorizontal</Group>
<Behavior>Collapsible</Behavior>
<Collapsed>true</Collapsed>
<ControlRepresentation>Picture</ControlRepresentation>
<Representation>NormalSeparation</Representation>
<ExtendedTooltip name="GroupStorageToFileРасширеннаяПодсказка" id="176"/>
Expand Down Expand Up @@ -275,16 +276,80 @@
<AutoCommandBar name="MetadataListCommandBar" id="49">
<Autofill>false</Autofill>
<ChildItems>
<Button name="MetadataListSelectAll" id="191">
<Type>CommandBarButton</Type>
<CommandName>Form.Command.SelectAll</CommandName>
<ExtendedTooltip name="MetadataListSelectAllРасширеннаяПодсказка" id="192"/>
</Button>
<Button name="MetadataListDeselectAll" id="193">
<Type>CommandBarButton</Type>
<CommandName>Form.Command.DeselectAll</CommandName>
<ExtendedTooltip name="MetadataListDeselectAllРасширеннаяПодсказка" id="194"/>
</Button>
<ButtonGroup name="MetadataListGroupSelect" id="209">
<Title>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Выбор группы списка метаданных</v8:content>
</v8:item>
<v8:item>
<v8:lang>en</v8:lang>
<v8:content>Metadata list group select</v8:content>
</v8:item>
</Title>
<ToolTip>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Выбор группы списка метаданных</v8:content>
</v8:item>
<v8:item>
<v8:lang>en</v8:lang>
<v8:content>Metadata list group select</v8:content>
</v8:item>
</ToolTip>
<Representation>Compact</Representation>
<ExtendedTooltip name="MetadataListGroupSelectExtendedTooltip" id="210"/>
<ChildItems>
<Button name="MetadataListSelectAll" id="191">
<Type>CommandBarButton</Type>
<CommandName>Form.Command.SelectAll</CommandName>
<ExtendedTooltip name="MetadataListSelectAllРасширеннаяПодсказка" id="192"/>
</Button>
<Button name="MetadataListDeselectAll" id="193">
<Type>CommandBarButton</Type>
<CommandName>Form.Command.DeselectAll</CommandName>
<ExtendedTooltip name="MetadataListDeselectAllРасширеннаяПодсказка" id="194"/>
</Button>
</ChildItems>
</ButtonGroup>
<ButtonGroup name="MetadataListGroupSort" id="211">
<Title>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Сортировка группы списка метаданных</v8:content>
</v8:item>
<v8:item>
<v8:lang>en</v8:lang>
<v8:content>Metadata list group sort</v8:content>
</v8:item>
</Title>
<ToolTip>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Сортировка группы списка метаданных</v8:content>
</v8:item>
<v8:item>
<v8:lang>en</v8:lang>
<v8:content>Metadata list group sort</v8:content>
</v8:item>
</ToolTip>
<Representation>Compact</Representation>
<ExtendedTooltip name="MetadataListGroupSortExtendedTooltip" id="212"/>
<ChildItems>
<Button name="MetadataListSortListDesc" id="207">
<Type>CommandBarButton</Type>
<CommandName>Form.Item.MetadataList.StandardCommand.SortListDesc</CommandName>
<LocationInCommandBar>InCommandBar</LocationInCommandBar>
<ExtendedTooltip name="MetadataListSortListDescExtendedTooltip" id="208"/>
</Button>
<Button name="MetadataListSortListAsc" id="205">
<Type>CommandBarButton</Type>
<CommandName>Form.Item.MetadataList.StandardCommand.SortListAsc</CommandName>
<LocationInCommandBar>InCommandBar</LocationInCommandBar>
<ExtendedTooltip name="MetadataListSortListAscExtendedTooltip" id="206"/>
</Button>
</ChildItems>
</ButtonGroup>
<Button name="MetadataListGenerateFeature" id="113">
<Type>CommandBarButton</Type>
<DefaultButton>true</DefaultButton>
Expand Down Expand Up @@ -312,6 +377,11 @@
</Title>
<ExtendedTooltip name="MetadataListCloseFormРасширеннаяПодсказка" id="161"/>
</Button>
<Button name="MetadataListUpdateMetadataCount" id="203">
<Type>CommandBarButton</Type>
<CommandName>Form.Command.UpdateMetadataCount</CommandName>
<ExtendedTooltip name="MetadataListUpdateMetadataCountExtendedTooltip" id="204"/>
</Button>
</ChildItems>
</AutoCommandBar>
<ExtendedTooltip name="MetadataListExtendedTooltip" id="51"/>
Expand Down Expand Up @@ -419,6 +489,12 @@
<ContextMenu name="MetadataListFullNameContextMenu" id="84"/>
<ExtendedTooltip name="MetadataListFullNameExtendedTooltip" id="85"/>
</InputField>
<InputField name="MetadataListCount" id="200">
<DataPath>MetadataList.Count</DataPath>
<EditMode>EnterOnInput</EditMode>
<ContextMenu name="MetadataListCountContextMenu" id="201"/>
<ExtendedTooltip name="MetadataListCountExtendedTooltip" id="202"/>
</InputField>
</ChildItems>
</Table>
</ChildItems>
Expand Down Expand Up @@ -843,6 +919,26 @@
<v8:Type>v8ui:Picture</v8:Type>
</Type>
</Column>
<Column name="Count" id="4">
<Title>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Счетчик</v8:content>
</v8:item>
<v8:item>
<v8:lang>en</v8:lang>
<v8:content>Count</v8:content>
</v8:item>
</Title>
<Type>
<v8:Type>xs:decimal</v8:Type>
<v8:NumberQualifiers>
<v8:Digits>10</v8:Digits>
<v8:FractionDigits>0</v8:FractionDigits>
<v8:AllowedSign>Any</v8:AllowedSign>
</v8:NumberQualifiers>
</Type>
</Column>
</Columns>
</Attribute>
<Attribute name="DataList" id="4">
Expand Down Expand Up @@ -1328,6 +1424,29 @@
</Picture>
<Action>DeselectAll</Action>
</Command>
<Command name="UpdateMetadataCount" id="9">
<Title>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Обновить счетчик</v8:content>
</v8:item>
<v8:item>
<v8:lang>en</v8:lang>
<v8:content>Update count</v8:content>
</v8:item>
</Title>
<ToolTip>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Обновить счетчик метаданных</v8:content>
</v8:item>
<v8:item>
<v8:lang>en</v8:lang>
<v8:content>Update metadata count</v8:content>
</v8:item>
</ToolTip>
<Action>UpdateMetadataCount</Action>
</Command>
</Commands>
<Parameters>
<Parameter name="workspaceRoot">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1194,6 +1194,31 @@ Procedure SelectDependentItems(Command)
SelectDependentItemsAtServer();
EndProcedure

&AtServer
Procedure UpdateMetadataCountAtServer()

Template = "SELECT SUM(1) AS Count FROM ";

For Each MetaGroup In MetadataList.GetItems() Do
tmpCount = 0;
For Each MetaName In MetaGroup.GetItems() Do

Query = New Query();
Query.Text = Template + MetaName.FullName;
QueryResult = Query.Execute().Select();
QueryResult.Next();
MetaName.Count = QueryResult.Count;
tmpCount = tmpCount + MetaName.Count;
EndDo;
MetaGroup.Count = tmpCount;
EndDo;
EndProcedure

&AtClient
Procedure UpdateMetadataCount(Command)
UpdateMetadataCountAtServer();
EndProcedure

&AtClient
Procedure SelectAll(Команда)
SetMarks(True);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# language: ru
# language: ru
#parent uf:
@UF5_формирование_результатов_выполнения_сценариев
#parent ua:
Expand Down Expand Up @@ -82,6 +82,7 @@
| 'Использовать' | 'Представление' |
| 'Нет' | 'Регистры накопления' |
И в таблице "MetadataList" я устанавливаю флаг с именем 'MetadataListUse'
И я разворачиваю группу с именем 'GroupStorageToFile'
И я меняю значение переключателя с именем 'CreateFileForStorage' на 'Нет'
И я нажимаю на кнопку с именем '*GenerateFeature*'
И я меняю значение переключателя с именем 'StepsLanguage' на 'Английский'
Expand All @@ -95,6 +96,7 @@

И я запоминаю значение поля с именем 'PathToUpload' как 'PathToUpload'
Если '$PathToUpload$ = ""' Тогда
И я разворачиваю группу с именем 'GroupStorageToFile'
И в поле 'Путь' я ввожу текст '111'
И в поле с именем 'PathToUpload' я ввожу текст '$КаталогИнструментов$'
И я перехожу к следующему реквизиту
Expand Down

0 comments on commit ab2e5f9

Please sign in to comment.