Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hemei
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
潘栩锋
hemei
Commits
01c9f470
Commit
01c9f470
authored
Nov 11, 2022
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'remotes/origin/feature-feng-yide-20221107' into dev-7.0-1
parents
e46cffab
24395f94
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
272 additions
and
47 deletions
+272
-47
ExcelOuput.cs
....Blowing.DbViewer/FLY.Blowing.DbViewer/Core/ExcelOuput.cs
+4
-2
AssemblyInfo.cs
....DbViewer/FLY.Blowing.DbViewer/Properties/AssemblyInfo.cs
+3
-3
AssemblyInfo.cs
...LY.Thick.Blowing.UI.Fix.Client/Properties/AssemblyInfo.cs
+2
-2
AssemblyInfo.cs
...LY.Thick.BlowingScan.UI.Client/Properties/AssemblyInfo.cs
+2
-2
UcTAreaProfile.xaml
Project.FLY.Unions/FLY.Unions.UI/UcTAreaProfile.xaml
+4
-4
UcThkProfile.xaml
Project.FLY.Unions/FLY.Unions.UI/UcThkProfile.xaml
+5
-5
UcWeightProfile.xaml
Project.FLY.Unions/FLY.Unions.UI/UcWeightProfile.xaml
+16
-5
UcWeightProfile.xaml.cs
Project.FLY.Unions/FLY.Unions.UI/UcWeightProfile.xaml.cs
+40
-4
UcWeightProfileVmUt.cs
Project.FLY.Unions/FLY.Unions.UI/UcWeightProfileVmUt.cs
+3
-2
AssemblyInfo.cs
...LY.Weight/FLY.Weight.UI.Server/Properties/AssemblyInfo.cs
+2
-2
WdSetup.xaml
Project.FLY.Weight/FLY.Weight.UI.Server/WdSetup.xaml
+4
-0
WdSetup.xaml.cs
Project.FLY.Weight/FLY.Weight.UI.Server/WdSetup.xaml.cs
+3
-2
WeightProfileServiceClient.cs
...LY.Weight/FLY.Weight/Client/WeightProfileServiceClient.cs
+16
-0
WeightSystemServiceClient.cs
...FLY.Weight/FLY.Weight/Client/WeightSystemServiceClient.cs
+19
-2
WeightProfileParam.cs
Project.FLY.Weight/FLY.Weight/Common/WeightProfileParam.cs
+7
-0
IWeightProfileService.cs
...t.FLY.Weight/FLY.Weight/IService/IWeightProfileService.cs
+16
-0
IWeightSystemService.cs
...ct.FLY.Weight/FLY.Weight/IService/IWeightSystemService.cs
+5
-0
LcTable.cs
Project.FLY.Weight/FLY.Weight/Server/Model/LcTable.cs
+5
-0
TDGage.cs
Project.FLY.Weight/FLY.Weight/Server/TDGage.cs
+1
-1
WeightProfile.cs
Project.FLY.Weight/FLY.Weight/Server/WeightProfile.cs
+18
-1
WeightSystem.cs
Project.FLY.Weight/FLY.Weight/Server/WeightSystem.cs
+67
-8
hemeiInstallZipVersionInfo.json
脚本/hemeiInstallZipVersionInfo.json
+3
-2
版本描述.md
脚本/版本描述.md
+27
-0
No files found.
Project.FLY.Blowing.DbViewer/FLY.Blowing.DbViewer/Core/ExcelOuput.cs
View file @
01c9f470
...
@@ -372,8 +372,9 @@ namespace FLY.Blowing.DbViewer.Core
...
@@ -372,8 +372,9 @@ namespace FLY.Blowing.DbViewer.Core
dataTable
.
Columns
.
Add
(
new
DataColumn
()
{
ColumnName
=
"料斗重量(kg)"
,
DataType
=
typeof
(
double
),
Caption
=
"0.0000"
});
dataTable
.
Columns
.
Add
(
new
DataColumn
()
{
ColumnName
=
"料斗重量(kg)"
,
DataType
=
typeof
(
double
),
Caption
=
"0.0000"
});
for
(
int
i
=
0
;
i
<
itemCnt
;
i
++)
for
(
int
i
=
0
;
i
<
itemCnt
;
i
++)
{
{
dataTable
.
Columns
.
Add
(
new
DataColumn
()
{
ColumnName
=
$"#
{
i
+
1
}
重量(kg)"
,
DataType
=
typeof
(
double
),
Caption
=
"0.0000"
});
dataTable
.
Columns
.
Add
(
new
DataColumn
()
{
ColumnName
=
$"#
{
i
+
1
}
重量(kg)"
,
DataType
=
typeof
(
double
),
Caption
=
"0.0000"
});
dataTable
.
Columns
.
Add
(
new
DataColumn
()
{
ColumnName
=
$"#
{
i
+
1
}
比例(%)"
,
DataType
=
typeof
(
double
),
Caption
=
"0.00"
});
dataTable
.
Columns
.
Add
(
new
DataColumn
()
{
ColumnName
=
$"#
{
i
+
1
}
比例(%)"
,
DataType
=
typeof
(
double
),
Caption
=
"0.00"
});
dataTable
.
Columns
.
Add
(
new
DataColumn
()
{
ColumnName
=
$"#
{
i
+
1
}
仓号"
,
DataType
=
typeof
(
string
)
});
}
}
CurrRowGrowUpReady
();
CurrRowGrowUpReady
();
for
(
int
j
=
0
;
j
<
mixs
.
Count
();
j
++)
for
(
int
j
=
0
;
j
<
mixs
.
Count
();
j
++)
...
@@ -389,6 +390,7 @@ namespace FLY.Blowing.DbViewer.Core
...
@@ -389,6 +390,7 @@ namespace FLY.Blowing.DbViewer.Core
var
item
=
mix
.
Items
[
i
];
var
item
=
mix
.
Items
[
i
];
dataRow
[
$"#
{
i
+
1
}
重量(kg)"
]
=
item
.
Disp
;
dataRow
[
$"#
{
i
+
1
}
重量(kg)"
]
=
item
.
Disp
;
dataRow
[
$"#
{
i
+
1
}
比例(%)"
]
=
item
.
PDisp
;
dataRow
[
$"#
{
i
+
1
}
比例(%)"
]
=
item
.
PDisp
;
dataRow
[
$"#
{
i
+
1
}
仓号"
]
=
item
.
Description
;
}
}
dataTable
.
Rows
.
Add
(
dataRow
);
dataTable
.
Rows
.
Add
(
dataRow
);
...
...
Project.FLY.Blowing.DbViewer/FLY.Blowing.DbViewer/Properties/AssemblyInfo.cs
View file @
01c9f470
...
@@ -12,7 +12,7 @@ using System.Windows;
...
@@ -12,7 +12,7 @@ using System.Windows;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("佛山市枫莱尔自动化技术有限公司")]
[assembly: AssemblyCompany("佛山市枫莱尔自动化技术有限公司")]
[assembly: AssemblyProduct("吹膜数据库浏览器")]
[assembly: AssemblyProduct("吹膜数据库浏览器")]
[assembly: AssemblyCopyright("Copyright © 202
1
FlyAutomation")]
[assembly: AssemblyCopyright("Copyright © 202
2
FlyAutomation")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyCulture("")]
...
@@ -51,6 +51,6 @@ using System.Windows;
...
@@ -51,6 +51,6 @@ using System.Windows;
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("
6.33
.0.0")]
[assembly: AssemblyVersion("
7.7
.0.0")]
[assembly: AssemblyFileVersion("
6.33
.0.0")]
[assembly: AssemblyFileVersion("
7.7
.0.0")]
[assembly: Guid("5FE5D848-CD2B-42CC-8EBD-2029371CDFE2")]
[assembly: Guid("5FE5D848-CD2B-42CC-8EBD-2029371CDFE2")]
Project.FLY.Thick.Blowing/FLY.Thick.Blowing.UI.Fix.Client/Properties/AssemblyInfo.cs
View file @
01c9f470
...
@@ -51,6 +51,6 @@ using System.Windows;
...
@@ -51,6 +51,6 @@ using System.Windows;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.
6.2
.0")]
[assembly: AssemblyVersion("7.
7
.0")]
[assembly: AssemblyFileVersion("7.
6.2
.0")]
[assembly: AssemblyFileVersion("7.
7
.0")]
[assembly: Guid("D12087A7-EEC4-4D9F-9269-8F20324F4B04")]
[assembly: Guid("D12087A7-EEC4-4D9F-9269-8F20324F4B04")]
Project.FLY.Thick.BlowingScan/FLY.Thick.BlowingScan.UI.Client/Properties/AssemblyInfo.cs
View file @
01c9f470
...
@@ -51,6 +51,6 @@ using System.Windows;
...
@@ -51,6 +51,6 @@ using System.Windows;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.
6.3
.1")]
[assembly: AssemblyVersion("7.
7.0
.1")]
[assembly: AssemblyFileVersion("7.
6.3
.1")]
[assembly: AssemblyFileVersion("7.
7.0
.1")]
[assembly: Guid("38E0D8EC-4D1C-49FF-AB08-6289294C5BD4")]
[assembly: Guid("38E0D8EC-4D1C-49FF-AB08-6289294C5BD4")]
Project.FLY.Unions/FLY.Unions.UI/UcTAreaProfile.xaml
View file @
01c9f470
...
@@ -91,8 +91,8 @@
...
@@ -91,8 +91,8 @@
ItemsSource="{Binding ProfileList}" SelectedItem="{Binding SelectedItem}">
ItemsSource="{Binding ProfileList}" SelectedItem="{Binding SelectedItem}">
<ListBox.Resources>
<ListBox.Resources>
<Style TargetType="{x:Type ListBoxItem}">
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="FontFamily" Value="
Microsoft YaHei UI Light
"/>
<Setter Property="FontFamily" Value="
{StaticResource FontFamily.Field}
"/>
<Setter Property="FontSize" Value="
16
"/>
<Setter Property="FontSize" Value="
{StaticResource FontSize.FieldContent.Middle}
"/>
<!--<Setter Property="HorizontalContentAlignment" Value="Center"/>-->
<!--<Setter Property="HorizontalContentAlignment" Value="Center"/>-->
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
...
@@ -109,7 +109,7 @@
...
@@ -109,7 +109,7 @@
Margin="0,0,0,5">
Margin="0,0,0,5">
<!--<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />-->
<!--<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />-->
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Horizontal">
<TextBlock x:Name="Tb" Text="{Binding .}" Foreground="{StaticResource Brushes.Static}" FontWeight="
Bold" FontSize="26" FontFamily="Microsoft Sans Serif
" />
<TextBlock x:Name="Tb" Text="{Binding .}" Foreground="{StaticResource Brushes.Static}" FontWeight="
{TemplateBinding FontWeight}" FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily}
" />
</StackPanel>
</StackPanel>
</Border>
</Border>
<ControlTemplate.Triggers>
<ControlTemplate.Triggers>
...
@@ -160,7 +160,7 @@
...
@@ -160,7 +160,7 @@
<StackPanel>
<StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="配方名称" />
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="配方名称" />
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding PName}" Tag="
Full
" />
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding PName}" Tag="
Name
" />
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
...
...
Project.FLY.Unions/FLY.Unions.UI/UcThkProfile.xaml
View file @
01c9f470
...
@@ -31,8 +31,8 @@
...
@@ -31,8 +31,8 @@
ItemsSource="{Binding ProfileList}" SelectedItem="{Binding SelectedItem}">
ItemsSource="{Binding ProfileList}" SelectedItem="{Binding SelectedItem}">
<ListBox.Resources>
<ListBox.Resources>
<Style TargetType="{x:Type ListBoxItem}">
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="FontFamily" Value="
Microsoft YaHei UI Light
"/>
<Setter Property="FontFamily" Value="
{StaticResource FontFamily.Field}
"/>
<Setter Property="FontSize" Value="
16
"/>
<Setter Property="FontSize" Value="
{StaticResource FontSize.FieldContent.Middle}
"/>
<!--<Setter Property="HorizontalContentAlignment" Value="Center"/>-->
<!--<Setter Property="HorizontalContentAlignment" Value="Center"/>-->
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
Margin="0,0,0,5">
Margin="0,0,0,5">
<!--<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />-->
<!--<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />-->
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Horizontal">
<TextBlock x:Name="Tb" Text="{Binding .}" Foreground="{StaticResource Brushes.Static}" FontWeight="
Bold" FontSize="26" FontFamily="Microsoft Sans Serif
" />
<TextBlock x:Name="Tb" Text="{Binding .}" Foreground="{StaticResource Brushes.Static}" FontWeight="
{TemplateBinding FontWeight}" FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily}
" />
</StackPanel>
</StackPanel>
</Border>
</Border>
<ControlTemplate.Triggers>
<ControlTemplate.Triggers>
...
@@ -99,7 +99,7 @@
...
@@ -99,7 +99,7 @@
<StackPanel>
<StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="产品名称" />
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="产品名称" />
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding PName}" Tag="
Full
" />
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding PName}" Tag="
Name
" />
</StackPanel>
</StackPanel>
<Grid>
<Grid>
<Grid.ColumnDefinitions>
<Grid.ColumnDefinitions>
...
@@ -108,7 +108,7 @@
...
@@ -108,7 +108,7 @@
</Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
<StackPanel Margin="{StaticResource ControlMargin}">
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="订单号" />
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="订单号" />
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding OrderNo}" Tag="
Full
" />
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding OrderNo}" Tag="
Name
" />
</StackPanel>
</StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}" Grid.Column="1">
<StackPanel Margin="{StaticResource ControlMargin}" Grid.Column="1">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="卷号" />
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="卷号" />
...
...
Project.FLY.Unions/FLY.Unions.UI/UcWeightProfile.xaml
View file @
01c9f470
...
@@ -17,6 +17,8 @@
...
@@ -17,6 +17,8 @@
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary.MergedDictionaries>
<sys:Double x:Key="Table.Column.Width[0]">50</sys:Double>
<sys:Double x:Key="Table.Column.Width[0]">50</sys:Double>
<sys:Double x:Key="Table.Column.Width">120</sys:Double>
<sys:Double x:Key="Table.Column.Width">120</sys:Double>
<sys:Double x:Key="Table.Column.Width.Description">200</sys:Double>
<Style x:Key="Table.Column.Title[0]" TargetType="TextBlock" BasedOn="{StaticResource Styles.Text.FieldHeader}">
<Style x:Key="Table.Column.Title[0]" TargetType="TextBlock" BasedOn="{StaticResource Styles.Text.FieldHeader}">
<Setter Property="Width" Value="{StaticResource Table.Column.Width[0]}"/>
<Setter Property="Width" Value="{StaticResource Table.Column.Width[0]}"/>
...
@@ -62,8 +64,8 @@
...
@@ -62,8 +64,8 @@
ItemsSource="{Binding ProfileList}" SelectedItem="{Binding SelectedItem}">
ItemsSource="{Binding ProfileList}" SelectedItem="{Binding SelectedItem}">
<ListBox.Resources>
<ListBox.Resources>
<Style TargetType="{x:Type ListBoxItem}">
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="FontFamily" Value="
Microsoft YaHei UI Light
"/>
<Setter Property="FontFamily" Value="
{StaticResource FontFamily.Field}
"/>
<Setter Property="FontSize" Value="
16
"/>
<Setter Property="FontSize" Value="
{StaticResource FontSize.FieldContent.Middle}
"/>
<!--<Setter Property="HorizontalContentAlignment" Value="Center"/>-->
<!--<Setter Property="HorizontalContentAlignment" Value="Center"/>-->
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
...
@@ -80,7 +82,7 @@
...
@@ -80,7 +82,7 @@
Margin="0,0,0,5">
Margin="0,0,0,5">
<!--<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />-->
<!--<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />-->
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Horizontal">
<TextBlock x:Name="Tb" Text="{Binding .}" Foreground="{StaticResource Brushes.Static}" FontWeight="
Bold" FontSize="26" FontFamily="{StaticResource FontFamily.Field
}" />
<TextBlock x:Name="Tb" Text="{Binding .}" Foreground="{StaticResource Brushes.Static}" FontWeight="
{TemplateBinding FontWeight}" FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily
}" />
</StackPanel>
</StackPanel>
</Border>
</Border>
<ControlTemplate.Triggers>
<ControlTemplate.Triggers>
...
@@ -131,7 +133,7 @@
...
@@ -131,7 +133,7 @@
<StackPanel>
<StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="配方名称" />
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="配方名称" />
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding PName}" Tag="
Full
" />
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding PName}" Tag="
Name
" />
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
...
@@ -232,6 +234,11 @@
...
@@ -232,6 +234,11 @@
Visibility="{Binding ElementName=grid_root,Path=DataContext.HasIngredientDensity,Converter={StaticResource visbilityconv},ConverterParameter=Collapsed}">
Visibility="{Binding ElementName=grid_root,Path=DataContext.HasIngredientDensity,Converter={StaticResource visbilityconv},ConverterParameter=Collapsed}">
<TextBlock Style="{StaticResource Table.Column.Title}" Text="当前密度g/cm³" />
<TextBlock Style="{StaticResource Table.Column.Title}" Text="当前密度g/cm³" />
</Border>
</Border>
<Border BorderThickness="0,1,1,1" BorderBrush="{StaticResource Color_table_border}"
Visibility="{Binding ElementName=grid_root,Path=DataContext.HasIngredientDescription,Converter={StaticResource visbilityconv},ConverterParameter=Collapsed}">
<TextBlock Style="{StaticResource Table.Column.Title}" Width="{StaticResource Table.Column.Width.Description}" Text="仓号" />
</Border>
</StackPanel>
</StackPanel>
<ItemsControl ItemsSource="{Binding Ingredients}" >
<ItemsControl ItemsSource="{Binding Ingredients}" >
<ItemsControl.ItemsPanel>
<ItemsControl.ItemsPanel>
...
@@ -259,6 +266,10 @@
...
@@ -259,6 +266,10 @@
Visibility="{Binding ElementName=grid_root,Path=DataContext.HasIngredientDensity,Converter={StaticResource visbilityconv},ConverterParameter=Collapsed}">
Visibility="{Binding ElementName=grid_root,Path=DataContext.HasIngredientDensity,Converter={StaticResource visbilityconv},ConverterParameter=Collapsed}">
<TextBlock Style="{StaticResource Table.Column.Content}" Text="{Binding PLC_Density,StringFormat={}{0:0.###}}" />
<TextBlock Style="{StaticResource Table.Column.Content}" Text="{Binding PLC_Density,StringFormat={}{0:0.###}}" />
</Border>
</Border>
<Border BorderThickness="0,0,1,1" BorderBrush="{StaticResource Color_table_border}"
Visibility="{Binding ElementName=grid_root,Path=DataContext.HasIngredientDescription,Converter={StaticResource visbilityconv},ConverterParameter=Collapsed}">
<TextBox Style="{StaticResource Table.Column.Content.Editable}" Width="{StaticResource Table.Column.Width.Description}" Text="{Binding Description}" Tag="Name"/>
</Border>
</StackPanel>
</StackPanel>
</DataTemplate>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl.ItemTemplate>
...
...
Project.FLY.Unions/FLY.Unions.UI/UcWeightProfile.xaml.cs
View file @
01c9f470
...
@@ -62,7 +62,10 @@ namespace FLY.Unions.UI
...
@@ -62,7 +62,10 @@ namespace FLY.Unions.UI
/// </summary>
/// </summary>
public
bool
HasIngredientDensity
{
get
;
set
;
}
public
bool
HasIngredientDensity
{
get
;
set
;
}
/// <summary>
/// 有每层组份的描述功能
/// </summary>
public
bool
HasIngredientDescription
{
get
;
set
;
}
#
region
Command
#
region
Command
...
@@ -93,7 +96,7 @@ namespace FLY.Unions.UI
...
@@ -93,7 +96,7 @@ namespace FLY.Unions.UI
this
.
weightProfileService
=
_weightProfileService
;
this
.
weightProfileService
=
_weightProfileService
;
this
.
weightSystemService
=
_weightSystemService
;
this
.
weightSystemService
=
_weightSystemService
;
weightSystemService
.
VersionStringParse
(
out
int
version
,
out
int
itemStyle
);
weightSystemService
.
VersionStringParse
(
out
int
version
,
out
int
itemStyle
);
HasIngredientDescription
=
weightSystemService
.
HasIngredientDescription
;
switch
(
version
)
switch
(
version
)
{
{
case
5
:
case
5
:
...
@@ -188,6 +191,21 @@ namespace FLY.Unions.UI
...
@@ -188,6 +191,21 @@ namespace FLY.Unions.UI
if
(!
WdPassword
.
Authorize
(
"Profile"
))
if
(!
WdPassword
.
Authorize
(
"Profile"
))
return
;
return
;
//有效性检查
if
(
string
.
IsNullOrEmpty
(
Param
.
PName
))
{
FLY
.
ControlLibrary
.
Window_WarningTip
.
Show
(
"参数出错"
,
"称重配方名称为空"
);
return
;
}
weightProfileService
.
Apply
(
Param
.
GetValue
());
if
(!
ProfileList
.
Contains
(
Param
.
PName
))
{
ProfileList
.
Add
(
Param
.
PName
);
}
SelectedItem
=
Param
.
PName
;
//绑定weightSystemService数据
//绑定weightSystemService数据
for
(
int
i
=
0
;
i
<
weightSystemService
.
Items
.
Count
();
i
++)
for
(
int
i
=
0
;
i
<
weightSystemService
.
Items
.
Count
();
i
++)
{
{
...
@@ -209,6 +227,10 @@ namespace FLY.Unions.UI
...
@@ -209,6 +227,10 @@ namespace FLY.Unions.UI
ingredient
.
Density
=
ingredientView
.
Density
;
ingredient
.
Density
=
ingredientView
.
Density
;
}
}
}
}
FLY
.
ControlLibrary
.
Window_Tip
.
Show
(
"成功"
,
"已经设置到PLC"
,
TimeSpan
.
FromSeconds
(
2
));
}
}
private
void
ToProfile
()
private
void
ToProfile
()
...
@@ -333,12 +355,18 @@ namespace FLY.Unions.UI
...
@@ -333,12 +355,18 @@ namespace FLY.Unions.UI
ingredientView
.
Density
=
ingredient
.
Density
;
ingredientView
.
Density
=
ingredient
.
Density
;
ingredientView
.
MixPSet
=
ingredient
.
MixPSet
;
ingredientView
.
MixPSet
=
ingredient
.
MixPSet
;
ingredientView
.
Description
=
ingredient
.
Description
;
}
}
}
}
}
}
/// <summary>
/// 从WeightProfileParamView转为WeightProfileParam
/// </summary>
/// <returns></returns>
public
WeightProfileParam
GetValue
()
public
WeightProfileParam
GetValue
()
{
{
WeightProfileParam
param
=
new
WeightProfileParam
WeightProfileParam
param
=
new
WeightProfileParam
{
{
PName
=
PName
,
PName
=
PName
,
...
@@ -352,8 +380,9 @@ namespace FLY.Unions.UI
...
@@ -352,8 +380,9 @@ namespace FLY.Unions.UI
ingredientView
=>
new
IngredientParam
ingredientView
=>
new
IngredientParam
{
{
Density
=
ingredientView
.
Density
,
Density
=
ingredientView
.
Density
,
MixPSet
=
ingredientView
.
MixPSet
MixPSet
=
ingredientView
.
MixPSet
,
}).
ToArray
()
Description
=
ingredientView
.
Description
}).
ToArray
(),
};
};
}).
ToArray
()
}).
ToArray
()
};
};
...
@@ -361,6 +390,9 @@ namespace FLY.Unions.UI
...
@@ -361,6 +390,9 @@ namespace FLY.Unions.UI
return
param
;
return
param
;
}
}
/// <summary>
/// 从PLC获取当前数据
/// </summary>
public
void
SetValueFromPlc
()
public
void
SetValueFromPlc
()
{
{
for
(
int
i
=
0
;
i
<
Items
.
Count
();
i
++)
for
(
int
i
=
0
;
i
<
Items
.
Count
();
i
++)
...
@@ -442,6 +474,10 @@ namespace FLY.Unions.UI
...
@@ -442,6 +474,10 @@ namespace FLY.Unions.UI
/// </summary>
/// </summary>
public
float
Density
{
get
;
set
;
}
public
float
Density
{
get
;
set
;
}
/// <summary>
/// 描述
/// </summary>
public
string
Description
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 比例 0~100
/// 比例 0~100
...
...
Project.FLY.Unions/FLY.Unions.UI/UcWeightProfileVmUt.cs
View file @
01c9f470
...
@@ -18,8 +18,9 @@ namespace FLY.Unions.UI
...
@@ -18,8 +18,9 @@ namespace FLY.Unions.UI
Param
.
PName
=
"qweqwee11231"
;
Param
.
PName
=
"qweqwee11231"
;
HasDensity
=
false
;
HasDensity
=
true
;
HasIngredientDensity
=
false
;
HasIngredientDensity
=
true
;
HasIngredientDescription
=
true
;
int
[]
BinCnts
=
new
int
[]
{
6
,
2
,
0
,
2
,
6
};
int
[]
BinCnts
=
new
int
[]
{
6
,
2
,
0
,
2
,
6
};
...
...
Project.FLY.Weight/FLY.Weight.UI.Server/Properties/AssemblyInfo.cs
View file @
01c9f470
...
@@ -51,6 +51,6 @@ using System.Windows;
...
@@ -51,6 +51,6 @@ using System.Windows;
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.
6.1
.0")]
[assembly: AssemblyVersion("7.
7.0
.0")]
[assembly: AssemblyFileVersion("7.
6.1
.0")]
[assembly: AssemblyFileVersion("7.
7.0
.0")]
[assembly: Guid("AC4FFE57-FF42-4B4D-9E23-FF583D78187D")]
[assembly: Guid("AC4FFE57-FF42-4B4D-9E23-FF583D78187D")]
Project.FLY.Weight/FLY.Weight.UI.Server/WdSetup.xaml
View file @
01c9f470
...
@@ -36,6 +36,10 @@
...
@@ -36,6 +36,10 @@
<TextBlock Text="层显示方式" Margin="2"/>
<TextBlock Text="层显示方式" Margin="2"/>
<ComboBox Margin="2" ItemsSource="{Binding WeightStyles}" DisplayMemberPath="Name" SelectedValuePath="ItemStyle" SelectedValue="{Binding ItemStyle,Mode=TwoWay}"/>
<ComboBox Margin="2" ItemsSource="{Binding WeightStyles}" DisplayMemberPath="Name" SelectedValuePath="ItemStyle" SelectedValue="{Binding ItemStyle,Mode=TwoWay}"/>
</StackPanel>
</StackPanel>
<StackPanel Margin="5">
<TextBlock Text="组分描述" Margin="2"/>
<CheckBox IsChecked="{Binding HasIngredientDescription}"/>
</StackPanel>
<Button Content="确定" Padding="20,5" Margin="5" Click="btnOkClick" VerticalAlignment="Bottom"/>
<Button Content="确定" Padding="20,5" Margin="5" Click="btnOkClick" VerticalAlignment="Bottom"/>
</StackPanel>
</StackPanel>
...
...
Project.FLY.Weight/FLY.Weight.UI.Server/WdSetup.xaml.cs
View file @
01c9f470
...
@@ -55,12 +55,10 @@ namespace FLY.Weight.UI.Server
...
@@ -55,12 +55,10 @@ namespace FLY.Weight.UI.Server
{
{
viewModel
.
GenV3
();
viewModel
.
GenV3
();
}
}
private
void
ComboBox_SelectionChanged
(
object
sender
,
SelectionChangedEventArgs
e
)
private
void
ComboBox_SelectionChanged
(
object
sender
,
SelectionChangedEventArgs
e
)
{
{
viewModel
.
PlcGroupItem2Version
();
viewModel
.
PlcGroupItem2Version
();
}
}
private
void
btnVersionClick
(
object
sender
,
RoutedEventArgs
e
)
private
void
btnVersionClick
(
object
sender
,
RoutedEventArgs
e
)
{
{
string
filePath
=
@"plcgroups\版本描述.txt"
;
string
filePath
=
@"plcgroups\版本描述.txt"
;
...
@@ -103,6 +101,7 @@ namespace FLY.Weight.UI.Server
...
@@ -103,6 +101,7 @@ namespace FLY.Weight.UI.Server
public
int
DataVersion
{
get
;
set
;
}
public
int
DataVersion
{
get
;
set
;
}
public
int
ItemStyle
{
get
;
set
;
}
public
int
ItemStyle
{
get
;
set
;
}
public
bool
HasIngredientDescription
{
get
;
set
;
}
public
string
[]
NumberNames
{
get
;
set
;
}
public
string
[]
NumberNames
{
get
;
set
;
}
TDGage
gage
;
TDGage
gage
;
...
@@ -120,6 +119,7 @@ namespace FLY.Weight.UI.Server
...
@@ -120,6 +119,7 @@ namespace FLY.Weight.UI.Server
DataVersion
=
version
;
DataVersion
=
version
;
ItemStyle
=
itemStyle
;
ItemStyle
=
itemStyle
;
NumberNames
=
gage
.
mData
.
NumberNames
;
NumberNames
=
gage
.
mData
.
NumberNames
;
HasIngredientDescription
=
gage
.
mData
.
HasIngredientDescription
;
}
}
private
void
Init_PlcGroupItems
()
private
void
Init_PlcGroupItems
()
...
@@ -236,6 +236,7 @@ namespace FLY.Weight.UI.Server
...
@@ -236,6 +236,7 @@ namespace FLY.Weight.UI.Server
gage
.
mData
.
NumberNames
=
NumberNames
;
gage
.
mData
.
NumberNames
=
NumberNames
;
gage
.
mData
.
Version
=
gage
.
mData
.
CreateVersionString
(
DataVersion
,
ItemStyle
);
gage
.
mData
.
Version
=
gage
.
mData
.
CreateVersionString
(
DataVersion
,
ItemStyle
);
gage
.
mData
.
HasIngredientDescription
=
HasIngredientDescription
;
gage
.
mData
.
SaveNumberNames
();
gage
.
mData
.
SaveNumberNames
();
...
...
Project.FLY.Weight/FLY.Weight/Client/WeightProfileServiceClient.cs
View file @
01c9f470
...
@@ -11,10 +11,26 @@ namespace FLY.Weight.Client
...
@@ -11,10 +11,26 @@ namespace FLY.Weight.Client
{
{
protected
override
Type
InterfaceType
=>
typeof
(
IWeightProfileService
);
protected
override
Type
InterfaceType
=>
typeof
(
IWeightProfileService
);
/// <summary>
/// 每次有新数据时候推送。 修改参数,不会推送
/// </summary>
[
Push
(
typeof
(
WeightProfileParamChangedEventArgs
))]
public
event
EventHandler
WeightProfileParamChanged
;
public
WeightProfileServiceClient
(
UInt32
id
)
:
base
(
id
)
{
}
public
WeightProfileServiceClient
(
UInt32
id
)
:
base
(
id
)
{
}
public
WeightProfileServiceClient
(
UInt32
serviceId
,
string
connName
)
:
base
(
serviceId
,
connName
)
{
}
public
WeightProfileServiceClient
(
UInt32
serviceId
,
string
connName
)
:
base
(
serviceId
,
connName
)
{
}
public
void
Trigger_WeightProfileParamChanged
(
EventArgs
e
)
{
//TODO, e 是 WeightProfileParamChangedEventArgs ,不知道是否能这样调用
WeightProfileParamChanged
?.
Invoke
(
this
,
e
);
}
/// <summary>
/// <summary>
/// 读取当前值, 没有推送功能
/// 读取当前值, 没有推送功能
/// </summary>
/// </summary>
...
...
Project.FLY.Weight/FLY.Weight/Client/WeightSystemServiceClient.cs
View file @
01c9f470
...
@@ -47,6 +47,12 @@ namespace FLY.Weight.Client
...
@@ -47,6 +47,12 @@ namespace FLY.Weight.Client
public
string
[]
NumberNames
{
get
;
set
;
}
public
string
[]
NumberNames
{
get
;
set
;
}
public
string
Version
{
get
;
set
;
}
=
"v3"
;
public
string
Version
{
get
;
set
;
}
=
"v3"
;
/// <summary>
/// 有每层的组分描述
/// </summary>
public
bool
HasIngredientDescription
{
get
;
set
;
}
=
false
;
#
endregion
#
endregion
...
@@ -133,7 +139,8 @@ namespace FLY.Weight.Client
...
@@ -133,7 +139,8 @@ namespace FLY.Weight.Client
{
{
BinCnts
=
BinCnts
,
BinCnts
=
BinCnts
,
NumberNames
=
NumberNames
,
NumberNames
=
NumberNames
,
Version
=
Version
Version
=
Version
,
HasIngredientDescription
=
HasIngredientDescription
};
};
string
json
=
Newtonsoft
.
Json
.
JsonConvert
.
SerializeObject
(
jsonDb
);
string
json
=
Newtonsoft
.
Json
.
JsonConvert
.
SerializeObject
(
jsonDb
);
File
.
WriteAllText
(
filePath
,
json
);
File
.
WriteAllText
(
filePath
,
json
);
...
@@ -148,6 +155,7 @@ namespace FLY.Weight.Client
...
@@ -148,6 +155,7 @@ namespace FLY.Weight.Client
BinCnts
=
p
.
BinCnts
;
BinCnts
=
p
.
BinCnts
;
NumberNames
=
p
.
NumberNames
;
NumberNames
=
p
.
NumberNames
;
Version
=
p
.
Version
;
Version
=
p
.
Version
;
HasIngredientDescription
=
p
.
HasIngredientDescription
;
}
}
catch
{
catch
{
//失败就算了。。。
//失败就算了。。。
...
@@ -168,6 +176,10 @@ namespace FLY.Weight.Client
...
@@ -168,6 +176,10 @@ namespace FLY.Weight.Client
{
{
Save
();
Save
();
}
}
else
if
(
e
.
PropertyName
==
nameof
(
HasIngredientDescription
))
{
Save
();
}
else
if
(
e
.
PropertyName
==
nameof
(
NumberNames
))
{
else
if
(
e
.
PropertyName
==
nameof
(
NumberNames
))
{
if
(
IsNumberNamesChanged
())
{
if
(
IsNumberNamesChanged
())
{
for
(
int
i
=
0
;
i
<
Items
.
Count
();
i
++)
for
(
int
i
=
0
;
i
<
Items
.
Count
();
i
++)
...
@@ -326,5 +338,10 @@ namespace FLY.Weight.Client
...
@@ -326,5 +338,10 @@ namespace FLY.Weight.Client
/// 版本号
/// 版本号
/// </summary>
/// </summary>
public
string
Version
;
public
string
Version
;
/// <summary>
/// 有层组分描述功能
/// </summary>
public
bool
HasIngredientDescription
;
}
}
}
}
Project.FLY.Weight/FLY.Weight/Common/WeightProfileParam.cs
View file @
01c9f470
...
@@ -47,6 +47,13 @@ namespace FLY.Weight.Common
...
@@ -47,6 +47,13 @@ namespace FLY.Weight.Common
/// 密度
/// 密度
/// </summary>
/// </summary>
public
float
Density
;
public
float
Density
;
/// <summary>
/// 描述
/// 这个功能是电脑端实现。 有功能关闭。
/// 易德提出的
/// </summary>
public
string
Description
;
}
}
...
...
Project.FLY.Weight/FLY.Weight/IService/IWeightProfileService.cs
View file @
01c9f470
using
FLY.Weight.Common
;
using
FLY.Weight.Common
;
using
FObjBase
;
using
FObjBase
;
using
FObjBase.Reflect
;
using
FObjBase.Reflect
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.ComponentModel
;
...
@@ -9,8 +10,18 @@ namespace FLY.Weight.IService
...
@@ -9,8 +10,18 @@ namespace FLY.Weight.IService
public
interface
IWeightProfileService
:
INotifyPropertyChanged
public
interface
IWeightProfileService
:
INotifyPropertyChanged
{
{
/// <summary>
/// 每次有新数据时候推送。 修改参数,不会推送
/// </summary>
[
Push
(
typeof
(
WeightProfileParamChangedEventArgs
))]
event
EventHandler
WeightProfileParamChanged
;
/// <summary>
/// <summary>
/// 读取当前值, 没有推送功能
/// 读取当前值, 没有推送功能
/// 不能把 WeightProfileParam Param 作为 属性,企图PropertyChangedNotify.
/// 它里面不是属性。有数组,不想变成属性这么麻烦
/// </summary>
/// </summary>
/// <param name="asyncDelegate"></param>
/// <param name="asyncDelegate"></param>
/// <param name="asyncContext"></param>
/// <param name="asyncContext"></param>
...
@@ -45,4 +56,9 @@ namespace FLY.Weight.IService
...
@@ -45,4 +56,9 @@ namespace FLY.Weight.IService
[
Call
(
typeof
(
WeightProfileParam
))]
[
Call
(
typeof
(
WeightProfileParam
))]
void
Read
(
string
productname
,
AsyncCBHandler
asyncDelegate
,
object
asyncContext
);
void
Read
(
string
productname
,
AsyncCBHandler
asyncDelegate
,
object
asyncContext
);
}
}
public
class
WeightProfileParamChangedEventArgs
:
EventArgs
{
public
WeightProfileParam
param
;
}
}
}
Project.FLY.Weight/FLY.Weight/IService/IWeightSystemService.cs
View file @
01c9f470
...
@@ -47,6 +47,11 @@ namespace FLY.Weight.IService
...
@@ -47,6 +47,11 @@ namespace FLY.Weight.IService
/// 版本
/// 版本
/// </summary>
/// </summary>
string
Version
{
get
;
}
string
Version
{
get
;
}
/// <summary>
/// 有层描述功能
/// </summary>
bool
HasIngredientDescription
{
get
;
}
}
}
public
static
class
WeightSystemExt
public
static
class
WeightSystemExt
...
...
Project.FLY.Weight/FLY.Weight/Server/Model/LcTable.cs
View file @
01c9f470
...
@@ -91,5 +91,10 @@ namespace FLY.Weight.Server.Model
...
@@ -91,5 +91,10 @@ namespace FLY.Weight.Server.Model
/// 1#比例显示
/// 1#比例显示
/// </summary>
/// </summary>
public
double
PDisp
{
get
;
set
;
}
public
double
PDisp
{
get
;
set
;
}
/// <summary>
/// 组分描述
/// </summary>
public
string
Description
{
get
;
set
;
}
}
}
}
}
Project.FLY.Weight/FLY.Weight/Server/TDGage.cs
View file @
01c9f470
...
@@ -96,7 +96,7 @@ namespace FLY.Weight.Server
...
@@ -96,7 +96,7 @@ namespace FLY.Weight.Server
mWarning
.
Init
(
mHistoryDb
.
ErrorBuffer
);
mWarning
.
Init
(
mHistoryDb
.
ErrorBuffer
);
mData
.
Init
(
mHistoryDb
,
mWarning
);
mData
.
Init
(
mHistoryDb
,
mWarning
,
mProfile
);
if
(
mFeederSystem
!=
null
)
{
if
(
mFeederSystem
!=
null
)
{
mFeederSystem
.
Init
(
mWarning
,
OBJComponents
.
Common
.
PlcErrNos
.
Instance
.
ERRNO_PLC_DISCONNECTED
.
Code
+
1
);
mFeederSystem
.
Init
(
mWarning
,
OBJComponents
.
Common
.
PlcErrNos
.
Instance
.
ERRNO_PLC_DISCONNECTED
.
Code
+
1
);
...
...
Project.FLY.Weight/FLY.Weight/Server/WeightProfile.cs
View file @
01c9f470
using
FLY.Weight.Common
;
using
FLY.Weight.Common
;
using
FLY.Weight.IService
;
using
FLY.Weight.IService
;
using
FObjBase
;
using
FObjBase
;
using
FObjBase.Reflect
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.ComponentModel
;
using
System.IO
;
using
System.IO
;
...
@@ -18,10 +20,16 @@ namespace FLY.Weight.Server
...
@@ -18,10 +20,16 @@ namespace FLY.Weight.Server
/// </summary>
/// </summary>
WeightProfileJsonDb
profileDb
=
new
WeightProfileJsonDb
();
WeightProfileJsonDb
profileDb
=
new
WeightProfileJsonDb
();
WeightProfileParam
weightProfileParam
;
public
WeightProfileParam
weightProfileParam
;
private
string
file_path
=
"weightprofile.json"
;
private
string
file_path
=
"weightprofile.json"
;
/// <summary>
/// 每次有新数据时候推送。 修改参数,不会推送
/// </summary>
[
Push
(
typeof
(
WeightProfileParamChangedEventArgs
))]
public
event
EventHandler
WeightProfileParamChanged
;
public
WeightProfile
()
public
WeightProfile
()
{
{
...
@@ -86,6 +94,13 @@ namespace FLY.Weight.Server
...
@@ -86,6 +94,13 @@ namespace FLY.Weight.Server
{
{
profileDb
.
ParamList
[
index
]
=
weightProfileParam
;
profileDb
.
ParamList
[
index
]
=
weightProfileParam
;
}
}
WeightProfileParamChanged
?.
Invoke
(
this
,
new
WeightProfileParamChangedEventArgs
()
{
param
=
weightProfileParam
});
Save
();
Save
();
}
}
...
@@ -101,6 +116,8 @@ namespace FLY.Weight.Server
...
@@ -101,6 +116,8 @@ namespace FLY.Weight.Server
asyncDelegate
?.
Invoke
(
asyncContext
,
weightProfileParam
);
asyncDelegate
?.
Invoke
(
asyncContext
,
weightProfileParam
);
}
}
/// <summary>
/// <summary>
/// 获取产品列表, 返回类型为 List<string>
/// 获取产品列表, 返回类型为 List<string>
/// </summary>
/// </summary>
...
...
Project.FLY.Weight/FLY.Weight/Server/WeightSystem.cs
View file @
01c9f470
...
@@ -56,6 +56,11 @@ namespace FLY.Weight.Server
...
@@ -56,6 +56,11 @@ namespace FLY.Weight.Server
public
string
Version
{
get
;
set
;
}
=
"version=3;itemStyle=0"
;
public
string
Version
{
get
;
set
;
}
=
"version=3;itemStyle=0"
;
public
string
[]
NumberNames
{
get
;
set
;
}
public
string
[]
NumberNames
{
get
;
set
;
}
/// <summary>
/// 有每层的组分描述
/// </summary>
public
bool
HasIngredientDescription
{
get
;
set
;
}
=
false
;
#
endregion
#
endregion
...
@@ -76,6 +81,12 @@ namespace FLY.Weight.Server
...
@@ -76,6 +81,12 @@ namespace FLY.Weight.Server
/// 周期保存Ibc数据
/// 周期保存Ibc数据
/// </summary>
/// </summary>
PeriodicallySaveData
<
Lc_Flow
>
psdFlow
;
PeriodicallySaveData
<
Lc_Flow
>
psdFlow
;
/// <summary>
/// 配方,只用于获取每层组分描述, 易德需要
/// </summary>
WeightProfile
profile
;
public
WeightSystem
()
public
WeightSystem
()
{
{
LoadNumberNames
();
LoadNumberNames
();
...
@@ -84,11 +95,11 @@ namespace FLY.Weight.Server
...
@@ -84,11 +95,11 @@ namespace FLY.Weight.Server
AddConfigFile
();
AddConfigFile
();
}
}
public
void
Init
(
HistoryDb
historyDb
,
WarningSystem2
warning
)
public
void
Init
(
HistoryDb
historyDb
,
WarningSystem2
warning
,
WeightProfile
profile
)
{
{
this
.
historyDb
=
historyDb
;
this
.
historyDb
=
historyDb
;
this
.
warning
=
warning
;
this
.
warning
=
warning
;
this
.
profile
=
profile
;
//--------------------------------------------------------------------------------
//--------------------------------------------------------------------------------
...
@@ -185,7 +196,7 @@ namespace FLY.Weight.Server
...
@@ -185,7 +196,7 @@ namespace FLY.Weight.Server
//提前记录配料数据到内存。 重新一次配料, 把之前保存的内存的数据,保存到数据库。
//提前记录配料数据到内存。 重新一次配料, 把之前保存的内存的数据,保存到数据库。
FObjBase
.
PollModule
.
Current
.
Poll_Config
(
PollModule
.
POLL_CONFIG
.
ADD
,
OnPoll_SaveMix
,
TimeSpan
.
FromSeconds
(
1
));
FObjBase
.
PollModule
.
Current
.
Poll_Config
(
OnPoll_SaveMix
,
TimeSpan
.
FromSeconds
(
1
));
//周期保存每层流量数据
//周期保存每层流量数据
psdFlow
=
new
PeriodicallySaveData
<
Lc_Flow
>();
psdFlow
=
new
PeriodicallySaveData
<
Lc_Flow
>();
...
@@ -225,7 +236,8 @@ namespace FLY.Weight.Server
...
@@ -225,7 +236,8 @@ namespace FLY.Weight.Server
void
OnPoll_SaveMix
()
void
OnPoll_SaveMix
()
{
{
Dictionary
<
WeighterC
,
Lc_Mix
>
mix
=
new
Dictionary
<
WeighterC
,
Lc_Mix
>();
Dictionary
<
WeighterC
,
Lc_Mix
>
mix
=
new
Dictionary
<
WeighterC
,
Lc_Mix
>();
foreach
(
WeighterC
w
in
Items
)
foreach
(
WeighterC
w
in
Items
)
{
{
//记录
//记录
Lc_Mix
f
=
new
Lc_Mix
Lc_Mix
f
=
new
Lc_Mix
...
@@ -238,9 +250,13 @@ namespace FLY.Weight.Server
...
@@ -238,9 +250,13 @@ namespace FLY.Weight.Server
{
{
FlyData_MixItem
item
=
new
FlyData_MixItem
()
FlyData_MixItem
item
=
new
FlyData_MixItem
()
{
{
Disp
=
w
.
Ingredients
[
i
].
MixDisp
,
Disp
=
Math
.
Round
(
w
.
Ingredients
[
i
].
MixDisp
,
4
)
,
PDisp
=
w
.
Ingredients
[
i
].
MixPDisp
PDisp
=
Math
.
Round
(
w
.
Ingredients
[
i
].
MixPDisp
,
2
)
,
};
};
//不需要记录描述,这里的10个只是缓存。最后还会复制到 Lc_Mix f
//if (HasIngredientDescription)
// item.Description = GetDescription(w, i);
f
.
Items
[
i
]
=
item
;
f
.
Items
[
i
]
=
item
;
}
}
mix
.
Add
(
w
,
f
);
mix
.
Add
(
w
,
f
);
...
@@ -249,7 +265,35 @@ namespace FLY.Weight.Server
...
@@ -249,7 +265,35 @@ namespace FLY.Weight.Server
if
(
mix10
.
Count
>
10
)
if
(
mix10
.
Count
>
10
)
mix10
.
RemoveAt
(
0
);
mix10
.
RemoveAt
(
0
);
}
}
string
GetDescription
(
WeighterC
w
,
int
ingredient_idx
)
{
int
i
=
Items
.
IndexOf
(
w
);
if
(
i
<
0
)
throw
new
Exception
(
"GetDescription 获取组分描述 异常 不能找到 WeighterC"
);
int
j
=
ingredient_idx
;
WeightProfileParam
profileParam
=
profile
.
weightProfileParam
;
if
(
profileParam
!=
null
)
{
if
(
profileParam
.
Items
!=
null
)
{
if
(
i
<
profileParam
.
Items
.
Count
())
{
if
(
profileParam
.
Items
[
i
]
!=
null
)
{
if
(
profileParam
.
Items
[
i
].
Ingredients
!=
null
)
{
if
(
j
<
profileParam
.
Items
[
i
].
Ingredients
.
Count
())
{
return
profileParam
.
Items
[
i
].
Ingredients
[
j
].
Description
;
}
}
}
}
}
}
return
null
;
}
//每隔1秒记录,w.MixDisp, Ingredients[i].(MixDisp,MixPDisp),保存10s
//每隔1秒记录,w.MixDisp, Ingredients[i].(MixDisp,MixPDisp),保存10s
//当卸料时,提取2s前的数据保存!!!!
//当卸料时,提取2s前的数据保存!!!!
...
@@ -287,11 +331,15 @@ namespace FLY.Weight.Server
...
@@ -287,11 +331,15 @@ namespace FLY.Weight.Server
Disp
=
Math
.
Round
(
f_last
.
Items
[
i
].
Disp
,
4
),
Disp
=
Math
.
Round
(
f_last
.
Items
[
i
].
Disp
,
4
),
PDisp
=
Math
.
Round
(
f_last
.
Items
[
i
].
PDisp
,
2
)
PDisp
=
Math
.
Round
(
f_last
.
Items
[
i
].
PDisp
,
2
)
};
};
if
(
HasIngredientDescription
)
item
.
Description
=
GetDescription
(
w
,
i
);
f
.
Items
[
i
]
=
item
;
f
.
Items
[
i
]
=
item
;
}
}
}
}
else
else
{
{
//没有数据。。。。
f
.
Total
=
Math
.
Round
(
w
.
MixDisp
,
4
);
f
.
Total
=
Math
.
Round
(
w
.
MixDisp
,
4
);
for
(
int
i
=
0
;
i
<
w
.
Ingredients
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
w
.
Ingredients
.
Count
;
i
++)
{
{
...
@@ -300,6 +348,9 @@ namespace FLY.Weight.Server
...
@@ -300,6 +348,9 @@ namespace FLY.Weight.Server
Disp
=
Math
.
Round
(
w
.
Ingredients
[
i
].
MixDisp
,
4
),
Disp
=
Math
.
Round
(
w
.
Ingredients
[
i
].
MixDisp
,
4
),
PDisp
=
Math
.
Round
(
w
.
Ingredients
[
i
].
MixPDisp
,
2
)
PDisp
=
Math
.
Round
(
w
.
Ingredients
[
i
].
MixPDisp
,
2
)
};
};
if
(
HasIngredientDescription
)
item
.
Description
=
GetDescription
(
w
,
i
);
f
.
Items
[
i
]
=
item
;
f
.
Items
[
i
]
=
item
;
}
}
}
}
...
@@ -327,6 +378,10 @@ namespace FLY.Weight.Server
...
@@ -327,6 +378,10 @@ namespace FLY.Weight.Server
Disp
=
Math
.
Round
(
w
.
Ingredients
[
i
].
MixCum
,
4
),
Disp
=
Math
.
Round
(
w
.
Ingredients
[
i
].
MixCum
,
4
),
PDisp
=
Math
.
Round
(
w
.
Ingredients
[
i
].
MixCumPercent
,
2
)
PDisp
=
Math
.
Round
(
w
.
Ingredients
[
i
].
MixCumPercent
,
2
)
};
};
if
(
HasIngredientDescription
)
item
.
Description
=
GetDescription
(
w
,
i
);
f
.
Items
[
i
]
=
item
;
f
.
Items
[
i
]
=
item
;
}
}
int
index
=
Items
.
IndexOf
(
w
);
int
index
=
Items
.
IndexOf
(
w
);
...
@@ -520,6 +575,7 @@ namespace FLY.Weight.Server
...
@@ -520,6 +575,7 @@ namespace FLY.Weight.Server
var
p
=
Newtonsoft
.
Json
.
JsonConvert
.
DeserializeObject
<
NumberNamesJsonDb
>(
json
);
var
p
=
Newtonsoft
.
Json
.
JsonConvert
.
DeserializeObject
<
NumberNamesJsonDb
>(
json
);
NumberNames
=
p
.
NumberNames
;
NumberNames
=
p
.
NumberNames
;
Version
=
p
.
VersionString
;
Version
=
p
.
VersionString
;
HasIngredientDescription
=
p
.
HasIngredientDescription
;
return
true
;
return
true
;
}
}
public
void
SaveNumberNames
()
public
void
SaveNumberNames
()
...
@@ -527,7 +583,8 @@ namespace FLY.Weight.Server
...
@@ -527,7 +583,8 @@ namespace FLY.Weight.Server
NumberNamesJsonDb
jsonDb
=
new
NumberNamesJsonDb
NumberNamesJsonDb
jsonDb
=
new
NumberNamesJsonDb
{
{
NumberNames
=
NumberNames
,
NumberNames
=
NumberNames
,
VersionString
=
Version
VersionString
=
Version
,
HasIngredientDescription
=
HasIngredientDescription
};
};
string
json
=
Newtonsoft
.
Json
.
JsonConvert
.
SerializeObject
(
jsonDb
);
string
json
=
Newtonsoft
.
Json
.
JsonConvert
.
SerializeObject
(
jsonDb
);
File
.
WriteAllText
(
filePath_number
,
json
);
File
.
WriteAllText
(
filePath_number
,
json
);
...
@@ -539,7 +596,8 @@ namespace FLY.Weight.Server
...
@@ -539,7 +596,8 @@ namespace FLY.Weight.Server
nameof
(
ItemsCnt
),
nameof
(
ItemsCnt
),
nameof
(
BinCnts
),
nameof
(
BinCnts
),
nameof
(
NumberNames
),
nameof
(
NumberNames
),
nameof
(
Version
)
nameof
(
Version
),
nameof
(
HasIngredientDescription
)
};
};
}
}
...
@@ -552,5 +610,6 @@ namespace FLY.Weight.Server
...
@@ -552,5 +610,6 @@ namespace FLY.Weight.Server
{
{
public
string
[]
NumberNames
;
public
string
[]
NumberNames
;
public
string
VersionString
;
public
string
VersionString
;
public
bool
HasIngredientDescription
;
}
}
}
}
脚本/hemeiInstallZipVersionInfo.json
View file @
01c9f470
{
{
"InstallZipVersion"
:
"7.
6.3
.1"
,
"InstallZipVersion"
:
"7.
7.0
.1"
,
"InstallZipUrl"
:
"http://server.flyautomation.net:8889/download/和美安装包_v7.
6.3.1_20221106
.7z"
"InstallZipUrl"
:
"http://server.flyautomation.net:8889/download/和美安装包_v7.
7.0.1_20221109
.7z"
}
}
\ No newline at end of file
脚本/版本描述.md
View file @
01c9f470
# 和美安装包_v7.7.0-20221108
## 测厚仪服务器 v7.6.2
## 测厚仪客户端 v7.7.0
1.
添加 称重的配方界面添加仓号输入
## 扫描测厚仪服务器 v7.6.1
## 扫描测厚仪客户端 v7.7.0
1.
添加 称重的配方界面添加仓号输入
## 自动风环 v7.6.1
## 称重 v7.7.0
1.
添加 仓号功能,历史数据会记录
## 称重单组 v7.6.0
## 收卷 v7.6.0
## IBC v7.6.0
## 下吹 v7.6.0
## 吹膜数据库浏览器 v7.0.0
<br/>
<br/>
<br/>
# 和美安装包_v7.6.3-20221105
# 和美安装包_v7.6.3-20221105
## 测厚仪服务器 v7.6.2
## 测厚仪服务器 v7.6.2
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment