diff --git a/Admin.Core.Api/Admin.Core.Model.xml b/Admin.Core.Api/Admin.Core.Model.xml
index 92b7aa6d..9ab604b2 100644
--- a/Admin.Core.Api/Admin.Core.Model.xml
+++ b/Admin.Core.Api/Admin.Core.Model.xml
@@ -518,7 +518,7 @@
- 工单编号
+ 订单编号
@@ -546,6 +546,11 @@
完成时间
+
+
+ 工单编号
+
+
老发泡线泡前库
diff --git a/Aucma.Core.DoorFoam/Aucma.Core.DoorFoam.csproj.user b/Aucma.Core.DoorFoam/Aucma.Core.DoorFoam.csproj.user
index 63c4cc93..951b24be 100644
--- a/Aucma.Core.DoorFoam/Aucma.Core.DoorFoam.csproj.user
+++ b/Aucma.Core.DoorFoam/Aucma.Core.DoorFoam.csproj.user
@@ -6,6 +6,11 @@
Designer
+
+
+ Code
+
+
Designer
@@ -13,6 +18,9 @@
Designer
+
+ Designer
+
Designer
diff --git a/Aucma.Core.DoorFoam/ViewModels/IndexPageViewModel.cs b/Aucma.Core.DoorFoam/ViewModels/IndexPageViewModel.cs
index f63dabbd..fd92c1b8 100644
--- a/Aucma.Core.DoorFoam/ViewModels/IndexPageViewModel.cs
+++ b/Aucma.Core.DoorFoam/ViewModels/IndexPageViewModel.cs
@@ -12,6 +12,9 @@ using Admin.Core.IService;
using Microsoft.Extensions.DependencyInjection;
using System.Threading.Tasks;
using System.Windows.Media;
+using Admin.Core.Model.ViewModels;
+using Pipelines.Sockets.Unofficial.Arenas;
+using NPOI.SS.Formula.Functions;
/*
* 首页信息
*/
@@ -20,180 +23,78 @@ namespace Aucma.Core.DoorFoam.ViewModels
public partial class IndexPageViewModel : ObservableObject
{
private static readonly log4net.ILog log = LogManager.GetLogger(typeof(IndexPageViewModel));
- private ObservableCollection listItems = new ObservableCollection();
- private readonly IDoorFoamRecordServices? _doorFoamRecordServices;
+
public IndexPageViewModel()
{
- _doorFoamRecordServices = App.ServiceProvider.GetService();
- //var state = _doorFoamRecordServices.GetConnectionState();
- StationName = "门体发泡";
- //MaterialName = "";
- //OrderNo = "";
- //BeginTime = DateTime.Now.ToString("yyyy-mm-dd HH:mm:ss");
- _=InitEveryDayMethodAsync();
+ InitEveryDayMethodAsync();
+ InitEveryDayMethod2Async();
}
///
/// 获取今天的数据
///
///
- private async Task InitEveryDayMethodAsync()
+ private void InitEveryDayMethodAsync()
{
- DateTime startTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
- DateTime endTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
-
- //var list = await _doorFoamRecordServices.QueryAsync(d => d.BeginTime >= startTime && d.EndTime <= endTime);
-
- ChartValues achievement = new ChartValues();
- Random random = new Random();
- for (int i = 0; i < 5; i++)
- {
- achievement.Add(random.Next(60, 100));
- }
- var column = new ColumnSeries();
- column.DataLabels = true;
- column.Title = "型号";
- column.Values = achievement;
- column.Foreground = Brushes.White;
-
- ModelStatistics.Add(column);
-
- ProductionHourList = new List()
- {
- "12",
- "13",
- "14",
- "15",
- "16",
- };
-
- ChartValues achievement2 = new ChartValues();
- Random random2 = new Random();
- for (int i = 0; i < 5; i++)
+ for (int i = 1; i <= 20; i++)
{
- achievement2.Add(random2.Next(60, 100));
+ TrolleyModel mode=new TrolleyModel();
+ mode.No = i;
+ mode.Name = i + "#台车";
+ mode.Status = "不工作";
+ mode.Model = $"{i}台车1#枪A门";
+ mode.Production = "1-1";
+
+ DoorFp1DataGrid.Add(mode);
}
- var column2 = new ColumnSeries();
- column2.DataLabels = true;
- column2.Title = "产量";
- column2.Values = achievement2;
- column2.Foreground = Brushes.White;
-
- Achievement.Add(column2);
+
}
-
- #region 扫描信息
-
- #region 物料条码
- private string _stationName;
- public string StationName
+ ///
+ /// 获取今天的数据
+ ///
+ ///
+ private void InitEveryDayMethod2Async()
{
- get { return _stationName; }
- set
+ for (int i = 1; i <= 20; i++)
{
- _stationName = value;
- SetProperty(ref _stationName, value);
+ TrolleyModel mode = new TrolleyModel();
+ mode.No = i;
+ mode.Name = i + "#台车";
+ mode.Status = "不工作";
+ mode.Model = $"{i}台车1#枪B门";
+ mode.Production = "1-1";
+
+ DoorFp2DataGrid.Add(mode);
}
- }
- #endregion
- #region 物料名称
- private string _materialName;
- public string MaterialName
- {
- get { return _materialName; }
- set
- {
- _materialName = value;
- SetProperty(ref _materialName, value);
- }
}
- #endregion
- #region 订单信息
- private string _orderNo;
- public string OrderNo
+
+ #region 初始化datagrid
+ private ObservableCollection _doorFp1DataGrid = new ObservableCollection();
+ public ObservableCollection DoorFp1DataGrid
{
- get { return _orderNo; }
+ get { return _doorFp1DataGrid; }
set
{
- _orderNo = value;
- SetProperty(ref _orderNo, value);
+ _doorFp1DataGrid = value;
+ OnPropertyChanged();//属性通知
}
}
#endregion
- #region 开始时间
- private string _beginTime;
- public string BeginTime
+ #region 初始化datagrid
+ private ObservableCollection _doorFp2DataGrid = new ObservableCollection();
+ public ObservableCollection DoorFp2DataGrid
{
- get { return _beginTime; }
+ get { return _doorFp1DataGrid; }
set
{
- _beginTime = value;
- SetProperty(ref _beginTime, value);
+ _doorFp1DataGrid = value;
+ OnPropertyChanged();//属性通知
}
}
#endregion
-
- #endregion
-
- #region 当日产量
-
- #region 日产量柱状图X轴日期
- ///
- /// 日产量柱状图X轴日期
- ///
- private List productionHourList;
-
- public List ProductionHourList
- {
- get { return productionHourList; }
- set { productionHourList = value; }
- }
- #endregion
-
- ///
- /// 日产量柱状图
- ///
- private SeriesCollection achievement = new SeriesCollection();
-
- public SeriesCollection Achievement
- {
- get { return achievement; }
- set { achievement = value; }
- }
-
- #endregion
-
- #region 型号统计
-
- #region 型号统计柱状图x轴物料类型
- ///
- /// 型号统计柱状图x轴物料类型
- ///
- private List materialNameList;
-
- public List MaterialNameList
- {
- get { return materialNameList; }
- set { materialNameList = value; }
- }
- #endregion
-
- #region 型号统计柱状图
- ///
- /// 型号统计柱状图
- ///
- private SeriesCollection modelStatistics = new SeriesCollection();
-
- public SeriesCollection ModelStatistics
- {
- get { return modelStatistics; }
- set { modelStatistics = value; }
- }
- #endregion
- #endregion
}
}
diff --git a/Aucma.Core.DoorFoam/ViewModels/RealTimePageViewModel.cs b/Aucma.Core.DoorFoam/ViewModels/RealTimePageViewModel.cs
new file mode 100644
index 00000000..fbac5dd9
--- /dev/null
+++ b/Aucma.Core.DoorFoam/ViewModels/RealTimePageViewModel.cs
@@ -0,0 +1,181 @@
+using CommunityToolkit.Mvvm.ComponentModel;
+using LiveCharts.Wpf;
+using LiveCharts;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media;
+
+namespace Aucma.Core.DoorFoam.ViewModels
+{
+ public partial class RealTimePageViewModel : ObservableObject
+ {
+ public RealTimePageViewModel()
+ {
+ InitEveryDayMethodAsync();
+ }
+ ///
+ /// 获取今天的数据
+ ///
+ ///
+ private void InitEveryDayMethodAsync()
+ {
+ DateTime startTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
+ DateTime endTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
+
+ //var list = await _doorFoamRecordServices.QueryAsync(d => d.BeginTime >= startTime && d.EndTime <= endTime);
+
+ ChartValues achievement = new ChartValues();
+ Random random = new Random();
+ for (int i = 0; i < 5; i++)
+ {
+ achievement.Add(random.Next(60, 100));
+ }
+ var column = new ColumnSeries();
+ column.DataLabels = true;
+ column.Title = "型号";
+ column.Values = achievement;
+ column.Foreground = Brushes.White;
+
+ ModelStatistics.Add(column);
+
+ ProductionHourList = new List()
+ {
+ "12",
+ "13",
+ "14",
+ "15",
+ "16",
+ };
+
+ ChartValues achievement2 = new ChartValues();
+ Random random2 = new Random();
+ for (int i = 0; i < 5; i++)
+ {
+ achievement2.Add(random2.Next(60, 100));
+ }
+ var column2 = new ColumnSeries();
+ column2.DataLabels = true;
+ column2.Title = "产量";
+ column2.Values = achievement2;
+ column2.Foreground = Brushes.White;
+
+ Achievement.Add(column2);
+ }
+
+ #region 扫描信息
+
+ #region 物料条码
+ private string _stationName;
+ public string StationName
+ {
+ get { return _stationName; }
+ set
+ {
+ _stationName = value;
+ SetProperty(ref _stationName, value);
+ }
+ }
+ #endregion
+
+ #region 物料名称
+ private string _materialName;
+ public string MaterialName
+ {
+ get { return _materialName; }
+ set
+ {
+ _materialName = value;
+ SetProperty(ref _materialName, value);
+ }
+ }
+ #endregion
+
+ #region 订单信息
+ private string _orderNo;
+ public string OrderNo
+ {
+ get { return _orderNo; }
+ set
+ {
+ _orderNo = value;
+ SetProperty(ref _orderNo, value);
+ }
+ }
+ #endregion
+
+ #region 开始时间
+ private string _beginTime;
+ public string BeginTime
+ {
+ get { return _beginTime; }
+ set
+ {
+ _beginTime = value;
+ SetProperty(ref _beginTime, value);
+ }
+ }
+ #endregion
+
+ #endregion
+
+ #region 当日产量
+
+ #region 日产量柱状图X轴日期
+ ///
+ /// 日产量柱状图X轴日期
+ ///
+ private List productionHourList;
+
+ public List ProductionHourList
+ {
+ get { return productionHourList; }
+ set { productionHourList = value; }
+ }
+ #endregion
+
+ ///
+ /// 日产量柱状图
+ ///
+ private SeriesCollection achievement = new SeriesCollection();
+
+ public SeriesCollection Achievement
+ {
+ get { return achievement; }
+ set { achievement = value; }
+ }
+
+ #endregion
+
+ #region 型号统计
+
+ #region 型号统计柱状图x轴物料类型
+ ///
+ /// 型号统计柱状图x轴物料类型
+ ///
+ private List materialNameList;
+
+ public List MaterialNameList
+ {
+ get { return materialNameList; }
+ set { materialNameList = value; }
+ }
+ #endregion
+
+ #region 型号统计柱状图
+ ///
+ /// 型号统计柱状图
+ ///
+ private SeriesCollection modelStatistics = new SeriesCollection();
+
+ public SeriesCollection ModelStatistics
+ {
+ get { return modelStatistics; }
+ set { modelStatistics = value; }
+ }
+ #endregion
+ #endregion
+ }
+}
diff --git a/Aucma.Core.DoorFoam/ViewModels/TrolleyModel.cs b/Aucma.Core.DoorFoam/ViewModels/TrolleyModel.cs
new file mode 100644
index 00000000..6e6ea580
--- /dev/null
+++ b/Aucma.Core.DoorFoam/ViewModels/TrolleyModel.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection.Metadata.Ecma335;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Aucma.Core.DoorFoam.ViewModels
+{
+ public class TrolleyModel
+ {
+ public int No { get; set; }
+ public string Name { get; set; }
+ public string Status { get; set; }
+ public string Model { get; set; }
+ public string Production { get; set; }
+ }
+}
diff --git a/Aucma.Core.DoorFoam/Views/IndexPageView.xaml b/Aucma.Core.DoorFoam/Views/IndexPageView.xaml
index 7c1e8e62..87bdf8c8 100644
--- a/Aucma.Core.DoorFoam/Views/IndexPageView.xaml
+++ b/Aucma.Core.DoorFoam/Views/IndexPageView.xaml
@@ -11,7 +11,7 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/Aucma.Core.DoorFoam/Views/MainWindow.xaml b/Aucma.Core.DoorFoam/Views/MainWindow.xaml
index d750a37c..c7d2a4cd 100644
--- a/Aucma.Core.DoorFoam/Views/MainWindow.xaml
+++ b/Aucma.Core.DoorFoam/Views/MainWindow.xaml
@@ -65,8 +65,8 @@
-
-
+
+
diff --git a/Aucma.Core.DoorFoam/Views/RealTimePageView.xaml b/Aucma.Core.DoorFoam/Views/RealTimePageView.xaml
new file mode 100644
index 00000000..f0383851
--- /dev/null
+++ b/Aucma.Core.DoorFoam/Views/RealTimePageView.xaml
@@ -0,0 +1,193 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Aucma.Core.DoorFoam/Views/RealTimePageView.xaml.cs b/Aucma.Core.DoorFoam/Views/RealTimePageView.xaml.cs
new file mode 100644
index 00000000..695c467e
--- /dev/null
+++ b/Aucma.Core.DoorFoam/Views/RealTimePageView.xaml.cs
@@ -0,0 +1,29 @@
+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.DoorFoam.Views
+{
+ ///
+ /// RealTimePageView.xaml 的交互逻辑
+ ///
+ public partial class RealTimePageView : UserControl
+ {
+ public RealTimePageView()
+ {
+ InitializeComponent();
+ this.DataContext = new RealTimePageView();
+ }
+ }
+}