diff --git a/GroupLine.App/App.config b/GroupLine.App/App.config
new file mode 100644
index 0000000..7b6d270
--- /dev/null
+++ b/GroupLine.App/App.config
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/App.xaml b/GroupLine.App/App.xaml
new file mode 100644
index 0000000..9a2da40
--- /dev/null
+++ b/GroupLine.App/App.xaml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/App.xaml.cs b/GroupLine.App/App.xaml.cs
new file mode 100644
index 0000000..dda2a9b
--- /dev/null
+++ b/GroupLine.App/App.xaml.cs
@@ -0,0 +1,25 @@
+using System.Windows;
+
+namespace GroupLine.App
+{
+ ///
+ /// App.xaml 的交互逻辑
+ ///
+ public partial class App : Application
+ {
+ private static System.Threading.Mutex mutex;
+ protected override void OnStartup(StartupEventArgs e)
+ {
+ mutex = new System.Threading.Mutex(true, "OnlyRun_CRNS");
+ if (mutex.WaitOne(0, false))
+ {
+ base.OnStartup(e);
+ }
+ else
+ {
+ MessageBox.Show("程序已经在运行!", "提示");
+ this.Shutdown();
+ }
+ }
+ }
+}
diff --git a/GroupLine.App/Assets/TextBox.xaml b/GroupLine.App/Assets/TextBox.xaml
new file mode 100644
index 0000000..bd3ceed
--- /dev/null
+++ b/GroupLine.App/Assets/TextBox.xaml
@@ -0,0 +1,104 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/GroupLine.App/FSqlContext.cs b/GroupLine.App/FSqlContext.cs
new file mode 100644
index 0000000..be5182a
--- /dev/null
+++ b/GroupLine.App/FSqlContext.cs
@@ -0,0 +1,12 @@
+using GroupLine.Com;
+
+namespace GroupLine.App
+{
+ public class FSqlContext
+ {
+ public static IFreeSql FDb = new FreeSql.FreeSqlBuilder()
+ .UseConnectionString(FreeSql.DataType.SqlServer, ConfigHelper.GetValue("connecting"))
+ .UseAutoSyncStructure(true) //自动同步实体结构到数据库
+ .Build(); //请务必定义成 Singleton 单例模式
+ }
+}
diff --git a/GroupLine.App/GroupLine.App.csproj b/GroupLine.App/GroupLine.App.csproj
new file mode 100644
index 0000000..f0bb5cd
--- /dev/null
+++ b/GroupLine.App/GroupLine.App.csproj
@@ -0,0 +1,782 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {BDF65038-979E-4922-B285-089193C1A1F4}
+ WinExe
+ GroupLine.App
+ GroupLine.App
+ v4.6.1
+ 512
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4
+ true
+ true
+
+
+
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+ Images\P0.ico
+
+
+
+ ..\packages\AutoMapper.8.0.0\lib\net461\AutoMapper.dll
+
+
+ ..\packages\Portable.BouncyCastle.1.8.9\lib\net40\BouncyCastle.Crypto.dll
+
+
+ ..\packages\CommonServiceLocator.2.0.2\lib\net45\CommonServiceLocator.dll
+
+
+ ..\packages\FreeSql.3.2.692\lib\net451\FreeSql.dll
+
+
+ ..\packages\FreeSql.Provider.SqlServer.3.2.692\lib\net451\FreeSql.Provider.SqlServer.dll
+
+
+ ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.dll
+
+
+ ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Extras.dll
+
+
+ ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Platform.dll
+
+
+ ..\packages\SharpZipLib.1.3.2\lib\net45\ICSharpCode.SharpZipLib.dll
+
+
+ ..\packages\MaterialDesignColors.2.0.4\lib\net452\MaterialDesignColors.dll
+
+
+ ..\packages\MaterialDesignThemes.4.1.0\lib\net452\MaterialDesignThemes.Wpf.dll
+
+
+ ..\packages\NLog.5.1.2\lib\net46\NLog.dll
+
+
+ ..\packages\NPOI.2.5.5\lib\net45\NPOI.dll
+
+
+ ..\packages\NPOI.2.5.5\lib\net45\NPOI.OOXML.dll
+
+
+ ..\packages\NPOI.2.5.5\lib\net45\NPOI.OpenXml4Net.dll
+
+
+ ..\packages\NPOI.2.5.5\lib\net45\NPOI.OpenXmlFormats.dll
+
+
+
+
+
+
+ ..\packages\System.Data.SqlClient.4.8.5\lib\net461\System.Data.SqlClient.dll
+
+
+
+ ..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll
+
+
+
+ ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\System.Windows.Interactivity.dll
+
+
+
+
+
+
+
+
+ 4.0
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AppearanceTestIndex.xaml
+
+
+ BurPlugInstallView.xaml
+
+
+ CylinderEngravView.xaml
+
+
+ DbDataClearView.xaml
+
+
+ ExhInstallMesView.xaml
+
+
+ GCDTransplantView.xaml
+
+
+ GCylinderBurnEbView.xaml
+
+
+ GDynStaticMachView.xaml
+
+
+ GInsRotaResView.xaml
+
+
+ GLeakCheckView.xaml
+
+
+ GLowVolStartView.xaml
+
+
+ GMagTorqueView.xaml
+
+
+ GOilPumpInstallView.xaml
+
+
+ GRingWeldMachView.xaml
+
+
+ GRotorBurnEbView.xaml
+
+
+ GRotorMagView.xaml
+
+
+ GShrinkTubView.xaml
+
+
+ GSpotWeldMachView.xaml
+
+
+ GStaticDiskMachView.xaml
+
+
+ KPCDTransplantView.xaml
+
+
+ KPDynStaticMachView.xaml
+
+
+ KPLeakCheckView.xaml
+
+
+ KPLowVolStartView.xaml
+
+
+ KPMagTorqueView.xaml
+
+
+ KPOilPumpInstallView.xaml
+
+
+ KPRingWeldMachDwView.xaml
+
+
+ KPRingWeldMachUpView.xaml
+
+
+ KPRingWeldMachView.xaml
+
+
+ KPSealInstallView.xaml
+
+
+ KPShrinkTubView.xaml
+
+
+ KPSpotWeldMachView.xaml
+
+
+ KPStaticDiskMachView.xaml
+
+
+ KPUpBurnEbView.xaml
+
+
+ MagTorqueView.xaml
+
+
+ OilPumpInstallView.xaml
+
+
+ KanBanIndex.xaml
+
+
+ KanBan_Create.xaml
+
+
+ KanBan_PlanCountCreate.xaml
+
+
+ KanBan_PlanCountUpdate.xaml
+
+
+ KanBan_Update.xaml
+
+
+ MsgInput.xaml
+
+
+ OffsetConfigIndex.xaml
+
+
+ OverflowLeakMesView.xaml
+
+
+ PCoreMesView.xaml
+
+
+ PLowWeldView.xaml
+
+
+ PRacktPressView.xaml
+
+
+ PRacktWeldView.xaml
+
+
+ ReportTimeConfigIndex.xaml
+
+
+ StaticDiscPressView.xaml
+
+
+ TermWeldView.xaml
+
+
+ UserControlMenuItem.xaml
+
+
+ Designer
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+ Designer
+
+
+ App.xaml
+ Code
+
+
+ MainWindow.xaml
+ Code
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+
+
+ Code
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+ PreserveNewest
+
+
+ Designer
+
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+
+
+
+
+
+ {d952eff3-e90d-48ce-92e5-76e1ba4ab609}
+ GroupLine.Com
+
+
+ {7b3ac8e7-3cda-4d30-8d65-42092aa62bb9}
+ GroupLine.Model
+
+
+
+
+ Always
+
+
+
+
+ Always
+
+
+
+
+
+
+
+ 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。
+
+
+
+
\ No newline at end of file
diff --git a/GroupLine.App/Images/P0.ico b/GroupLine.App/Images/P0.ico
new file mode 100644
index 0000000..f8e93e2
Binary files /dev/null and b/GroupLine.App/Images/P0.ico differ
diff --git a/GroupLine.App/Images/logo.png b/GroupLine.App/Images/logo.png
new file mode 100644
index 0000000..1ba11bc
Binary files /dev/null and b/GroupLine.App/Images/logo.png differ
diff --git a/GroupLine.App/MainWindow.xaml b/GroupLine.App/MainWindow.xaml
new file mode 100644
index 0000000..80d57b6
--- /dev/null
+++ b/GroupLine.App/MainWindow.xaml
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/MainWindow.xaml.cs b/GroupLine.App/MainWindow.xaml.cs
new file mode 100644
index 0000000..dde5ca4
--- /dev/null
+++ b/GroupLine.App/MainWindow.xaml.cs
@@ -0,0 +1,254 @@
+using GroupLine.App.View;
+using GroupLine.App.View.AppearanceTest;
+using GroupLine.App.View.MagTorque;
+using GroupLine.App.View.KanBan;
+using GroupLine.App.View.OffsetConfig;
+using GroupLine.App.ViewModel;
+using GroupLine.Com;
+using GroupLine.Model;
+using MaterialDesignThemes.Wpf;
+using NLog;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading;
+using System.Windows;
+using System.Windows.Controls;
+using YC5.App.View.DbDataClear;
+using YC5.App.View.OilPumpInstall;
+using GroupLine.App.View.BurPlugInstall;
+using GroupLine.App.View.CylinderEngrav;
+using GroupLine.App.View.ExhInstallMes;
+using GroupLine.App.View.GCDTransplant;
+using GroupLine.App.View.GCylinderBurnEb;
+using GroupLine.App.View.GDynStaticMach;
+using GroupLine.App.View.GInsRotaRes;
+using GroupLine.App.View.GLeakCheck;
+using GroupLine.App.View.GLowVolStart;
+using GroupLine.App.View.GMagTorque;
+using GroupLine.App.View.GOilPumpInstall;
+using GroupLine.App.View.GRingWeldMach;
+using GroupLine.App.View.GRotorBurnEb;
+using GroupLine.App.View.GRotorMag;
+using GroupLine.App.View.GShrinkTub;
+using GroupLine.App.View.GSpotWeldMach;
+using GroupLine.App.View.GStaticDiskMach;
+using GroupLine.App.View.KPCDTransplant;
+using GroupLine.App.View.KPDynStaticMach;
+using GroupLine.App.View.KPLeakCheck;
+using GroupLine.App.View.KPLowVolStart;
+using GroupLine.App.View.KPMagTorque;
+using GroupLine.App.View.KPOilPumpInstall;
+using GroupLine.App.View.KPRingWeldMach;
+using GroupLine.App.View.KPSealInstall;
+using GroupLine.App.View.KPSpotWeldMach;
+using GroupLine.App.View.KPStaticDiskMach;
+using GroupLine.App.View.OverflowLeakMes;
+using GroupLine.App.View.PCoreMes;
+using GroupLine.App.View.PLowWeld;
+using GroupLine.App.View.PRacktPress;
+using GroupLine.App.View.PRacktWeld;
+using GroupLine.App.View.StaticDiscPress;
+using GroupLine.App.View.TermWeld;
+using GroupLine.App.View.KPUpBurnEb;
+using GroupLine.App.View.KPRingWeldMachDw;
+using GroupLine.App.View.KPRingWeldMachUp;
+using GroupLine.App.View.KPShrinkTub;
+
+namespace GroupLine.App
+{
+ ///
+ /// MainWindow.xaml 的交互逻辑
+ ///
+ public partial class MainWindow : Window
+ {
+ ///
+ /// 报表定时导出监听线程
+ ///
+ private Thread ReportListenThread;
+
+ ///
+ /// 报表导出时间字符串
+ ///
+ private string ReportOutPutTime = "12:01";
+
+
+
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ //FSQL实例
+ static IFreeSql Fsql;
+
+ ///
+ /// 当前程序的位置
+ ///
+ private string Location;
+
+ ///
+ /// 当前配置信息区域
+ ///
+ private string CurrentRegion = "SCR组立";
+
+ ///
+ /// 当前配置的分类
+ ///
+ private string CurrentCategory = "报表信息";
+
+ ///
+ /// 当前的报表导出的时间
+ ///
+ private string CurrentReportTimeName = "导出时间";
+
+ public MainWindow()
+ {
+ InitializeComponent();
+
+
+ ReportTimeConfigViewModel.PubReportTimeEvent += ReportTimeConfigViewModel_PubReportTimeEvent;
+
+ //获取程序的配置信息
+ var SqlCon = ConfigHelper.GetValue("connecting");
+
+ Fsql = new FreeSql.FreeSqlBuilder()
+ .UseConnectionString(FreeSql.DataType.SqlServer, SqlCon)
+ .UseAutoSyncStructure(true) //自动同步实体结构到数据库
+ .Build(); //请务必定义成 Singleton 单例模式
+
+ var menuReports = new List();
+ var DeviceGroup = new List();
+
+ CurrentRegion = "GroupLine";
+ this.Title = "GroupLine产线管理系统";
+ this.LabelTitle.Content = "DAIKIN-GroupLine生产管理系统";
+
+
+ var item3 = new ItemMenu("设备数据", DeviceGroup, PackIconKind.CogOutline);
+
+
+ //DeviceGroup.Add(new SubItem("铭板打印", new PlaquePrintIndex()));
+ //DeviceGroup.Add(new SubItem("外观检查", new AppearanceTestIndex()));
+ DeviceGroup.Add(new SubItem("G型磁束扭矩检", new MagTorqueView()));
+ DeviceGroup.Add(new SubItem("G型油泵安装", new OilPumpInstallView()));
+ DeviceGroup.Add(new SubItem("筒体刻印机", new CylinderEngravView()));
+ DeviceGroup.Add(new SubItem("端子凸焊", new TermWeldView()));
+ DeviceGroup.Add(new SubItem("G型筒体烧嵌", new GCylinderBurnEbView()));
+ DeviceGroup.Add(new SubItem("G型转子烧嵌", new GRotorBurnEbView()));
+ DeviceGroup.Add(new SubItem("G型转子着磁", new GRotorMagView()));
+ DeviceGroup.Add(new SubItem("G型绝缘、回转方向、电阻测量", new GInsRotaResView()));
+ DeviceGroup.Add(new SubItem("小P支架压入", new PRacktPressView()));
+ DeviceGroup.Add(new SubItem("小P支架焊接", new PRacktWeldView()));
+ DeviceGroup.Add(new SubItem("小P下部焊接", new PLowWeldView()));
+ DeviceGroup.Add(new SubItem("小P芯出测定", new PCoreMesView()));
+ //DeviceGroup.Add(new SubItem("G型磁束扭矩检测工位", new GMagTorqueView()));
+ DeviceGroup.Add(new SubItem("K / P型磁束扭矩检测工位", new KPMagTorqueView()));
+ //DeviceGroup.Add(new SubItem("G型油泵安装工位", new GOilPumpInstallView()));
+ DeviceGroup.Add(new SubItem("K / P型油泵安装工位", new KPOilPumpInstallView()));
+ DeviceGroup.Add(new SubItem("G型C - D移栽", new GCDTransplantView()));
+ DeviceGroup.Add(new SubItem("K / P型C - D移栽", new KPCDTransplantView()));
+ DeviceGroup.Add(new SubItem("G型高低压泄露检查", new GLeakCheckView()));
+ DeviceGroup.Add(new SubItem("K / P型高低压泄露检查", new KPLeakCheckView()));
+ DeviceGroup.Add(new SubItem("K / P型密封盖板安装", new KPSealInstallView()));
+ DeviceGroup.Add(new SubItem("排气盖板安装气密检测", new ExhInstallMesView()));
+ DeviceGroup.Add(new SubItem("埋塞敲入螺旋钉安装", new BurPlugInstallView()));
+ DeviceGroup.Add(new SubItem("溢流阀安装泄露检查", new OverflowLeakMesView()));
+ DeviceGroup.Add(new SubItem("静盘注液阀压入", new StaticDiscPressView()));
+ DeviceGroup.Add(new SubItem("G型动静盘组装机", new GDynStaticMachView()));
+ DeviceGroup.Add(new SubItem("K / P型动静盘组装机", new KPDynStaticMachView()));
+ DeviceGroup.Add(new SubItem("G型低电压启动", new GLowVolStartView()));
+ DeviceGroup.Add(new SubItem("K / P型低电压启动", new KPLowVolStartView()));
+ DeviceGroup.Add(new SubItem("G型点焊机", new GSpotWeldMachView()));
+ DeviceGroup.Add(new SubItem("K / P点焊机", new KPSpotWeldMachView()));
+ DeviceGroup.Add(new SubItem("G型环焊机底部焊接", new GRingWeldMachView()));
+ DeviceGroup.Add(new SubItem("G型环焊机顶部焊接", new KPRingWeldMachView()));
+ DeviceGroup.Add(new SubItem("G型缩管", new GShrinkTubView()));
+ DeviceGroup.Add(new SubItem("K / P上配重烧嵌", new KPUpBurnEbView()));
+ DeviceGroup.Add(new SubItem("G型静盘组装机", new GStaticDiskMachView()));
+ DeviceGroup.Add(new SubItem("K / P静盘组装机", new KPStaticDiskMachView()));
+ DeviceGroup.Add(new SubItem("K/P型环焊机底部焊接", new KPRingWeldMachDwView()));
+ DeviceGroup.Add(new SubItem("K/P型环焊机顶部焊接", new KPRingWeldMachUpView()));
+ DeviceGroup.Add(new SubItem("K/P型缩管", new KPShrinkTubView()));
+
+
+ var menuKanban = new List();
+ menuKanban.Add(new SubItem("休息时间设置", new KanBanIndex()));
+ menuKanban.Add(new SubItem("偏置设置", new OffsetConfigIndex()));
+ menuKanban.Add(new SubItem("数据备份", new DbDataClearView()));
+ //menuKanban.Add(new SubItem("稼动率报表", new ProductRateIndex()));
+ //menuKanban.Add(new SubItem("帮助"));
+ var item5 = new ItemMenu("配置", menuKanban, PackIconKind.MonitorDashboard);
+
+ var menuSystemConfig = new List();
+ menuSystemConfig.Add(new SubItem("帮助"));
+ var item4 = new ItemMenu("系统设置", menuSystemConfig, PackIconKind.ViewDashboard);
+
+ //MonitorDashboard ClipboardTextPlayOutline
+
+ //var menuUser = new List();
+ //menuUser.Add(new SubItem("用户管理"));
+ //var item5 = new ItemMenu("用户设置", menuUser, PackIconKind.User);
+
+ //var item0 = new ItemMenu("看板中心", new null, PackIconKind.ViewDashboard);
+
+ //Menu.Children.Add(new UserControlMenuItem(item0, this));
+ //Menu.Children.Add(new UserControlMenuItem(item1, this));
+ Menu.Children.Add(new UserControlMenuItem(item3, this));
+ Menu.Children.Add(new UserControlMenuItem(item5, this));
+ Menu.Children.Add(new UserControlMenuItem(item4, this));
+ //Menu.Children.Add(new UserControlMenuItem(item5, this));
+
+
+
+ var ConfigInfo = Fsql.Select().Where(a => a.Region == CurrentRegion && a.Category == CurrentCategory && a.Name == CurrentReportTimeName).ToList();
+ if (ConfigInfo != null && ConfigInfo.Count() > 0)
+ {
+ ReportOutPutTime = ConfigInfo.FirstOrDefault().Value;
+ }
+ else
+ {
+ ReportOutPutTime = "12:01";
+ }
+
+ ReportListenThread = new Thread(new ThreadStart(ReportListenThreadMethod));
+ ReportListenThread.Start();
+
+ }
+
+ private void ReportListenThreadMethod()
+ {
+
+ }
+
+ ///
+ /// 修改了报表信息数据
+ ///
+ ///
+ private void ReportTimeConfigViewModel_PubReportTimeEvent(string ReportInfo)
+ {
+ ReportOutPutTime = ReportInfo;
+ }
+
+ ///
+ /// 切换窗体
+ ///
+ ///
+ internal void SwitchScreen(object sender)
+ {
+
+ var screen = ((UserControl)sender);
+
+ if (screen != null)
+ {
+ StackPanelMain.Children.Clear();
+ StackPanelMain.Children.Add(screen);
+ }
+
+
+ }
+
+ private void Window_Closed(object sender, EventArgs e)
+ {
+ Environment.Exit(0);
+ }
+ }
+}
diff --git a/GroupLine.App/ModelDto/AppearanceTestDto.cs b/GroupLine.App/ModelDto/AppearanceTestDto.cs
new file mode 100644
index 0000000..77139ef
--- /dev/null
+++ b/GroupLine.App/ModelDto/AppearanceTestDto.cs
@@ -0,0 +1,223 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(AppearanceTestDto))]
+ public class AppearanceTestDto : ValidateModelBase
+ {
+
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+
+
+ private string _PlaqueNo;
+ ///
+ /// 压缩机铭板号
+ ///
+ public string PlaqueNo
+ {
+ get { return _PlaqueNo; }
+ set { _PlaqueNo = value; RaisePropertyChanged(() => PlaqueNo); }
+ }
+ private string _ProLineNo;
+ ///
+ /// 生产线号
+ ///
+ public string ProLineNo
+ {
+ get { return _ProLineNo; }
+ set { _ProLineNo = value; RaisePropertyChanged(() => ProLineNo); }
+ }
+ private string _MachineTypeCheck;
+ ///
+ /// 机种确认
+ ///
+ public string MachineTypeCheck
+ {
+ get { return _MachineTypeCheck; }
+ set { _MachineTypeCheck = value; RaisePropertyChanged(() => MachineTypeCheck); }
+ }
+ private string _PlaqueCheck;
+ ///
+ /// 铭板确认
+ ///
+ public string PlaqueCheck
+ {
+ get { return _PlaqueCheck; }
+ set { _PlaqueCheck = value; RaisePropertyChanged(() => PlaqueCheck); }
+ }
+ private string _TerminalCheck;
+ ///
+ /// 端子确认
+ ///
+ public string TerminalCheck
+ {
+ get { return _TerminalCheck; }
+ set { _TerminalCheck = value; RaisePropertyChanged(() => TerminalCheck); }
+ }
+ private string _ElectricalBoxCheck;
+ ///
+ /// 电器盒确认
+ ///
+ public string ElectricalBoxCheck
+ {
+ get { return _ElectricalBoxCheck; }
+ set { _ElectricalBoxCheck = value; RaisePropertyChanged(() => ElectricalBoxCheck); }
+ }
+ private string _SealingPlugCheck;
+ ///
+ /// 密封塞确认
+ ///
+ public string SealingPlugCheck
+ {
+ get { return _SealingPlugCheck; }
+ set { _SealingPlugCheck = value; RaisePropertyChanged(() => SealingPlugCheck); }
+ }
+ private string _InOutTubeCheck;
+ ///
+ /// 吸入管吐出管确认
+ ///
+ public string InOutTubeCheck
+ {
+ get { return _InOutTubeCheck; }
+ set { _InOutTubeCheck = value; RaisePropertyChanged(() => InOutTubeCheck); }
+ }
+ private string _UpperCoverCheck;
+ ///
+ /// 上外罩确认
+ ///
+ public string UpperCoverCheck
+ {
+ get { return _UpperCoverCheck; }
+ set { _UpperCoverCheck = value; RaisePropertyChanged(() => UpperCoverCheck); }
+ }
+ private string _ReservoirCheck;
+ ///
+ /// 储液器确认
+ ///
+ public string ReservoirCheck
+ {
+ get { return _ReservoirCheck; }
+ set { _ReservoirCheck = value; RaisePropertyChanged(() => ReservoirCheck); }
+ }
+ private string _HandTubeCheck;
+ ///
+ /// 继手管确认
+ ///
+ public string HandTubeCheck
+ {
+ get { return _HandTubeCheck; }
+ set { _HandTubeCheck = value; RaisePropertyChanged(() => HandTubeCheck); }
+ }
+ private string _WeldCheck;
+ ///
+ /// 点焊确认
+ ///
+ public string WeldCheck
+ {
+ get { return _WeldCheck; }
+ set { _WeldCheck = value; RaisePropertyChanged(() => WeldCheck); }
+ }
+ private string _PaintCheck;
+ ///
+ /// 涂装确认
+ ///
+ public string PaintCheck
+ {
+ get { return _PaintCheck; }
+ set { _PaintCheck = value; RaisePropertyChanged(() => PaintCheck); }
+ }
+ private string _LiftLugCheck;
+ ///
+ /// 吊耳确认
+ ///
+ public string LiftLugCheck
+ {
+ get { return _LiftLugCheck; }
+ set { _LiftLugCheck = value; RaisePropertyChanged(() => LiftLugCheck); }
+ }
+ private string _GirthWeldCheck;
+ ///
+ /// 环焊确认
+ ///
+ public string GirthWeldCheck
+ {
+ get { return _GirthWeldCheck; }
+ set { _GirthWeldCheck = value; RaisePropertyChanged(() => GirthWeldCheck); }
+ }
+ private string _WeldSlagCheck;
+ ///
+ /// 焊渣确认
+ ///
+ public string WeldSlagCheck
+ {
+ get { return _WeldSlagCheck; }
+ set { _WeldSlagCheck = value; RaisePropertyChanged(() => WeldSlagCheck); }
+ }
+ private string _FastenLeatherPadCheck;
+ ///
+ /// 紧固环皮垫确认
+ ///
+ public string FastenLeatherPadCheck
+ {
+ get { return _FastenLeatherPadCheck; }
+ set { _FastenLeatherPadCheck = value; RaisePropertyChanged(() => FastenLeatherPadCheck); }
+ }
+ private string _CylinderCheck;
+ ///
+ /// 筒体确认
+ ///
+ public string CylinderCheck
+ {
+ get { return _CylinderCheck; }
+ set { _CylinderCheck = value; RaisePropertyChanged(() => CylinderCheck); }
+ }
+ private string _Result;
+ ///
+ /// 外观检查结果
+ ///
+ public string Result
+ {
+ get { return _Result; }
+ set { _Result = value; RaisePropertyChanged(() => Result); }
+ }
+ private string _OperationNo;
+ ///
+ /// 测试人员工号
+ ///
+ public string OperationNo
+ {
+ get { return _OperationNo; }
+ set { _OperationNo = value; RaisePropertyChanged(() => OperationNo); }
+ }
+
+
+
+
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set
+ {
+ _CreateTime = value;
+ RaisePropertyChanged(() => CreateTime);
+ }
+ }
+
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/BurPlugInstallDto.cs b/GroupLine.App/ModelDto/BurPlugInstallDto.cs
new file mode 100644
index 0000000..35e0b2a
--- /dev/null
+++ b/GroupLine.App/ModelDto/BurPlugInstallDto.cs
@@ -0,0 +1,130 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(BurPlugInstallDto))]
+ public class BurPlugInstallDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+ private string _StaticDiskNo;
+ ///
+ /// 静盘编号
+ ///
+ public string StaticDiskNo
+ {
+ get { return _StaticDiskNo; }
+ set { _StaticDiskNo = value; RaisePropertyChanged(() => StaticDiskNo); }
+ }
+ private string _OpNo;
+ ///
+ /// 员工编号
+ ///
+ public string OpNo
+ {
+ get { return _OpNo; }
+ set { _OpNo = value; RaisePropertyChanged(() => OpNo); }
+ }
+
+
+ private string _SpiralScrewCheck;
+ ///
+ /// 螺旋螺钉判定
+ ///
+ public string SpiralScrewCheck
+ {
+ get { return _SpiralScrewCheck; }
+ set
+ {
+ switch (value)
+ {
+ case "1":
+ _SpiralScrewCheck = "OK";
+ break;
+ case "2":
+ _SpiralScrewCheck = "NG";
+ break;
+ default:
+ _SpiralScrewCheck = "不做";
+ break;
+ }
+ _SpiralScrewCheck = value;
+ RaisePropertyChanged(() => SpiralScrewCheck);
+ }
+ }
+
+
+ private string _StaDycDiskCheck;
+ ///
+ /// 动静盘埋塞判定
+ ///
+ public string StaDycDiskCheck
+ {
+ get { return _StaDycDiskCheck; }
+ set
+ {
+ switch (value)
+ {
+ case "1":
+ _StaDycDiskCheck = "OK";
+ break;
+ case "2":
+ _StaDycDiskCheck = "NG";
+ break;
+ default:
+ _StaDycDiskCheck = "不做";
+ break;
+ }
+ _StaDycDiskCheck = value;
+ RaisePropertyChanged(() => StaDycDiskCheck);
+ }
+ }
+
+ private string _CoverPlugCheck;
+ ///
+ /// 盖板埋塞判定
+ ///
+ public string CoverPlugCheck
+ {
+ get { return _CoverPlugCheck; }
+ set
+ {
+ switch (value)
+ {
+ case "1":
+ _CoverPlugCheck = "OK";
+ break;
+ case "2":
+ _CoverPlugCheck = "NG";
+ break;
+ default:
+ _CoverPlugCheck = "不做";
+ break;
+ }
+ _CoverPlugCheck = value; RaisePropertyChanged(() => CoverPlugCheck);
+ }
+ }
+
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/ComboBoxModel.cs b/GroupLine.App/ModelDto/ComboBoxModel.cs
new file mode 100644
index 0000000..37c6cb7
--- /dev/null
+++ b/GroupLine.App/ModelDto/ComboBoxModel.cs
@@ -0,0 +1,30 @@
+using GalaSoft.MvvmLight;
+using System;
+
+namespace GroupLine.App.ModelDto
+{
+ public class ComboBoxModel : ObservableObject
+ {
+ private String key;
+ ///
+ /// Key值
+ ///
+ public String Key
+ {
+ get { return key; }
+ set { key = value; RaisePropertyChanged(() => Key); }
+ }
+
+
+ private String text;
+ ///
+ /// Text值
+ ///
+ public String Text
+ {
+ get { return text; }
+ set { text = value; RaisePropertyChanged(() => Text); }
+ }
+ }
+
+}
diff --git a/GroupLine.App/ModelDto/CylinderEngravDto.cs b/GroupLine.App/ModelDto/CylinderEngravDto.cs
new file mode 100644
index 0000000..493694c
--- /dev/null
+++ b/GroupLine.App/ModelDto/CylinderEngravDto.cs
@@ -0,0 +1,50 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(CylinderEngravDto))]
+ public class CylinderEngravDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+private string _OpNo;
+ ///
+ /// 员工编号
+ ///
+ public string OpNo
+ {
+ get { return _OpNo; }
+ set { _OpNo = value; RaisePropertyChanged(() => OpNo); }
+ }
+private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/ExhInstallMesDto.cs b/GroupLine.App/ModelDto/ExhInstallMesDto.cs
new file mode 100644
index 0000000..8d7e1ef
--- /dev/null
+++ b/GroupLine.App/ModelDto/ExhInstallMesDto.cs
@@ -0,0 +1,340 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(ExhInstallMesDto))]
+ public class ExhInstallMesDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+ private string _MachineCode;
+ ///
+ /// 机型
+ ///
+ public string MachineCode
+ {
+ get { return _MachineCode; }
+ set { _MachineCode = value; RaisePropertyChanged(() => _MachineCode); }
+ }
+
+ private string _StaticDiskNo;
+ ///
+ /// 静盘编号
+ ///
+ public string StaticDiskNo
+ {
+ get { return _StaticDiskNo; }
+ set { _StaticDiskNo = value; RaisePropertyChanged(() => StaticDiskNo); }
+ }
+
+ private string _DynaDiskNo;
+ ///
+ /// 动盘编号
+ ///
+ public string DynaDiskNo
+ {
+ get { return _DynaDiskNo; }
+ set { _DynaDiskNo = value; RaisePropertyChanged(() => _DynaDiskNo); }
+ }
+
+
+ private decimal _Cycle;
+ ///
+ /// 节拍
+ ///
+ public decimal Cycle
+ {
+ get { return _Cycle; }
+ set { _Cycle = value; RaisePropertyChanged(() => Cycle); }
+ }
+
+ private int _ScrewCount;
+ ///
+ /// 螺丝数量
+ ///
+ public int ScrewCount
+ {
+ get { return _ScrewCount; }
+ set { _ScrewCount = value; RaisePropertyChanged(() => ScrewCount); }
+ }
+
+ private string _CylinderNo;
+ ///
+ /// 员工编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+ private decimal _ExhausTorque;
+ ///
+ /// 排气盖板扭矩
+ ///
+ public decimal ExhausTorque
+ {
+ get { return _ExhausTorque; }
+ set { _ExhausTorque = value; RaisePropertyChanged(() => ExhausTorque); }
+ }
+ private decimal _FinalAngle;
+ ///
+ /// 最终角度
+ ///
+ public decimal FinalAngle
+ {
+ get { return _FinalAngle; }
+ set { _FinalAngle = value; RaisePropertyChanged(() => FinalAngle); }
+ }
+
+ private decimal _ExhausTorque2;
+ ///
+ /// 排气盖板扭矩2
+ ///
+ public decimal ExhausTorque2
+ {
+ get { return _ExhausTorque2; }
+ set { _ExhausTorque2 = value; RaisePropertyChanged(() => ExhausTorque2); }
+ }
+ private decimal _FinalAngle2;
+ ///
+ /// 最终角度2
+ ///
+ public decimal FinalAngle2
+ {
+ get { return _FinalAngle2; }
+ set { _FinalAngle2 = value; RaisePropertyChanged(() => FinalAngle2); }
+ }
+
+ private decimal _ExhausTorque3;
+ ///
+ /// 排气盖板扭矩3
+ ///
+ public decimal ExhausTorque3
+ {
+ get { return _ExhausTorque3; }
+ set { _ExhausTorque3 = value; RaisePropertyChanged(() => ExhausTorque3); }
+ }
+ private decimal _FinalAngle3;
+ ///
+ /// 最终角度3
+ ///
+ public decimal FinalAngle3
+ {
+ get { return _FinalAngle3; }
+ set { _FinalAngle3 = value; RaisePropertyChanged(() => FinalAngle3); }
+ }
+
+
+
+ private decimal _ExhausTorque4;
+ ///
+ /// 排气盖板扭矩4
+ ///
+ public decimal ExhausTorque4
+ {
+ get { return _ExhausTorque4; }
+ set { _ExhausTorque4 = value; RaisePropertyChanged(() => ExhausTorque4); }
+ }
+ private decimal _FinalAngle4;
+ ///
+ /// 最终角度4
+ ///
+ public decimal FinalAngle4
+ {
+ get { return _FinalAngle4; }
+ set { _FinalAngle4 = value; RaisePropertyChanged(() => FinalAngle4); }
+ }
+
+
+ private decimal _ExhausTorque5;
+ ///
+ /// 排气盖板扭矩5
+ ///
+ public decimal ExhausTorque5
+ {
+ get { return _ExhausTorque5; }
+ set { _ExhausTorque5 = value; RaisePropertyChanged(() => ExhausTorque5); }
+ }
+ private decimal _FinalAngle5;
+ ///
+ /// 最终角度5
+ ///
+ public decimal FinalAngle5
+ {
+ get { return _FinalAngle5; }
+ set { _FinalAngle5 = value; RaisePropertyChanged(() => FinalAngle5); }
+ }
+
+
+ private decimal _ExhausTorque6;
+ ///
+ /// 排气盖板扭矩6
+ ///
+ public decimal ExhausTorque6
+ {
+ get { return _ExhausTorque6; }
+ set { _ExhausTorque6 = value; RaisePropertyChanged(() => ExhausTorque6); }
+ }
+ private decimal _FinalAngle6;
+ ///
+ /// 最终角度6
+ ///
+ public decimal FinalAngle6
+ {
+ get { return _FinalAngle6; }
+ set { _FinalAngle6 = value; RaisePropertyChanged(() => FinalAngle6); }
+ }
+
+
+ private decimal _ExhausTorque7;
+ ///
+ /// 排气盖板扭矩7
+ ///
+ public decimal ExhausTorque7
+ {
+ get { return _ExhausTorque7; }
+ set { _ExhausTorque7 = value; RaisePropertyChanged(() => ExhausTorque7); }
+ }
+ private decimal _FinalAngle7;
+ ///
+ /// 最终角度7
+ ///
+ public decimal FinalAngle7
+ {
+ get { return _FinalAngle7; }
+ set { _FinalAngle7 = value; RaisePropertyChanged(() => FinalAngle7); }
+ }
+
+
+ private decimal _ExhausTorque8;
+ ///
+ /// 排气盖板扭矩8
+ ///
+ public decimal ExhausTorque8
+ {
+ get { return _ExhausTorque8; }
+ set { _ExhausTorque8 = value; RaisePropertyChanged(() => ExhausTorque8); }
+ }
+ private decimal _FinalAngle8;
+ ///
+ /// 最终角度8
+ ///
+ public decimal FinalAngle8
+ {
+ get { return _FinalAngle8; }
+ set { _FinalAngle8 = value; RaisePropertyChanged(() => FinalAngle8); }
+ }
+
+
+ private decimal _ExhausTorque9;
+ ///
+ /// 排气盖板扭矩9
+ ///
+ public decimal ExhausTorque9
+ {
+ get { return _ExhausTorque9; }
+ set { _ExhausTorque9 = value; RaisePropertyChanged(() => ExhausTorque9); }
+ }
+ private decimal _FinalAngle9;
+ ///
+ /// 最终角度9
+ ///
+ public decimal FinalAngle9
+ {
+ get { return _FinalAngle9; }
+ set { _FinalAngle9 = value; RaisePropertyChanged(() => FinalAngle9); }
+ }
+
+
+ private decimal _ExhausTorque10;
+ ///
+ /// 排气盖板扭矩10
+ ///
+ public decimal ExhausTorque10
+ {
+ get { return _ExhausTorque10; }
+ set { _ExhausTorque10 = value; RaisePropertyChanged(() => ExhausTorque10); }
+ }
+ private decimal _FinalAngle10;
+ ///
+ /// 最终角度10
+ ///
+ public decimal FinalAngle10
+ {
+ get { return _FinalAngle10; }
+ set { _FinalAngle10 = value; RaisePropertyChanged(() => FinalAngle10); }
+ }
+
+
+ private decimal _ExhausTorque11;
+ ///
+ /// 排气盖板扭矩11
+ ///
+ public decimal ExhausTorque11
+ {
+ get { return _ExhausTorque11; }
+ set { _ExhausTorque11 = value; RaisePropertyChanged(() => ExhausTorque11); }
+ }
+ private decimal _FinalAngle11;
+ ///
+ /// 最终角度11
+ ///
+ public decimal FinalAngle11
+ {
+ get { return _FinalAngle11; }
+ set { _FinalAngle11 = value; RaisePropertyChanged(() => FinalAngle11); }
+ }
+
+
+ private decimal _ExhausTorque12;
+ ///
+ /// 排气盖板扭矩12
+ ///
+ public decimal ExhausTorque12
+ {
+ get { return _ExhausTorque12; }
+ set { _ExhausTorque12 = value; RaisePropertyChanged(() => ExhausTorque12); }
+ }
+ private decimal _FinalAngle12;
+ ///
+ /// 最终角度12
+ ///
+ public decimal FinalAngle12
+ {
+ get { return _FinalAngle12; }
+ set { _FinalAngle12 = value; RaisePropertyChanged(() => FinalAngle12); }
+ }
+
+
+ private string _Result;
+ ///
+ /// 判定
+ ///
+ public string Result
+ {
+ get { return _Result; }
+ set { _Result = value; RaisePropertyChanged(() => Result); }
+ }
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/GCDTransplantDto.cs b/GroupLine.App/ModelDto/GCDTransplantDto.cs
new file mode 100644
index 0000000..963f413
--- /dev/null
+++ b/GroupLine.App/ModelDto/GCDTransplantDto.cs
@@ -0,0 +1,41 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(GCDTransplantDto))]
+ public class GCDTransplantDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/GCylinderBurnEbDto.cs b/GroupLine.App/ModelDto/GCylinderBurnEbDto.cs
new file mode 100644
index 0000000..150fd21
--- /dev/null
+++ b/GroupLine.App/ModelDto/GCylinderBurnEbDto.cs
@@ -0,0 +1,77 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(GCylinderBurnEbDto))]
+ public class GCylinderBurnEbDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+private string _StatoNo;
+ ///
+ /// 定子编号
+ ///
+ public string StatoNo
+ {
+ get { return _StatoNo; }
+ set { _StatoNo = value; RaisePropertyChanged(() => StatoNo); }
+ }
+private string _ATrayNo;
+ ///
+ /// A托盘号
+ ///
+ public string ATrayNo
+ {
+ get { return _ATrayNo; }
+ set { _ATrayNo = value; RaisePropertyChanged(() => ATrayNo); }
+ }
+private string _OpNo;
+ ///
+ /// 员工编号
+ ///
+ public string OpNo
+ {
+ get { return _OpNo; }
+ set { _OpNo = value; RaisePropertyChanged(() => OpNo); }
+ }
+private decimal _CylinderTemp;
+ ///
+ /// 筒体温度
+ ///
+ public decimal CylinderTemp
+ {
+ get { return _CylinderTemp; }
+ set { _CylinderTemp = value; RaisePropertyChanged(() => CylinderTemp); }
+ }
+private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/GDynStaticMachDto.cs b/GroupLine.App/ModelDto/GDynStaticMachDto.cs
new file mode 100644
index 0000000..c788ed0
--- /dev/null
+++ b/GroupLine.App/ModelDto/GDynStaticMachDto.cs
@@ -0,0 +1,95 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(GDynStaticMachDto))]
+ public class GDynStaticMachDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+private string _DynaDiskNo;
+ ///
+ /// 动盘编号
+ ///
+ public string DynaDiskNo
+ {
+ get { return _DynaDiskNo; }
+ set { _DynaDiskNo = value; RaisePropertyChanged(() => DynaDiskNo); }
+ }
+private string _StaticDiskNo;
+ ///
+ /// 静盘编号
+ ///
+ public string StaticDiskNo
+ {
+ get { return _StaticDiskNo; }
+ set { _StaticDiskNo = value; RaisePropertyChanged(() => StaticDiskNo); }
+ }
+private string _EuropMacine;
+ ///
+ /// 欧式机构
+ ///
+ public string EuropMacine
+ {
+ get { return _EuropMacine; }
+ set { _EuropMacine = value; RaisePropertyChanged(() => EuropMacine); }
+ }
+private string _StaDskCastNo;
+ ///
+ /// 静盘铸件号
+ ///
+ public string StaDskCastNo
+ {
+ get { return _StaDskCastNo; }
+ set { _StaDskCastNo = value; RaisePropertyChanged(() => StaDskCastNo); }
+ }
+private string _OpNo;
+ ///
+ /// 员工编号
+ ///
+ public string OpNo
+ {
+ get { return _OpNo; }
+ set { _OpNo = value; RaisePropertyChanged(() => OpNo); }
+ }
+//private decimal _Torque;
+// ///
+// /// 扭矩值
+// ///
+// public decimal Torque
+// {
+// get { return _Torque; }
+// set { _Torque = value; RaisePropertyChanged(() => Torque); }
+// }
+private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/GInsRotaResDto.cs b/GroupLine.App/ModelDto/GInsRotaResDto.cs
new file mode 100644
index 0000000..2f84f62
--- /dev/null
+++ b/GroupLine.App/ModelDto/GInsRotaResDto.cs
@@ -0,0 +1,107 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(GInsRotaResDto))]
+ public class GInsRotaResDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+ private string _CylinderNo;
+ ///
+ /// 筒体号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+ private string _OpNo;
+ ///
+ /// 员工编号
+ ///
+ public string OpNo
+ {
+ get { return _OpNo; }
+ set { _OpNo = value; RaisePropertyChanged(() => OpNo); }
+ }
+ private string _IsolateResults;
+ ///
+ /// 绝缘结果
+ ///
+ public string IsolateResults
+ {
+ get { return _IsolateResults; }
+ set { _IsolateResults = value; RaisePropertyChanged(() => IsolateResults); }
+ }
+ private decimal _ResValue1;
+ ///
+ /// 电阻值1
+ ///
+ public decimal ResValue1
+ {
+ get { return _ResValue1; }
+ set { _ResValue1 = value; RaisePropertyChanged(() => ResValue1); }
+ }
+ private decimal _ResValue2;
+ ///
+ /// 电阻值2
+ ///
+ public decimal ResValue2
+ {
+ get { return _ResValue2; }
+ set { _ResValue2 = value; RaisePropertyChanged(() => ResValue2); }
+ }
+ private decimal _ResValue3;
+ ///
+ /// 电阻值3
+ ///
+ public decimal ResValue3
+ {
+ get { return _ResValue3; }
+ set { _ResValue3 = value; RaisePropertyChanged(() => ResValue3); }
+ }
+
+ private string _RotaResult;
+ ///
+ /// 回转方向结果
+ ///
+ public string RotaResult
+ {
+ get { return _RotaResult; }
+ set { _RotaResult = value; RaisePropertyChanged(() => RotaResult); }
+ }
+
+ private string _ResResult;
+ ///
+ /// 阻值结果
+ ///
+ public string ResResult
+ {
+ get { return _ResResult; }
+ set { _ResResult = value; RaisePropertyChanged(() => ResResult); }
+ }
+
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/GLeakCheckDto.cs b/GroupLine.App/ModelDto/GLeakCheckDto.cs
new file mode 100644
index 0000000..da5c81a
--- /dev/null
+++ b/GroupLine.App/ModelDto/GLeakCheckDto.cs
@@ -0,0 +1,77 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(GLeakCheckDto))]
+ public class GLeakCheckDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+private decimal _PumpVacuum;
+ ///
+ /// 抽真空值
+ ///
+ public decimal PumpVacuum
+ {
+ get { return _PumpVacuum; }
+ set { _PumpVacuum = value; RaisePropertyChanged(() => PumpVacuum); }
+ }
+private decimal _KeepVacuum;
+ ///
+ /// 保持真空值
+ ///
+ public decimal KeepVacuum
+ {
+ get { return _KeepVacuum; }
+ set { _KeepVacuum = value; RaisePropertyChanged(() => KeepVacuum); }
+ }
+private string _PumpVamResult;
+ ///
+ /// 抽真空值判定
+ ///
+ public string PumpVamResult
+ {
+ get { return _PumpVamResult; }
+ set { _PumpVamResult = value; RaisePropertyChanged(() => PumpVamResult); }
+ }
+private string _KeepVamResult;
+ ///
+ /// 保持真空值判定
+ ///
+ public string KeepVamResult
+ {
+ get { return _KeepVamResult; }
+ set { _KeepVamResult = value; RaisePropertyChanged(() => KeepVamResult); }
+ }
+private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/GLowVolStartDto.cs b/GroupLine.App/ModelDto/GLowVolStartDto.cs
new file mode 100644
index 0000000..e4ac193
--- /dev/null
+++ b/GroupLine.App/ModelDto/GLowVolStartDto.cs
@@ -0,0 +1,87 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(GLowVolStartDto))]
+ public class GLowVolStartDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+ private decimal _ACur;
+ ///
+ /// A相电流值
+ ///
+ public decimal ACur
+ {
+ get { return _ACur; }
+ set { _ACur = value; RaisePropertyChanged(() => ACur); }
+ }
+ private decimal _BCur;
+ ///
+ /// B相电流值
+ ///
+ public decimal BCur
+ {
+ get { return _BCur; }
+ set { _BCur = value; RaisePropertyChanged(() => BCur); }
+ }
+
+ private decimal _CCur;
+ ///
+ /// C相电流值
+ ///
+ public decimal CCur
+ {
+ get { return _CCur; }
+ set { _CCur = value; RaisePropertyChanged(() => CCur); }
+ }
+ private string _Result;
+ ///
+ /// 判定
+ ///
+ public string Result
+ {
+ get { return _Result; }
+ set { _Result = value; RaisePropertyChanged(() => Result); }
+ }
+ private string _OpNo;
+ ///
+ /// 员工编号
+ ///
+ public string OpNo
+ {
+ get { return _OpNo; }
+ set { _OpNo = value; RaisePropertyChanged(() => OpNo); }
+ }
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/GMagTorqueDto.cs b/GroupLine.App/ModelDto/GMagTorqueDto.cs
new file mode 100644
index 0000000..bc66abe
--- /dev/null
+++ b/GroupLine.App/ModelDto/GMagTorqueDto.cs
@@ -0,0 +1,68 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(GMagTorqueDto))]
+ public class GMagTorqueDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+private decimal _MagBeamCount;
+ ///
+ /// 磁束值
+ ///
+ public decimal MagBeamCount
+ {
+ get { return _MagBeamCount; }
+ set { _MagBeamCount = value; RaisePropertyChanged(() => MagBeamCount); }
+ }
+private decimal _TorqueValue;
+ ///
+ /// 扭矩值
+ ///
+ public decimal TorqueValue
+ {
+ get { return _TorqueValue; }
+ set { _TorqueValue = value; RaisePropertyChanged(() => TorqueValue); }
+ }
+private string _Result;
+ ///
+ /// 结果
+ ///
+ public string Result
+ {
+ get { return _Result; }
+ set { _Result = value; RaisePropertyChanged(() => Result); }
+ }
+private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/GOilPumpInstallDto.cs b/GroupLine.App/ModelDto/GOilPumpInstallDto.cs
new file mode 100644
index 0000000..7f1c9a5
--- /dev/null
+++ b/GroupLine.App/ModelDto/GOilPumpInstallDto.cs
@@ -0,0 +1,140 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(GOilPumpInstallDto))]
+ public class GOilPumpInstallDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+ private string _OilPumpNo;
+ ///
+ /// 油泵编号
+ ///
+ public string OilPumpNo
+ {
+ get { return _OilPumpNo; }
+ set { _OilPumpNo = value; RaisePropertyChanged(() => OilPumpNo); }
+ }
+ private string _OpNo;
+ ///
+ /// 员工编号
+ ///
+ public string OpNo
+ {
+ get { return _OpNo; }
+ set { _OpNo = value; RaisePropertyChanged(() => OpNo); }
+ }
+ private string _OilPmpBruRsult;
+ ///
+ /// 油泵磕伤确认
+ ///
+ public string OilPmpBruRsult
+ {
+ get { return _OilPmpBruRsult; }
+ set
+ {
+ switch (value)
+ {
+ case "1":
+ _OilPmpBruRsult = "有磕伤";
+ break;
+ case "0":
+ _OilPmpBruRsult = "无磕伤";
+ break;
+ default:
+ _OilPmpBruRsult = "无";
+ break;
+ }
+ RaisePropertyChanged(() => OilPmpBruRsult);
+ }
+ }
+ private string _IsReturn;
+ ///
+ /// 是否是返修品
+ ///
+ public string IsReturn
+ {
+ get { return _IsReturn; }
+ set
+ {
+ switch (value)
+ {
+ case "1":
+ _IsReturn = "返修品";
+ break;
+ case "0":
+ _IsReturn = "非返修品";
+ break;
+ default:
+ _IsReturn = "无";
+ break;
+ }
+ RaisePropertyChanged(() => IsReturn);
+ }
+ }
+ private string _WeldSpotUI;
+ ///
+ /// 焊点外观
+ ///
+ public string WeldSpotUI
+ {
+ get { return _WeldSpotUI; }
+ set
+ {
+ switch (value)
+ {
+ case "1":
+ _WeldSpotUI = "有磕伤";
+ break;
+ case "0":
+ _WeldSpotUI = "无磕伤";
+ break;
+ default:
+ _WeldSpotUI = "无";
+ break;
+ }
+ RaisePropertyChanged(() => WeldSpotUI);
+ }
+ }
+ private string _Result;
+ ///
+ /// 结果
+ ///
+ public string Result
+ {
+ get { return _Result; }
+ set { _Result = value; RaisePropertyChanged(() => Result); }
+ }
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/GRingWeldMachDto.cs b/GroupLine.App/ModelDto/GRingWeldMachDto.cs
new file mode 100644
index 0000000..d0ef635
--- /dev/null
+++ b/GroupLine.App/ModelDto/GRingWeldMachDto.cs
@@ -0,0 +1,131 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(GRingWeldMachDto))]
+ public class GRingWeldMachDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+ private decimal _Vol1;
+ ///
+ /// 电压值1
+ ///
+ public decimal Vol1
+ {
+ get { return _Vol1; }
+ set { _Vol1 = value; RaisePropertyChanged(() => Vol1); }
+ }
+ private int _Cur1;
+ ///
+ /// 电流值1
+ ///
+ public int Cur1
+ {
+ get { return _Cur1; }
+ set { _Cur1 = value; RaisePropertyChanged(() => Cur1); }
+ }
+ private decimal _WeldTime1;
+ ///
+ /// 焊接时间1
+ ///
+ public decimal WeldTime1
+ {
+ get { return _WeldTime1; }
+ set { _WeldTime1 = value; RaisePropertyChanged(() => WeldTime1); }
+ }
+ private decimal _Vol2;
+ ///
+ /// 电压值2
+ ///
+ public decimal Vol2
+ {
+ get { return _Vol2; }
+ set { _Vol2 = value; RaisePropertyChanged(() => Vol2); }
+ }
+ private int _Cur2;
+ ///
+ /// 电流值2
+ ///
+ public int Cur2
+ {
+ get { return _Cur2; }
+ set { _Cur2 = value; RaisePropertyChanged(() => Cur2); }
+ }
+ private decimal _WeldTime2;
+ ///
+ /// 焊接时间2
+ ///
+ public decimal WeldTime2
+ {
+ get { return _WeldTime2; }
+ set { _WeldTime2 = value; RaisePropertyChanged(() => WeldTime2); }
+ }
+ private int _NozzleClean;
+ ///
+ /// 喷嘴清洁
+ ///
+ public int NozzleClean
+ {
+ get { return _NozzleClean; }
+ set { _NozzleClean = value; RaisePropertyChanged(() => NozzleClean); }
+ }
+ private int _NozzleReplace;
+ ///
+ /// 喷嘴更换
+ ///
+ public int NozzleReplace
+ {
+ get { return _NozzleReplace; }
+ set { _NozzleReplace = value; RaisePropertyChanged(() => NozzleReplace); }
+ }
+ private string _Fixture;
+ ///
+ /// 夹具
+ ///
+ public string Fixture
+ {
+ get { return _Fixture; }
+ set { _Fixture = value; RaisePropertyChanged(() => Fixture); }
+ }
+ private string _Result;
+ ///
+ /// 判定OK/NG
+ ///
+ public string Result
+ {
+ get { return _Result; }
+ set { _Result = value; RaisePropertyChanged(() => Result); }
+ }
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/GRotorBurnEbDto.cs b/GroupLine.App/ModelDto/GRotorBurnEbDto.cs
new file mode 100644
index 0000000..2b29e91
--- /dev/null
+++ b/GroupLine.App/ModelDto/GRotorBurnEbDto.cs
@@ -0,0 +1,59 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(GRotorBurnEbDto))]
+ public class GRotorBurnEbDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+ private string _RotorNo;
+ ///
+ /// 转子编号
+ ///
+ public string RotorNo
+ {
+ get { return _RotorNo; }
+ set { _RotorNo = value; RaisePropertyChanged(() => RotorNo); }
+ }
+private string _CrankshaftNo;
+ ///
+ /// 曲轴编号
+ ///
+ public string CrankshaftNo
+ {
+ get { return _CrankshaftNo; }
+ set { _CrankshaftNo = value; RaisePropertyChanged(() => CrankshaftNo); }
+ }
+private string _OpNo;
+ ///
+ /// 员工编号
+ ///
+ public string OpNo
+ {
+ get { return _OpNo; }
+ set { _OpNo = value; RaisePropertyChanged(() => OpNo); }
+ }
+private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/GRotorMagDto.cs b/GroupLine.App/ModelDto/GRotorMagDto.cs
new file mode 100644
index 0000000..66e82bc
--- /dev/null
+++ b/GroupLine.App/ModelDto/GRotorMagDto.cs
@@ -0,0 +1,86 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(GRotorMagDto))]
+ public class GRotorMagDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+
+ private string _RotorNo;
+ ///
+ /// 转子编号
+ ///
+ public string RotorNo
+ {
+ get { return _RotorNo; }
+ set { _RotorNo = value; RaisePropertyChanged(() => RotorNo); }
+ }
+ private string _OpNo;
+ ///
+ /// 员工编号
+ ///
+ public string OpNo
+ {
+ get { return _OpNo; }
+ set { _OpNo = value; RaisePropertyChanged(() => OpNo); }
+ }
+ private decimal _MagBeamCount;
+ ///
+ /// 磁束量
+ ///
+ public decimal MagBeamCount
+ {
+ get { return _MagBeamCount; }
+ set { _MagBeamCount = value; RaisePropertyChanged(() => MagBeamCount); }
+ }
+ private decimal _Current;
+ ///
+ /// 电流值
+ ///
+ public decimal Current
+ {
+ get { return _Current; }
+ set { _Current = value; RaisePropertyChanged(() => Current); }
+ }
+ private decimal _RotorAngle;
+ ///
+ /// 转子角度
+ ///
+ public decimal RotorAngle
+ {
+ get { return _RotorAngle; }
+ set { _RotorAngle = value; RaisePropertyChanged(() => RotorAngle); }
+ }
+ private string _RotorAgleRsult;
+ ///
+ /// 转子角度判定
+ ///
+ public string RotorAgleRsult
+ {
+ get { return _RotorAgleRsult; }
+ set { _RotorAgleRsult = value; RaisePropertyChanged(() => RotorAgleRsult); }
+ }
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/GShrinkTubDto.cs b/GroupLine.App/ModelDto/GShrinkTubDto.cs
new file mode 100644
index 0000000..b470b8b
--- /dev/null
+++ b/GroupLine.App/ModelDto/GShrinkTubDto.cs
@@ -0,0 +1,77 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(GShrinkTubDto))]
+ public class GShrinkTubDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+ private string _OpNo;
+ ///
+ /// 员工编号
+ ///
+ public string OpNo
+ {
+ get { return _OpNo; }
+ set { _OpNo = value; RaisePropertyChanged(() => OpNo); }
+ }
+ private decimal _FinalLoad;
+ ///
+ /// 终负荷
+ ///
+ public decimal FinalLoad
+ {
+ get { return _FinalLoad; }
+ set { _FinalLoad = value; RaisePropertyChanged(() => FinalLoad); }
+ }
+ private decimal _FinalLocation;
+ ///
+ /// 终位置
+ ///
+ public decimal FinalLocation
+ {
+ get { return _FinalLocation; }
+ set { _FinalLocation = value; RaisePropertyChanged(() => FinalLocation); }
+ }
+ private string _Result;
+ ///
+ /// 判定
+ ///
+ public string Result
+ {
+ get { return _Result; }
+ set { _Result = value; RaisePropertyChanged(() => Result); }
+ }
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/GSpotWeldMachDto.cs b/GroupLine.App/ModelDto/GSpotWeldMachDto.cs
new file mode 100644
index 0000000..083e9f1
--- /dev/null
+++ b/GroupLine.App/ModelDto/GSpotWeldMachDto.cs
@@ -0,0 +1,275 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(GSpotWeldMachDto))]
+ public class GSpotWeldMachDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+private decimal _VolR1_1;
+ ///
+ /// 电压R1-1
+ ///
+ public decimal VolR1_1
+ {
+ get { return _VolR1_1; }
+ set { _VolR1_1 = value; RaisePropertyChanged(() => VolR1_1); }
+ }
+private int _CurR1_1;
+ ///
+ /// 电流R1-1
+ ///
+ public int CurR1_1
+ {
+ get { return _CurR1_1; }
+ set { _CurR1_1 = value; RaisePropertyChanged(() => CurR1_1); }
+ }
+private decimal _WeldTimeR1_1;
+ ///
+ /// 焊接时间R1-1
+ ///
+ public decimal WeldTimeR1_1
+ {
+ get { return _WeldTimeR1_1; }
+ set { _WeldTimeR1_1 = value; RaisePropertyChanged(() => WeldTimeR1_1); }
+ }
+private decimal _VolR1_2;
+ ///
+ /// 电压R1-2
+ ///
+ public decimal VolR1_2
+ {
+ get { return _VolR1_2; }
+ set { _VolR1_2 = value; RaisePropertyChanged(() => VolR1_2); }
+ }
+private int _CurR1_2;
+ ///
+ /// 电流R1-2
+ ///
+ public int CurR1_2
+ {
+ get { return _CurR1_2; }
+ set { _CurR1_2 = value; RaisePropertyChanged(() => CurR1_2); }
+ }
+private decimal _WeldTimeR1_2;
+ ///
+ /// 焊接时间R1-2
+ ///
+ public decimal WeldTimeR1_2
+ {
+ get { return _WeldTimeR1_2; }
+ set { _WeldTimeR1_2 = value; RaisePropertyChanged(() => WeldTimeR1_2); }
+ }
+private decimal _VolR1_3;
+ ///
+ /// 电压R1-3
+ ///
+ public decimal VolR1_3
+ {
+ get { return _VolR1_3; }
+ set { _VolR1_3 = value; RaisePropertyChanged(() => VolR1_3); }
+ }
+private int _CurR1_3;
+ ///
+ /// 电流R1-3
+ ///
+ public int CurR1_3
+ {
+ get { return _CurR1_3; }
+ set { _CurR1_3 = value; RaisePropertyChanged(() => CurR1_3); }
+ }
+private decimal _WeldTimeR1_3;
+ ///
+ /// 焊接时间R1-3
+ ///
+ public decimal WeldTimeR1_3
+ {
+ get { return _WeldTimeR1_3; }
+ set { _WeldTimeR1_3 = value; RaisePropertyChanged(() => WeldTimeR1_3); }
+ }
+private decimal _VolR1_4;
+ ///
+ /// 电压R1-4
+ ///
+ public decimal VolR1_4
+ {
+ get { return _VolR1_4; }
+ set { _VolR1_4 = value; RaisePropertyChanged(() => VolR1_4); }
+ }
+private int _CurR1_4;
+ ///
+ /// 电流R1-4
+ ///
+ public int CurR1_4
+ {
+ get { return _CurR1_4; }
+ set { _CurR1_4 = value; RaisePropertyChanged(() => CurR1_4); }
+ }
+private decimal _WeldTimeR1_4;
+ ///
+ /// 焊接时间R1-4
+ ///
+ public decimal WeldTimeR1_4
+ {
+ get { return _WeldTimeR1_4; }
+ set { _WeldTimeR1_4 = value; RaisePropertyChanged(() => WeldTimeR1_4); }
+ }
+private decimal _VolR2_1;
+ ///
+ /// 电压R2-1
+ ///
+ public decimal VolR2_1
+ {
+ get { return _VolR2_1; }
+ set { _VolR2_1 = value; RaisePropertyChanged(() => VolR2_1); }
+ }
+private int _CurR2_1;
+ ///
+ /// 电流R2-1
+ ///
+ public int CurR2_1
+ {
+ get { return _CurR2_1; }
+ set { _CurR2_1 = value; RaisePropertyChanged(() => CurR2_1); }
+ }
+private decimal _WeldTimeR2_1;
+ ///
+ /// 焊接时间R2-1
+ ///
+ public decimal WeldTimeR2_1
+ {
+ get { return _WeldTimeR2_1; }
+ set { _WeldTimeR2_1 = value; RaisePropertyChanged(() => WeldTimeR2_1); }
+ }
+private decimal _VolR2_2;
+ ///
+ /// 电压R2-2
+ ///
+ public decimal VolR2_2
+ {
+ get { return _VolR2_2; }
+ set { _VolR2_2 = value; RaisePropertyChanged(() => VolR2_2); }
+ }
+private int _CurR2_2;
+ ///
+ /// 电流R2-2
+ ///
+ public int CurR2_2
+ {
+ get { return _CurR2_2; }
+ set { _CurR2_2 = value; RaisePropertyChanged(() => CurR2_2); }
+ }
+private decimal _WeldTimeR2_2;
+ ///
+ /// 焊接时间R2-2
+ ///
+ public decimal WeldTimeR2_2
+ {
+ get { return _WeldTimeR2_2; }
+ set { _WeldTimeR2_2 = value; RaisePropertyChanged(() => WeldTimeR2_2); }
+ }
+private decimal _VolR2_3;
+ ///
+ /// 电压R2-3
+ ///
+ public decimal VolR2_3
+ {
+ get { return _VolR2_3; }
+ set { _VolR2_3 = value; RaisePropertyChanged(() => VolR2_3); }
+ }
+private int _CurR2_3;
+ ///
+ /// 电流R2-3
+ ///
+ public int CurR2_3
+ {
+ get { return _CurR2_3; }
+ set { _CurR2_3 = value; RaisePropertyChanged(() => CurR2_3); }
+ }
+private decimal _WeldTimeR2_3;
+ ///
+ /// 焊接时间R2-3
+ ///
+ public decimal WeldTimeR2_3
+ {
+ get { return _WeldTimeR2_3; }
+ set { _WeldTimeR2_3 = value; RaisePropertyChanged(() => WeldTimeR2_3); }
+ }
+private decimal _VolR2_4;
+ ///
+ /// 电压R2-4
+ ///
+ public decimal VolR2_4
+ {
+ get { return _VolR2_4; }
+ set { _VolR2_4 = value; RaisePropertyChanged(() => VolR2_4); }
+ }
+private int _CurR2_4;
+ ///
+ /// 电流R2-4
+ ///
+ public int CurR2_4
+ {
+ get { return _CurR2_4; }
+ set { _CurR2_4 = value; RaisePropertyChanged(() => CurR2_4); }
+ }
+private decimal _WeldTimeR2_4;
+ ///
+ /// 焊接时间R2-4
+ ///
+ public decimal WeldTimeR2_4
+ {
+ get { return _WeldTimeR2_4; }
+ set { _WeldTimeR2_4 = value; RaisePropertyChanged(() => WeldTimeR2_4); }
+ }
+private int _NozzleClean;
+ ///
+ /// 喷嘴清洁
+ ///
+ public int NozzleClean
+ {
+ get { return _NozzleClean; }
+ set { _NozzleClean = value; RaisePropertyChanged(() => NozzleClean); }
+ }
+private int _NozzleReplace;
+ ///
+ /// 喷嘴更换
+ ///
+ public int NozzleReplace
+ {
+ get { return _NozzleReplace; }
+ set { _NozzleReplace = value; RaisePropertyChanged(() => NozzleReplace); }
+ }
+private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/GStaticDiskMachDto.cs b/GroupLine.App/ModelDto/GStaticDiskMachDto.cs
new file mode 100644
index 0000000..f293bee
--- /dev/null
+++ b/GroupLine.App/ModelDto/GStaticDiskMachDto.cs
@@ -0,0 +1,332 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(GStaticDiskMachDto))]
+ public class GStaticDiskMachDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+
+
+ private string _MachineCode;
+ ///
+ /// 机型
+ ///
+ public string MachineCode
+ {
+ get { return _MachineCode; }
+ set { _MachineCode = value; RaisePropertyChanged(() => _MachineCode); }
+ }
+
+
+ private decimal _Cycle;
+ ///
+ /// 节拍
+ ///
+ public decimal Cycle
+ {
+ get { return _Cycle; }
+ set { _Cycle = value; RaisePropertyChanged(() => Cycle); }
+ }
+
+ private int _ScrewCount;
+ ///
+ /// 螺丝数量
+ ///
+ public int ScrewCount
+ {
+ get { return _ScrewCount; }
+ set { _ScrewCount = value; RaisePropertyChanged(() => ScrewCount); }
+ }
+
+
+ private decimal _FinalTorque;
+ ///
+ /// 最终扭矩
+ ///
+ public decimal FinalTorque
+ {
+ get { return _FinalTorque; }
+ set { _FinalTorque = value; RaisePropertyChanged(() => FinalTorque); }
+ }
+ private decimal _FinalAngle;
+ ///
+ /// 最终角度
+ ///
+ public decimal FinalAngle
+ {
+ get { return _FinalAngle; }
+ set { _FinalAngle = value; RaisePropertyChanged(() => FinalAngle); }
+ }
+
+
+ private decimal _FinalTorque2;
+ ///
+ /// 最终扭矩2
+ ///
+ public decimal FinalTorque2
+ {
+ get { return _FinalTorque2; }
+ set { _FinalTorque2 = value; RaisePropertyChanged(() => FinalTorque2); }
+ }
+ private decimal _FinalAngle2;
+ ///
+ /// 最终角度2
+ ///
+ public decimal FinalAngle2
+ {
+ get { return _FinalAngle2; }
+ set { _FinalAngle2 = value; RaisePropertyChanged(() => FinalAngle2); }
+ }
+
+
+ private decimal _FinalTorque3;
+ ///
+ /// 最终扭矩3
+ ///
+ public decimal FinalTorque3
+ {
+ get { return _FinalTorque3; }
+ set { _FinalTorque3 = value; RaisePropertyChanged(() => FinalTorque3); }
+ }
+ private decimal _FinalAngle3;
+ ///
+ /// 最终角度3
+ ///
+ public decimal FinalAngle3
+ {
+ get { return _FinalAngle3; }
+ set { _FinalAngle3 = value; RaisePropertyChanged(() => FinalAngle3); }
+ }
+
+
+ private decimal _FinalTorque4;
+ ///
+ /// 最终扭矩4
+ ///
+ public decimal FinalTorque4
+ {
+ get { return _FinalTorque4; }
+ set { _FinalTorque4 = value; RaisePropertyChanged(() => FinalTorque4); }
+ }
+ private decimal _FinalAngle4;
+ ///
+ /// 最终角度4
+ ///
+ public decimal FinalAngle4
+ {
+ get { return _FinalAngle4; }
+ set { _FinalAngle4 = value; RaisePropertyChanged(() => FinalAngle4); }
+ }
+
+
+ private decimal _FinalTorque5;
+ ///
+ /// 最终扭矩5
+ ///
+ public decimal FinalTorque5
+ {
+ get { return _FinalTorque5; }
+ set { _FinalTorque5 = value; RaisePropertyChanged(() => FinalTorque5); }
+ }
+ private decimal _FinalAngle5;
+ ///
+ /// 最终角度5
+ ///
+ public decimal FinalAngle5
+ {
+ get { return _FinalAngle5; }
+ set { _FinalAngle5= value; RaisePropertyChanged(() => FinalAngle5); }
+ }
+
+
+ private decimal _FinalTorque6;
+ ///
+ /// 最终扭矩6
+ ///
+ public decimal FinalTorque6
+ {
+ get { return _FinalTorque6; }
+ set { _FinalTorque6 = value; RaisePropertyChanged(() => FinalTorque6); }
+ }
+ private decimal _FinalAngle6;
+ ///
+ /// 最终角度6
+ ///
+ public decimal FinalAngle6
+ {
+ get { return _FinalAngle6; }
+ set { _FinalAngle6 = value; RaisePropertyChanged(() => FinalAngle6); }
+ }
+
+
+ private decimal _FinalTorque7;
+ ///
+ /// 最终扭矩7
+ ///
+ public decimal FinalTorque7
+ {
+ get { return _FinalTorque7; }
+ set { _FinalTorque7 = value; RaisePropertyChanged(() => FinalTorque7); }
+ }
+ private decimal _FinalAngle7;
+ ///
+ /// 最终角度7
+ ///
+ public decimal FinalAngle7
+ {
+ get { return _FinalAngle7; }
+ set { _FinalAngle7 = value; RaisePropertyChanged(() => FinalAngle7); }
+ }
+
+
+ private decimal _FinalTorque8;
+ ///
+ /// 最终扭矩8
+ ///
+ public decimal FinalTorque8
+ {
+ get { return _FinalTorque8; }
+ set { _FinalTorque8 = value; RaisePropertyChanged(() => FinalTorque8); }
+ }
+ private decimal _FinalAngle8;
+ ///
+ /// 最终角度8
+ ///
+ public decimal FinalAngle8
+ {
+ get { return _FinalAngle8; }
+ set { _FinalAngle8 = value; RaisePropertyChanged(() => FinalAngle8); }
+ }
+
+
+ private decimal _FinalTorque9;
+ ///
+ /// 最终扭矩9
+ ///
+ public decimal FinalTorque9
+ {
+ get { return _FinalTorque9; }
+ set { _FinalTorque9 = value; RaisePropertyChanged(() => FinalTorque9); }
+ }
+ private decimal _FinalAngle9;
+ ///
+ /// 最终角度9
+ ///
+ public decimal FinalAngle9
+ {
+ get { return _FinalAngle9; }
+ set { _FinalAngle9 = value; RaisePropertyChanged(() => FinalAngle9); }
+ }
+
+ private decimal _FinalTorque10;
+ ///
+ /// 最终扭矩10
+ ///
+ public decimal FinalTorque10
+ {
+ get { return _FinalTorque10; }
+ set { _FinalTorque10 = value; RaisePropertyChanged(() => FinalTorque10); }
+ }
+ private decimal _FinalAngle10;
+ ///
+ /// 最终角度10
+ ///
+ public decimal FinalAngle10
+ {
+ get { return _FinalAngle10; }
+ set { _FinalAngle10 = value; RaisePropertyChanged(() => FinalAngle10); }
+ }
+
+
+ private decimal _FinalTorque11;
+ ///
+ /// 最终扭矩11
+ ///
+ public decimal FinalTorque11
+ {
+ get { return _FinalTorque11; }
+ set { _FinalTorque11 = value; RaisePropertyChanged(() => FinalTorque11); }
+ }
+ private decimal _FinalAngle11;
+ ///
+ /// 最终角度11
+ ///
+ public decimal FinalAngle11
+ {
+ get { return _FinalAngle11; }
+ set { _FinalAngle11 = value; RaisePropertyChanged(() => FinalAngle11); }
+ }
+
+
+ private decimal _FinalTorque12;
+ ///
+ /// 最终扭矩12
+ ///
+ public decimal FinalTorque12
+ {
+ get { return _FinalTorque12; }
+ set { _FinalTorque12 = value; RaisePropertyChanged(() => FinalTorque12); }
+ }
+ private decimal _FinalAngle12;
+ ///
+ /// 最终角度12
+ ///
+ public decimal FinalAngle12
+ {
+ get { return _FinalAngle12; }
+ set { _FinalAngle12 = value; RaisePropertyChanged(() => FinalAngle12); }
+ }
+
+
+ private string _Result;
+ ///
+ /// 判定
+ ///
+ public string Result
+ {
+ get { return _Result; }
+ set { _Result = value; RaisePropertyChanged(() => Result); }
+ }
+ private string _OpNo;
+ ///
+ /// 员工编号
+ ///
+ public string OpNo
+ {
+ get { return _OpNo; }
+ set { _OpNo = value; RaisePropertyChanged(() => OpNo); }
+ }
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/KPCDTransplantDto.cs b/GroupLine.App/ModelDto/KPCDTransplantDto.cs
new file mode 100644
index 0000000..f535beb
--- /dev/null
+++ b/GroupLine.App/ModelDto/KPCDTransplantDto.cs
@@ -0,0 +1,41 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(KPCDTransplantDto))]
+ public class KPCDTransplantDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/KPDynStaticMachDto.cs b/GroupLine.App/ModelDto/KPDynStaticMachDto.cs
new file mode 100644
index 0000000..7707b9e
--- /dev/null
+++ b/GroupLine.App/ModelDto/KPDynStaticMachDto.cs
@@ -0,0 +1,137 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(KPDynStaticMachDto))]
+ public class KPDynStaticMachDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+ private string _DynaDiskNo;
+ ///
+ /// 动盘编号
+ ///
+ public string DynaDiskNo
+ {
+ get { return _DynaDiskNo; }
+ set { _DynaDiskNo = value; RaisePropertyChanged(() => DynaDiskNo); }
+ }
+ private string _StaticDiskNo;
+ ///
+ /// 静盘编号
+ ///
+ public string StaticDiskNo
+ {
+ get { return _StaticDiskNo; }
+ set { _StaticDiskNo = value; RaisePropertyChanged(() => StaticDiskNo); }
+ }
+ private string _EuropMacine;
+ ///
+ /// 欧式机构
+ ///
+ public string EuropMacine
+ {
+ get { return _EuropMacine; }
+ set { _EuropMacine = value; RaisePropertyChanged(() => EuropMacine); }
+ }
+ private string _StaDskCastNo;
+ ///
+ /// 静盘铸件号
+ ///
+ public string StaDskCastNo
+ {
+ get { return _StaDskCastNo; }
+ set { _StaDskCastNo = value; RaisePropertyChanged(() => StaDskCastNo); }
+ }
+
+ private string _MeterGap;
+ ///
+ /// 间隙值 玛仪器测量
+ ///
+ public string MeterGap
+ {
+ get { return _MeterGap; }
+ set { _MeterGap = value; RaisePropertyChanged(() => MeterGap); }
+ }
+
+
+ private string _MeterGroup;
+ ///
+ /// 分组 玛仪器测量
+ ///
+ public string MeterGroup
+ {
+ get { return _MeterGroup; }
+ set { _MeterGroup = value; RaisePropertyChanged(() => MeterGroup); }
+ }
+
+
+ private string _MeterResult;
+ ///
+ /// 结论 玛仪器测量
+ ///
+ public string MeterResult
+ {
+ get { return _MeterResult; }
+ set { _MeterResult = value; RaisePropertyChanged(() => MeterResult); }
+ }
+
+ private string _OpNo;
+ ///
+ /// 员工编号
+ ///
+ public string OpNo
+ {
+ get { return _OpNo; }
+ set { _OpNo = value; RaisePropertyChanged(() => OpNo); }
+ }
+ //private decimal _Torque;
+ // ///
+ // /// 扭矩值
+ // ///
+ // public decimal Torque
+ // {
+ // get { return _Torque; }
+ // set { _Torque = value; RaisePropertyChanged(() => Torque); }
+ // }
+ private string _EuopMaDifValue;
+ ///
+ /// 欧式机构段差值
+ ///
+ public string EuopMaDifValue
+ {
+ get { return _EuopMaDifValue; }
+ set { _EuopMaDifValue = value; RaisePropertyChanged(() => EuopMaDifValue); }
+ }
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/KPLeakCheckDto.cs b/GroupLine.App/ModelDto/KPLeakCheckDto.cs
new file mode 100644
index 0000000..b00da9d
--- /dev/null
+++ b/GroupLine.App/ModelDto/KPLeakCheckDto.cs
@@ -0,0 +1,77 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(KPLeakCheckDto))]
+ public class KPLeakCheckDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+private decimal _PumpVacuum;
+ ///
+ /// 抽真空值
+ ///
+ public decimal PumpVacuum
+ {
+ get { return _PumpVacuum; }
+ set { _PumpVacuum = value; RaisePropertyChanged(() => PumpVacuum); }
+ }
+private decimal _KeepVacuum;
+ ///
+ /// 保持真空值
+ ///
+ public decimal KeepVacuum
+ {
+ get { return _KeepVacuum; }
+ set { _KeepVacuum = value; RaisePropertyChanged(() => KeepVacuum); }
+ }
+private string _PumpVamResult;
+ ///
+ /// 抽真空值判定
+ ///
+ public string PumpVamResult
+ {
+ get { return _PumpVamResult; }
+ set { _PumpVamResult = value; RaisePropertyChanged(() => PumpVamResult); }
+ }
+private string _KeepVamResult;
+ ///
+ /// 保持真空值判定
+ ///
+ public string KeepVamResult
+ {
+ get { return _KeepVamResult; }
+ set { _KeepVamResult = value; RaisePropertyChanged(() => KeepVamResult); }
+ }
+private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/KPLowVolStartDto.cs b/GroupLine.App/ModelDto/KPLowVolStartDto.cs
new file mode 100644
index 0000000..9e8cd99
--- /dev/null
+++ b/GroupLine.App/ModelDto/KPLowVolStartDto.cs
@@ -0,0 +1,86 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(KPLowVolStartDto))]
+ public class KPLowVolStartDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+private decimal _ACur;
+ ///
+ /// A相电流值
+ ///
+ public decimal ACur
+ {
+ get { return _ACur; }
+ set { _ACur = value; RaisePropertyChanged(() => ACur); }
+ }
+private decimal _BCur;
+ ///
+ /// B相电流值
+ ///
+ public decimal BCur
+ {
+ get { return _BCur; }
+ set { _BCur = value; RaisePropertyChanged(() => BCur); }
+ }
+private decimal _CCur;
+ ///
+ /// C相电流值
+ ///
+ public decimal CCur
+ {
+ get { return _CCur; }
+ set { _CCur = value; RaisePropertyChanged(() => CCur); }
+ }
+private string _Result;
+ ///
+ /// 判定
+ ///
+ public string Result
+ {
+ get { return _Result; }
+ set { _Result = value; RaisePropertyChanged(() => Result); }
+ }
+private string _OpNo;
+ ///
+ /// 员工编号
+ ///
+ public string OpNo
+ {
+ get { return _OpNo; }
+ set { _OpNo = value; RaisePropertyChanged(() => OpNo); }
+ }
+private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/KPMagTorqueDto.cs b/GroupLine.App/ModelDto/KPMagTorqueDto.cs
new file mode 100644
index 0000000..1c8962d
--- /dev/null
+++ b/GroupLine.App/ModelDto/KPMagTorqueDto.cs
@@ -0,0 +1,68 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(KPMagTorqueDto))]
+ public class KPMagTorqueDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+private decimal _MagBeamCount;
+ ///
+ /// 磁束值
+ ///
+ public decimal MagBeamCount
+ {
+ get { return _MagBeamCount; }
+ set { _MagBeamCount = value; RaisePropertyChanged(() => MagBeamCount); }
+ }
+private decimal _TorqueValue;
+ ///
+ /// 扭矩值
+ ///
+ public decimal TorqueValue
+ {
+ get { return _TorqueValue; }
+ set { _TorqueValue = value; RaisePropertyChanged(() => TorqueValue); }
+ }
+private string _Result;
+ ///
+ /// 结果
+ ///
+ public string Result
+ {
+ get { return _Result; }
+ set { _Result = value; RaisePropertyChanged(() => Result); }
+ }
+private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/KPOilPumpInstallDto.cs b/GroupLine.App/ModelDto/KPOilPumpInstallDto.cs
new file mode 100644
index 0000000..4829b8d
--- /dev/null
+++ b/GroupLine.App/ModelDto/KPOilPumpInstallDto.cs
@@ -0,0 +1,140 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(KPOilPumpInstallDto))]
+ public class KPOilPumpInstallDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+private string _OilPumpNo;
+ ///
+ /// 油泵编号
+ ///
+ public string OilPumpNo
+ {
+ get { return _OilPumpNo; }
+ set { _OilPumpNo = value; RaisePropertyChanged(() => OilPumpNo); }
+ }
+private string _OpNo;
+ ///
+ /// 员工编号
+ ///
+ public string OpNo
+ {
+ get { return _OpNo; }
+ set { _OpNo = value; RaisePropertyChanged(() => OpNo); }
+ }
+ private string _OilPmpBruRsult;
+ ///
+ /// 油泵磕伤确认
+ ///
+ public string OilPmpBruRsult
+ {
+ get { return _OilPmpBruRsult; }
+ set
+ {
+ switch (value)
+ {
+ case "1":
+ _OilPmpBruRsult = "有磕伤";
+ break;
+ case "0":
+ _OilPmpBruRsult = "无磕伤";
+ break;
+ default:
+ _OilPmpBruRsult = "无";
+ break;
+ }
+ RaisePropertyChanged(() => OilPmpBruRsult);
+ }
+ }
+ private string _IsReturn;
+ ///
+ /// 是否是返修品
+ ///
+ public string IsReturn
+ {
+ get { return _IsReturn; }
+ set
+ {
+ switch (value)
+ {
+ case "1":
+ _IsReturn = "返修品";
+ break;
+ case "0":
+ _IsReturn = "非返修品";
+ break;
+ default:
+ _IsReturn = "无";
+ break;
+ }
+ RaisePropertyChanged(() => IsReturn);
+ }
+ }
+ private string _WeldSpotUI;
+ ///
+ /// 焊点外观
+ ///
+ public string WeldSpotUI
+ {
+ get { return _WeldSpotUI; }
+ set
+ {
+ switch (value)
+ {
+ case "1":
+ _WeldSpotUI = "有磕伤";
+ break;
+ case "0":
+ _WeldSpotUI = "无磕伤";
+ break;
+ default:
+ _WeldSpotUI = "无";
+ break;
+ }
+ RaisePropertyChanged(() => WeldSpotUI);
+ }
+ }
+ private string _Result;
+ ///
+ /// 结果
+ ///
+ public string Result
+ {
+ get { return _Result; }
+ set { _Result = value; RaisePropertyChanged(() => Result); }
+ }
+private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/KPRingWeldMachDto.cs b/GroupLine.App/ModelDto/KPRingWeldMachDto.cs
new file mode 100644
index 0000000..da00bea
--- /dev/null
+++ b/GroupLine.App/ModelDto/KPRingWeldMachDto.cs
@@ -0,0 +1,131 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(KPRingWeldMachDto))]
+ public class KPRingWeldMachDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+private decimal _Vol1;
+ ///
+ /// 电压值1
+ ///
+ public decimal Vol1
+ {
+ get { return _Vol1; }
+ set { _Vol1 = value; RaisePropertyChanged(() => Vol1); }
+ }
+private int _Cur1;
+ ///
+ /// 电流值1
+ ///
+ public int Cur1
+ {
+ get { return _Cur1; }
+ set { _Cur1 = value; RaisePropertyChanged(() => Cur1); }
+ }
+private decimal _WeldTime1;
+ ///
+ /// 焊接时间1
+ ///
+ public decimal WeldTime1
+ {
+ get { return _WeldTime1; }
+ set { _WeldTime1 = value; RaisePropertyChanged(() => WeldTime1); }
+ }
+private decimal _Vol2;
+ ///
+ /// 电压值2
+ ///
+ public decimal Vol2
+ {
+ get { return _Vol2; }
+ set { _Vol2 = value; RaisePropertyChanged(() => Vol2); }
+ }
+private int _Cur2;
+ ///
+ /// 电流值2
+ ///
+ public int Cur2
+ {
+ get { return _Cur2; }
+ set { _Cur2 = value; RaisePropertyChanged(() => Cur2); }
+ }
+private decimal _WeldTime2;
+ ///
+ /// 焊接时间2
+ ///
+ public decimal WeldTime2
+ {
+ get { return _WeldTime2; }
+ set { _WeldTime2 = value; RaisePropertyChanged(() => WeldTime2); }
+ }
+private int _NozzleClean;
+ ///
+ /// 喷嘴清洁
+ ///
+ public int NozzleClean
+ {
+ get { return _NozzleClean; }
+ set { _NozzleClean = value; RaisePropertyChanged(() => NozzleClean); }
+ }
+private int _NozzleReplace;
+ ///
+ /// 喷嘴更换
+ ///
+ public int NozzleReplace
+ {
+ get { return _NozzleReplace; }
+ set { _NozzleReplace = value; RaisePropertyChanged(() => NozzleReplace); }
+ }
+private string _Fixture;
+ ///
+ /// 夹具
+ ///
+ public string Fixture
+ {
+ get { return _Fixture; }
+ set { _Fixture = value; RaisePropertyChanged(() => Fixture); }
+ }
+private string _Result;
+ ///
+ /// 判定OK/NG
+ ///
+ public string Result
+ {
+ get { return _Result; }
+ set { _Result = value; RaisePropertyChanged(() => Result); }
+ }
+private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/KPRingWeldMachDwDto.cs b/GroupLine.App/ModelDto/KPRingWeldMachDwDto.cs
new file mode 100644
index 0000000..5d50e0c
--- /dev/null
+++ b/GroupLine.App/ModelDto/KPRingWeldMachDwDto.cs
@@ -0,0 +1,134 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(KPRingWeldMachDwDto))]
+ public class KPRingWeldMachDwDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+ private decimal _Vol1;
+ ///
+ /// 电压值1
+ ///
+ public decimal Vol1
+ {
+ get { return _Vol1; }
+ set { _Vol1 = value; RaisePropertyChanged(() => Vol1); }
+ }
+ private int _Cur1;
+ ///
+ /// 电流值1
+ ///
+ public int Cur1
+ {
+ get { return _Cur1; }
+ set { _Cur1 = value; RaisePropertyChanged(() => Cur1); }
+ }
+ private decimal _WeldTime1;
+ ///
+ /// 焊接时间1
+ ///
+ public decimal WeldTime1
+ {
+ get { return _WeldTime1; }
+ set { _WeldTime1 = value; RaisePropertyChanged(() => WeldTime1); }
+ }
+ private decimal _Vol2;
+ ///
+ /// 电压值2
+ ///
+ public decimal Vol2
+ {
+ get { return _Vol2; }
+ set { _Vol2 = value; RaisePropertyChanged(() => Vol2); }
+ }
+ private int _Cur2;
+ ///
+ /// 电流值2
+ ///
+ public int Cur2
+ {
+ get { return _Cur2; }
+ set { _Cur2 = value; RaisePropertyChanged(() => Cur2); }
+ }
+ private decimal _WeldTime2;
+ ///
+ /// 焊接时间2
+ ///
+ public decimal WeldTime2
+ {
+ get { return _WeldTime2; }
+ set { _WeldTime2 = value; RaisePropertyChanged(() => WeldTime2); }
+ }
+ private int _NozzleClean;
+ ///
+ /// 喷嘴清洁
+ ///
+ public int NozzleClean
+ {
+ get { return _NozzleClean; }
+ set { _NozzleClean = value; RaisePropertyChanged(() => NozzleClean); }
+ }
+ private int _NozzleReplace;
+ ///
+ /// 喷嘴更换
+ ///
+ public int NozzleReplace
+ {
+ get { return _NozzleReplace; }
+ set { _NozzleReplace = value; RaisePropertyChanged(() => NozzleReplace); }
+ }
+ private string _Fixture;
+ ///
+ /// 夹具
+ ///
+ public string Fixture
+ {
+ get { return _Fixture; }
+ set { _Fixture = value; RaisePropertyChanged(() => Fixture); }
+ }
+ private string _Result;
+ ///
+ /// 判定OK/NG
+ ///
+ public string Result
+ {
+ get { return _Result; }
+ set { _Result = value; RaisePropertyChanged(() => Result); }
+ }
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/KPRingWeldMachUpDto.cs b/GroupLine.App/ModelDto/KPRingWeldMachUpDto.cs
new file mode 100644
index 0000000..be61fc2
--- /dev/null
+++ b/GroupLine.App/ModelDto/KPRingWeldMachUpDto.cs
@@ -0,0 +1,133 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(KPRingWeldMachUpDto))]
+ public class KPRingWeldMachUpDto : ValidateModelBase
+ {
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+ private decimal _Vol1;
+ ///
+ /// 电压值1
+ ///
+ public decimal Vol1
+ {
+ get { return _Vol1; }
+ set { _Vol1 = value; RaisePropertyChanged(() => Vol1); }
+ }
+ private int _Cur1;
+ ///
+ /// 电流值1
+ ///
+ public int Cur1
+ {
+ get { return _Cur1; }
+ set { _Cur1 = value; RaisePropertyChanged(() => Cur1); }
+ }
+ private decimal _WeldTime1;
+ ///
+ /// 焊接时间1
+ ///
+ public decimal WeldTime1
+ {
+ get { return _WeldTime1; }
+ set { _WeldTime1 = value; RaisePropertyChanged(() => WeldTime1); }
+ }
+ private decimal _Vol2;
+ ///
+ /// 电压值2
+ ///
+ public decimal Vol2
+ {
+ get { return _Vol2; }
+ set { _Vol2 = value; RaisePropertyChanged(() => Vol2); }
+ }
+ private int _Cur2;
+ ///
+ /// 电流值2
+ ///
+ public int Cur2
+ {
+ get { return _Cur2; }
+ set { _Cur2 = value; RaisePropertyChanged(() => Cur2); }
+ }
+ private decimal _WeldTime2;
+ ///
+ /// 焊接时间2
+ ///
+ public decimal WeldTime2
+ {
+ get { return _WeldTime2; }
+ set { _WeldTime2 = value; RaisePropertyChanged(() => WeldTime2); }
+ }
+ private int _NozzleClean;
+ ///
+ /// 喷嘴清洁
+ ///
+ public int NozzleClean
+ {
+ get { return _NozzleClean; }
+ set { _NozzleClean = value; RaisePropertyChanged(() => NozzleClean); }
+ }
+ private int _NozzleReplace;
+ ///
+ /// 喷嘴更换
+ ///
+ public int NozzleReplace
+ {
+ get { return _NozzleReplace; }
+ set { _NozzleReplace = value; RaisePropertyChanged(() => NozzleReplace); }
+ }
+ private string _Fixture;
+ ///
+ /// 夹具
+ ///
+ public string Fixture
+ {
+ get { return _Fixture; }
+ set { _Fixture = value; RaisePropertyChanged(() => Fixture); }
+ }
+ private string _Result;
+ ///
+ /// 判定OK/NG
+ ///
+ public string Result
+ {
+ get { return _Result; }
+ set { _Result = value; RaisePropertyChanged(() => Result); }
+ }
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/KPSealInstallDto.cs b/GroupLine.App/ModelDto/KPSealInstallDto.cs
new file mode 100644
index 0000000..6e6c6ef
--- /dev/null
+++ b/GroupLine.App/ModelDto/KPSealInstallDto.cs
@@ -0,0 +1,311 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(KPSealInstallDto))]
+ public class KPSealInstallDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+ private string _SealCover;
+ ///
+ /// 密封盖板
+ ///
+ public string SealCover
+ {
+ get { return _SealCover; }
+ set { _SealCover = value; RaisePropertyChanged(() => SealCover); }
+ }
+
+ private decimal _Cycle;
+ ///
+ /// 节拍
+ ///
+ public decimal Cycle
+ {
+ get { return _Cycle; }
+ set { _Cycle = value; RaisePropertyChanged(() => Cycle); }
+ }
+
+ private int _ScrewCount;
+ ///
+ /// 螺丝数量
+ ///
+ public int ScrewCount
+ {
+ get { return _ScrewCount; }
+ set { _ScrewCount = value; RaisePropertyChanged(() => ScrewCount); }
+ }
+
+ private decimal _FinalTorque;
+ ///
+ /// 最终扭矩
+ ///
+ public decimal FinalTorque
+ {
+ get { return _FinalTorque; }
+ set { _FinalTorque = value; RaisePropertyChanged(() => FinalTorque); }
+ }
+ private decimal _FinalAngle;
+ ///
+ /// 最终角度
+ ///
+ public decimal FinalAngle
+ {
+ get { return _FinalAngle; }
+ set { _FinalAngle = value; RaisePropertyChanged(() => FinalAngle); }
+ }
+
+
+ private decimal _FinalTorque2;
+ ///
+ /// 最终扭矩2
+ ///
+ public decimal FinalTorque2
+ {
+ get { return _FinalTorque2; }
+ set { _FinalTorque2 = value; RaisePropertyChanged(() => FinalTorque2); }
+ }
+ private decimal _FinalAngle2;
+ ///
+ /// 最终角度2
+ ///
+ public decimal FinalAngle2
+ {
+ get { return _FinalAngle2; }
+ set { _FinalAngle2 = value; RaisePropertyChanged(() => FinalAngle2); }
+ }
+
+
+ private decimal _FinalTorque3;
+ ///
+ /// 最终扭矩3
+ ///
+ public decimal FinalTorque3
+ {
+ get { return _FinalTorque3; }
+ set { _FinalTorque3 = value; RaisePropertyChanged(() => FinalTorque3); }
+ }
+ private decimal _FinalAngle3;
+ ///
+ /// 最终角度3
+ ///
+ public decimal FinalAngle3
+ {
+ get { return _FinalAngle3; }
+ set { _FinalAngle3 = value; RaisePropertyChanged(() => FinalAngle3); }
+ }
+
+ private decimal _FinalTorque4;
+ ///
+ /// 最终扭矩4
+ ///
+ public decimal FinalTorque4
+ {
+ get { return _FinalTorque4; }
+ set { _FinalTorque4 = value; RaisePropertyChanged(() => FinalTorque4); }
+ }
+ private decimal _FinalAngle4;
+ ///
+ /// 最终角度4
+ ///
+ public decimal FinalAngle4
+ {
+ get { return _FinalAngle4; }
+ set { _FinalAngle4 = value; RaisePropertyChanged(() => FinalAngle4); }
+ }
+
+ private decimal _FinalTorque5;
+ ///
+ /// 最终扭矩5
+ ///
+ public decimal FinalTorque5
+ {
+ get { return _FinalTorque5; }
+ set { _FinalTorque5 = value; RaisePropertyChanged(() => FinalTorque5); }
+ }
+ private decimal _FinalAngle5;
+ ///
+ /// 最终角度5
+ ///
+ public decimal FinalAngle5
+ {
+ get { return _FinalAngle5; }
+ set { _FinalAngle5 = value; RaisePropertyChanged(() => FinalAngle5); }
+ }
+
+ private decimal _FinalTorque6;
+ ///
+ /// 最终扭矩6
+ ///
+ public decimal FinalTorque6
+ {
+ get { return _FinalTorque6; }
+ set { _FinalTorque6 = value; RaisePropertyChanged(() => FinalTorque6); }
+ }
+ private decimal _FinalAngle6;
+ ///
+ /// 最终角度6
+ ///
+ public decimal FinalAngle6
+ {
+ get { return _FinalAngle6; }
+ set { _FinalAngle6= value; RaisePropertyChanged(() => FinalAngle6); }
+ }
+
+ private decimal _FinalTorque7;
+ ///
+ /// 最终扭矩7
+ ///
+ public decimal FinalTorque7
+ {
+ get { return _FinalTorque7; }
+ set { _FinalTorque7 = value; RaisePropertyChanged(() => FinalTorque7); }
+ }
+ private decimal _FinalAngle7;
+ ///
+ /// 最终角度7
+ ///
+ public decimal FinalAngle7
+ {
+ get { return _FinalAngle7; }
+ set { _FinalAngle7 = value; RaisePropertyChanged(() => FinalAngle7); }
+ }
+
+
+ private decimal _FinalTorque8;
+ ///
+ /// 最终扭矩8
+ ///
+ public decimal FinalTorque8
+ {
+ get { return _FinalTorque8; }
+ set { _FinalTorque8 = value; RaisePropertyChanged(() => FinalTorque8); }
+ }
+ private decimal _FinalAngle8;
+ ///
+ /// 最终角度8
+ ///
+ public decimal FinalAngle8
+ {
+ get { return _FinalAngle8; }
+ set { _FinalAngle8 = value; RaisePropertyChanged(() => FinalAngle8); }
+ }
+
+ private decimal _FinalTorque9;
+ ///
+ /// 最终扭矩9
+ ///
+ public decimal FinalTorque9
+ {
+ get { return _FinalTorque9; }
+ set { _FinalTorque9 = value; RaisePropertyChanged(() => FinalTorque9); }
+ }
+ private decimal _FinalAngle9;
+ ///
+ /// 最终角度9
+ ///
+ public decimal FinalAngle9
+ {
+ get { return _FinalAngle9; }
+ set { _FinalAngle9 = value; RaisePropertyChanged(() => FinalAngle9); }
+ }
+
+ private decimal _FinalTorque10;
+ ///
+ /// 最终扭矩10
+ ///
+ public decimal FinalTorque10
+ {
+ get { return _FinalTorque10; }
+ set { _FinalTorque10 = value; RaisePropertyChanged(() => FinalTorque10); }
+ }
+ private decimal _FinalAngle10;
+ ///
+ /// 最终角度10
+ ///
+ public decimal FinalAngle10
+ {
+ get { return _FinalAngle10; }
+ set { _FinalAngle10 = value; RaisePropertyChanged(() => FinalAngle10); }
+ }
+
+ private decimal _FinalTorque11;
+ ///
+ /// 最终扭矩11
+ ///
+ public decimal FinalTorque11
+ {
+ get { return _FinalTorque11; }
+ set { _FinalTorque11 = value; RaisePropertyChanged(() => FinalTorque11); }
+ }
+ private decimal _FinalAngle11;
+ ///
+ /// 最终角度11
+ ///
+ public decimal FinalAngle11
+ {
+ get { return _FinalAngle11; }
+ set { _FinalAngle11 = value; RaisePropertyChanged(() => FinalAngle11); }
+ }
+
+ private decimal _FinalTorque12;
+ ///
+ /// 最终扭矩12
+ ///
+ public decimal FinalTorque12
+ {
+ get { return _FinalTorque12; }
+ set { _FinalTorque12 = value; RaisePropertyChanged(() => FinalTorque12); }
+ }
+ private decimal _FinalAngle12;
+ ///
+ /// 最终角度12
+ ///
+ public decimal FinalAngle12
+ {
+ get { return _FinalAngle12; }
+ set { _FinalAngle12 = value; RaisePropertyChanged(() => FinalAngle12); }
+ }
+
+ private string _Result;
+ ///
+ /// 判定
+ ///
+ public string Result
+ {
+ get { return _Result; }
+ set { _Result = value; RaisePropertyChanged(() => Result); }
+ }
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/KPShrinkTubDto.cs b/GroupLine.App/ModelDto/KPShrinkTubDto.cs
new file mode 100644
index 0000000..93c2ad7
--- /dev/null
+++ b/GroupLine.App/ModelDto/KPShrinkTubDto.cs
@@ -0,0 +1,79 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(KPShrinkTubDto))]
+ public class KPShrinkTubDto : ValidateModelBase
+ {
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+ private string _OpNo;
+ ///
+ /// 员工编号
+ ///
+ public string OpNo
+ {
+ get { return _OpNo; }
+ set { _OpNo = value; RaisePropertyChanged(() => OpNo); }
+ }
+ private decimal _FinalLoad;
+ ///
+ /// 终负荷
+ ///
+ public decimal FinalLoad
+ {
+ get { return _FinalLoad; }
+ set { _FinalLoad = value; RaisePropertyChanged(() => FinalLoad); }
+ }
+ private decimal _FinalLocation;
+ ///
+ /// 终位置
+ ///
+ public decimal FinalLocation
+ {
+ get { return _FinalLocation; }
+ set { _FinalLocation = value; RaisePropertyChanged(() => FinalLocation); }
+ }
+ private string _Result;
+ ///
+ /// 判定
+ ///
+ public string Result
+ {
+ get { return _Result; }
+ set { _Result = value; RaisePropertyChanged(() => Result); }
+ }
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/KPSpotWeldMachDto.cs b/GroupLine.App/ModelDto/KPSpotWeldMachDto.cs
new file mode 100644
index 0000000..df06ee7
--- /dev/null
+++ b/GroupLine.App/ModelDto/KPSpotWeldMachDto.cs
@@ -0,0 +1,221 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(KPSpotWeldMachDto))]
+ public class KPSpotWeldMachDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+private decimal _Vol1;
+ ///
+ /// 电压1
+ ///
+ public decimal Vol1
+ {
+ get { return _Vol1; }
+ set { _Vol1 = value; RaisePropertyChanged(() => Vol1); }
+ }
+private int _Cur1;
+ ///
+ /// 电流1
+ ///
+ public int Cur1
+ {
+ get { return _Cur1; }
+ set { _Cur1 = value; RaisePropertyChanged(() => Cur1); }
+ }
+private decimal _WeldTime1;
+ ///
+ /// 焊接时间1
+ ///
+ public decimal WeldTime1
+ {
+ get { return _WeldTime1; }
+ set { _WeldTime1 = value; RaisePropertyChanged(() => WeldTime1); }
+ }
+private decimal _Vol2;
+ ///
+ /// 电压2
+ ///
+ public decimal Vol2
+ {
+ get { return _Vol2; }
+ set { _Vol2 = value; RaisePropertyChanged(() => Vol2); }
+ }
+private int _Cur2;
+ ///
+ /// 电流2
+ ///
+ public int Cur2
+ {
+ get { return _Cur2; }
+ set { _Cur2 = value; RaisePropertyChanged(() => Cur2); }
+ }
+private decimal _WeldTime2;
+ ///
+ /// 焊接时间2
+ ///
+ public decimal WeldTime2
+ {
+ get { return _WeldTime2; }
+ set { _WeldTime2 = value; RaisePropertyChanged(() => WeldTime2); }
+ }
+private decimal _Vol3;
+ ///
+ /// 电压3
+ ///
+ public decimal Vol3
+ {
+ get { return _Vol3; }
+ set { _Vol3 = value; RaisePropertyChanged(() => Vol3); }
+ }
+private int _Cur3;
+ ///
+ /// 电流3
+ ///
+ public int Cur3
+ {
+ get { return _Cur3; }
+ set { _Cur3 = value; RaisePropertyChanged(() => Cur3); }
+ }
+private decimal _WeldTime3;
+ ///
+ /// 焊接时间3
+ ///
+ public decimal WeldTime3
+ {
+ get { return _WeldTime3; }
+ set { _WeldTime3 = value; RaisePropertyChanged(() => WeldTime3); }
+ }
+private decimal _Vol4;
+ ///
+ /// 电压4
+ ///
+ public decimal Vol4
+ {
+ get { return _Vol4; }
+ set { _Vol4 = value; RaisePropertyChanged(() => Vol4); }
+ }
+private int _Cur4;
+ ///
+ /// 电流4
+ ///
+ public int Cur4
+ {
+ get { return _Cur4; }
+ set { _Cur4 = value; RaisePropertyChanged(() => Cur4); }
+ }
+private decimal _WeldTime4;
+ ///
+ /// 焊接时间4
+ ///
+ public decimal WeldTime4
+ {
+ get { return _WeldTime4; }
+ set { _WeldTime4 = value; RaisePropertyChanged(() => WeldTime4); }
+ }
+private decimal _Vol5;
+ ///
+ /// 电压5
+ ///
+ public decimal Vol5
+ {
+ get { return _Vol5; }
+ set { _Vol5 = value; RaisePropertyChanged(() => Vol5); }
+ }
+private int _Cur5;
+ ///
+ /// 电流5
+ ///
+ public int Cur5
+ {
+ get { return _Cur5; }
+ set { _Cur5 = value; RaisePropertyChanged(() => Cur5); }
+ }
+private decimal _WeldTime5;
+ ///
+ /// 焊接时间5
+ ///
+ public decimal WeldTime5
+ {
+ get { return _WeldTime5; }
+ set { _WeldTime5 = value; RaisePropertyChanged(() => WeldTime5); }
+ }
+private decimal _Vol6;
+ ///
+ /// 电压6
+ ///
+ public decimal Vol6
+ {
+ get { return _Vol6; }
+ set { _Vol6 = value; RaisePropertyChanged(() => Vol6); }
+ }
+private int _Cur6;
+ ///
+ /// 电流6
+ ///
+ public int Cur6
+ {
+ get { return _Cur6; }
+ set { _Cur6 = value; RaisePropertyChanged(() => Cur6); }
+ }
+private decimal _WeldTime6;
+ ///
+ /// 焊接时间6
+ ///
+ public decimal WeldTime6
+ {
+ get { return _WeldTime6; }
+ set { _WeldTime6 = value; RaisePropertyChanged(() => WeldTime6); }
+ }
+private int _NozzleClean;
+ ///
+ /// 喷嘴清洁
+ ///
+ public int NozzleClean
+ {
+ get { return _NozzleClean; }
+ set { _NozzleClean = value; RaisePropertyChanged(() => NozzleClean); }
+ }
+private int _NozzleReplace;
+ ///
+ /// 喷嘴更换
+ ///
+ public int NozzleReplace
+ {
+ get { return _NozzleReplace; }
+ set { _NozzleReplace = value; RaisePropertyChanged(() => NozzleReplace); }
+ }
+private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/KPStaticDiskMachDto.cs b/GroupLine.App/ModelDto/KPStaticDiskMachDto.cs
new file mode 100644
index 0000000..d9b71f9
--- /dev/null
+++ b/GroupLine.App/ModelDto/KPStaticDiskMachDto.cs
@@ -0,0 +1,332 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(KPStaticDiskMachDto))]
+ public class KPStaticDiskMachDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+
+
+ private string _MachineCode;
+ ///
+ /// 机型
+ ///
+ public string MachineCode
+ {
+ get { return _MachineCode; }
+ set { _MachineCode = value; RaisePropertyChanged(() => _MachineCode); }
+ }
+
+
+ private decimal _Cycle;
+ ///
+ /// 节拍
+ ///
+ public decimal Cycle
+ {
+ get { return _Cycle; }
+ set { _Cycle = value; RaisePropertyChanged(() => Cycle); }
+ }
+
+ private int _ScrewCount;
+ ///
+ /// 螺丝数量
+ ///
+ public int ScrewCount
+ {
+ get { return _ScrewCount; }
+ set { _ScrewCount = value; RaisePropertyChanged(() => ScrewCount); }
+ }
+
+
+
+ private decimal _FinalTorque;
+ ///
+ /// 最终扭矩
+ ///
+ public decimal FinalTorque
+ {
+ get { return _FinalTorque; }
+ set { _FinalTorque = value; RaisePropertyChanged(() => FinalTorque); }
+ }
+ private decimal _FinalAngle;
+ ///
+ /// 最终角度
+ ///
+ public decimal FinalAngle
+ {
+ get { return _FinalAngle; }
+ set { _FinalAngle = value; RaisePropertyChanged(() => FinalAngle); }
+ }
+
+
+ private decimal _FinalTorque2;
+ ///
+ /// 最终扭矩2
+ ///
+ public decimal FinalTorque2
+ {
+ get { return _FinalTorque2; }
+ set { _FinalTorque2 = value; RaisePropertyChanged(() => FinalTorque2); }
+ }
+ private decimal _FinalAngle2;
+ ///
+ /// 最终角度2
+ ///
+ public decimal FinalAngle2
+ {
+ get { return _FinalAngle2; }
+ set { _FinalAngle2 = value; RaisePropertyChanged(() => FinalAngle2); }
+ }
+
+
+ private decimal _FinalTorque3;
+ ///
+ /// 最终扭矩3
+ ///
+ public decimal FinalTorque3
+ {
+ get { return _FinalTorque3; }
+ set { _FinalTorque3 = value; RaisePropertyChanged(() => FinalTorque3); }
+ }
+ private decimal _FinalAngle3;
+ ///
+ /// 最终角度3
+ ///
+ public decimal FinalAngle3
+ {
+ get { return _FinalAngle3; }
+ set { _FinalAngle3 = value; RaisePropertyChanged(() => FinalAngle3); }
+ }
+
+
+ private decimal _FinalTorque4;
+ ///
+ /// 最终扭矩4
+ ///
+ public decimal FinalTorque4
+ {
+ get { return _FinalTorque4; }
+ set { _FinalTorque4 = value; RaisePropertyChanged(() => FinalTorque4); }
+ }
+ private decimal _FinalAngle4;
+ ///
+ /// 最终角度4
+ ///
+ public decimal FinalAngle4
+ {
+ get { return _FinalAngle4; }
+ set { _FinalAngle4 = value; RaisePropertyChanged(() => FinalAngle4); }
+ }
+
+
+ private decimal _FinalTorque5;
+ ///
+ /// 最终扭矩5
+ ///
+ public decimal FinalTorque5
+ {
+ get { return _FinalTorque5; }
+ set { _FinalTorque5 = value; RaisePropertyChanged(() => FinalTorque5); }
+ }
+ private decimal _FinalAngle5;
+ ///
+ /// 最终角度5
+ ///
+ public decimal FinalAngle5
+ {
+ get { return _FinalAngle5; }
+ set { _FinalAngle5 = value; RaisePropertyChanged(() => FinalAngle5); }
+ }
+
+
+ private decimal _FinalTorque6;
+ ///
+ /// 最终扭矩6
+ ///
+ public decimal FinalTorque6
+ {
+ get { return _FinalTorque6; }
+ set { _FinalTorque6 = value; RaisePropertyChanged(() => FinalTorque6); }
+ }
+ private decimal _FinalAngle6;
+ ///
+ /// 最终角度6
+ ///
+ public decimal FinalAngle6
+ {
+ get { return _FinalAngle6; }
+ set { _FinalAngle6 = value; RaisePropertyChanged(() => FinalAngle6); }
+ }
+
+
+ private decimal _FinalTorque7;
+ ///
+ /// 最终扭矩7
+ ///
+ public decimal FinalTorque7
+ {
+ get { return _FinalTorque7; }
+ set { _FinalTorque7 = value; RaisePropertyChanged(() => FinalTorque7); }
+ }
+ private decimal _FinalAngle7;
+ ///
+ /// 最终角度7
+ ///
+ public decimal FinalAngle7
+ {
+ get { return _FinalAngle7; }
+ set { _FinalAngle7 = value; RaisePropertyChanged(() => FinalAngle7); }
+ }
+
+
+ private decimal _FinalTorque8;
+ ///
+ /// 最终扭矩8
+ ///
+ public decimal FinalTorque8
+ {
+ get { return _FinalTorque8; }
+ set { _FinalTorque8 = value; RaisePropertyChanged(() => FinalTorque8); }
+ }
+ private decimal _FinalAngle8;
+ ///
+ /// 最终角度8
+ ///
+ public decimal FinalAngle8
+ {
+ get { return _FinalAngle8; }
+ set { _FinalAngle8 = value; RaisePropertyChanged(() => FinalAngle8); }
+ }
+
+
+ private decimal _FinalTorque9;
+ ///
+ /// 最终扭矩9
+ ///
+ public decimal FinalTorque9
+ {
+ get { return _FinalTorque9; }
+ set { _FinalTorque9 = value; RaisePropertyChanged(() => FinalTorque9); }
+ }
+ private decimal _FinalAngle9;
+ ///
+ /// 最终角度9
+ ///
+ public decimal FinalAngle9
+ {
+ get { return _FinalAngle9; }
+ set { _FinalAngle9 = value; RaisePropertyChanged(() => FinalAngle9); }
+ }
+
+ private decimal _FinalTorque10;
+ ///
+ /// 最终扭矩10
+ ///
+ public decimal FinalTorque10
+ {
+ get { return _FinalTorque10; }
+ set { _FinalTorque10 = value; RaisePropertyChanged(() => FinalTorque10); }
+ }
+ private decimal _FinalAngle10;
+ ///
+ /// 最终角度10
+ ///
+ public decimal FinalAngle10
+ {
+ get { return _FinalAngle10; }
+ set { _FinalAngle10 = value; RaisePropertyChanged(() => FinalAngle10); }
+ }
+
+
+ private decimal _FinalTorque11;
+ ///
+ /// 最终扭矩11
+ ///
+ public decimal FinalTorque11
+ {
+ get { return _FinalTorque11; }
+ set { _FinalTorque11 = value; RaisePropertyChanged(() => FinalTorque11); }
+ }
+ private decimal _FinalAngle11;
+ ///
+ /// 最终角度11
+ ///
+ public decimal FinalAngle11
+ {
+ get { return _FinalAngle11; }
+ set { _FinalAngle11 = value; RaisePropertyChanged(() => FinalAngle11); }
+ }
+
+
+ private decimal _FinalTorque12;
+ ///
+ /// 最终扭矩12
+ ///
+ public decimal FinalTorque12
+ {
+ get { return _FinalTorque12; }
+ set { _FinalTorque12 = value; RaisePropertyChanged(() => FinalTorque12); }
+ }
+ private decimal _FinalAngle12;
+ ///
+ /// 最终角度12
+ ///
+ public decimal FinalAngle12
+ {
+ get { return _FinalAngle12; }
+ set { _FinalAngle12 = value; RaisePropertyChanged(() => FinalAngle12); }
+ }
+
+ private string _Result;
+ ///
+ /// 判定
+ ///
+ public string Result
+ {
+ get { return _Result; }
+ set { _Result = value; RaisePropertyChanged(() => Result); }
+ }
+ private string _OpNo;
+ ///
+ /// 员工编号
+ ///
+ public string OpNo
+ {
+ get { return _OpNo; }
+ set { _OpNo = value; RaisePropertyChanged(() => OpNo); }
+ }
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/KPUpBurnEbDto.cs b/GroupLine.App/ModelDto/KPUpBurnEbDto.cs
new file mode 100644
index 0000000..7a8e7fe
--- /dev/null
+++ b/GroupLine.App/ModelDto/KPUpBurnEbDto.cs
@@ -0,0 +1,82 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(KPUpBurnEbDto))]
+ public class KPUpBurnEbDto : ValidateModelBase
+ {
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+ private string _CrankshaftNo;
+ ///
+ /// 曲轴编号
+ ///
+ public string CrankshaftNo
+ {
+ get { return _CrankshaftNo; }
+ set { _CrankshaftNo = value; RaisePropertyChanged(() => CrankshaftNo); }
+ }
+
+ private decimal _ProbeA;
+ ///
+ /// 测头A
+ ///
+ public decimal ProbeA
+ {
+ get { return _ProbeA; }
+ set { _ProbeA = value; RaisePropertyChanged(() => ProbeA); }
+ }
+
+ private decimal _ProbeB;
+ ///
+ /// 测头B
+ ///
+ public decimal ProbeB
+ {
+ get { return _ProbeB; }
+ set { _ProbeB = value; RaisePropertyChanged(() => ProbeB); }
+ }
+
+ private string _Result;
+ ///
+ /// 判定
+ ///
+ public string Result
+ {
+ get { return _Result; }
+ set { _Result = value; RaisePropertyChanged(() => Result); }
+ }
+
+ private string _OpNo;
+ ///
+ /// 员工编号
+ ///
+ public string OpNo
+ {
+ get { return _OpNo; }
+ set { _OpNo = value; RaisePropertyChanged(() => OpNo); }
+ }
+
+
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/KanBan/PlanCountDto.cs b/GroupLine.App/ModelDto/KanBan/PlanCountDto.cs
new file mode 100644
index 0000000..8bac841
--- /dev/null
+++ b/GroupLine.App/ModelDto/KanBan/PlanCountDto.cs
@@ -0,0 +1,97 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(PlanCountDto))]
+ public class PlanCountDto : ValidateModelBase
+ {
+ ///
+ /// ID
+ ///
+ private Guid _ID;
+ public Guid ID
+ {
+ get { return _ID; }
+ set { _ID = value; RaisePropertyChanged(() => ID); }
+ }
+
+ ///
+ /// 计划日期
+ ///
+ private DateTime _PlanDate;
+ [Required]
+ public DateTime PlanDate
+ {
+ get { return _PlanDate; }
+ set { _PlanDate = value; RaisePropertyChanged(() => PlanDate); }
+ }
+
+ ///
+ /// 班次
+ ///
+ private string _ClassNum;
+ [Required]
+ public string ClassNum
+ {
+ get { return _ClassNum; }
+ set { _ClassNum = value; RaisePropertyChanged(() => ClassNum); }
+ }
+
+ ///
+ /// 前组产量
+ ///
+ private int _AGroup;
+ [Required]
+ public int AGroup
+ {
+ get { return _AGroup; }
+ set { _AGroup = value; RaisePropertyChanged(() => AGroup); }
+ }
+
+ ///
+ /// 后装产量
+ ///
+ private int _BGroup;
+ [Required]
+ public int BGroup
+ {
+ get { return _BGroup; }
+ set { _BGroup = value; RaisePropertyChanged(() => BGroup); }
+ }
+
+
+ ///
+ /// 组装产量
+ ///
+ private int _CGroup;
+ [Required]
+ public int CGroup
+ {
+ get { return _CGroup; }
+ set { _CGroup = value; RaisePropertyChanged(() => CGroup); }
+ }
+
+
+ ///
+ /// 创建时间
+ ///
+ private DateTime _CreateTime;
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+ private bool isFormValid;
+ ///
+ /// 是否全局验证
+ ///
+ public bool IsFormValid
+ {
+ get { return isFormValid; }
+ set { isFormValid = value; RaisePropertyChanged(() => IsFormValid); }
+ }
+ }
+
+}
diff --git a/GroupLine.App/ModelDto/KanBan/WorkTimeDto.cs b/GroupLine.App/ModelDto/KanBan/WorkTimeDto.cs
new file mode 100644
index 0000000..70397b0
--- /dev/null
+++ b/GroupLine.App/ModelDto/KanBan/WorkTimeDto.cs
@@ -0,0 +1,86 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(WorkTimeDto))]
+ public class WorkTimeDto : ValidateModelBase
+ {
+ ///
+ /// ID
+ ///
+ private Guid _ID;
+ public Guid ID
+ {
+ get { return _ID; }
+ set { _ID = value; RaisePropertyChanged(() => ID); }
+ }
+
+ ///
+ /// 班次
+ ///
+ private string _ClassNum;
+ //[Required]
+ public string ClassNum
+ {
+ get { return _ClassNum; }
+ set { _ClassNum = value; RaisePropertyChanged(() => ClassNum); }
+ }
+
+ ///
+ /// 排序
+ ///
+ private string _Index;
+ //[Required]
+ public string Index
+ {
+ get { return _Index; }
+ set { _Index = value; RaisePropertyChanged(() => Index); }
+ }
+
+ ///
+ /// 开始时间
+ ///
+ private string _StartTime;
+ //[Required]
+ //[RegularExpression(@"^(\d|[01]\d|2[0-3]):(\d|[0-5]\d):(\d|[0-5]\d)$", ErrorMessage = "请输入正确的时间格式")]
+ public string StartTime
+ {
+ get { return _StartTime; }
+ set { _StartTime = value; RaisePropertyChanged(() => StartTime); }
+ }
+
+ ///
+ /// 结束时间
+ ///
+ private string _EndTime;
+ //[Required]
+ // [RegularExpression(@"^(\d|[01]\d|2[0-3]):(\d|[0-5]\d):(\d|[0-5]\d)$", ErrorMessage = "请输入正确的时间格式")]
+ public string EndTime
+ {
+ get { return _EndTime; }
+ set { _EndTime = value; RaisePropertyChanged(() => EndTime); }
+ }
+
+ ///
+ /// 创建时间
+ ///
+ private DateTime _CreateTime;
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+ private bool isFormValid;
+ ///
+ /// 是否全局验证
+ ///
+ public bool IsFormValid
+ {
+ get { return isFormValid; }
+ set { isFormValid = value; RaisePropertyChanged(() => IsFormValid); }
+ }
+ }
+
+}
diff --git a/GroupLine.App/ModelDto/MagTorqueDto.cs b/GroupLine.App/ModelDto/MagTorqueDto.cs
new file mode 100644
index 0000000..94d87ff
--- /dev/null
+++ b/GroupLine.App/ModelDto/MagTorqueDto.cs
@@ -0,0 +1,70 @@
+using GroupLine.App.ModelDto;
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App
+{
+ [MetadataType(typeof(MagTorqueDto))]
+ public class MagTorqueDto : ValidateModelBase
+ {
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+
+ private string _ModelType;
+ ///
+ /// 机种类型
+ ///
+ public string ModelType
+ {
+ get { return _ModelType; }
+ set { _ModelType = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+
+
+
+ private decimal _MagValue;
+ ///
+ /// 磁束值
+ ///
+ public decimal MagValue
+ {
+ get { return _MagValue; }
+ set { _MagValue = value; RaisePropertyChanged(() => MagValue); }
+ }
+ private decimal _TorqueValue;
+ ///
+ /// 扭矩值
+ ///
+ public decimal TorqueValue
+ {
+ get { return _TorqueValue; }
+ set { _TorqueValue = value; RaisePropertyChanged(() => TorqueValue); }
+ }
+ private string _Result;
+ ///
+ /// 结果
+ ///
+ public string Result
+ {
+ get { return _Result; }
+ set { _Result = value; RaisePropertyChanged(() => Result); }
+ }
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/OilPumpInstallDto.cs b/GroupLine.App/ModelDto/OilPumpInstallDto.cs
new file mode 100644
index 0000000..f767ee0
--- /dev/null
+++ b/GroupLine.App/ModelDto/OilPumpInstallDto.cs
@@ -0,0 +1,88 @@
+using GroupLine.App.ModelDto;
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App
+{
+ [MetadataType(typeof(OilPumpInstallDto))]
+ public class OilPumpInstallDto : ValidateModelBase
+ {
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+
+
+ private string _ModelType;
+ ///
+ /// 机种类型
+ ///
+ public string ModelType
+ {
+ get { return _ModelType; }
+ set { _ModelType = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+
+ private string _OilPumpNo;
+ ///
+ /// 油泵编号
+ ///
+ public string OilPumpNo
+ {
+ get { return _OilPumpNo; }
+ set { _OilPumpNo = value; RaisePropertyChanged(() => OilPumpNo); }
+ }
+ private string _OpNo;
+ ///
+ /// 员工编号
+ ///
+ public string OpNo
+ {
+ get { return _OpNo; }
+ set { _OpNo = value; RaisePropertyChanged(() => OpNo); }
+ }
+ private int _OilPumpDmge;
+ ///
+ /// 油泵磕伤确认
+ ///
+ public int OilPumpDmge
+ {
+ get { return _OilPumpDmge; }
+ set { _OilPumpDmge = value; RaisePropertyChanged(() => OilPumpDmge); }
+ }
+ private int _Repair;
+ ///
+ /// 是否是返修品
+ ///
+ public int Repair
+ {
+ get { return _Repair; }
+ set { _Repair = value; RaisePropertyChanged(() => Repair); }
+ }
+ private string _Result;
+ ///
+ /// 结果
+ ///
+ public string Result
+ {
+ get { return _Result; }
+ set { _Result = value; RaisePropertyChanged(() => Result); }
+ }
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/OverflowLeakMesDto.cs b/GroupLine.App/ModelDto/OverflowLeakMesDto.cs
new file mode 100644
index 0000000..853c631
--- /dev/null
+++ b/GroupLine.App/ModelDto/OverflowLeakMesDto.cs
@@ -0,0 +1,191 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(OverflowLeakMesDto))]
+ public class OverflowLeakMesDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+ private string _MachineCode;
+ ///
+ /// 机型
+ ///
+ public string MachineCode
+ {
+ get { return _MachineCode; }
+ set { _MachineCode = value; RaisePropertyChanged(() => _MachineCode); }
+ }
+
+ private string _StaticDiskNo;
+ ///
+ /// 静盘编号
+ ///
+ public string StaticDiskNo
+ {
+ get { return _StaticDiskNo; }
+ set { _StaticDiskNo = value; RaisePropertyChanged(() => StaticDiskNo); }
+ }
+
+ private string _DynaDiskNo;
+ ///
+ /// 动盘编号
+ ///
+ public string DynaDiskNo
+ {
+ get { return _DynaDiskNo; }
+ set { _DynaDiskNo = value; RaisePropertyChanged(() => _DynaDiskNo); }
+ }
+
+
+ private decimal _Cycle;
+ ///
+ /// 节拍
+ ///
+ public decimal Cycle
+ {
+ get { return _Cycle; }
+ set { _Cycle = value; RaisePropertyChanged(() => Cycle); }
+ }
+
+ private int _ScrewCount;
+ ///
+ /// 螺丝数量
+ ///
+ public int ScrewCount
+ {
+ get { return _ScrewCount; }
+ set { _ScrewCount = value; RaisePropertyChanged(() => ScrewCount); }
+ }
+
+
+ //private string _StaticDiskNo;
+ /////
+ ///// 静盘编号
+ /////
+ //public string StaticDiskNo
+ //{
+ // get { return _StaticDiskNo; }
+ // set { _StaticDiskNo = value; RaisePropertyChanged(() => StaticDiskNo); }
+ //}
+ private string _OpNo;
+ ///
+ /// 员工编号
+ ///
+ public string OpNo
+ {
+ get { return _OpNo; }
+ set { _OpNo = value; RaisePropertyChanged(() => OpNo); }
+ }
+
+ private decimal _OverflowTorque;
+ ///
+ /// 溢流阀扭矩
+ ///
+ public decimal OverflowTorque
+ {
+ get { return _OverflowTorque; }
+ set { _OverflowTorque = value; RaisePropertyChanged(() => OverflowTorque); }
+ }
+ private decimal _FinalAngle;
+ ///
+ /// 最终角度
+ ///
+ public decimal FinalAngle
+ {
+ get { return _FinalAngle; }
+ set { _FinalAngle = value; RaisePropertyChanged(() => FinalAngle); }
+ }
+
+
+ private decimal _OverflowTorque2;
+ ///
+ /// 溢流阀扭矩2
+ ///
+ public decimal OverflowTorque2
+ {
+ get { return _OverflowTorque2; }
+ set { _OverflowTorque2 = value; RaisePropertyChanged(() => OverflowTorque2); }
+ }
+ private decimal _FinalAngle2;
+ ///
+ /// 最终角度2
+ ///
+ public decimal FinalAngle2
+ {
+ get { return _FinalAngle2; }
+ set { _FinalAngle2 = value; RaisePropertyChanged(() => FinalAngle2); }
+ }
+
+
+ private decimal _OverflowTorque3;
+ ///
+ /// 溢流阀扭矩3
+ ///
+ public decimal OverflowTorque3
+ {
+ get { return _OverflowTorque3; }
+ set { _OverflowTorque3 = value; RaisePropertyChanged(() => OverflowTorque3); }
+ }
+ private decimal _FinalAngle3;
+ ///
+ /// 最终角度3
+ ///
+ public decimal FinalAngle3
+ {
+ get { return _FinalAngle3; }
+ set { _FinalAngle3 = value; RaisePropertyChanged(() => FinalAngle3); }
+ }
+
+
+ private decimal _OverflowTorque4;
+ ///
+ /// 溢流阀扭矩4
+ ///
+ public decimal OverflowTorque4
+ {
+ get { return _OverflowTorque4; }
+ set { _OverflowTorque4 = value; RaisePropertyChanged(() => OverflowTorque4); }
+ }
+ private decimal _FinalAngle4;
+ ///
+ /// 最终角度4
+ ///
+ public decimal FinalAngle4
+ {
+ get { return _FinalAngle4; }
+ set { _FinalAngle4 = value; RaisePropertyChanged(() => FinalAngle4); }
+ }
+
+
+ private string _Result;
+ ///
+ /// 判定
+ ///
+ public string Result
+ {
+ get { return _Result; }
+ set { _Result = value; RaisePropertyChanged(() => Result); }
+ }
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/PCoreMesDto.cs b/GroupLine.App/ModelDto/PCoreMesDto.cs
new file mode 100644
index 0000000..f4d7f8d
--- /dev/null
+++ b/GroupLine.App/ModelDto/PCoreMesDto.cs
@@ -0,0 +1,59 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(PCoreMesDto))]
+ public class PCoreMesDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+private decimal _CoreOutput;
+ ///
+ /// 芯出测量值
+ ///
+ public decimal CoreOutput
+ {
+ get { return _CoreOutput; }
+ set { _CoreOutput = value; RaisePropertyChanged(() => CoreOutput); }
+ }
+private string _OpNo;
+ ///
+ /// 员工编号
+ ///
+ public string OpNo
+ {
+ get { return _OpNo; }
+ set { _OpNo = value; RaisePropertyChanged(() => OpNo); }
+ }
+private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/PLowWeldDto.cs b/GroupLine.App/ModelDto/PLowWeldDto.cs
new file mode 100644
index 0000000..95ba474
--- /dev/null
+++ b/GroupLine.App/ModelDto/PLowWeldDto.cs
@@ -0,0 +1,113 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(PLowWeldDto))]
+ public class PLowWeldDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+private string _CrankshaftNo;
+ ///
+ /// 曲轴编号
+ ///
+ public string CrankshaftNo
+ {
+ get { return _CrankshaftNo; }
+ set { _CrankshaftNo = value; RaisePropertyChanged(() => CrankshaftNo); }
+ }
+private string _DownNo;
+ ///
+ /// 下部编号
+ ///
+ public string DownNo
+ {
+ get { return _DownNo; }
+ set { _DownNo = value; RaisePropertyChanged(() => DownNo); }
+ }
+private string _DoCastNo;
+ ///
+ /// 下部铸件编号
+ ///
+ public string DoCastNo
+ {
+ get { return _DoCastNo; }
+ set { _DoCastNo = value; RaisePropertyChanged(() => DoCastNo); }
+ }
+private decimal _StatorPressDep;
+ ///
+ /// 定子压入深度
+ ///
+ public decimal StatorPressDep
+ {
+ get { return _StatorPressDep; }
+ set { _StatorPressDep = value; RaisePropertyChanged(() => StatorPressDep); }
+ }
+private decimal _RotorPressDep;
+ ///
+ /// 转子压入深度
+ ///
+ public decimal RotorPressDep
+ {
+ get { return _RotorPressDep; }
+ set { _RotorPressDep = value; RaisePropertyChanged(() => RotorPressDep); }
+ }
+private string _FelerGgeResult;
+ ///
+ /// 塞尺检查(OK)
+ ///
+ public string FelerGgeResult
+ {
+ get { return _FelerGgeResult; }
+ set { _FelerGgeResult = value; RaisePropertyChanged(() => FelerGgeResult); }
+ }
+private string _MagnetResult;
+ ///
+ /// 磁石检查(OK)
+ ///
+ public string MagnetResult
+ {
+ get { return _MagnetResult; }
+ set { _MagnetResult = value; RaisePropertyChanged(() => MagnetResult); }
+ }
+private string _OpNo;
+ ///
+ /// 员工编号
+ ///
+ public string OpNo
+ {
+ get { return _OpNo; }
+ set { _OpNo = value; RaisePropertyChanged(() => OpNo); }
+ }
+private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/PRacktPressDto.cs b/GroupLine.App/ModelDto/PRacktPressDto.cs
new file mode 100644
index 0000000..3b61736
--- /dev/null
+++ b/GroupLine.App/ModelDto/PRacktPressDto.cs
@@ -0,0 +1,77 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(PRacktPressDto))]
+ public class PRacktPressDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+private string _RacktNo;
+ ///
+ /// 支架编号
+ ///
+ public string RacktNo
+ {
+ get { return _RacktNo; }
+ set { _RacktNo = value; RaisePropertyChanged(() => RacktNo); }
+ }
+private decimal _PressValue;
+ ///
+ /// 压入压力
+ ///
+ public decimal PressValue
+ {
+ get { return _PressValue; }
+ set { _PressValue = value; RaisePropertyChanged(() => PressValue); }
+ }
+private string _TrayNo;
+ ///
+ /// 托盘编号
+ ///
+ public string TrayNo
+ {
+ get { return _TrayNo; }
+ set { _TrayNo = value; RaisePropertyChanged(() => TrayNo); }
+ }
+private string _OpNo;
+ ///
+ /// 员工编号
+ ///
+ public string OpNo
+ {
+ get { return _OpNo; }
+ set { _OpNo = value; RaisePropertyChanged(() => OpNo); }
+ }
+private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/PRacktWeldDto.cs b/GroupLine.App/ModelDto/PRacktWeldDto.cs
new file mode 100644
index 0000000..b36e761
--- /dev/null
+++ b/GroupLine.App/ModelDto/PRacktWeldDto.cs
@@ -0,0 +1,59 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(PRacktWeldDto))]
+ public class PRacktWeldDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+
+ private string _CylinderNo;
+ ///
+ /// 筒体编号
+ ///
+ public string CylinderNo
+ {
+ get { return _CylinderNo; }
+ set { _CylinderNo = value; RaisePropertyChanged(() => CylinderNo); }
+ }
+private string _TrayNo;
+ ///
+ /// 托盘编号
+ ///
+ public string TrayNo
+ {
+ get { return _TrayNo; }
+ set { _TrayNo = value; RaisePropertyChanged(() => TrayNo); }
+ }
+private string _OpNo;
+ ///
+ /// 员工编号
+ ///
+ public string OpNo
+ {
+ get { return _OpNo; }
+ set { _OpNo = value; RaisePropertyChanged(() => OpNo); }
+ }
+private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/StaticDiscPressDto.cs b/GroupLine.App/ModelDto/StaticDiscPressDto.cs
new file mode 100644
index 0000000..ea8da6c
--- /dev/null
+++ b/GroupLine.App/ModelDto/StaticDiscPressDto.cs
@@ -0,0 +1,100 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(StaticDiscPressDto))]
+ public class StaticDiscPressDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+ private string _StaticDiskNo;
+ ///
+ /// 静盘编号
+ ///
+ public string StaticDiskNo
+ {
+ get { return _StaticDiskNo; }
+ set
+ {
+ _StaticDiskNo = value; RaisePropertyChanged(() => StaticDiskNo);
+ }
+ }
+ private string _OpNo;
+ ///
+ /// 员工编号
+ ///
+ public string OpNo
+ {
+ get { return _OpNo; }
+ set { _OpNo = value; RaisePropertyChanged(() => OpNo); }
+ }
+
+ private decimal _PressValue;
+ ///
+ /// 压力值
+ ///
+ public decimal PressValue
+ {
+ get { return _PressValue; }
+ set { _PressValue = value; RaisePropertyChanged(() => PressValue); }
+ }
+
+ private decimal _PressDepth;
+ ///
+ /// 压入深度
+ ///
+ public decimal PressDepth
+ {
+ get { return _PressDepth; }
+ set { _PressDepth = value; RaisePropertyChanged(() => PressDepth); }
+ }
+
+ private string _PressStation;
+ ///
+ /// 压入工位
+ ///
+ public string PressStation
+ {
+ get { return _PressStation; }
+ set
+ {
+ switch (value)
+ {
+ case "1":
+ _PressStation = "左工位";
+ break;
+ case "2":
+ _PressStation = "右工位";
+ break;
+ default:
+ _PressStation = "无";
+ break;
+ }
+ RaisePropertyChanged(() => PressStation);
+ }
+ }
+
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/TermWeldDto.cs b/GroupLine.App/ModelDto/TermWeldDto.cs
new file mode 100644
index 0000000..77830f0
--- /dev/null
+++ b/GroupLine.App/ModelDto/TermWeldDto.cs
@@ -0,0 +1,102 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(TermWeldDto))]
+ public class TermWeldDto : ValidateModelBase
+ {
+
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+
+ private string _MachineModel;
+ ///
+ /// 机种名
+ ///
+ public string MachineModel
+ {
+ get { return _MachineModel; }
+ set { _MachineModel = value; RaisePropertyChanged(() => MachineModel); }
+ }
+ private string _WeldStation;
+ ///
+ /// 焊接工位
+ ///
+ public string WeldStation
+ {
+ get { return _WeldStation; }
+ set
+ {
+ switch (value)
+ {
+ case "1":
+ _WeldStation = "左工位";
+ break;
+ case "2":
+ _WeldStation = "右工位";
+ break;
+ default:
+ _WeldStation = "无";
+ break;
+ }
+ RaisePropertyChanged(() => WeldStation);
+ }
+ }
+ private string _OpNo;
+ ///
+ /// 员工编号
+ ///
+ public string OpNo
+ {
+ get { return _OpNo; }
+ set { _OpNo = value; RaisePropertyChanged(() => OpNo); }
+ }
+ private decimal _Cur;
+ ///
+ /// 电流值
+ ///
+ public decimal Cur
+ {
+ get { return _Cur; }
+ set { _Cur = value; RaisePropertyChanged(() => Cur); }
+ }
+ private int _ElectrodeModel;
+ ///
+ /// 电极型号
+ ///
+ public int ElectrodeModel
+ {
+ get { return _ElectrodeModel; }
+ set { _ElectrodeModel = value; RaisePropertyChanged(() => ElectrodeModel); }
+ }
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+ private decimal _WeldTime;
+ ///
+ /// 焊接时间
+ ///
+ public decimal WeldTime
+ {
+ get { return _WeldTime; }
+ set { _WeldTime = value; RaisePropertyChanged(() => WeldTime); }
+ }
+
+ }
+}
diff --git a/GroupLine.App/ModelDto/ValidateModelBase.cs b/GroupLine.App/ModelDto/ValidateModelBase.cs
new file mode 100644
index 0000000..74cfb06
--- /dev/null
+++ b/GroupLine.App/ModelDto/ValidateModelBase.cs
@@ -0,0 +1,90 @@
+using GalaSoft.MvvmLight;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+
+namespace GroupLine.App.ModelDto
+{
+ public class ValidateModelBase : ObservableObject, IDataErrorInfo
+ {
+ public ValidateModelBase()
+ {
+
+ }
+
+ #region 属性
+ ///
+ /// 表当验证错误集合
+ ///
+ public Dictionary dataErrors = new Dictionary();
+
+ ///
+ /// 是否验证通过
+ ///
+ public Boolean IsValidated
+ {
+ get
+ {
+ if (dataErrors != null && dataErrors.Count > 0)
+ {
+ return false;
+ }
+ return true;
+ }
+ }
+ #endregion
+
+ public string this[string columnName]
+ {
+ get
+ {
+ ValidationContext vc = new ValidationContext(this, null, null);
+ vc.MemberName = columnName;
+ var res = new List();
+ var result = Validator.TryValidateProperty(this.GetType().GetProperty(columnName).GetValue(this, null), vc, res);
+ if (res.Count > 0)
+ {
+ String errorInfo = string.Join(Environment.NewLine, res.Select(r => r.ErrorMessage).ToArray());
+ AddDic(dataErrors, columnName, errorInfo);
+ return errorInfo;
+ }
+ RemoveDic(dataErrors, columnName);
+ return null;
+ }
+ }
+
+ public string Error
+ {
+ get
+ {
+ return null;
+ }
+ }
+
+
+ #region 附属方法
+
+ ///
+ /// 移除字典
+ ///
+ ///
+ ///
+ private void RemoveDic(Dictionary dics, String dicKey)
+ {
+ dics.Remove(dicKey);
+ }
+
+ ///
+ /// 添加字典
+ ///
+ ///
+ ///
+ private void AddDic(Dictionary dics, String dicKey, string dicValue)
+ {
+ if (!dics.ContainsKey(dicKey)) dics.Add(dicKey, dicValue);
+ }
+ #endregion
+ }
+}
diff --git a/GroupLine.App/NLog.config b/GroupLine.App/NLog.config
new file mode 100644
index 0000000..25e34dc
--- /dev/null
+++ b/GroupLine.App/NLog.config
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/NLog.xsd b/GroupLine.App/NLog.xsd
new file mode 100644
index 0000000..d167472
--- /dev/null
+++ b/GroupLine.App/NLog.xsd
@@ -0,0 +1,3728 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Watch config file for changes and reload automatically.
+
+
+
+
+ Print internal NLog messages to the console. Default value is: false
+
+
+
+
+ Print internal NLog messages to the console error output. Default value is: false
+
+
+
+
+ Write internal NLog messages to the specified file.
+
+
+
+
+ Log level threshold for internal log messages. Default value is: Info.
+
+
+
+
+ Global log level threshold for application log messages. Messages below this level won't be logged.
+
+
+
+
+ Throw an exception when there is an internal error. Default value is: false. Not recommend to set to true in production!
+
+
+
+
+ Throw an exception when there is a configuration error. If not set, determined by throwExceptions.
+
+
+
+
+ Gets or sets a value indicating whether Variables should be kept on configuration reload. Default value is: false.
+
+
+
+
+ Write internal NLog messages to the System.Diagnostics.Trace. Default value is: false.
+
+
+
+
+ Write timestamps for internal NLog messages. Default value is: true.
+
+
+
+
+ Use InvariantCulture as default culture instead of CurrentCulture. Default value is: false.
+
+
+
+
+ Perform message template parsing and formatting of LogEvent messages (true = Always, false = Never, empty = Auto Detect). Default value is: empty.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Make all targets within this section asynchronous (creates additional threads but the calling thread isn't blocked by any target writes).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Prefix for targets/layout renderers/filters/conditions loaded from this assembly.
+
+
+
+
+ Load NLog extensions from the specified file (*.dll)
+
+
+
+
+ Load NLog extensions from the specified assembly. Assembly name should be fully qualified.
+
+
+
+
+
+
+
+
+
+ Filter on the name of the logger. May include wildcard characters ('*' or '?').
+
+
+
+
+ Comma separated list of levels that this rule matches.
+
+
+
+
+ Minimum level that this rule matches.
+
+
+
+
+ Maximum level that this rule matches.
+
+
+
+
+ Level that this rule matches.
+
+
+
+
+ Comma separated list of target names.
+
+
+
+
+ Ignore further rules if this one matches.
+
+
+
+
+ Enable this rule. Note: disabled rules aren't available from the API.
+
+
+
+
+ Rule identifier to allow rule lookup with Configuration.FindRuleByName and Configuration.RemoveRuleByName.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Default action if none of the filters match.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the file to be included. You could use * wildcard. The name is relative to the name of the current config file.
+
+
+
+
+ Ignore any errors in the include file.
+
+
+
+
+
+
+
+ Variable value. Note, the 'value' attribute has precedence over this one.
+
+
+
+
+
+ Variable name.
+
+
+
+
+ Variable value.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Number of log events that should be processed in a batch by the lazy writer thread.
+
+
+
+
+ Whether to use the locking queue, instead of a lock-free concurrent queue The locking queue is less concurrent when many logger threads, but reduces memory allocation
+
+
+
+
+ Limit of full s to write before yielding into Performance is better when writing many small batches, than writing a single large batch
+
+
+
+
+ Action to be taken when the lazy writer thread request queue count exceeds the set limit.
+
+
+
+
+ Limit on the number of requests in the lazy writer thread request queue.
+
+
+
+
+ Time in milliseconds to sleep between batches. (1 or less means trigger on new activity)
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Delay the flush until the LogEvent has been confirmed as written
+
+
+
+
+ Condition expression. Log events who meet this condition will cause a flush on the wrapped target.
+
+
+
+
+ Only flush when LogEvent matches condition. Ignore explicit-flush, config-reload-flush and shutdown-flush
+
+
+
+
+ Name of the target.
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Number of log events to be buffered.
+
+
+
+
+ Timeout (in milliseconds) after which the contents of buffer will be flushed if there's no write in the specified period of time. Use -1 to disable timed flushes.
+
+
+
+
+ Action to take if the buffer overflows.
+
+
+
+
+ Indicates whether to use sliding timeout.
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Encoding to be used.
+
+
+
+
+ Instance of that is used to format log messages.
+
+
+
+
+ End of line value if a newline is appended at the end of log message .
+
+
+
+
+ Maximum message size in bytes.
+
+
+
+
+ Indicates whether to append newline at the end of log message.
+
+
+
+
+ Get or set the SSL/TLS protocols. Default no SSL/TLS is used. Currently only implemented for TCP.
+
+
+
+
+ Network address.
+
+
+
+
+ Size of the connection cache (number of connections which are kept alive).
+
+
+
+
+ The number of seconds a connection will remain idle before the first keep-alive probe is sent
+
+
+
+
+ Maximum queue size.
+
+
+
+
+ Maximum current connections. 0 = no maximum.
+
+
+
+
+ Action that should be taken if the will be more connections than .
+
+
+
+
+ Action that should be taken if the message is larger than maxMessageSize.
+
+
+
+
+ Indicates whether to keep connection open whenever possible.
+
+
+
+
+ NDLC item separator.
+
+
+
+
+ NDC item separator.
+
+
+
+
+ Indicates whether to include dictionary contents.
+
+
+
+
+ Indicates whether to include source info (file name and line number) in the information sent over the network.
+
+
+
+
+ Indicates whether to include NLog-specific extensions to log4j schema.
+
+
+
+
+ Indicates whether to include contents of the stack.
+
+
+
+
+ Indicates whether to include stack contents.
+
+
+
+
+ Indicates whether to include dictionary contents.
+
+
+
+
+ Indicates whether to include dictionary contents.
+
+
+
+
+ Option to include all properties from the log events
+
+
+
+
+ Indicates whether to include call site (class and method name) in the information sent over the network.
+
+
+
+
+ Option to include all properties from the log events
+
+
+
+
+ AppInfo field. By default it's the friendly name of the current AppDomain.
+
+
+
+
+ Renderer for log4j:event logger-xml-attribute (Default ${logger})
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Layout that should be use to calculate the value for the parameter.
+
+
+
+
+ Viewer parameter name.
+
+
+
+
+ Whether an attribute with empty value should be included in the output
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Text to be rendered.
+
+
+
+
+ Header.
+
+
+
+
+ Footer.
+
+
+
+
+ Indicates whether to auto-check if the console is available. - Disables console writing if Environment.UserInteractive = False (Windows Service) - Disables console writing if Console Standard Input is not available (Non-Console-App)
+
+
+
+
+ Enables output using ANSI Color Codes
+
+
+
+
+ The encoding for writing messages to the .
+
+
+
+
+ Indicates whether the error stream (stderr) should be used instead of the output stream (stdout).
+
+
+
+
+ Indicates whether to auto-flush after
+
+
+
+
+ Indicates whether to auto-check if the console has been redirected to file - Disables coloring logic when System.Console.IsOutputRedirected = true
+
+
+
+
+ Indicates whether to use default row highlighting rules.
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Condition that must be met in order to set the specified foreground and background color.
+
+
+
+
+ Background color.
+
+
+
+
+ Foreground color.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Compile the ? This can improve the performance, but at the costs of more memory usage. If false, the Regex Cache is used.
+
+
+
+
+ Condition that must be met before scanning the row for highlight of words
+
+
+
+
+ Indicates whether to ignore case when comparing texts.
+
+
+
+
+ Regular expression to be matched. You must specify either text or regex.
+
+
+
+
+ Text to be matched. You must specify either text or regex.
+
+
+
+
+ Indicates whether to match whole words only.
+
+
+
+
+ Background color.
+
+
+
+
+ Foreground color.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Text to be rendered.
+
+
+
+
+ Header.
+
+
+
+
+ Footer.
+
+
+
+
+ Indicates whether to auto-flush after
+
+
+
+
+ Indicates whether to auto-check if the console is available - Disables console writing if Environment.UserInteractive = False (Windows Service) - Disables console writing if Console Standard Input is not available (Non-Console-App)
+
+
+
+
+ The encoding for writing messages to the .
+
+
+
+
+ Indicates whether to send the log messages to the standard error instead of the standard output.
+
+
+
+
+ Whether to enable batch writing using char[]-buffers, instead of using
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Obsolete - value will be ignored! The logging code always runs outside of transaction. Gets or sets a value indicating whether to use database transactions. Some data providers require this.
+
+
+
+
+ Indicates whether to keep the database connection open between the log events.
+
+
+
+
+ Name of the database provider.
+
+
+
+
+ Database password. If the ConnectionString is not provided this value will be used to construct the "Password=" part of the connection string.
+
+
+
+
+ Database host name. If the ConnectionString is not provided this value will be used to construct the "Server=" part of the connection string.
+
+
+
+
+ Database user name. If the ConnectionString is not provided this value will be used to construct the "User ID=" part of the connection string.
+
+
+
+
+ Name of the connection string (as specified in <connectionStrings> configuration section.
+
+
+
+
+ Connection string. When provided, it overrides the values specified in DBHost, DBUserName, DBPassword, DBDatabase.
+
+
+
+
+ Database name. If the ConnectionString is not provided this value will be used to construct the "Database=" part of the connection string.
+
+
+
+
+ Connection string using for installation and uninstallation. If not provided, regular ConnectionString is being used.
+
+
+
+
+ Configures isolated transaction batch writing. If supported by the database, then it will improve insert performance.
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+ Text of the SQL command to be run on each log level.
+
+
+
+
+ Type of the SQL command to be run on each log level.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Convert format of the property value
+
+
+
+
+ Culture used for parsing property string-value for type-conversion
+
+
+
+
+ Value to assign on the object-property
+
+
+
+
+ Name for the object-property
+
+
+
+
+ Type of the object-property
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Type of the command.
+
+
+
+
+ Connection string to run the command against. If not provided, connection string from the target is used.
+
+
+
+
+ Indicates whether to ignore failures.
+
+
+
+
+ Command text.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Database parameter name.
+
+
+
+
+ Layout that should be use to calculate the value for the parameter.
+
+
+
+
+ Database parameter DbType.
+
+
+
+
+ Database parameter size.
+
+
+
+
+ Database parameter precision.
+
+
+
+
+ Database parameter scale.
+
+
+
+
+ Type of the parameter.
+
+
+
+
+ Whether empty value should translate into DbNull. Requires database column to allow NULL values.
+
+
+
+
+ Convert format of the database parameter value.
+
+
+
+
+ Culture used for parsing parameter string-value for type-conversion
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Text to be rendered.
+
+
+
+
+ Header.
+
+
+
+
+ Footer.
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Layout used to format log messages.
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Layout used to format log messages.
+
+
+
+
+ Layout that renders event Category.
+
+
+
+
+ Optional entry type. When not set, or when not convertible to then determined by
+
+
+
+
+ Layout that renders event ID.
+
+
+
+
+ Name of the Event Log to write to. This can be System, Application or any user-defined name.
+
+
+
+
+ Name of the machine on which Event Log service is running.
+
+
+
+
+ Maximum Event log size in kilobytes.
+
+
+
+
+ Message length limit to write to the Event Log.
+
+
+
+
+ Value to be used as the event Source.
+
+
+
+
+ Action to take if the message is larger than the option.
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Indicates whether to return to the first target after any successful write.
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Text to be rendered.
+
+
+
+
+ Header.
+
+
+
+
+ Footer.
+
+
+
+
+ File encoding.
+
+
+
+
+ Line ending mode.
+
+
+
+
+ Maximum days of archive files that should be kept.
+
+
+
+
+ Indicates whether to compress archive files into the zip archive format.
+
+
+
+
+ Way file archives are numbered.
+
+
+
+
+ Name of the file to be used for an archive.
+
+
+
+
+ Is the an absolute or relative path?
+
+
+
+
+ Indicates whether to automatically archive log files every time the specified time passes.
+
+
+
+
+ Size in bytes above which log files will be automatically archived. Warning: combining this with isn't supported. We cannot create multiple archive files, if they should have the same name. Choose:
+
+
+
+
+ Maximum number of archive files that should be kept.
+
+
+
+
+ Indicates whether the footer should be written only when the file is archived.
+
+
+
+
+ Maximum number of log file names that should be stored as existing.
+
+
+
+
+ Indicates whether to delete old log file on startup.
+
+
+
+
+ File attributes (Windows only).
+
+
+
+
+ Indicates whether to create directories if they do not exist.
+
+
+
+
+ Cleanup invalid values in a filename, e.g. slashes in a filename. If set to true, this can impact the performance of massive writes. If set to false, nothing gets written when the filename is wrong.
+
+
+
+
+ Value of the file size threshold to archive old log file on startup.
+
+
+
+
+ Indicates whether to archive old log file on startup.
+
+
+
+
+ Value specifying the date format to use when archiving files.
+
+
+
+
+ Indicates whether to enable log file(s) to be deleted.
+
+
+
+
+ Indicates whether to write BOM (byte order mark) in created files
+
+
+
+
+ Indicates whether to replace file contents on each write instead of appending log message at the end.
+
+
+
+
+ Indicates whether file creation calls should be synchronized by a system global mutex.
+
+
+
+
+ Gets or set a value indicating whether a managed file stream is forced, instead of using the native implementation.
+
+
+
+
+ Is the an absolute or relative path?
+
+
+
+
+ Name of the file to write to.
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+ Indicates whether concurrent writes to the log file by multiple processes on different network hosts.
+
+
+
+
+ Maximum number of seconds that files are kept open. If this number is negative the files are not automatically closed after a period of inactivity.
+
+
+
+
+ Number of files to be kept open. Setting this to a higher value may improve performance in a situation where a single File target is writing to many files (such as splitting by level or by logger).
+
+
+
+
+ Indicates whether to keep log file open instead of opening and closing it on each logging event.
+
+
+
+
+ Whether or not this target should just discard all data that its asked to write. Mostly used for when testing NLog Stack except final write
+
+
+
+
+ Indicates whether concurrent writes to the log file by multiple processes on the same host.
+
+
+
+
+ Number of times the write is appended on the file before NLog discards the log message.
+
+
+
+
+ Delay in milliseconds to wait before attempting to write to the file again.
+
+
+
+
+ Log file buffer size in bytes.
+
+
+
+
+ Maximum number of seconds before open files are flushed. If this number is negative or zero the files are not flushed by timer.
+
+
+
+
+ Indicates whether to automatically flush the file buffers after each log message.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Condition expression. Log events who meet this condition will be forwarded to the wrapped target.
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Windows domain name to change context to.
+
+
+
+
+ Required impersonation level.
+
+
+
+
+ Type of the logon provider.
+
+
+
+
+ Logon Type.
+
+
+
+
+ User account password.
+
+
+
+
+ Indicates whether to revert to the credentials of the process instead of impersonating another user.
+
+
+
+
+ Username to change context to.
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Interval in which messages will be written up to the number of messages.
+
+
+
+
+ Maximum allowed number of messages written per .
+
+
+
+
+ Name of the target.
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Endpoint address.
+
+
+
+
+ Name of the endpoint configuration in WCF configuration file.
+
+
+
+
+ Indicates whether to use a WCF service contract that is one way (fire and forget) or two way (request-reply)
+
+
+
+
+ Client ID.
+
+
+
+
+ Indicates whether to include per-event properties in the payload sent to the server.
+
+
+
+
+ Indicates whether to use binary message encoding.
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Layout that should be use to calculate the value for the parameter.
+
+
+
+
+ Name of the parameter.
+
+
+
+
+ Type of the parameter.
+
+
+
+
+ Type of the parameter. Obsolete alias for
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Text to be rendered.
+
+
+
+
+ Header.
+
+
+
+
+ Footer.
+
+
+
+
+ Indicates whether NewLine characters in the body should be replaced with tags.
+
+
+
+
+ Priority used for sending mails.
+
+
+
+
+ Encoding to be used for sending e-mail.
+
+
+
+
+ BCC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com).
+
+
+
+
+ CC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com).
+
+
+
+
+ Indicates whether to add new lines between log entries.
+
+
+
+
+ Indicates whether to send message as HTML instead of plain text.
+
+
+
+
+ Sender's email address (e.g. joe@domain.com).
+
+
+
+
+ Mail message body (repeated for each log message send in one mail).
+
+
+
+
+ Mail subject.
+
+
+
+
+ Recipients' email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com).
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+ Indicates the SMTP client timeout.
+
+
+
+
+ SMTP Server to be used for sending.
+
+
+
+
+ SMTP Authentication mode.
+
+
+
+
+ Username used to connect to SMTP server (used when SmtpAuthentication is set to "basic").
+
+
+
+
+ Password used to authenticate against SMTP server (used when SmtpAuthentication is set to "basic").
+
+
+
+
+ Indicates whether SSL (secure sockets layer) should be used when communicating with SMTP server.
+
+
+
+
+ Port number that SMTP Server is listening on.
+
+
+
+
+ Indicates whether the default Settings from System.Net.MailSettings should be used.
+
+
+
+
+ Folder where applications save mail messages to be processed by the local SMTP server.
+
+
+
+
+ Specifies how outgoing email messages will be handled.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Layout used to format log messages.
+
+
+
+
+ Max number of items to have in memory
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Class name.
+
+
+
+
+ Method name. The method must be public and static. Use the AssemblyQualifiedName , https://msdn.microsoft.com/en-us/library/system.type.assemblyqualifiedname(v=vs.110).aspx e.g.
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Layout used to format log messages.
+
+
+
+
+ Encoding to be used.
+
+
+
+
+ End of line value if a newline is appended at the end of log message .
+
+
+
+
+ Maximum message size in bytes.
+
+
+
+
+ Indicates whether to append newline at the end of log message.
+
+
+
+
+ Network address.
+
+
+
+
+ Size of the connection cache (number of connections which are kept alive).
+
+
+
+
+ The number of seconds a connection will remain idle before the first keep-alive probe is sent
+
+
+
+
+ Indicates whether to keep connection open whenever possible.
+
+
+
+
+ Maximum current connections. 0 = no maximum.
+
+
+
+
+ Maximum queue size.
+
+
+
+
+ Action that should be taken if the will be more connections than .
+
+
+
+
+ Action that should be taken if the message is larger than maxMessageSize.
+
+
+
+
+ Get or set the SSL/TLS protocols. Default no SSL/TLS is used. Currently only implemented for TCP.
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Encoding to be used.
+
+
+
+
+ Instance of that is used to format log messages.
+
+
+
+
+ End of line value if a newline is appended at the end of log message .
+
+
+
+
+ Maximum message size in bytes.
+
+
+
+
+ Indicates whether to append newline at the end of log message.
+
+
+
+
+ Get or set the SSL/TLS protocols. Default no SSL/TLS is used. Currently only implemented for TCP.
+
+
+
+
+ Network address.
+
+
+
+
+ Size of the connection cache (number of connections which are kept alive).
+
+
+
+
+ The number of seconds a connection will remain idle before the first keep-alive probe is sent
+
+
+
+
+ Maximum queue size.
+
+
+
+
+ Maximum current connections. 0 = no maximum.
+
+
+
+
+ Action that should be taken if the will be more connections than .
+
+
+
+
+ Action that should be taken if the message is larger than maxMessageSize.
+
+
+
+
+ Indicates whether to keep connection open whenever possible.
+
+
+
+
+ NDLC item separator.
+
+
+
+
+ NDC item separator.
+
+
+
+
+ Indicates whether to include dictionary contents.
+
+
+
+
+ Indicates whether to include source info (file name and line number) in the information sent over the network.
+
+
+
+
+ Indicates whether to include NLog-specific extensions to log4j schema.
+
+
+
+
+ Indicates whether to include contents of the stack.
+
+
+
+
+ Indicates whether to include stack contents.
+
+
+
+
+ Indicates whether to include dictionary contents.
+
+
+
+
+ Indicates whether to include dictionary contents.
+
+
+
+
+ Option to include all properties from the log events
+
+
+
+
+ Indicates whether to include call site (class and method name) in the information sent over the network.
+
+
+
+
+ Option to include all properties from the log events
+
+
+
+
+ AppInfo field. By default it's the friendly name of the current AppDomain.
+
+
+
+
+ Renderer for log4j:event logger-xml-attribute (Default ${logger})
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Layout used to format log messages.
+
+
+
+
+ Indicates whether to perform layout calculation.
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Layout used to format log messages.
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Indicates whether performance counter should be automatically created.
+
+
+
+
+ Name of the performance counter category.
+
+
+
+
+ Counter help text.
+
+
+
+
+ Name of the performance counter.
+
+
+
+
+ Performance counter type.
+
+
+
+
+ The value by which to increment the counter.
+
+
+
+
+ Performance counter instance name.
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Default filter to be applied when no specific rule matches.
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+
+
+
+
+
+
+
+
+ Condition to be tested.
+
+
+
+
+ Resulting filter to be applied when the condition matches.
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+ Number of times to repeat each log message.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+ Number of retries that should be attempted on the wrapped target in case of a failure.
+
+
+
+
+ Time to wait between retries in milliseconds.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Layout used to format log messages.
+
+
+
+
+ Forward to (Instead of )
+
+
+
+
+ Always use independent of
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
+
+
+
+
+ Should we include the BOM (Byte-order-mark) for UTF? Influences the property. This will only work for UTF-8.
+
+
+
+
+ Web service method name. Only used with Soap.
+
+
+
+
+ Web service namespace. Only used with Soap.
+
+
+
+
+ Protocol to be used when calling web service.
+
+
+
+
+ Custom proxy address, include port separated by a colon
+
+
+
+
+ Encoding.
+
+
+
+
+ Web service URL.
+
+
+
+
+ Value of the User-agent HTTP header.
+
+
+
+
+ Value whether escaping be done according to the old NLog style (Very non-standard)
+
+
+
+
+ Value whether escaping be done according to Rfc3986 (Supports Internationalized Resource Identifiers - IRIs)
+
+
+
+
+ Indicates whether to pre-authenticate the HttpWebRequest (Requires 'Authorization' in parameters)
+
+
+
+
+ Name of the root XML element, if POST of XML document chosen. If so, this property must not be null. (see and ).
+
+
+
+
+ (optional) root namespace of the XML document, if POST of XML document chosen. (see and ).
+
+
+
+
+ Proxy configuration when calling web service
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Footer layout.
+
+
+
+
+ Header layout.
+
+
+
+
+ Body layout (can be repeated multiple times).
+
+
+
+
+ Custom column delimiter value (valid when ColumnDelimiter is set to 'Custom').
+
+
+
+
+ Column delimiter.
+
+
+
+
+ Quote Character.
+
+
+
+
+ Quoting mode.
+
+
+
+
+ Indicates whether CVS should include header.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Layout of the column.
+
+
+
+
+ Name of the column.
+
+
+
+
+ Override of Quoting mode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Should forward slashes be escaped? If true, / will be converted to \/
+
+
+
+
+ Option to render the empty object value {}
+
+
+
+
+ Option to suppress the extra spaces in the output json
+
+
+
+
+ Option to exclude null/empty properties from the log event (as JSON)
+
+
+
+
+ List of property names to exclude when is true
+
+
+
+
+ Option to include all properties from the log event (as JSON)
+
+
+
+
+ Option to include all properties from the log event (as JSON)
+
+
+
+
+ Indicates whether to include contents of the dictionary.
+
+
+
+
+ Indicates whether to include contents of the dictionary.
+
+
+
+
+ Indicates whether to include contents of the dictionary.
+
+
+
+
+ Indicates whether to include contents of the dictionary.
+
+
+
+
+ How far should the JSON serializer follow object references before backing off
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Layout that will be rendered as the attribute's value.
+
+
+
+
+ Name of the attribute.
+
+
+
+
+ Determines whether or not this attribute will be Json encoded.
+
+
+
+
+ Should forward slashes be escaped? If true, / will be converted to \/
+
+
+
+
+ Indicates whether to escape non-ascii characters
+
+
+
+
+ Whether an attribute with empty value should be included in the output
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Footer layout.
+
+
+
+
+ Header layout.
+
+
+
+
+ Body layout (can be repeated multiple times).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Option to include all properties from the log events
+
+
+
+
+ Indicates whether to include call site (class and method name) in the information sent over the network.
+
+
+
+
+ Option to include all properties from the log events
+
+
+
+
+ Indicates whether to include contents of the dictionary.
+
+
+
+
+ Indicates whether to include contents of the dictionary.
+
+
+
+
+ Indicates whether to include contents of the stack.
+
+
+
+
+ Indicates whether to include contents of the stack.
+
+
+
+
+ Indicates whether to include contents of the dictionary.
+
+
+
+
+ Indicates whether to include source info (file name and line number) in the information sent over the network.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Layout text.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Option to include all properties from the log event (as XML)
+
+
+
+
+ XML attribute name to use when rendering property-key When null (or empty) then key-attribute is not included
+
+
+
+
+ XML element name to use for rendering IList-collections items
+
+
+
+
+ How far should the XML serializer follow object references before backing off
+
+
+
+
+ Indicates whether to include contents of the dictionary.
+
+
+
+
+ Indicates whether to include contents of the dictionary.
+
+
+
+
+ Indicates whether to include contents of the dictionary.
+
+
+
+
+ Option to include all properties from the log event (as XML)
+
+
+
+
+ XML attribute name to use when rendering property-value When null (or empty) then value-attribute is not included and value is formatted as XML-element-value
+
+
+
+
+ List of property names to exclude when is true
+
+
+
+
+ XML element name to use when rendering properties
+
+
+
+
+ Determines whether or not this attribute will be Xml encoded.
+
+
+
+
+ Auto indent and create new lines
+
+
+
+
+ Whether a ElementValue with empty value should be included in the output
+
+
+
+
+ Value inside the root XML element
+
+
+
+
+ Name of the root XML element
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Determines whether or not this attribute will be Xml encoded.
+
+
+
+
+ Name of the element
+
+
+
+
+ Value inside the element
+
+
+
+
+ Whether a ElementValue with empty value should be included in the output
+
+
+
+
+ Auto indent and create new lines
+
+
+
+
+ List of property names to exclude when is true
+
+
+
+
+ Option to include all properties from the log event (as XML)
+
+
+
+
+ Option to include all properties from the log event (as XML)
+
+
+
+
+ Indicates whether to include contents of the dictionary.
+
+
+
+
+ Indicates whether to include contents of the dictionary.
+
+
+
+
+ Indicates whether to include contents of the dictionary.
+
+
+
+
+ How far should the XML serializer follow object references before backing off
+
+
+
+
+ XML element name to use for rendering IList-collections items
+
+
+
+
+ XML attribute name to use when rendering property-key When null (or empty) then key-attribute is not included
+
+
+
+
+ XML element name to use when rendering properties
+
+
+
+
+ XML attribute name to use when rendering property-value When null (or empty) then value-attribute is not included and value is formatted as XML-element-value
+
+
+
+
+
+
+
+
+
+
+
+
+ Layout that will be rendered as the attribute's value.
+
+
+
+
+ Name of the attribute.
+
+
+
+
+ Determines whether or not this attribute will be Xml encoded.
+
+
+
+
+ Whether an attribute with empty value should be included in the output
+
+
+
+
+
+
+
+
+
+
+
+
+ Action to be taken when filter matches.
+
+
+
+
+ Condition expression.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Action to be taken when filter matches.
+
+
+
+
+ Indicates whether to ignore case when comparing strings.
+
+
+
+
+ Layout to be used to filter log messages.
+
+
+
+
+ Substring to be matched.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Action to be taken when filter matches.
+
+
+
+
+ String to compare the layout to.
+
+
+
+
+ Indicates whether to ignore case when comparing strings.
+
+
+
+
+ Layout to be used to filter log messages.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Action to be taken when filter matches.
+
+
+
+
+ Indicates whether to ignore case when comparing strings.
+
+
+
+
+ Layout to be used to filter log messages.
+
+
+
+
+ Substring to be matched.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Action to be taken when filter matches.
+
+
+
+
+ String to compare the layout to.
+
+
+
+
+ Indicates whether to ignore case when comparing strings.
+
+
+
+
+ Layout to be used to filter log messages.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Action to be taken when filter matches.
+
+
+
+
+ Default number of unique filter values to expect, will automatically increase if needed
+
+
+
+
+ Applies the configured action to the initial logevent that starts the timeout period. Used to configure that it should ignore all events until timeout.
+
+
+
+
+ Layout to be used to filter log messages.
+
+
+
+
+ Max number of unique filter values to expect simultaneously
+
+
+
+
+ Max length of filter values, will truncate if above limit
+
+
+
+
+ How long before a filter expires, and logging is accepted again
+
+
+
+
+ Default buffer size for the internal buffers
+
+
+
+
+ Reuse internal buffers, and doesn't have to constantly allocate new buffers
+
+
+
+
+ Append FilterCount to the when an event is no longer filtered
+
+
+
+
+ Insert FilterCount value into when an event is no longer filtered
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/GroupLine.App/Properties/AssemblyInfo.cs b/GroupLine.App/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..1b4eb6f
--- /dev/null
+++ b/GroupLine.App/Properties/AssemblyInfo.cs
@@ -0,0 +1,53 @@
+using System.Reflection;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// 有关程序集的一般信息由以下
+// 控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("GroupLine.App")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("HP Inc.")]
+[assembly: AssemblyProduct("GroupLine.App")]
+[assembly: AssemblyCopyright("Copyright © HP Inc. 2023")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 将 ComVisible 设置为 false 会使此程序集中的类型
+//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
+//请将此类型的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+//若要开始生成可本地化的应用程序,请设置
+//.csproj 文件中的 CultureYouAreCodingWith
+//例如,如果您在源文件中使用的是美国英语,
+//使用的是美国英语,请将 设置为 en-US。 然后取消
+//对以下 NeutralResourceLanguage 特性的注释。 更新
+//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //主题特定资源词典所处位置
+ //(未在页面中找到资源时使用,
+ //或应用程序资源字典中找到时使用)
+ ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
+ //(未在页面中找到资源时使用,
+ //、应用程序或任何主题专用资源字典中找到时使用)
+)]
+
+
+// 程序集的版本信息由下列四个值组成:
+//
+// 主版本
+// 次版本
+// 生成号
+// 修订号
+//
+//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
+//通过使用 "*",如下所示:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/GroupLine.App/Properties/Resources.Designer.cs b/GroupLine.App/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..105c3af
--- /dev/null
+++ b/GroupLine.App/Properties/Resources.Designer.cs
@@ -0,0 +1,63 @@
+//------------------------------------------------------------------------------
+//
+// 此代码由工具生成。
+// 运行时版本:4.0.30319.42000
+//
+// 对此文件的更改可能会导致不正确的行为,并且如果
+// 重新生成代码,这些更改将会丢失。
+//
+//------------------------------------------------------------------------------
+
+namespace GroupLine.App.Properties {
+ using System;
+
+
+ ///
+ /// 一个强类型的资源类,用于查找本地化的字符串等。
+ ///
+ // 此类是由 StronglyTypedResourceBuilder
+ // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
+ // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+ // (以 /str 作为命令选项),或重新生成 VS 项目。
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ ///
+ /// 返回此类使用的缓存的 ResourceManager 实例。
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GroupLine.App.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// 重写当前线程的 CurrentUICulture 属性,对
+ /// 使用此强类型资源类的所有资源查找执行重写。
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/GroupLine.App/Properties/Resources.resx b/GroupLine.App/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/GroupLine.App/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/GroupLine.App/Properties/Settings.Designer.cs b/GroupLine.App/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..15d16af
--- /dev/null
+++ b/GroupLine.App/Properties/Settings.Designer.cs
@@ -0,0 +1,26 @@
+//------------------------------------------------------------------------------
+//
+// 此代码由工具生成。
+// 运行时版本:4.0.30319.42000
+//
+// 对此文件的更改可能会导致不正确的行为,并且如果
+// 重新生成代码,这些更改将会丢失。
+//
+//------------------------------------------------------------------------------
+
+namespace GroupLine.App.Properties {
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default {
+ get {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/GroupLine.App/Properties/Settings.settings b/GroupLine.App/Properties/Settings.settings
new file mode 100644
index 0000000..033d7a5
--- /dev/null
+++ b/GroupLine.App/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/GroupLine.App/ReportFile/AppearanceTestTemplate.xlsx b/GroupLine.App/ReportFile/AppearanceTestTemplate.xlsx
new file mode 100644
index 0000000..b597604
Binary files /dev/null and b/GroupLine.App/ReportFile/AppearanceTestTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/BurPlugInstallTemplate.xlsx b/GroupLine.App/ReportFile/BurPlugInstallTemplate.xlsx
new file mode 100644
index 0000000..b399270
Binary files /dev/null and b/GroupLine.App/ReportFile/BurPlugInstallTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/CylinderEngravTemplate.xlsx b/GroupLine.App/ReportFile/CylinderEngravTemplate.xlsx
new file mode 100644
index 0000000..f2374fa
Binary files /dev/null and b/GroupLine.App/ReportFile/CylinderEngravTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/ExhInstallMesTemplate.xlsx b/GroupLine.App/ReportFile/ExhInstallMesTemplate.xlsx
new file mode 100644
index 0000000..6cd473d
Binary files /dev/null and b/GroupLine.App/ReportFile/ExhInstallMesTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/GCDTransplantTemplate.xlsx b/GroupLine.App/ReportFile/GCDTransplantTemplate.xlsx
new file mode 100644
index 0000000..efa2ee8
Binary files /dev/null and b/GroupLine.App/ReportFile/GCDTransplantTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/GCylinderBurnEbTemplate.xlsx b/GroupLine.App/ReportFile/GCylinderBurnEbTemplate.xlsx
new file mode 100644
index 0000000..939c0c9
Binary files /dev/null and b/GroupLine.App/ReportFile/GCylinderBurnEbTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/GDynStaticMachTemplate.xlsx b/GroupLine.App/ReportFile/GDynStaticMachTemplate.xlsx
new file mode 100644
index 0000000..c0c3d20
Binary files /dev/null and b/GroupLine.App/ReportFile/GDynStaticMachTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/GInsRotaResTemplate.xlsx b/GroupLine.App/ReportFile/GInsRotaResTemplate.xlsx
new file mode 100644
index 0000000..fc9a094
Binary files /dev/null and b/GroupLine.App/ReportFile/GInsRotaResTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/GLeakCheckTemplate.xlsx b/GroupLine.App/ReportFile/GLeakCheckTemplate.xlsx
new file mode 100644
index 0000000..463f415
Binary files /dev/null and b/GroupLine.App/ReportFile/GLeakCheckTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/GLowVolStartTemplate.xlsx b/GroupLine.App/ReportFile/GLowVolStartTemplate.xlsx
new file mode 100644
index 0000000..d55fd55
Binary files /dev/null and b/GroupLine.App/ReportFile/GLowVolStartTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/GMagTorqueTemplate.xlsx b/GroupLine.App/ReportFile/GMagTorqueTemplate.xlsx
new file mode 100644
index 0000000..e63fad3
Binary files /dev/null and b/GroupLine.App/ReportFile/GMagTorqueTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/GOilPumpInstallTemplate.xlsx b/GroupLine.App/ReportFile/GOilPumpInstallTemplate.xlsx
new file mode 100644
index 0000000..73864f3
Binary files /dev/null and b/GroupLine.App/ReportFile/GOilPumpInstallTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/GRingWeldMachTemplate.xlsx b/GroupLine.App/ReportFile/GRingWeldMachTemplate.xlsx
new file mode 100644
index 0000000..4b204d6
Binary files /dev/null and b/GroupLine.App/ReportFile/GRingWeldMachTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/GRotorBurnEbTemplate.xlsx b/GroupLine.App/ReportFile/GRotorBurnEbTemplate.xlsx
new file mode 100644
index 0000000..7f9ea6e
Binary files /dev/null and b/GroupLine.App/ReportFile/GRotorBurnEbTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/GRotorMagTemplate.xlsx b/GroupLine.App/ReportFile/GRotorMagTemplate.xlsx
new file mode 100644
index 0000000..50ea252
Binary files /dev/null and b/GroupLine.App/ReportFile/GRotorMagTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/GShrinkTubTemplate.xlsx b/GroupLine.App/ReportFile/GShrinkTubTemplate.xlsx
new file mode 100644
index 0000000..daed035
Binary files /dev/null and b/GroupLine.App/ReportFile/GShrinkTubTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/GSpotWeldMachTemplate.xlsx b/GroupLine.App/ReportFile/GSpotWeldMachTemplate.xlsx
new file mode 100644
index 0000000..8739ab2
Binary files /dev/null and b/GroupLine.App/ReportFile/GSpotWeldMachTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/GStaticDiskMachTemplate.xlsx b/GroupLine.App/ReportFile/GStaticDiskMachTemplate.xlsx
new file mode 100644
index 0000000..5de76d8
Binary files /dev/null and b/GroupLine.App/ReportFile/GStaticDiskMachTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/KPCDTransplantTemplate.xlsx b/GroupLine.App/ReportFile/KPCDTransplantTemplate.xlsx
new file mode 100644
index 0000000..d011ddf
Binary files /dev/null and b/GroupLine.App/ReportFile/KPCDTransplantTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/KPDynStaticMachTemplate.xlsx b/GroupLine.App/ReportFile/KPDynStaticMachTemplate.xlsx
new file mode 100644
index 0000000..30e51fd
Binary files /dev/null and b/GroupLine.App/ReportFile/KPDynStaticMachTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/KPLeakCheckTemplate.xlsx b/GroupLine.App/ReportFile/KPLeakCheckTemplate.xlsx
new file mode 100644
index 0000000..8d70ef6
Binary files /dev/null and b/GroupLine.App/ReportFile/KPLeakCheckTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/KPLowVolStartTemplate.xlsx b/GroupLine.App/ReportFile/KPLowVolStartTemplate.xlsx
new file mode 100644
index 0000000..5a3aa62
Binary files /dev/null and b/GroupLine.App/ReportFile/KPLowVolStartTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/KPMagTorqueTemplate.xlsx b/GroupLine.App/ReportFile/KPMagTorqueTemplate.xlsx
new file mode 100644
index 0000000..4d16d9d
Binary files /dev/null and b/GroupLine.App/ReportFile/KPMagTorqueTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/KPOilPumpInstallTemplate.xlsx b/GroupLine.App/ReportFile/KPOilPumpInstallTemplate.xlsx
new file mode 100644
index 0000000..de20ea2
Binary files /dev/null and b/GroupLine.App/ReportFile/KPOilPumpInstallTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/KPRingWeldMachDwTemplate.xlsx b/GroupLine.App/ReportFile/KPRingWeldMachDwTemplate.xlsx
new file mode 100644
index 0000000..4b204d6
Binary files /dev/null and b/GroupLine.App/ReportFile/KPRingWeldMachDwTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/KPRingWeldMachTemplate.xlsx b/GroupLine.App/ReportFile/KPRingWeldMachTemplate.xlsx
new file mode 100644
index 0000000..bb8f572
Binary files /dev/null and b/GroupLine.App/ReportFile/KPRingWeldMachTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/KPRingWeldMachUpTemplate.xlsx b/GroupLine.App/ReportFile/KPRingWeldMachUpTemplate.xlsx
new file mode 100644
index 0000000..4b204d6
Binary files /dev/null and b/GroupLine.App/ReportFile/KPRingWeldMachUpTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/KPSealInstallTemplate.xlsx b/GroupLine.App/ReportFile/KPSealInstallTemplate.xlsx
new file mode 100644
index 0000000..76170a7
Binary files /dev/null and b/GroupLine.App/ReportFile/KPSealInstallTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/KPShrinkTubTemplate.xlsx b/GroupLine.App/ReportFile/KPShrinkTubTemplate.xlsx
new file mode 100644
index 0000000..daed035
Binary files /dev/null and b/GroupLine.App/ReportFile/KPShrinkTubTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/KPSpotWeldMachTemplate.xlsx b/GroupLine.App/ReportFile/KPSpotWeldMachTemplate.xlsx
new file mode 100644
index 0000000..144cdf8
Binary files /dev/null and b/GroupLine.App/ReportFile/KPSpotWeldMachTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/KPStaticDiskMachTemplate.xlsx b/GroupLine.App/ReportFile/KPStaticDiskMachTemplate.xlsx
new file mode 100644
index 0000000..6c3b1f8
Binary files /dev/null and b/GroupLine.App/ReportFile/KPStaticDiskMachTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/KPUpBurnEbTemplate.xlsx b/GroupLine.App/ReportFile/KPUpBurnEbTemplate.xlsx
new file mode 100644
index 0000000..19586b8
Binary files /dev/null and b/GroupLine.App/ReportFile/KPUpBurnEbTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/MagTorqueTemplate.xlsx b/GroupLine.App/ReportFile/MagTorqueTemplate.xlsx
new file mode 100644
index 0000000..a19e822
Binary files /dev/null and b/GroupLine.App/ReportFile/MagTorqueTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/OilPumpInstallTemplate.xlsx b/GroupLine.App/ReportFile/OilPumpInstallTemplate.xlsx
new file mode 100644
index 0000000..5fba13d
Binary files /dev/null and b/GroupLine.App/ReportFile/OilPumpInstallTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/OverflowLeakMesTemplate.xlsx b/GroupLine.App/ReportFile/OverflowLeakMesTemplate.xlsx
new file mode 100644
index 0000000..102dce5
Binary files /dev/null and b/GroupLine.App/ReportFile/OverflowLeakMesTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/PCoreMesTemplate.xlsx b/GroupLine.App/ReportFile/PCoreMesTemplate.xlsx
new file mode 100644
index 0000000..d4ddc4b
Binary files /dev/null and b/GroupLine.App/ReportFile/PCoreMesTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/PLowWeldTemplate.xlsx b/GroupLine.App/ReportFile/PLowWeldTemplate.xlsx
new file mode 100644
index 0000000..8c057d6
Binary files /dev/null and b/GroupLine.App/ReportFile/PLowWeldTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/PRacktPressTemplate.xlsx b/GroupLine.App/ReportFile/PRacktPressTemplate.xlsx
new file mode 100644
index 0000000..fe23b0e
Binary files /dev/null and b/GroupLine.App/ReportFile/PRacktPressTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/PRacktWeldTemplate.xlsx b/GroupLine.App/ReportFile/PRacktWeldTemplate.xlsx
new file mode 100644
index 0000000..c31f2a2
Binary files /dev/null and b/GroupLine.App/ReportFile/PRacktWeldTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/PlaquePrintTemplate.xlsx b/GroupLine.App/ReportFile/PlaquePrintTemplate.xlsx
new file mode 100644
index 0000000..7cf419f
Binary files /dev/null and b/GroupLine.App/ReportFile/PlaquePrintTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/StaticDiscPressTemplate.xlsx b/GroupLine.App/ReportFile/StaticDiscPressTemplate.xlsx
new file mode 100644
index 0000000..81caac5
Binary files /dev/null and b/GroupLine.App/ReportFile/StaticDiscPressTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/TermWeldTemplate.xlsx b/GroupLine.App/ReportFile/TermWeldTemplate.xlsx
new file mode 100644
index 0000000..46b152a
Binary files /dev/null and b/GroupLine.App/ReportFile/TermWeldTemplate.xlsx differ
diff --git a/GroupLine.App/View/AppearanceTest/AppearanceTestIndex.xaml b/GroupLine.App/View/AppearanceTest/AppearanceTestIndex.xaml
new file mode 100644
index 0000000..c15921e
--- /dev/null
+++ b/GroupLine.App/View/AppearanceTest/AppearanceTestIndex.xaml
@@ -0,0 +1,214 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/AppearanceTest/AppearanceTestIndex.xaml.cs b/GroupLine.App/View/AppearanceTest/AppearanceTestIndex.xaml.cs
new file mode 100644
index 0000000..a11c103
--- /dev/null
+++ b/GroupLine.App/View/AppearanceTest/AppearanceTestIndex.xaml.cs
@@ -0,0 +1,15 @@
+using System.Windows.Controls;
+
+namespace GroupLine.App.View.AppearanceTest
+{
+ ///
+ /// AppearanceTestIndex.xaml 的交互逻辑
+ ///
+ public partial class AppearanceTestIndex : UserControl
+ {
+ public AppearanceTestIndex()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/BurPlugInstall/BurPlugInstallView.xaml b/GroupLine.App/View/BurPlugInstall/BurPlugInstallView.xaml
new file mode 100644
index 0000000..a332f4c
--- /dev/null
+++ b/GroupLine.App/View/BurPlugInstall/BurPlugInstallView.xaml
@@ -0,0 +1,154 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/BurPlugInstall/BurPlugInstallView.xaml.cs b/GroupLine.App/View/BurPlugInstall/BurPlugInstallView.xaml.cs
new file mode 100644
index 0000000..f1799f2
--- /dev/null
+++ b/GroupLine.App/View/BurPlugInstall/BurPlugInstallView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.BurPlugInstall
+{
+ ///
+ /// BurPlugInstallView.xaml 的交互逻辑
+ ///
+ public partial class BurPlugInstallView : UserControl
+ {
+ public BurPlugInstallView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/CylinderEngrav/CylinderEngravView.xaml b/GroupLine.App/View/CylinderEngrav/CylinderEngravView.xaml
new file mode 100644
index 0000000..c78273c
--- /dev/null
+++ b/GroupLine.App/View/CylinderEngrav/CylinderEngravView.xaml
@@ -0,0 +1,142 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/CylinderEngrav/CylinderEngravView.xaml.cs b/GroupLine.App/View/CylinderEngrav/CylinderEngravView.xaml.cs
new file mode 100644
index 0000000..256264a
--- /dev/null
+++ b/GroupLine.App/View/CylinderEngrav/CylinderEngravView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.CylinderEngrav
+{
+ ///
+ /// CylinderEngravView.xaml 的交互逻辑
+ ///
+ public partial class CylinderEngravView : UserControl
+ {
+ public CylinderEngravView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/DbDataClear/DbDataClearView.xaml b/GroupLine.App/View/DbDataClear/DbDataClearView.xaml
new file mode 100644
index 0000000..58145af
--- /dev/null
+++ b/GroupLine.App/View/DbDataClear/DbDataClearView.xaml
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/DbDataClear/DbDataClearView.xaml.cs b/GroupLine.App/View/DbDataClear/DbDataClearView.xaml.cs
new file mode 100644
index 0000000..c338b62
--- /dev/null
+++ b/GroupLine.App/View/DbDataClear/DbDataClearView.xaml.cs
@@ -0,0 +1,28 @@
+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 YC5.App.View.DbDataClear
+{
+ ///
+ /// DbDataClearView.xaml 的交互逻辑
+ ///
+ public partial class DbDataClearView : UserControl
+ {
+ public DbDataClearView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/ExhInstallMes/ExhInstallMesView.xaml b/GroupLine.App/View/ExhInstallMes/ExhInstallMesView.xaml
new file mode 100644
index 0000000..dd60dc9
--- /dev/null
+++ b/GroupLine.App/View/ExhInstallMes/ExhInstallMesView.xaml
@@ -0,0 +1,287 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/ExhInstallMes/ExhInstallMesView.xaml.cs b/GroupLine.App/View/ExhInstallMes/ExhInstallMesView.xaml.cs
new file mode 100644
index 0000000..11aac6a
--- /dev/null
+++ b/GroupLine.App/View/ExhInstallMes/ExhInstallMesView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.ExhInstallMes
+{
+ ///
+ /// ExhInstallMesView.xaml 的交互逻辑
+ ///
+ public partial class ExhInstallMesView : UserControl
+ {
+ public ExhInstallMesView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/GCDTransplant/GCDTransplantView.xaml b/GroupLine.App/View/GCDTransplant/GCDTransplantView.xaml
new file mode 100644
index 0000000..b0aa424
--- /dev/null
+++ b/GroupLine.App/View/GCDTransplant/GCDTransplantView.xaml
@@ -0,0 +1,137 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/GCDTransplant/GCDTransplantView.xaml.cs b/GroupLine.App/View/GCDTransplant/GCDTransplantView.xaml.cs
new file mode 100644
index 0000000..2b08303
--- /dev/null
+++ b/GroupLine.App/View/GCDTransplant/GCDTransplantView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.GCDTransplant
+{
+ ///
+ /// GCDTransplantView.xaml 的交互逻辑
+ ///
+ public partial class GCDTransplantView : UserControl
+ {
+ public GCDTransplantView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/GCylinderBurnEb/GCylinderBurnEbView.xaml b/GroupLine.App/View/GCylinderBurnEb/GCylinderBurnEbView.xaml
new file mode 100644
index 0000000..7e0f9bd
--- /dev/null
+++ b/GroupLine.App/View/GCylinderBurnEb/GCylinderBurnEbView.xaml
@@ -0,0 +1,157 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/GCylinderBurnEb/GCylinderBurnEbView.xaml.cs b/GroupLine.App/View/GCylinderBurnEb/GCylinderBurnEbView.xaml.cs
new file mode 100644
index 0000000..1687f28
--- /dev/null
+++ b/GroupLine.App/View/GCylinderBurnEb/GCylinderBurnEbView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.GCylinderBurnEb
+{
+ ///
+ /// GCylinderBurnEbView.xaml 的交互逻辑
+ ///
+ public partial class GCylinderBurnEbView : UserControl
+ {
+ public GCylinderBurnEbView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/GDynStaticMach/GDynStaticMachView.xaml b/GroupLine.App/View/GDynStaticMach/GDynStaticMachView.xaml
new file mode 100644
index 0000000..21b0c13
--- /dev/null
+++ b/GroupLine.App/View/GDynStaticMach/GDynStaticMachView.xaml
@@ -0,0 +1,167 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/GDynStaticMach/GDynStaticMachView.xaml.cs b/GroupLine.App/View/GDynStaticMach/GDynStaticMachView.xaml.cs
new file mode 100644
index 0000000..563425e
--- /dev/null
+++ b/GroupLine.App/View/GDynStaticMach/GDynStaticMachView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.GDynStaticMach
+{
+ ///
+ /// GDynStaticMachView.xaml 的交互逻辑
+ ///
+ public partial class GDynStaticMachView : UserControl
+ {
+ public GDynStaticMachView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/GInsRotaRes/GInsRotaResView.xaml b/GroupLine.App/View/GInsRotaRes/GInsRotaResView.xaml
new file mode 100644
index 0000000..fcd57a2
--- /dev/null
+++ b/GroupLine.App/View/GInsRotaRes/GInsRotaResView.xaml
@@ -0,0 +1,171 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/GInsRotaRes/GInsRotaResView.xaml.cs b/GroupLine.App/View/GInsRotaRes/GInsRotaResView.xaml.cs
new file mode 100644
index 0000000..0553a54
--- /dev/null
+++ b/GroupLine.App/View/GInsRotaRes/GInsRotaResView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.GInsRotaRes
+{
+ ///
+ /// GInsRotaResView.xaml 的交互逻辑
+ ///
+ public partial class GInsRotaResView : UserControl
+ {
+ public GInsRotaResView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/GLeakCheck/GLeakCheckView.xaml b/GroupLine.App/View/GLeakCheck/GLeakCheckView.xaml
new file mode 100644
index 0000000..f24da6e
--- /dev/null
+++ b/GroupLine.App/View/GLeakCheck/GLeakCheckView.xaml
@@ -0,0 +1,157 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/GLeakCheck/GLeakCheckView.xaml.cs b/GroupLine.App/View/GLeakCheck/GLeakCheckView.xaml.cs
new file mode 100644
index 0000000..fee3410
--- /dev/null
+++ b/GroupLine.App/View/GLeakCheck/GLeakCheckView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.GLeakCheck
+{
+ ///
+ /// GLeakCheckView.xaml 的交互逻辑
+ ///
+ public partial class GLeakCheckView : UserControl
+ {
+ public GLeakCheckView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/GLowVolStart/GLowVolStartView.xaml b/GroupLine.App/View/GLowVolStart/GLowVolStartView.xaml
new file mode 100644
index 0000000..b2bc635
--- /dev/null
+++ b/GroupLine.App/View/GLowVolStart/GLowVolStartView.xaml
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/GLowVolStart/GLowVolStartView.xaml.cs b/GroupLine.App/View/GLowVolStart/GLowVolStartView.xaml.cs
new file mode 100644
index 0000000..96236c5
--- /dev/null
+++ b/GroupLine.App/View/GLowVolStart/GLowVolStartView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.GLowVolStart
+{
+ ///
+ /// GLowVolStartView.xaml 的交互逻辑
+ ///
+ public partial class GLowVolStartView : UserControl
+ {
+ public GLowVolStartView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/GMagTorque/GMagTorqueView.xaml b/GroupLine.App/View/GMagTorque/GMagTorqueView.xaml
new file mode 100644
index 0000000..02ca73f
--- /dev/null
+++ b/GroupLine.App/View/GMagTorque/GMagTorqueView.xaml
@@ -0,0 +1,152 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/GMagTorque/GMagTorqueView.xaml.cs b/GroupLine.App/View/GMagTorque/GMagTorqueView.xaml.cs
new file mode 100644
index 0000000..1e899b2
--- /dev/null
+++ b/GroupLine.App/View/GMagTorque/GMagTorqueView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.GMagTorque
+{
+ ///
+ /// GMagTorqueView.xaml 的交互逻辑
+ ///
+ public partial class GMagTorqueView : UserControl
+ {
+ public GMagTorqueView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/GOilPumpInstall/GOilPumpInstallView.xaml b/GroupLine.App/View/GOilPumpInstall/GOilPumpInstallView.xaml
new file mode 100644
index 0000000..6874847
--- /dev/null
+++ b/GroupLine.App/View/GOilPumpInstall/GOilPumpInstallView.xaml
@@ -0,0 +1,167 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/GOilPumpInstall/GOilPumpInstallView.xaml.cs b/GroupLine.App/View/GOilPumpInstall/GOilPumpInstallView.xaml.cs
new file mode 100644
index 0000000..b19d5d6
--- /dev/null
+++ b/GroupLine.App/View/GOilPumpInstall/GOilPumpInstallView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.GOilPumpInstall
+{
+ ///
+ /// GOilPumpInstallView.xaml 的交互逻辑
+ ///
+ public partial class GOilPumpInstallView : UserControl
+ {
+ public GOilPumpInstallView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/GRingWeldMach/GRingWeldMachView.xaml b/GroupLine.App/View/GRingWeldMach/GRingWeldMachView.xaml
new file mode 100644
index 0000000..2391368
--- /dev/null
+++ b/GroupLine.App/View/GRingWeldMach/GRingWeldMachView.xaml
@@ -0,0 +1,187 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/GRingWeldMach/GRingWeldMachView.xaml.cs b/GroupLine.App/View/GRingWeldMach/GRingWeldMachView.xaml.cs
new file mode 100644
index 0000000..1192fa8
--- /dev/null
+++ b/GroupLine.App/View/GRingWeldMach/GRingWeldMachView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.GRingWeldMach
+{
+ ///
+ /// GRingWeldMachView.xaml 的交互逻辑
+ ///
+ public partial class GRingWeldMachView : UserControl
+ {
+ public GRingWeldMachView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/GRotorBurnEb/GRotorBurnEbView.xaml b/GroupLine.App/View/GRotorBurnEb/GRotorBurnEbView.xaml
new file mode 100644
index 0000000..3748b24
--- /dev/null
+++ b/GroupLine.App/View/GRotorBurnEb/GRotorBurnEbView.xaml
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/GRotorBurnEb/GRotorBurnEbView.xaml.cs b/GroupLine.App/View/GRotorBurnEb/GRotorBurnEbView.xaml.cs
new file mode 100644
index 0000000..a93d3ae
--- /dev/null
+++ b/GroupLine.App/View/GRotorBurnEb/GRotorBurnEbView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.GRotorBurnEb
+{
+ ///
+ /// GRotorBurnEbView.xaml 的交互逻辑
+ ///
+ public partial class GRotorBurnEbView : UserControl
+ {
+ public GRotorBurnEbView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/GRotorMag/GRotorMagView.xaml b/GroupLine.App/View/GRotorMag/GRotorMagView.xaml
new file mode 100644
index 0000000..1243965
--- /dev/null
+++ b/GroupLine.App/View/GRotorMag/GRotorMagView.xaml
@@ -0,0 +1,163 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/GRotorMag/GRotorMagView.xaml.cs b/GroupLine.App/View/GRotorMag/GRotorMagView.xaml.cs
new file mode 100644
index 0000000..43646b3
--- /dev/null
+++ b/GroupLine.App/View/GRotorMag/GRotorMagView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.GRotorMag
+{
+ ///
+ /// GRotorMagView.xaml 的交互逻辑
+ ///
+ public partial class GRotorMagView : UserControl
+ {
+ public GRotorMagView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/GShrinkTub/GShrinkTubView.xaml b/GroupLine.App/View/GShrinkTub/GShrinkTubView.xaml
new file mode 100644
index 0000000..76b49ab
--- /dev/null
+++ b/GroupLine.App/View/GShrinkTub/GShrinkTubView.xaml
@@ -0,0 +1,157 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/GShrinkTub/GShrinkTubView.xaml.cs b/GroupLine.App/View/GShrinkTub/GShrinkTubView.xaml.cs
new file mode 100644
index 0000000..4665586
--- /dev/null
+++ b/GroupLine.App/View/GShrinkTub/GShrinkTubView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.GShrinkTub
+{
+ ///
+ /// GShrinkTubView.xaml 的交互逻辑
+ ///
+ public partial class GShrinkTubView : UserControl
+ {
+ public GShrinkTubView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/GSpotWeldMach/GSpotWeldMachView.xaml b/GroupLine.App/View/GSpotWeldMach/GSpotWeldMachView.xaml
new file mode 100644
index 0000000..8032b47
--- /dev/null
+++ b/GroupLine.App/View/GSpotWeldMach/GSpotWeldMachView.xaml
@@ -0,0 +1,289 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/GSpotWeldMach/GSpotWeldMachView.xaml.cs b/GroupLine.App/View/GSpotWeldMach/GSpotWeldMachView.xaml.cs
new file mode 100644
index 0000000..e9d807f
--- /dev/null
+++ b/GroupLine.App/View/GSpotWeldMach/GSpotWeldMachView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.GSpotWeldMach
+{
+ ///
+ /// GSpotWeldMachView.xaml 的交互逻辑
+ ///
+ public partial class GSpotWeldMachView : UserControl
+ {
+ public GSpotWeldMachView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/GStaticDiskMach/GStaticDiskMachView.xaml b/GroupLine.App/View/GStaticDiskMach/GStaticDiskMachView.xaml
new file mode 100644
index 0000000..2216d0e
--- /dev/null
+++ b/GroupLine.App/View/GStaticDiskMach/GStaticDiskMachView.xaml
@@ -0,0 +1,295 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/GStaticDiskMach/GStaticDiskMachView.xaml.cs b/GroupLine.App/View/GStaticDiskMach/GStaticDiskMachView.xaml.cs
new file mode 100644
index 0000000..3914c54
--- /dev/null
+++ b/GroupLine.App/View/GStaticDiskMach/GStaticDiskMachView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.GStaticDiskMach
+{
+ ///
+ /// GStaticDiskMachView.xaml 的交互逻辑
+ ///
+ public partial class GStaticDiskMachView : UserControl
+ {
+ public GStaticDiskMachView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/KPCDTransplant/KPCDTransplantView.xaml b/GroupLine.App/View/KPCDTransplant/KPCDTransplantView.xaml
new file mode 100644
index 0000000..2935385
--- /dev/null
+++ b/GroupLine.App/View/KPCDTransplant/KPCDTransplantView.xaml
@@ -0,0 +1,137 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/KPCDTransplant/KPCDTransplantView.xaml.cs b/GroupLine.App/View/KPCDTransplant/KPCDTransplantView.xaml.cs
new file mode 100644
index 0000000..a9aa4eb
--- /dev/null
+++ b/GroupLine.App/View/KPCDTransplant/KPCDTransplantView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.KPCDTransplant
+{
+ ///
+ /// KPCDTransplantView.xaml 的交互逻辑
+ ///
+ public partial class KPCDTransplantView : UserControl
+ {
+ public KPCDTransplantView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/KPDynStaticMach/KPDynStaticMachView.xaml b/GroupLine.App/View/KPDynStaticMach/KPDynStaticMachView.xaml
new file mode 100644
index 0000000..80f8bc4
--- /dev/null
+++ b/GroupLine.App/View/KPDynStaticMach/KPDynStaticMachView.xaml
@@ -0,0 +1,189 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/KPDynStaticMach/KPDynStaticMachView.xaml.cs b/GroupLine.App/View/KPDynStaticMach/KPDynStaticMachView.xaml.cs
new file mode 100644
index 0000000..5a2acf8
--- /dev/null
+++ b/GroupLine.App/View/KPDynStaticMach/KPDynStaticMachView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.KPDynStaticMach
+{
+ ///
+ /// KPDynStaticMachView.xaml 的交互逻辑
+ ///
+ public partial class KPDynStaticMachView : UserControl
+ {
+ public KPDynStaticMachView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/KPLeakCheck/KPLeakCheckView.xaml b/GroupLine.App/View/KPLeakCheck/KPLeakCheckView.xaml
new file mode 100644
index 0000000..319bd20
--- /dev/null
+++ b/GroupLine.App/View/KPLeakCheck/KPLeakCheckView.xaml
@@ -0,0 +1,157 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/KPLeakCheck/KPLeakCheckView.xaml.cs b/GroupLine.App/View/KPLeakCheck/KPLeakCheckView.xaml.cs
new file mode 100644
index 0000000..45a4729
--- /dev/null
+++ b/GroupLine.App/View/KPLeakCheck/KPLeakCheckView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.KPLeakCheck
+{
+ ///
+ /// KPLeakCheckView.xaml 的交互逻辑
+ ///
+ public partial class KPLeakCheckView : UserControl
+ {
+ public KPLeakCheckView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/KPLowVolStart/KPLowVolStartView.xaml b/GroupLine.App/View/KPLowVolStart/KPLowVolStartView.xaml
new file mode 100644
index 0000000..e9df28e
--- /dev/null
+++ b/GroupLine.App/View/KPLowVolStart/KPLowVolStartView.xaml
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/KPLowVolStart/KPLowVolStartView.xaml.cs b/GroupLine.App/View/KPLowVolStart/KPLowVolStartView.xaml.cs
new file mode 100644
index 0000000..4b19e04
--- /dev/null
+++ b/GroupLine.App/View/KPLowVolStart/KPLowVolStartView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.KPLowVolStart
+{
+ ///
+ /// KPLowVolStartView.xaml 的交互逻辑
+ ///
+ public partial class KPLowVolStartView : UserControl
+ {
+ public KPLowVolStartView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/KPMagTorque/KPMagTorqueView.xaml b/GroupLine.App/View/KPMagTorque/KPMagTorqueView.xaml
new file mode 100644
index 0000000..013e617
--- /dev/null
+++ b/GroupLine.App/View/KPMagTorque/KPMagTorqueView.xaml
@@ -0,0 +1,152 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/KPMagTorque/KPMagTorqueView.xaml.cs b/GroupLine.App/View/KPMagTorque/KPMagTorqueView.xaml.cs
new file mode 100644
index 0000000..c6d5f0a
--- /dev/null
+++ b/GroupLine.App/View/KPMagTorque/KPMagTorqueView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.KPMagTorque
+{
+ ///
+ /// KPMagTorqueView.xaml 的交互逻辑
+ ///
+ public partial class KPMagTorqueView : UserControl
+ {
+ public KPMagTorqueView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/KPOilPumpInstall/KPOilPumpInstallView.xaml b/GroupLine.App/View/KPOilPumpInstall/KPOilPumpInstallView.xaml
new file mode 100644
index 0000000..b6e8be1
--- /dev/null
+++ b/GroupLine.App/View/KPOilPumpInstall/KPOilPumpInstallView.xaml
@@ -0,0 +1,167 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/KPOilPumpInstall/KPOilPumpInstallView.xaml.cs b/GroupLine.App/View/KPOilPumpInstall/KPOilPumpInstallView.xaml.cs
new file mode 100644
index 0000000..ddc76d8
--- /dev/null
+++ b/GroupLine.App/View/KPOilPumpInstall/KPOilPumpInstallView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.KPOilPumpInstall
+{
+ ///
+ /// KPOilPumpInstallView.xaml 的交互逻辑
+ ///
+ public partial class KPOilPumpInstallView : UserControl
+ {
+ public KPOilPumpInstallView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/KPRingWeldMach/KPRingWeldMachView.xaml b/GroupLine.App/View/KPRingWeldMach/KPRingWeldMachView.xaml
new file mode 100644
index 0000000..35a2d5d
--- /dev/null
+++ b/GroupLine.App/View/KPRingWeldMach/KPRingWeldMachView.xaml
@@ -0,0 +1,187 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/KPRingWeldMach/KPRingWeldMachView.xaml.cs b/GroupLine.App/View/KPRingWeldMach/KPRingWeldMachView.xaml.cs
new file mode 100644
index 0000000..c29c717
--- /dev/null
+++ b/GroupLine.App/View/KPRingWeldMach/KPRingWeldMachView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.KPRingWeldMach
+{
+ ///
+ /// KPRingWeldMachView.xaml 的交互逻辑
+ ///
+ public partial class KPRingWeldMachView : UserControl
+ {
+ public KPRingWeldMachView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/KPRingWeldMachDw/KPRingWeldMachDwView.xaml b/GroupLine.App/View/KPRingWeldMachDw/KPRingWeldMachDwView.xaml
new file mode 100644
index 0000000..631b423
--- /dev/null
+++ b/GroupLine.App/View/KPRingWeldMachDw/KPRingWeldMachDwView.xaml
@@ -0,0 +1,187 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/KPRingWeldMachDw/KPRingWeldMachDwView.xaml.cs b/GroupLine.App/View/KPRingWeldMachDw/KPRingWeldMachDwView.xaml.cs
new file mode 100644
index 0000000..cb92276
--- /dev/null
+++ b/GroupLine.App/View/KPRingWeldMachDw/KPRingWeldMachDwView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.KPRingWeldMachDw
+{
+ ///
+ /// KPRingWeldMachDwView.xaml 的交互逻辑
+ ///
+ public partial class KPRingWeldMachDwView : UserControl
+ {
+ public KPRingWeldMachDwView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/KPRingWeldMachUp/KPRingWeldMachUpView.xaml b/GroupLine.App/View/KPRingWeldMachUp/KPRingWeldMachUpView.xaml
new file mode 100644
index 0000000..1b62cde
--- /dev/null
+++ b/GroupLine.App/View/KPRingWeldMachUp/KPRingWeldMachUpView.xaml
@@ -0,0 +1,187 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/KPRingWeldMachUp/KPRingWeldMachUpView.xaml.cs b/GroupLine.App/View/KPRingWeldMachUp/KPRingWeldMachUpView.xaml.cs
new file mode 100644
index 0000000..29bb6ad
--- /dev/null
+++ b/GroupLine.App/View/KPRingWeldMachUp/KPRingWeldMachUpView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.KPRingWeldMachUp
+{
+ ///
+ /// KPRingWeldMachUpView.xaml 的交互逻辑
+ ///
+ public partial class KPRingWeldMachUpView : UserControl
+ {
+ public KPRingWeldMachUpView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/KPSealInstall/KPSealInstallView.xaml b/GroupLine.App/View/KPSealInstall/KPSealInstallView.xaml
new file mode 100644
index 0000000..78761b6
--- /dev/null
+++ b/GroupLine.App/View/KPSealInstall/KPSealInstallView.xaml
@@ -0,0 +1,299 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/KPSealInstall/KPSealInstallView.xaml.cs b/GroupLine.App/View/KPSealInstall/KPSealInstallView.xaml.cs
new file mode 100644
index 0000000..c416930
--- /dev/null
+++ b/GroupLine.App/View/KPSealInstall/KPSealInstallView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.KPSealInstall
+{
+ ///
+ /// KPSealInstallView.xaml 的交互逻辑
+ ///
+ public partial class KPSealInstallView : UserControl
+ {
+ public KPSealInstallView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/KPShrinkTub/KPShrinkTubView.xaml b/GroupLine.App/View/KPShrinkTub/KPShrinkTubView.xaml
new file mode 100644
index 0000000..7e9cbeb
--- /dev/null
+++ b/GroupLine.App/View/KPShrinkTub/KPShrinkTubView.xaml
@@ -0,0 +1,157 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/KPShrinkTub/KPShrinkTubView.xaml.cs b/GroupLine.App/View/KPShrinkTub/KPShrinkTubView.xaml.cs
new file mode 100644
index 0000000..4ccd84a
--- /dev/null
+++ b/GroupLine.App/View/KPShrinkTub/KPShrinkTubView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.KPShrinkTub
+{
+ ///
+ /// KPShrinkTubView.xaml 的交互逻辑
+ ///
+ public partial class KPShrinkTubView : UserControl
+ {
+ public KPShrinkTubView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/KPSpotWeldMach/KPSpotWeldMachView.xaml b/GroupLine.App/View/KPSpotWeldMach/KPSpotWeldMachView.xaml
new file mode 100644
index 0000000..24846cb
--- /dev/null
+++ b/GroupLine.App/View/KPSpotWeldMach/KPSpotWeldMachView.xaml
@@ -0,0 +1,237 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/KPSpotWeldMach/KPSpotWeldMachView.xaml.cs b/GroupLine.App/View/KPSpotWeldMach/KPSpotWeldMachView.xaml.cs
new file mode 100644
index 0000000..a536b69
--- /dev/null
+++ b/GroupLine.App/View/KPSpotWeldMach/KPSpotWeldMachView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.KPSpotWeldMach
+{
+ ///
+ /// KPSpotWeldMachView.xaml 的交互逻辑
+ ///
+ public partial class KPSpotWeldMachView : UserControl
+ {
+ public KPSpotWeldMachView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/KPStaticDiskMach/KPStaticDiskMachView.xaml b/GroupLine.App/View/KPStaticDiskMach/KPStaticDiskMachView.xaml
new file mode 100644
index 0000000..014e945
--- /dev/null
+++ b/GroupLine.App/View/KPStaticDiskMach/KPStaticDiskMachView.xaml
@@ -0,0 +1,295 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/KPStaticDiskMach/KPStaticDiskMachView.xaml.cs b/GroupLine.App/View/KPStaticDiskMach/KPStaticDiskMachView.xaml.cs
new file mode 100644
index 0000000..881b657
--- /dev/null
+++ b/GroupLine.App/View/KPStaticDiskMach/KPStaticDiskMachView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.KPStaticDiskMach
+{
+ ///
+ /// KPStaticDiskMachView.xaml 的交互逻辑
+ ///
+ public partial class KPStaticDiskMachView : UserControl
+ {
+ public KPStaticDiskMachView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/KPUpBurnEb/KPUpBurnEbView.xaml b/GroupLine.App/View/KPUpBurnEb/KPUpBurnEbView.xaml
new file mode 100644
index 0000000..9bdc8b1
--- /dev/null
+++ b/GroupLine.App/View/KPUpBurnEb/KPUpBurnEbView.xaml
@@ -0,0 +1,152 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/KPUpBurnEb/KPUpBurnEbView.xaml.cs b/GroupLine.App/View/KPUpBurnEb/KPUpBurnEbView.xaml.cs
new file mode 100644
index 0000000..6c605e1
--- /dev/null
+++ b/GroupLine.App/View/KPUpBurnEb/KPUpBurnEbView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.KPUpBurnEb
+{
+ ///
+ /// KPUpBurnEbView.xaml 的交互逻辑
+ ///
+ public partial class KPUpBurnEbView : UserControl
+ {
+ public KPUpBurnEbView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/KanBan/KanBanIndex.xaml b/GroupLine.App/View/KanBan/KanBanIndex.xaml
new file mode 100644
index 0000000..a8e06e4
--- /dev/null
+++ b/GroupLine.App/View/KanBan/KanBanIndex.xaml
@@ -0,0 +1,300 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/KanBan/KanBanIndex.xaml.cs b/GroupLine.App/View/KanBan/KanBanIndex.xaml.cs
new file mode 100644
index 0000000..01ac4e0
--- /dev/null
+++ b/GroupLine.App/View/KanBan/KanBanIndex.xaml.cs
@@ -0,0 +1,55 @@
+using GalaSoft.MvvmLight.Messaging;
+using System;
+using System.Windows.Controls;
+
+namespace GroupLine.App.View.KanBan
+{
+ ///
+ /// KanBanIndex.xaml 的交互逻辑
+ ///
+ public partial class KanBanIndex : UserControl
+ {
+ public KanBanIndex()
+ {
+ InitializeComponent();
+ //打开OpenUpdateWindow
+ Messenger.Default.Register(this, "Open_KanBan_WorkTimeCreate_CreateWindow", OpenCreateWindow);
+ Messenger.Default.Register(this, "Open_KanBan_WorkTimeUpdate_UpdateWindow", OpenUpdateWindow);
+
+ Messenger.Default.Register(this, "Open_KanBan_PlanCountCreate_CreateWindow", OpenPlanCountCreateWindow);
+ Messenger.Default.Register(this, "Open_KanBan_PlanCountUpdate_UpdateWindow", OpenPlanCountUpdateWindow);
+ }
+
+ private void OpenPlanCountUpdateWindow(string obj)
+ {
+ KanBan_PlanCountUpdate update = new KanBan_PlanCountUpdate();
+ update.ShowDialog();
+ }
+
+ private void OpenPlanCountCreateWindow(string obj)
+ {
+ KanBan_PlanCountCreate create = new KanBan_PlanCountCreate();
+ create.ShowDialog();
+ }
+
+ ///
+ /// 打开窗体
+ ///
+ ///
+ private void OpenCreateWindow(string obj)
+ {
+ KanBan_Create create = new KanBan_Create();
+ create.ShowDialog();
+ }
+
+ ///
+ /// 更新窗体
+ ///
+ ///
+ private void OpenUpdateWindow(string obj)
+ {
+ KanBan_Update update = new KanBan_Update();
+ update.ShowDialog();
+ }
+ }
+}
diff --git a/GroupLine.App/View/KanBan/KanBan_Create.xaml b/GroupLine.App/View/KanBan/KanBan_Create.xaml
new file mode 100644
index 0000000..6ba504e
--- /dev/null
+++ b/GroupLine.App/View/KanBan/KanBan_Create.xaml
@@ -0,0 +1,111 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/KanBan/KanBan_Create.xaml.cs b/GroupLine.App/View/KanBan/KanBan_Create.xaml.cs
new file mode 100644
index 0000000..e707231
--- /dev/null
+++ b/GroupLine.App/View/KanBan/KanBan_Create.xaml.cs
@@ -0,0 +1,28 @@
+using GalaSoft.MvvmLight.Messaging;
+using System;
+using System.Windows;
+
+namespace GroupLine.App.View.KanBan
+{
+ ///
+ /// KanBan_Create.xaml 的交互逻辑
+ ///
+ public partial class KanBan_Create : Window
+ {
+ public KanBan_Create()
+ {
+ InitializeComponent();
+ WindowStartupLocation = WindowStartupLocation.CenterScreen;
+ //InitializeComponent();
+
+ //消息标志token:ViewAlert,用于标识只阅读某个或者某些Sender发送的消息,并执行相应的处理,所以Sender那边的token要保持一致
+ //执行方法Action:ShowReceiveInfo,用来执行接收到消息后的后续工作,注意这边是支持泛型能力的,所以传递参数很方便。
+ Messenger.Default.Register(this, "CloseCurrentWindow", CloseCurrentWindow);
+ }
+
+ private void CloseCurrentWindow(string obj)
+ {
+ this.Close();
+ }
+ }
+}
diff --git a/GroupLine.App/View/KanBan/KanBan_PlanCountCreate.xaml b/GroupLine.App/View/KanBan/KanBan_PlanCountCreate.xaml
new file mode 100644
index 0000000..065f1eb
--- /dev/null
+++ b/GroupLine.App/View/KanBan/KanBan_PlanCountCreate.xaml
@@ -0,0 +1,126 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/KanBan/KanBan_PlanCountCreate.xaml.cs b/GroupLine.App/View/KanBan/KanBan_PlanCountCreate.xaml.cs
new file mode 100644
index 0000000..9a27955
--- /dev/null
+++ b/GroupLine.App/View/KanBan/KanBan_PlanCountCreate.xaml.cs
@@ -0,0 +1,27 @@
+using GalaSoft.MvvmLight.Messaging;
+using System;
+using System.Windows;
+
+namespace GroupLine.App.View.KanBan
+{
+ ///
+ /// KanBan_PlanCountCreate.xaml 的交互逻辑
+ ///
+ public partial class KanBan_PlanCountCreate : Window
+ {
+ public KanBan_PlanCountCreate()
+ {
+ InitializeComponent(); WindowStartupLocation = WindowStartupLocation.CenterScreen;
+ //InitializeComponent();
+
+ //消息标志token:ViewAlert,用于标识只阅读某个或者某些Sender发送的消息,并执行相应的处理,所以Sender那边的token要保持一致
+ //执行方法Action:ShowReceiveInfo,用来执行接收到消息后的后续工作,注意这边是支持泛型能力的,所以传递参数很方便。
+ Messenger.Default.Register(this, "CloseCurrentWindow", CloseCurrentWindow);
+ }
+
+ private void CloseCurrentWindow(string obj)
+ {
+ this.Close();
+ }
+ }
+}
diff --git a/GroupLine.App/View/KanBan/KanBan_PlanCountUpdate.xaml b/GroupLine.App/View/KanBan/KanBan_PlanCountUpdate.xaml
new file mode 100644
index 0000000..971868f
--- /dev/null
+++ b/GroupLine.App/View/KanBan/KanBan_PlanCountUpdate.xaml
@@ -0,0 +1,126 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/KanBan/KanBan_PlanCountUpdate.xaml.cs b/GroupLine.App/View/KanBan/KanBan_PlanCountUpdate.xaml.cs
new file mode 100644
index 0000000..b387ede
--- /dev/null
+++ b/GroupLine.App/View/KanBan/KanBan_PlanCountUpdate.xaml.cs
@@ -0,0 +1,28 @@
+using GalaSoft.MvvmLight.Messaging;
+using System;
+using System.Windows;
+
+namespace GroupLine.App.View.KanBan
+{
+ ///
+ /// KanBan_PlanCountUpdate.xaml 的交互逻辑
+ ///
+ public partial class KanBan_PlanCountUpdate : Window
+ {
+ public KanBan_PlanCountUpdate()
+ {
+ InitializeComponent();
+ WindowStartupLocation = WindowStartupLocation.CenterScreen;
+ //InitializeComponent();
+
+ //消息标志token:ViewAlert,用于标识只阅读某个或者某些Sender发送的消息,并执行相应的处理,所以Sender那边的token要保持一致
+ //执行方法Action:ShowReceiveInfo,用来执行接收到消息后的后续工作,注意这边是支持泛型能力的,所以传递参数很方便。
+ Messenger.Default.Register(this, "CloseCurrentWindow", CloseCurrentWindow);
+ }
+
+ private void CloseCurrentWindow(string obj)
+ {
+ this.Close();
+ }
+ }
+}
diff --git a/GroupLine.App/View/KanBan/KanBan_Update.xaml b/GroupLine.App/View/KanBan/KanBan_Update.xaml
new file mode 100644
index 0000000..6e4b869
--- /dev/null
+++ b/GroupLine.App/View/KanBan/KanBan_Update.xaml
@@ -0,0 +1,110 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/KanBan/KanBan_Update.xaml.cs b/GroupLine.App/View/KanBan/KanBan_Update.xaml.cs
new file mode 100644
index 0000000..fcfdbb3
--- /dev/null
+++ b/GroupLine.App/View/KanBan/KanBan_Update.xaml.cs
@@ -0,0 +1,28 @@
+using GalaSoft.MvvmLight.Messaging;
+using System;
+using System.Windows;
+
+namespace GroupLine.App.View.KanBan
+{
+ ///
+ /// KanBan_Update.xaml 的交互逻辑
+ ///
+ public partial class KanBan_Update : Window
+ {
+ public KanBan_Update()
+ {
+ InitializeComponent();
+ WindowStartupLocation = WindowStartupLocation.CenterScreen;
+ //InitializeComponent();
+
+ //消息标志token:ViewAlert,用于标识只阅读某个或者某些Sender发送的消息,并执行相应的处理,所以Sender那边的token要保持一致
+ //执行方法Action:ShowReceiveInfo,用来执行接收到消息后的后续工作,注意这边是支持泛型能力的,所以传递参数很方便。
+ Messenger.Default.Register(this, "CloseCurrentWindow", CloseCurrentWindow);
+ }
+
+ private void CloseCurrentWindow(string obj)
+ {
+ this.Close();
+ }
+ }
+}
diff --git a/GroupLine.App/View/MagTorque/MagTorqueView.xaml b/GroupLine.App/View/MagTorque/MagTorqueView.xaml
new file mode 100644
index 0000000..8187326
--- /dev/null
+++ b/GroupLine.App/View/MagTorque/MagTorqueView.xaml
@@ -0,0 +1,145 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/MagTorque/MagTorqueView.xaml.cs b/GroupLine.App/View/MagTorque/MagTorqueView.xaml.cs
new file mode 100644
index 0000000..cc1e94d
--- /dev/null
+++ b/GroupLine.App/View/MagTorque/MagTorqueView.xaml.cs
@@ -0,0 +1,15 @@
+using System.Windows.Controls;
+
+namespace GroupLine.App.View.MagTorque
+{
+ ///
+ /// MagTorqueView.xaml 的交互逻辑
+ ///
+ public partial class MagTorqueView : UserControl
+ {
+ public MagTorqueView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/MsgInput.xaml b/GroupLine.App/View/MsgInput.xaml
new file mode 100644
index 0000000..b48602a
--- /dev/null
+++ b/GroupLine.App/View/MsgInput.xaml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/MsgInput.xaml.cs b/GroupLine.App/View/MsgInput.xaml.cs
new file mode 100644
index 0000000..f665943
--- /dev/null
+++ b/GroupLine.App/View/MsgInput.xaml.cs
@@ -0,0 +1,40 @@
+using System;
+using System.Windows;
+
+namespace GroupLine.App.View
+{
+ ///
+ /// MsgInput.xaml 的交互逻辑
+ ///
+ public partial class MsgInput : Window
+ {
+ public MsgInput()
+ {
+ InitializeComponent();
+ }
+
+ public string InputValue
+ {
+ get
+ {
+ return Box.Text;
+ }
+ set
+ {
+ this.Box.Text = value;
+ }
+ }
+
+ public event EventHandler Accept;
+
+ private void ButtonCmd_Click(object sender, RoutedEventArgs e)
+ {
+ if (Accept != null)
+ {
+ Accept(this, EventArgs.Empty);
+ this.Close();
+ }
+ }
+
+ }
+}
diff --git a/GroupLine.App/View/OffsetConfig/OffsetConfigIndex.xaml b/GroupLine.App/View/OffsetConfig/OffsetConfigIndex.xaml
new file mode 100644
index 0000000..c3c450f
--- /dev/null
+++ b/GroupLine.App/View/OffsetConfig/OffsetConfigIndex.xaml
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/OffsetConfig/OffsetConfigIndex.xaml.cs b/GroupLine.App/View/OffsetConfig/OffsetConfigIndex.xaml.cs
new file mode 100644
index 0000000..8677e7d
--- /dev/null
+++ b/GroupLine.App/View/OffsetConfig/OffsetConfigIndex.xaml.cs
@@ -0,0 +1,15 @@
+using System.Windows.Controls;
+
+namespace GroupLine.App.View.OffsetConfig
+{
+ ///
+ /// OffsetConfigIndex.xaml 的交互逻辑
+ ///
+ public partial class OffsetConfigIndex : UserControl
+ {
+ public OffsetConfigIndex()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/OilPumpInstall/OilPumpInstallView.xaml b/GroupLine.App/View/OilPumpInstall/OilPumpInstallView.xaml
new file mode 100644
index 0000000..573fb82
--- /dev/null
+++ b/GroupLine.App/View/OilPumpInstall/OilPumpInstallView.xaml
@@ -0,0 +1,158 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/OilPumpInstall/OilPumpInstallView.xaml.cs b/GroupLine.App/View/OilPumpInstall/OilPumpInstallView.xaml.cs
new file mode 100644
index 0000000..f6120de
--- /dev/null
+++ b/GroupLine.App/View/OilPumpInstall/OilPumpInstallView.xaml.cs
@@ -0,0 +1,28 @@
+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 YC5.App.View.OilPumpInstall
+{
+ ///
+ /// OilPumpInstallView.xaml 的交互逻辑
+ ///
+ public partial class OilPumpInstallView : UserControl
+ {
+ public OilPumpInstallView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/OverflowLeakMes/OverflowLeakMesView.xaml b/GroupLine.App/View/OverflowLeakMes/OverflowLeakMesView.xaml
new file mode 100644
index 0000000..bf652f5
--- /dev/null
+++ b/GroupLine.App/View/OverflowLeakMes/OverflowLeakMesView.xaml
@@ -0,0 +1,204 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/OverflowLeakMes/OverflowLeakMesView.xaml.cs b/GroupLine.App/View/OverflowLeakMes/OverflowLeakMesView.xaml.cs
new file mode 100644
index 0000000..4ea9352
--- /dev/null
+++ b/GroupLine.App/View/OverflowLeakMes/OverflowLeakMesView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.OverflowLeakMes
+{
+ ///
+ /// OverflowLeakMesView.xaml 的交互逻辑
+ ///
+ public partial class OverflowLeakMesView : UserControl
+ {
+ public OverflowLeakMesView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/PCoreMes/PCoreMesView.xaml b/GroupLine.App/View/PCoreMes/PCoreMesView.xaml
new file mode 100644
index 0000000..407542c
--- /dev/null
+++ b/GroupLine.App/View/PCoreMes/PCoreMesView.xaml
@@ -0,0 +1,146 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/PCoreMes/PCoreMesView.xaml.cs b/GroupLine.App/View/PCoreMes/PCoreMesView.xaml.cs
new file mode 100644
index 0000000..0096289
--- /dev/null
+++ b/GroupLine.App/View/PCoreMes/PCoreMesView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.PCoreMes
+{
+ ///
+ /// PCoreMesView.xaml 的交互逻辑
+ ///
+ public partial class PCoreMesView : UserControl
+ {
+ public PCoreMesView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/PLowWeld/PLowWeldView.xaml b/GroupLine.App/View/PLowWeld/PLowWeldView.xaml
new file mode 100644
index 0000000..a754f87
--- /dev/null
+++ b/GroupLine.App/View/PLowWeld/PLowWeldView.xaml
@@ -0,0 +1,176 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/PLowWeld/PLowWeldView.xaml.cs b/GroupLine.App/View/PLowWeld/PLowWeldView.xaml.cs
new file mode 100644
index 0000000..89b1f57
--- /dev/null
+++ b/GroupLine.App/View/PLowWeld/PLowWeldView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.PLowWeld
+{
+ ///
+ /// PLowWeldView.xaml 的交互逻辑
+ ///
+ public partial class PLowWeldView : UserControl
+ {
+ public PLowWeldView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/PRacktPress/PRacktPressView.xaml b/GroupLine.App/View/PRacktPress/PRacktPressView.xaml
new file mode 100644
index 0000000..cd4b304
--- /dev/null
+++ b/GroupLine.App/View/PRacktPress/PRacktPressView.xaml
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/PRacktPress/PRacktPressView.xaml.cs b/GroupLine.App/View/PRacktPress/PRacktPressView.xaml.cs
new file mode 100644
index 0000000..975d7d0
--- /dev/null
+++ b/GroupLine.App/View/PRacktPress/PRacktPressView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.PRacktPress
+{
+ ///
+ /// PRacktPressView.xaml 的交互逻辑
+ ///
+ public partial class PRacktPressView : UserControl
+ {
+ public PRacktPressView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/PRacktWeld/PRacktWeldView.xaml b/GroupLine.App/View/PRacktWeld/PRacktWeldView.xaml
new file mode 100644
index 0000000..132075a
--- /dev/null
+++ b/GroupLine.App/View/PRacktWeld/PRacktWeldView.xaml
@@ -0,0 +1,146 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/PRacktWeld/PRacktWeldView.xaml.cs b/GroupLine.App/View/PRacktWeld/PRacktWeldView.xaml.cs
new file mode 100644
index 0000000..0bb1e7a
--- /dev/null
+++ b/GroupLine.App/View/PRacktWeld/PRacktWeldView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.PRacktWeld
+{
+ ///
+ /// PRacktWeldView.xaml 的交互逻辑
+ ///
+ public partial class PRacktWeldView : UserControl
+ {
+ public PRacktWeldView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/ReportTimeConfig/ReportTimeConfigIndex.xaml b/GroupLine.App/View/ReportTimeConfig/ReportTimeConfigIndex.xaml
new file mode 100644
index 0000000..dcf5ab2
--- /dev/null
+++ b/GroupLine.App/View/ReportTimeConfig/ReportTimeConfigIndex.xaml
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/ReportTimeConfig/ReportTimeConfigIndex.xaml.cs b/GroupLine.App/View/ReportTimeConfig/ReportTimeConfigIndex.xaml.cs
new file mode 100644
index 0000000..3a05511
--- /dev/null
+++ b/GroupLine.App/View/ReportTimeConfig/ReportTimeConfigIndex.xaml.cs
@@ -0,0 +1,15 @@
+using System.Windows.Controls;
+
+namespace GroupLine.App.View.ReportTimeConfig
+{
+ ///
+ /// ReportTimeConfigIndex.xaml 的交互逻辑
+ ///
+ public partial class ReportTimeConfigIndex : UserControl
+ {
+ public ReportTimeConfigIndex()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/StaticDiscPress/StaticDiscPressView.xaml b/GroupLine.App/View/StaticDiscPress/StaticDiscPressView.xaml
new file mode 100644
index 0000000..2d2c757
--- /dev/null
+++ b/GroupLine.App/View/StaticDiscPress/StaticDiscPressView.xaml
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/StaticDiscPress/StaticDiscPressView.xaml.cs b/GroupLine.App/View/StaticDiscPress/StaticDiscPressView.xaml.cs
new file mode 100644
index 0000000..6c87c6f
--- /dev/null
+++ b/GroupLine.App/View/StaticDiscPress/StaticDiscPressView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.StaticDiscPress
+{
+ ///
+ /// StaticDiscPressView.xaml 的交互逻辑
+ ///
+ public partial class StaticDiscPressView : UserControl
+ {
+ public StaticDiscPressView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/TermWeld/TermWeldView.xaml b/GroupLine.App/View/TermWeld/TermWeldView.xaml
new file mode 100644
index 0000000..69331c0
--- /dev/null
+++ b/GroupLine.App/View/TermWeld/TermWeldView.xaml
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/TermWeld/TermWeldView.xaml.cs b/GroupLine.App/View/TermWeld/TermWeldView.xaml.cs
new file mode 100644
index 0000000..7d27096
--- /dev/null
+++ b/GroupLine.App/View/TermWeld/TermWeldView.xaml.cs
@@ -0,0 +1,28 @@
+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 GroupLine.App.View.TermWeld
+{
+ ///
+ /// TermWeldView.xaml 的交互逻辑
+ ///
+ public partial class TermWeldView : UserControl
+ {
+ public TermWeldView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/UserControlMenuItem.xaml b/GroupLine.App/View/UserControlMenuItem.xaml
new file mode 100644
index 0000000..3879584
--- /dev/null
+++ b/GroupLine.App/View/UserControlMenuItem.xaml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/UserControlMenuItem.xaml.cs b/GroupLine.App/View/UserControlMenuItem.xaml.cs
new file mode 100644
index 0000000..b2bd16f
--- /dev/null
+++ b/GroupLine.App/View/UserControlMenuItem.xaml.cs
@@ -0,0 +1,30 @@
+using GroupLine.App.ViewModel;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace GroupLine.App.View
+{
+ ///
+ /// UserControlMenuItem.xaml 的交互逻辑
+ ///
+ public partial class UserControlMenuItem : UserControl
+ {
+ MainWindow _context;
+
+ public UserControlMenuItem(ItemMenu itemMenu, MainWindow context)
+ {
+ InitializeComponent();
+ _context = context;
+
+ ExpanderMenu.Visibility = itemMenu.SubItems == null ? Visibility.Collapsed : Visibility.Visible;
+ ListViewItemMenu.Visibility = itemMenu.SubItems == null ? Visibility.Visible : Visibility.Collapsed;
+
+ this.DataContext = itemMenu;
+ }
+ private void ListViewMenu_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ _context.SwitchScreen(((SubItem)((ListView)sender).SelectedItem).Screen);
+ //ListViewMenu.SelectedIndex = -1;
+ }
+ }
+}
diff --git a/GroupLine.App/ViewModel/AppearanceTestViewModel.cs b/GroupLine.App/ViewModel/AppearanceTestViewModel.cs
new file mode 100644
index 0000000..97b5350
--- /dev/null
+++ b/GroupLine.App/ViewModel/AppearanceTestViewModel.cs
@@ -0,0 +1,379 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.App.ModelDto;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+
+namespace GroupLine.App.ViewModel
+{
+ public class AppearanceTestViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "外观检查";
+
+ private string CurrentMachineNameTemplate = "AppearanceTestTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public AppearanceTestViewModel()
+ {
+ ListAppearanceTestDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(10).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListAppearanceTestDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListAppearanceTestDto
+ {
+ get { return _ListAppearanceTestDto; }
+ set { _ListAppearanceTestDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchPlaqueNo;
+
+ public string SearchPlaqueNo
+ {
+ get
+ {
+ return searchPlaqueNo;
+ }
+ set
+ {
+ searchPlaqueNo = value;
+ RaisePropertyChanged(() => SearchPlaqueNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchPlaqueNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.PlaqueNo.Contains(SearchPlaqueNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ ////多条件查询
+ //if (!string.IsNullOrEmpty(SearchEndDate))
+ //{
+ // MulConQueryable = MulConQueryable.Where(t => t.EndTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ //}
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListAppearanceTestDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListAppearanceTestDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListAppearanceTestDto != null && ListAppearanceTestDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListAppearanceTestDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].PlaqueNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].ProLineNo.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].MachineTypeCheck.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].PlaqueCheck.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].TerminalCheck.ToString());
+ row.CreateCell(5).SetCellValue(ListData[i].ElectricalBoxCheck.ToString());
+ row.CreateCell(6).SetCellValue(ListData[i].SealingPlugCheck.ToString());
+ row.CreateCell(7).SetCellValue(ListData[i].InOutTubeCheck.ToString());
+ row.CreateCell(8).SetCellValue(ListData[i].UpperCoverCheck.ToString());
+ row.CreateCell(9).SetCellValue(ListData[i].ReservoirCheck.ToString());
+ row.CreateCell(10).SetCellValue(ListData[i].HandTubeCheck.ToString());
+ row.CreateCell(11).SetCellValue(ListData[i].WeldCheck.ToString());
+ row.CreateCell(12).SetCellValue(ListData[i].PaintCheck.ToString());
+ row.CreateCell(13).SetCellValue(ListData[i].LiftLugCheck.ToString());
+ row.CreateCell(14).SetCellValue(ListData[i].GirthWeldCheck.ToString());
+ row.CreateCell(15).SetCellValue(ListData[i].WeldSlagCheck.ToString());
+ row.CreateCell(16).SetCellValue(ListData[i].FastenLeatherPadCheck.ToString());
+ row.CreateCell(17).SetCellValue(ListData[i].CylinderCheck.ToString());
+ row.CreateCell(18).SetCellValue(ListData[i].Result.ToString());
+ row.CreateCell(19).SetCellValue(ListData[i].OperationNo.ToString());
+ row.CreateCell(20).SetCellValue(ListData[i].CreateTime.ToString("yyyy - MM - dd HH: mm"));
+
+
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(20).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/BurPlugInstallViewModel.cs b/GroupLine.App/ViewModel/BurPlugInstallViewModel.cs
new file mode 100644
index 0000000..4ca36e1
--- /dev/null
+++ b/GroupLine.App/ViewModel/BurPlugInstallViewModel.cs
@@ -0,0 +1,362 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.App.ModelDto;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+
+namespace GroupLine.App.ViewModel
+{
+ public class BurPlugInstallViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "埋塞敲入螺旋钉安装";
+
+ private string CurrentMachineNameTemplate = "BurPlugInstallTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public BurPlugInstallViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ ////多条件查询
+ //if (!string.IsNullOrEmpty(SearchCylinderNo))
+ //{
+ // MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ //}
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].StaticDiskNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].OpNo.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].SpiralScrewCheck.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].StaDycDiskCheck.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].CoverPlugCheck.ToString());
+ row.CreateCell(5).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(5).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/CylinderEngravViewModel.cs b/GroupLine.App/ViewModel/CylinderEngravViewModel.cs
new file mode 100644
index 0000000..d4253b8
--- /dev/null
+++ b/GroupLine.App/ViewModel/CylinderEngravViewModel.cs
@@ -0,0 +1,359 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.App.ModelDto;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+
+namespace GroupLine.App.ViewModel
+{
+ public class CylinderEngravViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "筒体刻印机";
+
+ private string CurrentMachineNameTemplate = "CylinderEngravTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public CylinderEngravViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].OpNo.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(2).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/DbDataClearViewModel.cs b/GroupLine.App/ViewModel/DbDataClearViewModel.cs
new file mode 100644
index 0000000..32193b7
--- /dev/null
+++ b/GroupLine.App/ViewModel/DbDataClearViewModel.cs
@@ -0,0 +1,161 @@
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.App;
+using GroupLine.Com;
+using NLog;
+using NPOI.SS.Formula.Functions;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace YC5.App.ViewModel
+{
+ public class DbDataClearViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ ///
+ /// 设备集合
+ /// 供备份和删除使用
+ ///
+ private List ListMachine { get; set; }
+
+ public DbDataClearViewModel()
+ {
+ ActionCmdDate = DateTime.Now.AddMonths(-6).ToString();
+ ListMachine = new List()
+ {
+ "MagTorque",
+ "OilPumpInstall",
+ };
+ }
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string actionCmdDate;
+
+ public string ActionCmdDate
+ {
+ get
+ {
+ return actionCmdDate;
+ }
+ set
+ {
+ actionCmdDate = value;
+ RaisePropertyChanged(() => ActionCmdDate);
+ }
+ }
+
+
+ ///
+ /// 执行命令
+ ///
+ private RelayCommand actionCmd;
+ public RelayCommand ActionCmd
+ {
+ get
+ {
+ if (actionCmd == null) return new RelayCommand(() => Cmd());
+ return actionCmd;
+ }
+ set
+ {
+ actionCmd = value;
+ }
+ }
+
+ private void Cmd()
+ {
+ var Location = ConfigHelper.GetValue("Location");
+
+ var dataInfo = DateTime.Parse(ActionCmdDate);
+
+ DialogResult dialogResult = System.Windows.Forms.MessageBox.Show("你确定要删除数据吗?请谨慎确认时间,否则可能影响系统运行!!!将会花费一些时间", "删除数据", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
+ if (dialogResult == DialogResult.Cancel)
+ {
+ return;
+ }
+
+ _Logger.Info($"时间:{DateTime.Now.ToString()} -删除了数据,时间节点为:{dataInfo.ToString()}");
+
+ // 编写备份数据库的 T-SQL 语句
+ string sql = "BACKUP DATABASE YourDatabaseName TO DISK = 'C:\\Backup\\YourDatabaseName.bak'";
+
+ // 执行 SQL 语句
+ //fsql.Ado.ExecuteNonQuery(sql);
+
+
+ Task.Run(() =>
+ {
+ //BACKUP DATABASE[YourDatabase] TO DISK = N'YourDatabase_backup.bak';
+ FSqlContext.FDb.Ado.ExecuteNonQuery($"BACKUP DATABASE GroupLine TO DISK = N'GroupLine_backup_{DateTime.Now.ToString("yyyy-MM-dd")}.bak'");
+
+ foreach (var item in ListMachine)
+ {
+ // 字符串类型名称
+ string typeName = $"GroupLine.Model.{item}";
+
+ // 获取类型对象
+ Type type = Type.GetType(typeName);
+ if (type != null)
+ {
+ // 创建实例
+ object instance = Activator.CreateInstance(type);
+
+ // 将实例转换为相应类型
+ var typedInstance = Convert.ChangeType(instance, type);
+
+ // 现在你可以使用 typedInstance,它是具有你指定类型的实例
+ // 这里可以进行其他操作,如调用方法、设置属性等
+
+ //FSqlContext.FDb.Delete().Where(a => a.Crea <= dataInfo).ExecuteAffrows();
+ }
+
+ }
+
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+ //FSqlContext.FDb.Delete().Where(a => a.EndTime <= dataInfo).ExecuteAffrows();
+
+ System.Windows.Application.Current.Dispatcher.Invoke(() =>
+ {
+ System.Windows.MessageBox.Show("处理完成");
+ });
+ });
+
+ }
+ }
+}
diff --git a/GroupLine.App/ViewModel/ExhInstallMesViewModel.cs b/GroupLine.App/ViewModel/ExhInstallMesViewModel.cs
new file mode 100644
index 0000000..51075ea
--- /dev/null
+++ b/GroupLine.App/ViewModel/ExhInstallMesViewModel.cs
@@ -0,0 +1,388 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using GroupLine.App.ModelDto;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+
+namespace GroupLine.App.ViewModel
+{
+ public class ExhInstallMesViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "排气盖板安装气密检测";
+
+ private string CurrentMachineNameTemplate = "ExhInstallMesTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public ExhInstallMesViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].MachineCode.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].StaticDiskNo.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].DynaDiskNo.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].Cycle.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].ScrewCount.ToString());
+ row.CreateCell(5).SetCellValue(ListData[i].ExhausTorque.ToString());
+ row.CreateCell(6).SetCellValue(ListData[i].FinalAngle.ToString());
+ row.CreateCell(7).SetCellValue(ListData[i].ExhausTorque2.ToString());
+ row.CreateCell(8).SetCellValue(ListData[i].FinalAngle2.ToString());
+ row.CreateCell(9).SetCellValue(ListData[i].ExhausTorque3.ToString());
+ row.CreateCell(10).SetCellValue(ListData[i].FinalAngle3.ToString());
+ row.CreateCell(11).SetCellValue(ListData[i].ExhausTorque4.ToString());
+ row.CreateCell(12).SetCellValue(ListData[i].FinalAngle4.ToString());
+ row.CreateCell(13).SetCellValue(ListData[i].ExhausTorque5.ToString());
+ row.CreateCell(14).SetCellValue(ListData[i].FinalAngle5.ToString());
+ row.CreateCell(15).SetCellValue(ListData[i].ExhausTorque6.ToString());
+ row.CreateCell(16).SetCellValue(ListData[i].FinalAngle6.ToString());
+ row.CreateCell(17).SetCellValue(ListData[i].ExhausTorque7.ToString());
+ row.CreateCell(18).SetCellValue(ListData[i].FinalAngle7.ToString());
+ row.CreateCell(19).SetCellValue(ListData[i].ExhausTorque8.ToString());
+ row.CreateCell(20).SetCellValue(ListData[i].FinalAngle8.ToString());
+ row.CreateCell(21).SetCellValue(ListData[i].ExhausTorque9.ToString());
+ row.CreateCell(22).SetCellValue(ListData[i].FinalAngle9.ToString());
+ row.CreateCell(23).SetCellValue(ListData[i].ExhausTorque10.ToString());
+ row.CreateCell(24).SetCellValue(ListData[i].FinalAngle10.ToString());
+ row.CreateCell(25).SetCellValue(ListData[i].ExhausTorque11.ToString());
+ row.CreateCell(26).SetCellValue(ListData[i].FinalAngle11.ToString());
+ row.CreateCell(27).SetCellValue(ListData[i].ExhausTorque12.ToString());
+ row.CreateCell(28).SetCellValue(ListData[i].FinalAngle12.ToString());
+ row.CreateCell(29).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(30).SetCellValue(ListData[i].Result.ToString());
+ row.CreateCell(31).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(31).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/GCDTransplantViewModel.cs b/GroupLine.App/ViewModel/GCDTransplantViewModel.cs
new file mode 100644
index 0000000..71f72cb
--- /dev/null
+++ b/GroupLine.App/ViewModel/GCDTransplantViewModel.cs
@@ -0,0 +1,358 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+using GroupLine.App.ModelDto;
+
+namespace GroupLine.App.ViewModel
+{
+ public class GCDTransplantViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "G型C-D移栽";
+
+ private string CurrentMachineNameTemplate = "GCDTransplantTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public GCDTransplantViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(1).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/GCylinderBurnEbViewModel.cs b/GroupLine.App/ViewModel/GCylinderBurnEbViewModel.cs
new file mode 100644
index 0000000..768afdd
--- /dev/null
+++ b/GroupLine.App/ViewModel/GCylinderBurnEbViewModel.cs
@@ -0,0 +1,362 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+using GroupLine.App.ModelDto;
+
+namespace GroupLine.App.ViewModel
+{
+ public class GCylinderBurnEbViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "G型筒体烧嵌";
+
+ private string CurrentMachineNameTemplate = "GCylinderBurnEbTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public GCylinderBurnEbViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].StatoNo.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].ATrayNo.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].OpNo.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].CylinderTemp.ToString());
+ row.CreateCell(5).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(5).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/GDynStaticMachViewModel.cs b/GroupLine.App/ViewModel/GDynStaticMachViewModel.cs
new file mode 100644
index 0000000..00a5dcf
--- /dev/null
+++ b/GroupLine.App/ViewModel/GDynStaticMachViewModel.cs
@@ -0,0 +1,365 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+using GroupLine.App.ModelDto;
+
+namespace GroupLine.App.ViewModel
+{
+ public class GDynStaticMachViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "G型动静盘组装机";
+
+ private string CurrentMachineNameTemplate = "GDynStaticMachTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public GDynStaticMachViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ //var sql= MulConQueryable.ToSql();
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].DynaDiskNo.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].StaticDiskNo.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].EuropMacine.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].StaDskCastNo.ToString());
+ row.CreateCell(5).SetCellValue(ListData[i].OpNo.ToString());
+ //row.CreateCell(6).SetCellValue(ListData[i].Torque.ToString());
+ row.CreateCell(6).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(6).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/GInsRotaResViewModel.cs b/GroupLine.App/ViewModel/GInsRotaResViewModel.cs
new file mode 100644
index 0000000..25b43fd
--- /dev/null
+++ b/GroupLine.App/ViewModel/GInsRotaResViewModel.cs
@@ -0,0 +1,365 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+using GroupLine.App.ModelDto;
+
+namespace GroupLine.App.ViewModel
+{
+ public class GInsRotaResViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "G型绝缘、回转方向、电阻测量";
+
+ private string CurrentMachineNameTemplate = "GInsRotaResTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public GInsRotaResViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].OpNo.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].IsolateResults.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].ResValue1.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].ResValue2.ToString());
+ row.CreateCell(5).SetCellValue(ListData[i].ResValue3.ToString());
+ row.CreateCell(6).SetCellValue(ListData[i].RotaResult.ToString());
+ row.CreateCell(7).SetCellValue(ListData[i].ResResult.ToString());
+ row.CreateCell(8).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(8).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/GLeakCheckViewModel.cs b/GroupLine.App/ViewModel/GLeakCheckViewModel.cs
new file mode 100644
index 0000000..09ad4af
--- /dev/null
+++ b/GroupLine.App/ViewModel/GLeakCheckViewModel.cs
@@ -0,0 +1,362 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+using GroupLine.App.ModelDto;
+
+namespace GroupLine.App.ViewModel
+{
+ public class GLeakCheckViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "G型高低压泄露检查";
+
+ private string CurrentMachineNameTemplate = "GLeakCheckTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public GLeakCheckViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].PumpVacuum.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].KeepVacuum.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].PumpVamResult.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].KeepVamResult.ToString());
+ row.CreateCell(5).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(5).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/GLowVolStartViewModel.cs b/GroupLine.App/ViewModel/GLowVolStartViewModel.cs
new file mode 100644
index 0000000..ed75f06
--- /dev/null
+++ b/GroupLine.App/ViewModel/GLowVolStartViewModel.cs
@@ -0,0 +1,363 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+using GroupLine.App.ModelDto;
+
+namespace GroupLine.App.ViewModel
+{
+ public class GLowVolStartViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "G型低电压启动";
+
+ private string CurrentMachineNameTemplate = "GLowVolStartTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public GLowVolStartViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].ACur.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].BCur.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].CCur.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].Result.ToString());
+ row.CreateCell(5).SetCellValue(ListData[i].OpNo.ToString());
+ row.CreateCell(6).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(6).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/GMagTorqueViewModel.cs b/GroupLine.App/ViewModel/GMagTorqueViewModel.cs
new file mode 100644
index 0000000..27b1bd9
--- /dev/null
+++ b/GroupLine.App/ViewModel/GMagTorqueViewModel.cs
@@ -0,0 +1,361 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+using GroupLine.App.ModelDto;
+
+namespace GroupLine.App.ViewModel
+{
+ public class GMagTorqueViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "G型磁束扭矩检测工位";
+
+ private string CurrentMachineNameTemplate = "GMagTorqueTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public GMagTorqueViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].MagBeamCount.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].TorqueValue.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].Result.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(4).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/GOilPumpInstallViewModel.cs b/GroupLine.App/ViewModel/GOilPumpInstallViewModel.cs
new file mode 100644
index 0000000..d370fab
--- /dev/null
+++ b/GroupLine.App/ViewModel/GOilPumpInstallViewModel.cs
@@ -0,0 +1,364 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+using GroupLine.App.ModelDto;
+
+namespace GroupLine.App.ViewModel
+{
+ public class GOilPumpInstallViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "G型油泵安装工位";
+
+ private string CurrentMachineNameTemplate = "GOilPumpInstallTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public GOilPumpInstallViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].OilPumpNo.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].OpNo.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].OilPmpBruRsult.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].IsReturn.ToString());
+ row.CreateCell(5).SetCellValue(ListData[i].WeldSpotUI.ToString());
+ row.CreateCell(6).SetCellValue(ListData[i].Result.ToString());
+ row.CreateCell(7).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(7).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/GRingWeldMachViewModel.cs b/GroupLine.App/ViewModel/GRingWeldMachViewModel.cs
new file mode 100644
index 0000000..b6064c1
--- /dev/null
+++ b/GroupLine.App/ViewModel/GRingWeldMachViewModel.cs
@@ -0,0 +1,368 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+using GroupLine.App.ModelDto;
+
+namespace GroupLine.App.ViewModel
+{
+ public class GRingWeldMachViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "G型环焊机底部焊接";
+
+ private string CurrentMachineNameTemplate = "GRingWeldMachTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public GRingWeldMachViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].Vol1.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].Cur1.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].WeldTime1.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].Vol2.ToString());
+ row.CreateCell(5).SetCellValue(ListData[i].Cur2.ToString());
+ row.CreateCell(6).SetCellValue(ListData[i].WeldTime2.ToString());
+ row.CreateCell(7).SetCellValue(ListData[i].NozzleClean.ToString());
+ row.CreateCell(8).SetCellValue(ListData[i].NozzleReplace.ToString());
+ row.CreateCell(9).SetCellValue(ListData[i].Fixture.ToString());
+ row.CreateCell(10).SetCellValue(ListData[i].Result.ToString());
+ row.CreateCell(11).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(11).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/GRotorBurnEbViewModel.cs b/GroupLine.App/ViewModel/GRotorBurnEbViewModel.cs
new file mode 100644
index 0000000..c60abb9
--- /dev/null
+++ b/GroupLine.App/ViewModel/GRotorBurnEbViewModel.cs
@@ -0,0 +1,360 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+using GroupLine.App.ModelDto;
+
+namespace GroupLine.App.ViewModel
+{
+ public class GRotorBurnEbViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "G型转子烧嵌";
+
+ private string CurrentMachineNameTemplate = "GRotorBurnEbTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public GRotorBurnEbViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ //if (!string.IsNullOrEmpty(SearchCylinderNo))
+ //{
+ // MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ //}
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].RotorNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].CrankshaftNo.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].OpNo.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(3).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/GRotorMagViewModel.cs b/GroupLine.App/ViewModel/GRotorMagViewModel.cs
new file mode 100644
index 0000000..d46c2f6
--- /dev/null
+++ b/GroupLine.App/ViewModel/GRotorMagViewModel.cs
@@ -0,0 +1,363 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+using GroupLine.App.ModelDto;
+
+namespace GroupLine.App.ViewModel
+{
+ public class GRotorMagViewModel: ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "G型转子着磁";
+
+ private string CurrentMachineNameTemplate = "GRotorMagTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public GRotorMagViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ ////多条件查询
+ //if (!string.IsNullOrEmpty(SearchCylinderNo))
+ //{
+ // MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ //}
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].RotorNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].OpNo.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].MagBeamCount.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].Current.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].RotorAngle.ToString());
+ row.CreateCell(5).SetCellValue(ListData[i].RotorAgleRsult.ToString());
+ row.CreateCell(6).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(6).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/GShrinkTubViewModel.cs b/GroupLine.App/ViewModel/GShrinkTubViewModel.cs
new file mode 100644
index 0000000..cf1c62e
--- /dev/null
+++ b/GroupLine.App/ViewModel/GShrinkTubViewModel.cs
@@ -0,0 +1,362 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+using GroupLine.App.ModelDto;
+
+namespace GroupLine.App.ViewModel
+{
+ public class GShrinkTubViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "G型缩管";
+
+ private string CurrentMachineNameTemplate = "GShrinkTubTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public GShrinkTubViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].OpNo.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].FinalLoad.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].FinalLocation.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].Result.ToString());
+ row.CreateCell(5).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(5).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/GSpotWeldMachViewModel.cs b/GroupLine.App/ViewModel/GSpotWeldMachViewModel.cs
new file mode 100644
index 0000000..3538bbd
--- /dev/null
+++ b/GroupLine.App/ViewModel/GSpotWeldMachViewModel.cs
@@ -0,0 +1,384 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+using GroupLine.App.ModelDto;
+
+namespace GroupLine.App.ViewModel
+{
+ public class GSpotWeldMachViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "G型点焊机";
+
+ private string CurrentMachineNameTemplate = "GSpotWeldMachTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public GSpotWeldMachViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].VolR1_1.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].CurR1_1.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].WeldTimeR1_1.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].VolR1_2.ToString());
+ row.CreateCell(5).SetCellValue(ListData[i].CurR1_2.ToString());
+ row.CreateCell(6).SetCellValue(ListData[i].WeldTimeR1_2.ToString());
+ row.CreateCell(7).SetCellValue(ListData[i].VolR1_3.ToString());
+ row.CreateCell(8).SetCellValue(ListData[i].CurR1_3.ToString());
+ row.CreateCell(9).SetCellValue(ListData[i].WeldTimeR1_3.ToString());
+ row.CreateCell(10).SetCellValue(ListData[i].VolR1_4.ToString());
+ row.CreateCell(11).SetCellValue(ListData[i].CurR1_4.ToString());
+ row.CreateCell(12).SetCellValue(ListData[i].WeldTimeR1_4.ToString());
+ row.CreateCell(13).SetCellValue(ListData[i].VolR2_1.ToString());
+ row.CreateCell(14).SetCellValue(ListData[i].CurR2_1.ToString());
+ row.CreateCell(15).SetCellValue(ListData[i].WeldTimeR2_1.ToString());
+ row.CreateCell(16).SetCellValue(ListData[i].VolR2_2.ToString());
+ row.CreateCell(17).SetCellValue(ListData[i].CurR2_2.ToString());
+ row.CreateCell(18).SetCellValue(ListData[i].WeldTimeR2_2.ToString());
+ row.CreateCell(19).SetCellValue(ListData[i].VolR2_3.ToString());
+ row.CreateCell(20).SetCellValue(ListData[i].CurR2_3.ToString());
+ row.CreateCell(21).SetCellValue(ListData[i].WeldTimeR2_3.ToString());
+ row.CreateCell(22).SetCellValue(ListData[i].VolR2_4.ToString());
+ row.CreateCell(23).SetCellValue(ListData[i].CurR2_4.ToString());
+ row.CreateCell(24).SetCellValue(ListData[i].WeldTimeR2_4.ToString());
+ row.CreateCell(25).SetCellValue(ListData[i].NozzleClean.ToString());
+ row.CreateCell(26).SetCellValue(ListData[i].NozzleReplace.ToString());
+ row.CreateCell(27).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(27).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/GStaticDiskMachViewModel.cs b/GroupLine.App/ViewModel/GStaticDiskMachViewModel.cs
new file mode 100644
index 0000000..06200d4
--- /dev/null
+++ b/GroupLine.App/ViewModel/GStaticDiskMachViewModel.cs
@@ -0,0 +1,387 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+using GroupLine.App.ModelDto;
+
+namespace GroupLine.App.ViewModel
+{
+ public class GStaticDiskMachViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "G型静盘组装机";
+
+ private string CurrentMachineNameTemplate = "GStaticDiskMachTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public GStaticDiskMachViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].MachineCode.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].Cycle.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].ScrewCount.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].FinalTorque.ToString());
+ row.CreateCell(5).SetCellValue(ListData[i].FinalAngle.ToString());
+ row.CreateCell(6).SetCellValue(ListData[i].FinalTorque2.ToString());
+ row.CreateCell(7).SetCellValue(ListData[i].FinalAngle2.ToString());
+ row.CreateCell(8).SetCellValue(ListData[i].FinalTorque3.ToString());
+ row.CreateCell(9).SetCellValue(ListData[i].FinalAngle3.ToString());
+ row.CreateCell(10).SetCellValue(ListData[i].FinalTorque4.ToString());
+ row.CreateCell(11).SetCellValue(ListData[i].FinalAngle4.ToString());
+ row.CreateCell(12).SetCellValue(ListData[i].FinalTorque5.ToString());
+ row.CreateCell(13).SetCellValue(ListData[i].FinalAngle5.ToString());
+ row.CreateCell(14).SetCellValue(ListData[i].FinalTorque6.ToString());
+ row.CreateCell(15).SetCellValue(ListData[i].FinalAngle6.ToString());
+ row.CreateCell(16).SetCellValue(ListData[i].FinalTorque7.ToString());
+ row.CreateCell(17).SetCellValue(ListData[i].FinalAngle7.ToString());
+ row.CreateCell(18).SetCellValue(ListData[i].FinalTorque8.ToString());
+ row.CreateCell(19).SetCellValue(ListData[i].FinalAngle8.ToString());
+ row.CreateCell(20).SetCellValue(ListData[i].FinalTorque9.ToString());
+ row.CreateCell(21).SetCellValue(ListData[i].FinalAngle9.ToString());
+ row.CreateCell(22).SetCellValue(ListData[i].FinalTorque10.ToString());
+ row.CreateCell(23).SetCellValue(ListData[i].FinalAngle10.ToString());
+ row.CreateCell(24).SetCellValue(ListData[i].FinalTorque11.ToString());
+ row.CreateCell(25).SetCellValue(ListData[i].FinalAngle11.ToString());
+ row.CreateCell(26).SetCellValue(ListData[i].FinalTorque12.ToString());
+ row.CreateCell(27).SetCellValue(ListData[i].FinalAngle12.ToString());
+ row.CreateCell(28).SetCellValue(ListData[i].Result.ToString());
+ row.CreateCell(29).SetCellValue(ListData[i].OpNo.ToString());
+ row.CreateCell(30).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(30).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/ItemMenu.cs b/GroupLine.App/ViewModel/ItemMenu.cs
new file mode 100644
index 0000000..a739eb5
--- /dev/null
+++ b/GroupLine.App/ViewModel/ItemMenu.cs
@@ -0,0 +1,28 @@
+using MaterialDesignThemes.Wpf;
+using System.Collections.Generic;
+using System.Windows.Controls;
+
+namespace GroupLine.App.ViewModel
+{
+ public class ItemMenu
+ {
+ public ItemMenu(string header, List subItems, PackIconKind icon)
+ {
+ Header = header;
+ SubItems = subItems;
+ Icon = icon;
+ }
+
+ public ItemMenu(string header, UserControl screen, PackIconKind icon)
+ {
+ Header = header;
+ Screen = screen;
+ Icon = icon;
+ }
+
+ public string Header { get; private set; }
+ public PackIconKind Icon { get; private set; }
+ public List SubItems { get; private set; }
+ public UserControl Screen { get; private set; }
+ }
+}
diff --git a/GroupLine.App/ViewModel/KPCDTransplantViewModel.cs b/GroupLine.App/ViewModel/KPCDTransplantViewModel.cs
new file mode 100644
index 0000000..3c53947
--- /dev/null
+++ b/GroupLine.App/ViewModel/KPCDTransplantViewModel.cs
@@ -0,0 +1,358 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+using GroupLine.App.ModelDto;
+
+namespace GroupLine.App.ViewModel
+{
+ public class KPCDTransplantViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "KP型C-D移栽";
+
+ private string CurrentMachineNameTemplate = "KPCDTransplantTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public KPCDTransplantViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(1).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/KPDynStaticMachViewModel.cs b/GroupLine.App/ViewModel/KPDynStaticMachViewModel.cs
new file mode 100644
index 0000000..6559c63
--- /dev/null
+++ b/GroupLine.App/ViewModel/KPDynStaticMachViewModel.cs
@@ -0,0 +1,368 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+using GroupLine.App.ModelDto;
+
+namespace GroupLine.App.ViewModel
+{
+ public class KPDynStaticMachViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "KP型动静盘组装机";
+
+ private string CurrentMachineNameTemplate = "KPDynStaticMachTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public KPDynStaticMachViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ //var sql = MulConQueryable.ToSql();
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].DynaDiskNo.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].StaticDiskNo.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].EuropMacine.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].StaDskCastNo.ToString());
+ row.CreateCell(5).SetCellValue(ListData[i].MeterGap.ToString());
+ row.CreateCell(6).SetCellValue(ListData[i].MeterGroup.ToString());
+ row.CreateCell(7).SetCellValue(ListData[i].MeterResult.ToString());
+ row.CreateCell(8).SetCellValue(ListData[i].OpNo.ToString());
+ //row.CreateCell(6).SetCellValue(ListData[i].Torque.ToString());
+ row.CreateCell(9).SetCellValue(ListData[i].EuopMaDifValue.ToString());
+ row.CreateCell(10).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(10).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/KPLeakCheckViewModel.cs b/GroupLine.App/ViewModel/KPLeakCheckViewModel.cs
new file mode 100644
index 0000000..29bf645
--- /dev/null
+++ b/GroupLine.App/ViewModel/KPLeakCheckViewModel.cs
@@ -0,0 +1,362 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+using GroupLine.App.ModelDto;
+
+namespace GroupLine.App.ViewModel
+{
+ public class KPLeakCheckViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "KP型C-D移栽";
+
+ private string CurrentMachineNameTemplate = "KPLeakCheckTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public KPLeakCheckViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].PumpVacuum.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].KeepVacuum.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].PumpVamResult.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].KeepVamResult.ToString());
+ row.CreateCell(5).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(5).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/KPLowVolStartViewModel.cs b/GroupLine.App/ViewModel/KPLowVolStartViewModel.cs
new file mode 100644
index 0000000..2bab57a
--- /dev/null
+++ b/GroupLine.App/ViewModel/KPLowVolStartViewModel.cs
@@ -0,0 +1,363 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+using GroupLine.App.ModelDto;
+
+namespace GroupLine.App.ViewModel
+{
+ public class KPLowVolStartViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "KP型低电压启动";
+
+ private string CurrentMachineNameTemplate = "KPLowVolStartTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public KPLowVolStartViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].ACur.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].BCur.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].CCur.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].Result.ToString());
+ row.CreateCell(5).SetCellValue(ListData[i].OpNo.ToString());
+ row.CreateCell(6).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(6).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/KPMagTorqueViewModel.cs b/GroupLine.App/ViewModel/KPMagTorqueViewModel.cs
new file mode 100644
index 0000000..9b90ed8
--- /dev/null
+++ b/GroupLine.App/ViewModel/KPMagTorqueViewModel.cs
@@ -0,0 +1,361 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+using GroupLine.App.ModelDto;
+
+namespace GroupLine.App.ViewModel
+{
+ public class KPMagTorqueViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "KP型磁束扭矩检测工位";
+
+ private string CurrentMachineNameTemplate = "KPMagTorqueTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public KPMagTorqueViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].MagBeamCount.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].TorqueValue.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].Result.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(4).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/KPOilPumpInstallViewModel.cs b/GroupLine.App/ViewModel/KPOilPumpInstallViewModel.cs
new file mode 100644
index 0000000..eea4faf
--- /dev/null
+++ b/GroupLine.App/ViewModel/KPOilPumpInstallViewModel.cs
@@ -0,0 +1,364 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+using GroupLine.App.ModelDto;
+
+namespace GroupLine.App.ViewModel
+{
+ public class KPOilPumpInstallViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "KP型油泵安装工位";
+
+ private string CurrentMachineNameTemplate = "KPOilPumpInstallTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public KPOilPumpInstallViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].OilPumpNo.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].OpNo.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].OilPmpBruRsult.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].IsReturn.ToString());
+ row.CreateCell(5).SetCellValue(ListData[i].WeldSpotUI.ToString());
+ row.CreateCell(6).SetCellValue(ListData[i].Result.ToString());
+ row.CreateCell(7).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(7).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/KPRingWeldMachDwViewModel.cs b/GroupLine.App/ViewModel/KPRingWeldMachDwViewModel.cs
new file mode 100644
index 0000000..92e3466
--- /dev/null
+++ b/GroupLine.App/ViewModel/KPRingWeldMachDwViewModel.cs
@@ -0,0 +1,371 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GroupLine.App.ModelDto;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using System.Windows;
+using GalaSoft.MvvmLight.Command;
+using MessageBox = System.Windows.MessageBox;
+
+namespace GroupLine.App.ViewModel
+{
+ public class KPRingWeldMachDwViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "KP型环焊机底部焊接";
+
+ private string CurrentMachineNameTemplate = "KPRingWeldMachDwTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public KPRingWeldMachDwViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].Vol1.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].Cur1.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].WeldTime1.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].Vol2.ToString());
+ row.CreateCell(5).SetCellValue(ListData[i].Cur2.ToString());
+ row.CreateCell(6).SetCellValue(ListData[i].WeldTime2.ToString());
+ row.CreateCell(7).SetCellValue(ListData[i].NozzleClean.ToString());
+ row.CreateCell(8).SetCellValue(ListData[i].NozzleReplace.ToString());
+ row.CreateCell(9).SetCellValue(ListData[i].Fixture.ToString());
+ row.CreateCell(10).SetCellValue(ListData[i].Result.ToString());
+ row.CreateCell(11).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(11).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/KPRingWeldMachUpViewModel.cs b/GroupLine.App/ViewModel/KPRingWeldMachUpViewModel.cs
new file mode 100644
index 0000000..92f2351
--- /dev/null
+++ b/GroupLine.App/ViewModel/KPRingWeldMachUpViewModel.cs
@@ -0,0 +1,371 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GroupLine.App.ModelDto;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using System.Windows;
+using GalaSoft.MvvmLight.Command;
+using MessageBox = System.Windows.MessageBox;
+
+namespace GroupLine.App.ViewModel
+{
+ public class KPRingWeldMachUpViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "KP型环焊机顶部焊接";
+
+ private string CurrentMachineNameTemplate = "KPRingWeldMachUpTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public KPRingWeldMachUpViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].Vol1.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].Cur1.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].WeldTime1.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].Vol2.ToString());
+ row.CreateCell(5).SetCellValue(ListData[i].Cur2.ToString());
+ row.CreateCell(6).SetCellValue(ListData[i].WeldTime2.ToString());
+ row.CreateCell(7).SetCellValue(ListData[i].NozzleClean.ToString());
+ row.CreateCell(8).SetCellValue(ListData[i].NozzleReplace.ToString());
+ row.CreateCell(9).SetCellValue(ListData[i].Fixture.ToString());
+ row.CreateCell(10).SetCellValue(ListData[i].Result.ToString());
+ row.CreateCell(11).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(11).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/KPRingWeldMachViewModel.cs b/GroupLine.App/ViewModel/KPRingWeldMachViewModel.cs
new file mode 100644
index 0000000..e7f0253
--- /dev/null
+++ b/GroupLine.App/ViewModel/KPRingWeldMachViewModel.cs
@@ -0,0 +1,368 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+using GroupLine.App.ModelDto;
+
+namespace GroupLine.App.ViewModel
+{
+ public class KPRingWeldMachViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "G型环焊机顶部焊接";
+
+ private string CurrentMachineNameTemplate = "KPRingWeldMachTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public KPRingWeldMachViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].Vol1.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].Cur1.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].WeldTime1.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].Vol2.ToString());
+ row.CreateCell(5).SetCellValue(ListData[i].Cur2.ToString());
+ row.CreateCell(6).SetCellValue(ListData[i].WeldTime2.ToString());
+ row.CreateCell(7).SetCellValue(ListData[i].NozzleClean.ToString());
+ row.CreateCell(8).SetCellValue(ListData[i].NozzleReplace.ToString());
+ row.CreateCell(9).SetCellValue(ListData[i].Fixture.ToString());
+ row.CreateCell(10).SetCellValue(ListData[i].Result.ToString());
+ row.CreateCell(11).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(11).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/KPSealInstallViewModel.cs b/GroupLine.App/ViewModel/KPSealInstallViewModel.cs
new file mode 100644
index 0000000..eb1c24c
--- /dev/null
+++ b/GroupLine.App/ViewModel/KPSealInstallViewModel.cs
@@ -0,0 +1,386 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+using GroupLine.App.ModelDto;
+
+namespace GroupLine.App.ViewModel
+{
+ public class KPSealInstallViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "KP型密封盖板安装";
+
+ private string CurrentMachineNameTemplate = "KPSealInstallTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public KPSealInstallViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].SealCover.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].Cycle.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].ScrewCount.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].FinalTorque.ToString());
+ row.CreateCell(5).SetCellValue(ListData[i].FinalAngle.ToString());
+ row.CreateCell(6).SetCellValue(ListData[i].FinalTorque2.ToString());
+ row.CreateCell(7).SetCellValue(ListData[i].FinalAngle2.ToString());
+ row.CreateCell(8).SetCellValue(ListData[i].FinalTorque3.ToString());
+ row.CreateCell(9).SetCellValue(ListData[i].FinalAngle3.ToString());
+ row.CreateCell(10).SetCellValue(ListData[i].FinalTorque4.ToString());
+ row.CreateCell(11).SetCellValue(ListData[i].FinalAngle4.ToString());
+ row.CreateCell(12).SetCellValue(ListData[i].FinalTorque5.ToString());
+ row.CreateCell(13).SetCellValue(ListData[i].FinalAngle5.ToString());
+ row.CreateCell(14).SetCellValue(ListData[i].FinalTorque6.ToString());
+ row.CreateCell(15).SetCellValue(ListData[i].FinalAngle6.ToString());
+ row.CreateCell(16).SetCellValue(ListData[i].FinalTorque7.ToString());
+ row.CreateCell(17).SetCellValue(ListData[i].FinalAngle7.ToString());
+ row.CreateCell(18).SetCellValue(ListData[i].FinalTorque8.ToString());
+ row.CreateCell(19).SetCellValue(ListData[i].FinalAngle8.ToString());
+ row.CreateCell(20).SetCellValue(ListData[i].FinalTorque9.ToString());
+ row.CreateCell(21).SetCellValue(ListData[i].FinalAngle9.ToString());
+ row.CreateCell(22).SetCellValue(ListData[i].FinalTorque10.ToString());
+ row.CreateCell(23).SetCellValue(ListData[i].FinalAngle10.ToString());
+ row.CreateCell(24).SetCellValue(ListData[i].FinalTorque11.ToString());
+ row.CreateCell(25).SetCellValue(ListData[i].FinalAngle11.ToString());
+ row.CreateCell(26).SetCellValue(ListData[i].FinalTorque12.ToString());
+ row.CreateCell(27).SetCellValue(ListData[i].FinalAngle12.ToString());
+ row.CreateCell(28).SetCellValue(ListData[i].Result.ToString());
+ row.CreateCell(29).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(29).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/KPShrinkTubViewModel.cs b/GroupLine.App/ViewModel/KPShrinkTubViewModel.cs
new file mode 100644
index 0000000..4b68c48
--- /dev/null
+++ b/GroupLine.App/ViewModel/KPShrinkTubViewModel.cs
@@ -0,0 +1,365 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GroupLine.App.ModelDto;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using System.Windows;
+using GalaSoft.MvvmLight.Command;
+using MessageBox = System.Windows.MessageBox;
+
+namespace GroupLine.App.ViewModel
+{
+ public class KPShrinkTubViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "KP型缩管";
+
+ private string CurrentMachineNameTemplate = "KPShrinkTubTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public KPShrinkTubViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].OpNo.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].FinalLoad.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].FinalLocation.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].Result.ToString());
+ row.CreateCell(5).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(5).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/KPSpotWeldMachViewModel.cs b/GroupLine.App/ViewModel/KPSpotWeldMachViewModel.cs
new file mode 100644
index 0000000..2f66da8
--- /dev/null
+++ b/GroupLine.App/ViewModel/KPSpotWeldMachViewModel.cs
@@ -0,0 +1,378 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+using GroupLine.App.ModelDto;
+
+namespace GroupLine.App.ViewModel
+{
+ public class KPSpotWeldMachViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "KP点焊机";
+
+ private string CurrentMachineNameTemplate = "KPSpotWeldMachTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public KPSpotWeldMachViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].Vol1.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].Cur1.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].WeldTime1.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].Vol2.ToString());
+ row.CreateCell(5).SetCellValue(ListData[i].Cur2.ToString());
+ row.CreateCell(6).SetCellValue(ListData[i].WeldTime2.ToString());
+ row.CreateCell(7).SetCellValue(ListData[i].Vol3.ToString());
+ row.CreateCell(8).SetCellValue(ListData[i].Cur3.ToString());
+ row.CreateCell(9).SetCellValue(ListData[i].WeldTime3.ToString());
+ row.CreateCell(10).SetCellValue(ListData[i].Vol4.ToString());
+ row.CreateCell(11).SetCellValue(ListData[i].Cur4.ToString());
+ row.CreateCell(12).SetCellValue(ListData[i].WeldTime4.ToString());
+ row.CreateCell(13).SetCellValue(ListData[i].Vol5.ToString());
+ row.CreateCell(14).SetCellValue(ListData[i].Cur5.ToString());
+ row.CreateCell(15).SetCellValue(ListData[i].WeldTime5.ToString());
+ row.CreateCell(16).SetCellValue(ListData[i].Vol6.ToString());
+ row.CreateCell(17).SetCellValue(ListData[i].Cur6.ToString());
+ row.CreateCell(18).SetCellValue(ListData[i].WeldTime6.ToString());
+ row.CreateCell(19).SetCellValue(ListData[i].NozzleClean.ToString());
+ row.CreateCell(20).SetCellValue(ListData[i].NozzleReplace.ToString());
+ row.CreateCell(21).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(21).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/KPStaticDiskMachViewModel.cs b/GroupLine.App/ViewModel/KPStaticDiskMachViewModel.cs
new file mode 100644
index 0000000..ef2ee0c
--- /dev/null
+++ b/GroupLine.App/ViewModel/KPStaticDiskMachViewModel.cs
@@ -0,0 +1,387 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+using GroupLine.App.ModelDto;
+
+namespace GroupLine.App.ViewModel
+{
+ public class KPStaticDiskMachViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "KP静盘组装机";
+
+ private string CurrentMachineNameTemplate = "KPStaticDiskMachTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public KPStaticDiskMachViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCylinderNo;
+
+ public string SearchCylinderNo
+ {
+ get
+ {
+ return searchCylinderNo;
+ }
+ set
+ {
+ searchCylinderNo = value;
+ RaisePropertyChanged(() => searchCylinderNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCylinderNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CylinderNo.Contains(SearchCylinderNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CylinderNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].MachineCode.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].Cycle.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].ScrewCount.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].FinalTorque.ToString());
+ row.CreateCell(5).SetCellValue(ListData[i].FinalAngle.ToString());
+ row.CreateCell(6).SetCellValue(ListData[i].FinalTorque2.ToString());
+ row.CreateCell(7).SetCellValue(ListData[i].FinalAngle2.ToString());
+ row.CreateCell(8).SetCellValue(ListData[i].FinalTorque3.ToString());
+ row.CreateCell(9).SetCellValue(ListData[i].FinalAngle3.ToString());
+ row.CreateCell(10).SetCellValue(ListData[i].FinalTorque4.ToString());
+ row.CreateCell(11).SetCellValue(ListData[i].FinalAngle4.ToString());
+ row.CreateCell(12).SetCellValue(ListData[i].FinalTorque5.ToString());
+ row.CreateCell(13).SetCellValue(ListData[i].FinalAngle5.ToString());
+ row.CreateCell(14).SetCellValue(ListData[i].FinalTorque6.ToString());
+ row.CreateCell(15).SetCellValue(ListData[i].FinalAngle6.ToString());
+ row.CreateCell(16).SetCellValue(ListData[i].FinalTorque7.ToString());
+ row.CreateCell(17).SetCellValue(ListData[i].FinalAngle7.ToString());
+ row.CreateCell(18).SetCellValue(ListData[i].FinalTorque8.ToString());
+ row.CreateCell(19).SetCellValue(ListData[i].FinalAngle8.ToString());
+ row.CreateCell(20).SetCellValue(ListData[i].FinalTorque9.ToString());
+ row.CreateCell(21).SetCellValue(ListData[i].FinalAngle9.ToString());
+ row.CreateCell(22).SetCellValue(ListData[i].FinalTorque10.ToString());
+ row.CreateCell(23).SetCellValue(ListData[i].FinalAngle10.ToString());
+ row.CreateCell(24).SetCellValue(ListData[i].FinalTorque11.ToString());
+ row.CreateCell(25).SetCellValue(ListData[i].FinalAngle11.ToString());
+ row.CreateCell(26).SetCellValue(ListData[i].FinalTorque12.ToString());
+ row.CreateCell(27).SetCellValue(ListData[i].FinalAngle12.ToString());
+ row.CreateCell(28).SetCellValue(ListData[i].Result.ToString());
+ row.CreateCell(29).SetCellValue(ListData[i].OpNo.ToString());
+ row.CreateCell(30).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(30).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/KPUpBurnEbViewModel.cs b/GroupLine.App/ViewModel/KPUpBurnEbViewModel.cs
new file mode 100644
index 0000000..23112cf
--- /dev/null
+++ b/GroupLine.App/ViewModel/KPUpBurnEbViewModel.cs
@@ -0,0 +1,361 @@
+using AutoMapper;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GroupLine.App.ModelDto;
+using GroupLine.Model;
+using NLog;
+using NPOI.HSSF.Util;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Forms;
+using MessageBox = System.Windows.MessageBox;
+
+namespace GroupLine.App.ViewModel
+{
+ public class KPUpBurnEbViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "KP上配重烧嵌";
+
+ private string CurrentMachineNameTemplate = "KPUpBurnEbTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public KPUpBurnEbViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap());
+ autoMapper = config.CreateMapper();
+ }
+
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ #region "搜索条件属性"
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get
+ {
+ return machineName;
+ }
+ set
+ {
+ machineName = value;
+ RaisePropertyChanged(() => MachineName);
+ }
+ }
+
+
+
+ ///
+ /// 搜索条件-背番号
+ ///
+ private string searchBackData;
+
+ public string SearchBackData
+ {
+ get
+ {
+ return searchBackData;
+ }
+ set
+ {
+ searchBackData = value;
+ RaisePropertyChanged(() => SearchBackData);
+ }
+ }
+
+ ///
+ /// 搜索条件-筒体编号
+ ///
+ private string searchCrankshaftNo;
+
+ public string SearchCrankshaftNo
+ {
+ get
+ {
+ return searchCrankshaftNo;
+ }
+ set
+ {
+ searchCrankshaftNo = value;
+ RaisePropertyChanged(() => searchCrankshaftNo);
+ }
+ }
+
+
+ ///
+ /// 搜索条件-开始时间
+ ///
+ private string searchStartDate;
+
+ public string SearchStartDate
+ {
+ get
+ {
+ return searchStartDate;
+ }
+ set
+ {
+ searchStartDate = value;
+ RaisePropertyChanged(() => SearchStartDate);
+ }
+ }
+
+ ///
+ /// 搜索条件-结束时间
+ ///
+ private string searchEndDate;
+
+ public string SearchEndDate
+ {
+ get
+ {
+ return searchEndDate;
+ }
+
+ set
+ {
+ searchEndDate = value;
+ RaisePropertyChanged(() => SearchEndDate);
+ }
+ }
+ #endregion
+
+ #region "搜索命令"
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand searchCmd;
+ public RelayCommand SearchCmd
+ {
+ get
+ {
+ if (searchCmd == null) return new RelayCommand(() => Search());
+ return searchCmd;
+ }
+ set
+ {
+ searchCmd = value;
+ }
+ }
+
+ private void Search()
+ {
+ try
+ {
+ var MulConQueryable = FSqlContext.FDb.Select();
+
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchCrankshaftNo))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CrankshaftNo.Contains(SearchCrankshaftNo));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchStartDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
+ }
+ //多条件查询
+ if (!string.IsNullOrEmpty(SearchEndDate))
+ {
+ MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
+ }
+ var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
+ ListModelDto.Clear();
+
+
+ foreach (var item in ListDpI)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+ #endregion
+
+ #region "导出数据"
+ //OutputDataCmd
+
+ ///
+ /// 搜索命令
+ ///
+ private RelayCommand _OutputDataCmd;
+ public RelayCommand OutputDataCmd
+ {
+ get
+ {
+ if (_OutputDataCmd == null) return new RelayCommand(() => OutputDataAction());
+ return _OutputDataCmd;
+ }
+ set
+ {
+ _OutputDataCmd = value;
+ }
+ }
+
+ private void OutputDataAction()
+ {
+ try
+ {
+ if (ListModelDto != null && ListModelDto.Count > 0)
+ {
+ string FilePath = string.Empty;
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.Description = "请选择文件夹";
+ dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
+ //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ // 判空
+ if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
+ FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
+ }
+
+
+ var ListData = ListModelDto.ToList();
+
+ /***********************
+ 1.读取excel到workbook中
+ ***********************/
+ string TemplateFilePath = System.Environment.CurrentDirectory;
+ string tPath = TemplateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+ //string tPath = @"D:\ReportTemplate\注油Template.xlsx";
+ XSSFWorkbook wk = null;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close(); //把excel里的内容保存到workbook中之后,就可以关闭了
+ }
+ NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
+
+ /***********************
+ 2.操作数据
+ ***********************/
+ //2行 5行
+ IDataFormat dataformat = wk.CreateDataFormat();
+ ICellStyle style0 = wk.CreateCellStyle();
+
+ ICellStyle styleBag = wk.CreateCellStyle();
+ styleBag.FillForegroundColor = HSSFColor.Red.Index;
+ styleBag.FillPattern = FillPattern.SolidForeground;
+
+ for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
+ {
+ IRow row;
+ row = sheet.CreateRow(i + 1);
+
+ row.CreateCell(0).SetCellValue(ListData[i].CrankshaftNo.ToString());
+ row.CreateCell(1).SetCellValue(ListData[i].ProbeA.ToString());
+ row.CreateCell(2).SetCellValue(ListData[i].ProbeB.ToString());
+ row.CreateCell(3).SetCellValue(ListData[i].Result.ToString());
+ row.CreateCell(4).SetCellValue(ListData[i].OpNo.ToString());
+ row.CreateCell(5).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+ //row.GetCell(10).CellStyle = style0;
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(5).CellStyle = style0;
+ //row.GetCell(26).CellStyle = style0;
+ //if (ListDat[i].UpperGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(4).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].LowerGroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(6).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].GroupStandDiffResult == "NG")
+ //{
+ // row.GetCell(8).CellStyle = styleBag;
+ //}
+ //if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
+ //{
+
+ //}
+ //else
+ //{
+ // row.GetCell(7).CellStyle = styleBag;
+ //}
+
+ }
+
+
+ //DayDailyParameterInfo = null;
+ //NightDailyParameterInfo = null;
+
+ /***********************
+ 3.修改完成,写入到客户端
+ ***********************/
+ using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
+ {
+ //tPath = @"D:\日立报表\";
+ //判断文件夹是否存在,不存在就创建
+ if (!Directory.Exists(FilePath))
+ {
+ Directory.CreateDirectory(FilePath);
+ }
+ FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(searchEndDate).ToString("yyyy-MM-dd") + "-" + CurrentMachineName + ".xlsx";
+ wk.Write(ms);
+
+ using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
+ {
+ byte[] data = ms.ToArray();
+ fs.Write(data, 0, data.Length);
+ fs.Flush();
+ }
+ wk = null;
+ }
+ System.Windows.MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/GroupLine.App/ViewModel/KanBanViewModel.cs b/GroupLine.App/ViewModel/KanBanViewModel.cs
new file mode 100644
index 0000000..2dbc7ec
--- /dev/null
+++ b/GroupLine.App/ViewModel/KanBanViewModel.cs
@@ -0,0 +1,1021 @@
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using GalaSoft.MvvmLight.Messaging;
+using GroupLine.App.ModelDto;
+using GroupLine.Com;
+using GroupLine.Model.KanBan;
+using NLog;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace GroupLine.App.ViewModel
+{
+ public class KanBanViewModel : ViewModelBase
+ {
+ //日志的实例化
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ //FSQL实例
+ static IFreeSql Fsql;
+
+ public KanBanViewModel()
+ {
+ try
+ {
+
+ //获取程序的配置信息
+ var SqlCon = ConfigHelper.GetValue("connecting");
+
+ Fsql = new FreeSql.FreeSqlBuilder()
+ .UseConnectionString(FreeSql.DataType.SqlServer, SqlCon)
+ .UseAutoSyncStructure(true) //自动同步实体结构到数据库
+ .Build(); //请务必定义成 Singleton 单例模式
+
+ ListWorkTimeDto = new ObservableCollection();
+ var WorkTimeQueryable = Fsql.Select().ToList();
+ foreach (var item in WorkTimeQueryable)
+ {
+ ListWorkTimeDto.Add(new WorkTimeDto()
+ {
+ ID = item.Id,
+ Index = item.IndexNum,
+ ClassNum = item.ClassNum,
+ EndTime = item.EndTime,
+ StartTime = item.StartTime,
+ CreateTime = item.CreateTime
+ });
+ }
+ ListPlanCountDto = new ObservableCollection();
+
+ FormWorkTimeDto = new WorkTimeDto()
+ {
+ IsFormValid = true,
+ //ClassNum="白班",
+ //StartTime="00:00",
+ //EndTime = "00:00"
+ };
+
+ FormPlanCountDto = new PlanCountDto()
+ {
+ PlanDate = DateTime.Now
+
+ };
+
+ ClassNumComboBoxList = new List()
+ {
+ new ComboBoxModel(){Key="0",Text="" },
+ new ComboBoxModel(){Key="1",Text="A" },
+ new ComboBoxModel(){Key="2",Text="B" },
+ new ComboBoxModel(){Key="3",Text="C" },
+ new ComboBoxModel(){Key="4",Text="D" }
+ };
+
+ SearchStartTime = DateTime.Now.AddDays(-5).ToShortDateString();
+ SearchEndTime = DateTime.Now.AddDays(5).ToShortDateString();
+ PlanCountSearch();
+
+ CycleTime = 0;
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
+ }
+ }
+
+ ///
+ /// 工作时间列表集合
+ ///
+ private ObservableCollection _ListWorkTimeDto;
+ ///
+ /// 工作时间列表集合
+ ///
+ public ObservableCollection ListWorkTimeDto
+ {
+ get { return _ListWorkTimeDto; }
+ set { _ListWorkTimeDto = value; }
+ }
+
+
+ ///
+ /// 计划产量列表集合
+ ///
+ private ObservableCollection _ListPlanCountDto;
+ ///