diff --git a/SlnMesnac.Model/domain/WmsRawOutstockDetail .cs b/SlnMesnac.Model/domain/WmsRawOutstockDetail .cs
new file mode 100644
index 0000000..b72d696
--- /dev/null
+++ b/SlnMesnac.Model/domain/WmsRawOutstockDetail .cs
@@ -0,0 +1,156 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Security.Principal;
+using System.Text;
+
+namespace SlnMesnac.Model.domain
+{
+ [SugarTable("wms_raw_outstock_detail"), TenantAttribute("mes")]
+ public class WmsRawOutstockDetail
+ {
+ ///
+ /// 原材料出库记录明细ID
+ ///
+ [SugarColumn(ColumnName = "raw_outstock_detail_id", IsPrimaryKey = true, IsIdentity = true)]
+ public long RawOutstockDetailId { get; set; }
+
+ ///
+ /// 原材料出库ID
+ ///
+ [SugarColumn(ColumnName = "raw_outstock_id")]
+ public long RawOutstockId { get; set; }
+
+ ///
+ /// 原材料出库任务编号
+ ///
+ [SugarColumn(ColumnName = "task_code")]
+ public string TaskCode { get; set; }
+
+ ///
+ /// 仓库ID,关联仓库主键
+ ///
+ [SugarColumn(ColumnName = "warehouse_id")]
+ public long? WarehouseId { get; set; }
+
+ ///
+ /// 库位编码
+ ///
+ [SugarColumn(ColumnName = "location_code")]
+ public string LocationCode { get; set; }
+
+ ///
+ /// 物料条码;最终出库时保存
+ ///
+ [SugarColumn(ColumnName = "material_barcode")]
+ public string MaterialBarcode { get; set; }
+
+ ///
+ /// 物料ID
+ ///
+ [SugarColumn(ColumnName = "material_id")]
+ public long MaterialId { get; set; }
+
+ ///
+ /// 批次;扫描条码时,从打印条码记录表中获取
+ ///
+ [SugarColumn(ColumnName = "instock_batch")]
+ public string InstockBatch { get; set; }
+
+ ///
+ /// 生产日期;扫描条码时,从打印条码记录表中获取
+ ///
+ [SugarColumn(ColumnName = "material_production_date")]
+ public DateTime? MaterialProductionDate { get; set; }
+
+ ///
+ /// 计划数量
+ ///
+ [SugarColumn(ColumnName = "plan_amount")]
+ public decimal PlanAmount { get; set; }
+
+ ///
+ /// 出库数量
+ ///
+ [SugarColumn(ColumnName = "outstock_amount")]
+ public decimal? OutstockAmount { get; set; }
+
+ ///
+ /// 执行状态(0待执行,1执行中,2执行完成)
+ ///
+ [SugarColumn(ColumnName = "execute_status")]
+ public string ExecuteStatus { get; set; }
+
+ ///
+ /// 同步ERP状态(0:失败,1成功);此字段不用
+ ///
+ [SugarColumn(ColumnName = "erp_status")]
+ public string ErpStatus { get; set; }
+
+ ///
+ /// 同步给ERP的数量;此字段不用
+ ///
+ [SugarColumn(ColumnName = "erp_amount")]
+ public decimal? ErpAmount { get; set; }
+
+ ///
+ /// 出库人
+ ///
+ [SugarColumn(ColumnName = "outstock_person")]
+ public string OutstockPerson { get; set; }
+
+ ///
+ /// 出库时间
+ ///
+ [SugarColumn(ColumnName = "outstock_time")]
+ public DateTime? OutstockTime { get; set; }
+
+ ///
+ /// 出库方式(1:人工出库 2:AGV出库 )
+ ///
+ [SugarColumn(ColumnName = "outstock_way")]
+ public string OutstockWay { get; set; }
+
+ ///
+ /// 使用机台名称;出库扫描条码时,从打印条码记录表中获取
+ ///
+ [SugarColumn(ColumnName = "machine_name")]
+ public string MachineName { get; set; }
+
+ ///
+ /// 质检状态(0:待质检,1:合格,2:NG)
+ ///
+ [SugarColumn(ColumnName = "quality_status")]
+ public string QualityStatus { get; set; }
+
+ ///
+ /// 创建人
+ ///
+ [SugarColumn(ColumnName = "create_by")]
+ public string CreateBy { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [SugarColumn(ColumnName = "create_date")]
+ public DateTime? CreateDate { get; set; }
+
+ ///
+ /// 最后更新人
+ ///
+ [SugarColumn(ColumnName = "update_by")]
+ public string UpdateBy { get; set; }
+
+ ///
+ /// 最后更新时间
+ ///
+ [SugarColumn(ColumnName = "update_date")]
+ public DateTime? UpdateDate { get; set; }
+
+ ///
+ /// 每托数量
+ ///
+ [SugarColumn(ColumnName = "stack_amount")]
+ public decimal? StackAmount { get; set; }
+ }
+}
diff --git a/SlnMesnac.WPF/Converter/MultiBindingConverter.cs b/SlnMesnac.WPF/Converter/MultiBindingConverter.cs
new file mode 100644
index 0000000..b347877
--- /dev/null
+++ b/SlnMesnac.WPF/Converter/MultiBindingConverter.cs
@@ -0,0 +1,42 @@
+
+using SlnMesnac.WPF.Model;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+
+namespace SlnMesnac.WPF.ConvertTo
+{
+ public class MultiBindingConverter : IMultiValueConverter
+ {
+ ///
+ /// 对象转换
+ ///
+ /// 所绑定的源的值
+ /// 目标的类型
+ /// 绑定时所传递的参数
+ /// <系统语言等信息
+ ///
+ public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ {
+ if (values != null && values.Count() ==2)
+ {
+ StatisticModel bsm = new StatisticModel();
+
+ bsm.BeginTime = values[0].ToString();
+ bsm.EndTime = values[1].ToString();
+
+ return bsm;
+ }
+ return null;
+ }
+
+ public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+}
diff --git a/SlnMesnac.WPF/Model/StatisticModel.cs b/SlnMesnac.WPF/Model/StatisticModel.cs
new file mode 100644
index 0000000..20f11d2
--- /dev/null
+++ b/SlnMesnac.WPF/Model/StatisticModel.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SlnMesnac.WPF.Model
+{
+ public class StatisticModel
+ {
+ ///
+ /// 开始时间
+ ///
+ public string? BeginTime { get; set; }
+ ///
+ /// 结束时间
+ ///
+ public string? EndTime { get; set; }
+ }
+}
diff --git a/SlnMesnac.WPF/Page/DevMonitorPage.xaml.cs b/SlnMesnac.WPF/Page/DevMonitorPage.xaml.cs
index c3dca42..187e2bc 100644
--- a/SlnMesnac.WPF/Page/DevMonitorPage.xaml.cs
+++ b/SlnMesnac.WPF/Page/DevMonitorPage.xaml.cs
@@ -2010,7 +2010,6 @@ namespace SlnMesnac.WPF.Page
MagNetStatus3.Fill = MagNet_MesUse_Flag ? Brushes.Green : Brushes.Red;
MagNetStatus4.Fill = signal3 ? Brushes.Red : Brushes.Green;
}));
-
MachineStatusDto machineStatusDto = new MachineStatusDto();
machineStatusDto.deviceId = 1017;
machineStatusDto.status = MagNet_Shake_Status && MagNet_Status;
diff --git a/SlnMesnac.WPF/Page/ProdStatisticsPage.xaml b/SlnMesnac.WPF/Page/ProdStatisticsPage.xaml
index f0ec50b..5493fd7 100644
--- a/SlnMesnac.WPF/Page/ProdStatisticsPage.xaml
+++ b/SlnMesnac.WPF/Page/ProdStatisticsPage.xaml
@@ -2,22 +2,109 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:SlnMesnac.WPF.Page"
+ xmlns:cvt="clr-namespace:SlnMesnac.WPF.ConvertTo"
mc:Ignorable="d"
d:DesignHeight="750" d:DesignWidth="1920" Background="Transparent">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -30,35 +117,25 @@
-
+ ScrollViewer.VerticalScrollBarVisibility="Visible" BorderThickness="0" CanUserAddRows="False" HorizontalAlignment="Center"
+ Foreground="White" >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
+
@@ -73,7 +150,7 @@
@@ -85,26 +162,25 @@ Foreground="#FFFFFF" >
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
diff --git a/SlnMesnac.WPF/ViewModel/ProdStatisticsViewModel.cs b/SlnMesnac.WPF/ViewModel/ProdStatisticsViewModel.cs
index afccf71..224ec54 100644
--- a/SlnMesnac.WPF/ViewModel/ProdStatisticsViewModel.cs
+++ b/SlnMesnac.WPF/ViewModel/ProdStatisticsViewModel.cs
@@ -4,12 +4,16 @@ using Microsoft.Extensions.DependencyInjection;
using SlnMesnac.Business;
using SlnMesnac.Model.domain;
using SlnMesnac.Model.dto;
+using SlnMesnac.WPF.MessageTips;
+using SlnMesnac.WPF.Model;
+using SqlSugar;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using System.Windows;
#region << 版 本 注 释 >>
/*--------------------------------------------------------------------
@@ -42,37 +46,119 @@ namespace SlnMesnac.WPF.ViewModel
{
private readonly PalletStowBusiness _palletStowBusiness;
private readonly ProdCompletionBusiness _prodCompletionBusiness;
+ private readonly ISqlSugarClient sqlClient;
+
public ProdStatisticsViewModel()
{
_palletStowBusiness = App.ServiceProvider.GetService();
_prodCompletionBusiness = App.ServiceProvider.GetService();
-
+ sqlClient = App.ServiceProvider.GetService();
+ QueryCommand = new RelayCommand