Ver código fonte

优化MES时间记录及设置界面辅助说明

新增MES检查时间记录,上传数据时间更准确。设置界面“工作模式”、“取料位置”、“批头矫正的模式”增加辅助说明和提示,提升用户体验,调整部分控件布局。
孝锋 徐 7 meses atrás
pai
commit
c79f7f0610
2 arquivos alterados com 17 adições e 8 exclusões
  1. 3 2
      TeamAAS-VM/Core/Management.cs
  2. 14 6
      TeamAAS-VM/Views/SettingView.xaml

+ 3 - 2
TeamAAS-VM/Core/Management.cs

@@ -1231,6 +1231,7 @@ namespace TeamAAS_VP.Core
         Int16 _LastRequestPosition = 0;
         Int16[] _LastMesCheck = new Int16[10];
         Int16 _LastPickINC = 0;
+        DateTime[] _LastMesCheckTime = new DateTime[10];
         /// <summary>
         /// PLC命令触发时
         /// </summary>
@@ -1870,7 +1871,7 @@ namespace TeamAAS_VP.Core
                                 {
                                     //这里缺少从MES获取产品配方的内容,需要补充
 
-
+                                    _LastMesCheckTime[i] = DateTime.UtcNow;
 
                                     (bool isSuccess, string response) = await _mesService.StationGetAsync(code, 2);
                                     if (i == 0)
@@ -1903,7 +1904,7 @@ namespace TeamAAS_VP.Core
 
                                     //这里缺少上传MES的本站数据结果及开始和结束时间,需要补充
 
-                                    (bool isSuccess, string response) = await _mesService.SubmitGetAsync(code, true, DateTime.Now, DateTime.Now);
+                                    (bool isSuccess, string response) = await _mesService.SubmitGetAsync(code, true, _LastMesCheckTime[i], DateTime.UtcNow);
                                     //假设上传成功,这里缺少上传失败的处理
 
                                     await plc.WriteNodeAsync(string.Format(addressConfig.Out_MesStatus.Address, i), (Int16)3);

+ 14 - 6
TeamAAS-VM/Views/SettingView.xaml

@@ -2319,11 +2319,13 @@
                                    Text="{lex:Loc 工作模式}" />
                         <mah:NumericUpDown Grid.Row="7"
                                            Grid.Column="1"
-                                           Margin="0,6"
+                                           Margin="0,10"
                                            Value="{Binding WorkMode,Mode=TwoWay}"
                                            Minimum="0"
                                            Maximum="100"
-                                           FontSize="{DynamicResource Font.Size.Body3}" />
+                                           FontSize="{DynamicResource Font.Size.Body3}"
+                                           materialDesign:HintAssist.HelperTextFontSize="6"
+                                           materialDesign:HintAssist.HelperText="1:拍1打1 - 2:拍1打所有" />
 
                         <!-- 取料位置 -->
                         <TextBlock Grid.Row="8"
@@ -2332,14 +2334,17 @@
                                    VerticalAlignment="Center"
                                    HorizontalAlignment="Right"
                                    Margin="0,6,10,6"
-                                   Text="{lex:Loc 取料位置}" />
+                                   Text="{lex:Loc 取料位置}"
+                                   />
                         <mah:NumericUpDown Grid.Row="8"
                                            Grid.Column="1"
                                            Margin="0,6"
                                            Value="{Binding PickPointNum,Mode=TwoWay}"
                                            Minimum="0"
                                            Maximum="100"
-                                           FontSize="{DynamicResource Font.Size.Body3}" />
+                                           FontSize="{DynamicResource Font.Size.Body3}"
+                                           materialDesign:HintAssist.HelperTextFontSize="6"
+                                           materialDesign:HintAssist.HelperText="0:不需要取料 - 1:需要取料" />
                         <!-- 披头矫正的模式 -->
                         <TextBlock Grid.Row="9"
                                    Grid.Column="0"
@@ -2350,11 +2355,14 @@
                                    Text="{lex:Loc 批头矫正的模式}" />
                         <mah:NumericUpDown Grid.Row="9"
                                            Grid.Column="1"
-                                           Margin="0,6"
+                                           Margin="0,20"
                                            Value="{Binding ScrewTeachNum,Mode=TwoWay}"
                                            Minimum="0"
                                            Maximum="100"
-                                           FontSize="{DynamicResource Font.Size.Body3}" />
+                                           FontSize="{DynamicResource Font.Size.Body3}"
+                                           ToolTip="1:初始化时矫正,2:每个产品矫正一次,3:每颗螺丝矫正一次"
+                                           materialDesign:HintAssist.HelperTextFontSize="6"
+                                           materialDesign:HintAssist.HelperText="1:初始化时矫正,2:每个产品矫正一次,3:每颗螺丝矫正一次" />
 
                         <CheckBox Grid.Row="10"
                                   Grid.Column="0"