diff --git a/Aucma.Core.Palletiz/Aucma.Core.Palletiz.csproj b/Aucma.Core.Palletiz/Aucma.Core.Palletiz.csproj
index 7eee96de..9caaaa5b 100644
--- a/Aucma.Core.Palletiz/Aucma.Core.Palletiz.csproj
+++ b/Aucma.Core.Palletiz/Aucma.Core.Palletiz.csproj
@@ -81,9 +81,6 @@
Code
-
- Code
-
Code
diff --git a/Aucma.Core.Palletiz/Aucma.Core.Palletiz.csproj.user b/Aucma.Core.Palletiz/Aucma.Core.Palletiz.csproj.user
index 43c13b1d..00d9b561 100644
--- a/Aucma.Core.Palletiz/Aucma.Core.Palletiz.csproj.user
+++ b/Aucma.Core.Palletiz/Aucma.Core.Palletiz.csproj.user
@@ -7,9 +7,6 @@
-
- Designer
-
Designer
@@ -19,12 +16,6 @@
Designer
-
- Designer
-
-
- Designer
-
Designer
diff --git a/Aucma.Core.Palletiz/ViewModels/IndexPageViewModel.cs b/Aucma.Core.Palletiz/ViewModels/IndexPageViewModel.cs
index 5537a641..59ca6381 100644
--- a/Aucma.Core.Palletiz/ViewModels/IndexPageViewModel.cs
+++ b/Aucma.Core.Palletiz/ViewModels/IndexPageViewModel.cs
@@ -85,15 +85,16 @@ namespace Aucma.Core.Palletiz.ViewModels
{
ChartValues achievement = new ChartValues();
Random random = new Random();
- for (int i = 0; i < 2; i++)
- {
- achievement.Add(random.Next(1, 50));
- }
+ //for (int i = 0; i < 2; i++)
+ //{
+ // achievement.Add(random.Next(1, 50));
+ //}
var column = new ColumnSeries();
column.DataLabels = true;
column.Title = "小时产量";
column.Values = achievement;
+ column.ScalesYAt = 0;
column.Foreground = Brushes.White;
ModelStatistics.Add(column);
@@ -109,13 +110,14 @@ namespace Aucma.Core.Palletiz.ViewModels
ChartValues achievement2 = new ChartValues();
Random random2 = new Random();
- for (int i = 0; i < 5; i++)
- {
- achievement2.Add(random2.Next(0, 30));
- }
+ //for (int i = 0; i < 5; i++)
+ //{
+ // achievement2.Add(random2.Next(0, 30));
+ //}
var column2 = new ColumnSeries();
column2.DataLabels = true;
column2.Title = "型号统计";
+ column2.ScalesYAt = 0;
column2.Values = achievement2;
column2.Foreground = Brushes.White;
diff --git a/Aucma.Core.Palletiz/ViewModels/MainWindowViewModel.cs b/Aucma.Core.Palletiz/ViewModels/MainWindowViewModel.cs
index 10d4d689..fb555eb6 100644
--- a/Aucma.Core.Palletiz/ViewModels/MainWindowViewModel.cs
+++ b/Aucma.Core.Palletiz/ViewModels/MainWindowViewModel.cs
@@ -11,6 +11,10 @@ using Admin.Core.Common;
using Aucma.Core.PLc;
using Aucma.Core.Scanner;
using System.Linq;
+using System.Windows.Threading;
+using System.Threading.Tasks;
+using Admin.Core.IService;
+using Microsoft.Extensions.DependencyInjection;
namespace Aucma.Core.Palletiz.ViewModels
{
@@ -20,10 +24,19 @@ namespace Aucma.Core.Palletiz.ViewModels
private IndexPageView firstPage = new IndexPageView();//首页
private StatisticsPageView recordPage = new StatisticsPageView();
private PalletizPageView palletizPage = new PalletizPageView();
+
+ ISysUserInfoServices _sysUserInfoServices;
public MainWindowViewModel()
{
+ _sysUserInfoServices = App.ServiceProvider.GetService();
UserContent = firstPage;
init();
+ Task.Run(async () =>
+ {
+ await RefreshTeamTime();//班组时间
+ });
+
+
}
public void init()
@@ -34,6 +47,11 @@ namespace Aucma.Core.Palletiz.ViewModels
timer.AutoReset = true;
timer.Enabled = true;
timer.Start();
+
+ DispatcherTimer timer2 = new DispatcherTimer();
+ timer2.Interval = new TimeSpan(0, 0, 1); //间隔1秒
+ timer2.Tick += new EventHandler(timer_Tick);
+ timer2.Start();
}
#region 设备状态刷新
@@ -368,5 +386,51 @@ namespace Aucma.Core.Palletiz.ViewModels
}
#endregion
+ #region 刷新时间
+
+ public string _currentDateTime;
+ public string CurrentDateTime
+ {
+ get => _currentDateTime;
+ set => SetProperty(ref _currentDateTime, value);
+ }
+ #endregion
+
+ #region 班组信息
+ ///
+ /// 班组信息
+ ///
+ public string _teamName;
+ public string TeamName
+ {
+ get => _teamName;
+ set => SetProperty(ref _teamName, value);
+ }
+ #endregion
+
+ public async Task RefreshTeamTime()
+ {
+ while (true)
+ {
+ var list = await _sysUserInfoServices.GetTeamData();
+ if (list != null && list.Count > 0)
+ {
+ var sysUserInfo = list.First();
+ TeamName = $"{sysUserInfo.TeamName}({list.Min(d => d.StartTime).ToString("HH:mm")}~{list.Max(d => d.EndTime).ToString("HH:mm")})";
+ //TeamName = $"{sysUserInfo.TeamName}";
+ }
+ Thread.Sleep(5000);
+ }
+ }
+
+ void timer_Tick(object sender, EventArgs e)
+ {
+ System.Windows.Application.Current.Dispatcher.Invoke((Action)(() =>
+ {
+ CurrentDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+
+ }));
+
+ }
}
}
diff --git a/Aucma.Core.Palletiz/ViewModels/SplitPlanViewModel.cs b/Aucma.Core.Palletiz/ViewModels/SplitPlanViewModel.cs
index d4cc2f4b..da9f4b2d 100644
--- a/Aucma.Core.Palletiz/ViewModels/SplitPlanViewModel.cs
+++ b/Aucma.Core.Palletiz/ViewModels/SplitPlanViewModel.cs
@@ -273,12 +273,12 @@ namespace Aucma.Core.Palletiz.ViewModels
[RelayCommand]
public async Task SearchCriteriaSet()
{
- SearchCriteriaView searchCriteriaWindow = new SearchCriteriaView();
- bool? dialogResult = searchCriteriaWindow.ShowDialog();
- if (dialogResult == false) // 用户点击了“取消”按钮或关闭窗口
- {
+ //SearchCriteriaView searchCriteriaWindow = new SearchCriteriaView();
+ //bool? dialogResult = searchCriteriaWindow.ShowDialog();
+ //if (dialogResult == false) // 用户点击了“取消”按钮或关闭窗口
+ //{
await LoadData();
- }
+ //}
}
#endregion
@@ -324,9 +324,9 @@ namespace Aucma.Core.Palletiz.ViewModels
var info = SelectedDataItem as ProductPlanInfoModel;
if (info != null)
{
- info.PlanType = _radioButtonStatus;
- QuantityIssuedView quantityIssuedWindow = new QuantityIssuedView(info, ObjId);
- quantityIssuedWindow.ShowDialog();
+ //info.PlanType = _radioButtonStatus;
+ //QuantityIssuedView quantityIssuedWindow = new QuantityIssuedView(info, ObjId);
+ //quantityIssuedWindow.ShowDialog();
}
}
diff --git a/Aucma.Core.Palletiz/Views/IndexPageView.xaml b/Aucma.Core.Palletiz/Views/IndexPageView.xaml
index 09449a38..c8055788 100644
--- a/Aucma.Core.Palletiz/Views/IndexPageView.xaml
+++ b/Aucma.Core.Palletiz/Views/IndexPageView.xaml
@@ -159,13 +159,6 @@
-
@@ -202,7 +195,7 @@
-
+
@@ -225,7 +218,7 @@
-
+
@@ -233,7 +226,7 @@
-
+
diff --git a/Aucma.Core.Palletiz/Views/MainWindow.xaml b/Aucma.Core.Palletiz/Views/MainWindow.xaml
index 0be308b1..e2383798 100644
--- a/Aucma.Core.Palletiz/Views/MainWindow.xaml
+++ b/Aucma.Core.Palletiz/Views/MainWindow.xaml
@@ -34,17 +34,16 @@
-
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/Aucma.Core.Palletiz/Views/PalletizPageView.xaml b/Aucma.Core.Palletiz/Views/PalletizPageView.xaml
index c78d9da3..9c673f2f 100644
--- a/Aucma.Core.Palletiz/Views/PalletizPageView.xaml
+++ b/Aucma.Core.Palletiz/Views/PalletizPageView.xaml
@@ -6,366 +6,99 @@
xmlns:local="clr-namespace:Aucma.Core.Palletiz.Views"
mc:Ignorable="d" Background="#1152AC"
d:DesignHeight="1080" d:DesignWidth="1920">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Aucma.Core.Palletiz/Views/PlanPageView.xaml b/Aucma.Core.Palletiz/Views/PlanPageView.xaml
deleted file mode 100644
index 446a0016..00000000
--- a/Aucma.Core.Palletiz/Views/PlanPageView.xaml
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Aucma.Core.Palletiz/Views/PlanPageView.xaml.cs b/Aucma.Core.Palletiz/Views/PlanPageView.xaml.cs
deleted file mode 100644
index 90ea5126..00000000
--- a/Aucma.Core.Palletiz/Views/PlanPageView.xaml.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using Aucma.Core.Palletiz.ViewModels;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace Aucma.Core.Palletiz.Views
-{
- ///
- /// PlanPageView.xaml 的交互逻辑
- ///
- public partial class PlanPageView : UserControl
- {
- public PlanPageView()
- {
- InitializeComponent();
- this.DataContext = new PlanPageViewModel();
- }
- }
-}
diff --git a/Aucma.Core.Palletiz/Views/QuantityIssuedView.xaml b/Aucma.Core.Palletiz/Views/QuantityIssuedView.xaml
deleted file mode 100644
index 262eb554..00000000
--- a/Aucma.Core.Palletiz/Views/QuantityIssuedView.xaml
+++ /dev/null
@@ -1,111 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Aucma.Core.Palletiz/Views/QuantityIssuedView.xaml.cs b/Aucma.Core.Palletiz/Views/QuantityIssuedView.xaml.cs
deleted file mode 100644
index 2ee99752..00000000
--- a/Aucma.Core.Palletiz/Views/QuantityIssuedView.xaml.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using Aucma.Core.Palletiz.Models;
-using Aucma.Core.Palletiz.ViewModels;
-using System.Windows;
-
-namespace Aucma.Core.Palletiz.Views
-{
- ///
- /// QuantityIssuedView.xaml 的交互逻辑
- ///
- public partial class QuantityIssuedView : Window
- {
- public QuantityIssuedView()
- {
- InitializeComponent();
- }
-
- public QuantityIssuedView(ProductPlanInfoModel productPlanInfo,string objId)
- {
- InitializeComponent();
- this.DataContext = new QuantityIssuedViewModel(productPlanInfo, objId);
-
- }
- }
-}
diff --git a/Aucma.Core.Palletiz/Views/SearchCriteriaView.xaml b/Aucma.Core.Palletiz/Views/SearchCriteriaView.xaml
deleted file mode 100644
index 77216f61..00000000
--- a/Aucma.Core.Palletiz/Views/SearchCriteriaView.xaml
+++ /dev/null
@@ -1,107 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Aucma.Core.Palletiz/Views/SearchCriteriaView.xaml.cs b/Aucma.Core.Palletiz/Views/SearchCriteriaView.xaml.cs
deleted file mode 100644
index cb39cffc..00000000
--- a/Aucma.Core.Palletiz/Views/SearchCriteriaView.xaml.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using Aucma.Core.Palletiz.ViewModels;
-using System.Windows;
-
-namespace Aucma.Core.Palletiz.Views
-{
- ///
- /// SearchCriteriaView.xaml 的交互逻辑
- ///
- public partial class SearchCriteriaView : Window
- {
- public SearchCriteriaView()
- {
- InitializeComponent();
- this.DataContext = new SearchCriteriaViewModel();
- }
- }
-}
diff --git a/Aucma.Core.Palletiz/Views/SplitPlanView.xaml b/Aucma.Core.Palletiz/Views/SplitPlanView.xaml
index 71b313a9..2cc8c52c 100644
--- a/Aucma.Core.Palletiz/Views/SplitPlanView.xaml
+++ b/Aucma.Core.Palletiz/Views/SplitPlanView.xaml
@@ -6,7 +6,7 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
Background="#1152AC"
- Title="计划维护" FontFamily="Microsoft YaHei" Height="700" Width="900"
+ Title="货道设置" FontFamily="Microsoft YaHei" Height="700" Width="900"
d:DesignHeight="800" WindowStartupLocation="CenterScreen"
d:DesignWidth="1500" ResizeMode="NoResize" Topmost="True" >
@@ -129,7 +129,7 @@
-
+
diff --git a/Aucma.Core.Palletiz/Views/StatisticsPageView.xaml b/Aucma.Core.Palletiz/Views/StatisticsPageView.xaml
index 2a1e1146..29b0de9d 100644
--- a/Aucma.Core.Palletiz/Views/StatisticsPageView.xaml
+++ b/Aucma.Core.Palletiz/Views/StatisticsPageView.xaml
@@ -12,8 +12,7 @@
-
-
@@ -36,10 +35,10 @@
@@ -55,7 +54,7 @@
-
+
@@ -90,35 +89,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-