diff --git a/.windsurf/rules/projectrules.md b/.windsurf/rules/projectrules.md
new file mode 100644
index 0000000..5555fd2
--- /dev/null
+++ b/.windsurf/rules/projectrules.md
@@ -0,0 +1,133 @@
+---
+trigger: always_on
+---
+---
+# 当前是在开发GroupLine项目,这是一个WPF项目,使用MVVM模式开发,在这个项目上结构基础上新增几个设备数据数据模型
+
+# GroupLine.Model是数据模型的类库,一些数据库对应的模型在这里
+
+# 新增的设备模型如下:
+
+| 模型中文 | 模型英文 |
+| ---------------------- | ------------------ |
+| 导油板敲入 | OilGuideMount |
+| 转子烧嵌 | RotorShrinkFit |
+| KP型筒体烧嵌 | KPBarrelShrinkFit |
+| KP溢流阀组装机 | KPReliefValveAsm |
+| KP排气盖板安装气密检测 | KPExhCoverSealTest |
+
+# GroupLine.App是WPF界面和功能项目
+
+## ModelDto文件夹是进行界面展示的模型Dto
+
+## ReportFile文件夹是模型导出的数据Excel模板
+
+## View和ViewModel文件夹是MVVM开发的放置View和Model的地方
+
+## 查询数据使用FSqlContext
+
+## 每个模型都要在GroupLine.App.ViewModel中的ViewModelLocator 进行注册
+
+# 一个查询模型在项目中的一般的流程,以GInsRotaRes为例
+
+ 1)FrontLine.Model -> GInsRotaRes,具体请查看GInsRotaRes的类描述信息
+ 2)GroupLine.App.ModelDto -> GInsRotaResDto,具体请查看GInsRotaResDto的Dto类描述信息
+ 3)GroupLine.App.View.GInsRotaRes -> GInsRotaResView ,这个是模型查询的UserControl用户界面,里面包含查询的操作界面和数据表DataGrid展示的内容,具体请查看GroupLine.App.View.GInsRotaRes.GInsRotaResView的具体信息
+ 4)GroupLine.App.ViewModel -> GInsRotaResViewModel,模型查询逻辑和数据处理的ViewModel,具体请查看GInsRotaResViewModel的具体信息
+ 5) GInsRotaResViewModel中使用的查询数据后导出的数据模板在ReportFile中的GInsRotaResTemplate.xlsx中,里面跟模型的字段是一一匹配的
+ 6)GroupLine.App.ViewModel -> ViewModelLocator,根据MvvmLight的开发规范,每个VacuoCheckViewModel都要在这里注册一下
+ 7)GroupLine.App -> MainWindow 中会增加View的页面到菜单中:.Add(new SubItem("后组-上外罩焊接(2号機)", new GInsRotaResView()));
+ 8)在View中展示时,如果字段属性有单位的话,需要在View列头表格中除了显示中文名称外还需要显示单位
+ 9) ReportFile文件夹是模型导出的数据Excel模板,里面包含模板的格式(列头信息),你可以查看之前的Excel模板文件来了解如何设计
+# 我给出每个模型的字段信息,你按照上面的流程开发就行,模型的Id是long类型,主键,自增,FreeSql开发
+
+## 设备:导油板敲入 OilGuideMount
+### 字段信息:
+曲轴编号 CrankshaftNo 9位字符串
+支架编号 BracketNo 8位字符串
+支架铸件号 BracketCastingNo 4位字符串
+员工编号 OperatorNo 6位字符串
+放入时无磕碰 PlaceNoDamage 0/OK,1/NG
+导油板 OilGuidePlate 0/不做,1/OK
+塞尺检测 FeelerGaugeCheck 0/不做,1/OK
+埋塞 BuriedPlug 0/不做,1/OK
+螺旋螺钉 HelicalScrew 0/不做,1/OK
+气密检测 AirTightCheck 0/不做,1/OK
+
+---------------------------
+## 设备:转子烧嵌 RotorShrinkFit
+### 字段信息:
+转子编号 RotorNo 16位字符串
+支架编号 BracketNo 8位字符串
+员工编号 OperatorNo 6位字符串
+创建时间 CreateTime
+
+## 设备:KP型筒体烧嵌 KPBarrelShrinkFit
+### 字段信息:
+筒体编号 BarrelNo 20位字符串
+定子编号 StatorNo 16位字符串
+员工编号 OperatorNo 4位字符串
+筒体温度 BarrelTemp 浮点数123.4/单位℃
+创建时间 CreateTime
+
+## 设备:KP溢流阀组装机 KPReliefValveAsm
+### 字段信息:
+机型 ModelName 8位字符串
+动盘编号 MvDiscNo 8位字符串
+静盘编号 StDiscNo 8位字符串
+节拍 CycleTime 浮点数123.4/(S)
+螺丝数量 ScrewCount 整数12/(个)
+判定 Result 0/OK,1/NG
+最终扭矩1 FinalTorque1 浮点数12.34/(N.M)
+最终角度1 FinalAngle1 浮点数1234.5/(deg)
+最终扭矩2 FinalTorque2 浮点数12.34/(N.M)
+最终角度2 FinalAngle2 浮点数1234.5/(deg)
+最终扭矩3 FinalTorque3 浮点数12.34/(N.M)
+最终角度3 FinalAngle3 浮点数1234.5/(deg)
+最终扭矩4 FinalTorque4 浮点数12.34/(N.M)
+最终角度4 FinalAngle4 浮点数1234.5/(deg)
+员工编号 OperatorNo 10位字符串
+创建时间 CreateTime
+
+## 设备:KP排气盖板安装气密检测 KPExhCoverSealTest
+### 字段信息:
+机型 ModelName 8位字符串
+动盘编号 MvDiscNo 8位字符串
+静盘编号 StDiscNo 8位字符串
+节拍 CycleTime 浮点数123.4/(S)
+螺丝数量 ScrewCount 整数12/(个)
+判定 Result 0/OK,1/NG
+最终扭矩1 FinalTorque1 浮点数12.34/(N.M)
+最终角度1 FinalAngle1 浮点数1234.5/(deg)
+最终扭矩2 FinalTorque2 浮点数12.34/(N.M)
+最终角度2 FinalAngle2 浮点数1234.5/(deg)
+最终扭矩3 FinalTorque3 浮点数12.34/(N.M)
+最终角度3 FinalAngle3 浮点数1234.5/(deg)
+最终扭矩4 FinalTorque4 浮点数12.34/(N.M)
+最终角度4 FinalAngle4 浮点数1234.5/(deg)
+最终扭矩5 FinalTorque5 浮点数12.34/(N.M)
+最终角度5 FinalAngle5 浮点数1234.5/(deg)
+最终扭矩6 FinalTorque6 浮点数12.34/(N.M)
+最终角度6 FinalAngle6 浮点数1234.5/(deg)
+最终扭矩7 FinalTorque7 浮点数12.34/(N.M)
+最终角度7 FinalAngle7 浮点数1234.5/(deg)
+最终扭矩8 FinalTorque8 浮点数12.34/(N.M)
+最终角度8 FinalAngle8 浮点数1234.5/(deg)
+最终扭矩9 FinalTorque9 浮点数12.34/(N.M)
+最终角度9 FinalAngle9 浮点数1234.5/(deg)
+最终扭矩10 FinalTorque10 浮点数12.34/(N.M)
+最终角度10 FinalAngle10 浮点数1234.5/(deg)
+最终扭矩11 FinalTorque11 浮点数12.34/(N.M)
+最终角度11 FinalAngle11 浮点数1234.5/(deg)
+最终扭矩12 FinalTorque12 浮点数12.34/(N.M)
+最终角度12 FinalAngle12 浮点数1234.5/(deg)
+员工编号 OperatorNo 10位字符串
+创建时间 CreateTime
+
+## 备注
+- 8位字符串: 代表 8位长度的字符串
+- 0/OK,1/NG: 代表 0表示OK,1表示NG,数据库建模时用int类型,展示ModelDto时转换为字符串OK或者NG,其他类似
+- 浮点数1234.5/(deg): 代表 浮点数使用decimal类型,精度根据实际需求调整,比如 1234.5是一个小数点;单位是deg,在View中展示时,需要列头表格中除了显示中文名称外还需要显示单位
+- 时间字段使用DateTime类型
+- 布尔值使用bool类型
+- 整数12: 代表 整数使用int类型,比如 12
\ No newline at end of file
diff --git a/GroupLine.App/FSqlContext.cs b/GroupLine.App/FSqlContext.cs
index be5182a..423df37 100644
--- a/GroupLine.App/FSqlContext.cs
+++ b/GroupLine.App/FSqlContext.cs
@@ -6,7 +6,7 @@ namespace GroupLine.App
{
public static IFreeSql FDb = new FreeSql.FreeSqlBuilder()
.UseConnectionString(FreeSql.DataType.SqlServer, ConfigHelper.GetValue("connecting"))
- .UseAutoSyncStructure(true) //自动同步实体结构到数据库
+ .UseAutoSyncStructure(false) //自动同步实体结构到数据库
.Build(); //请务必定义成 Singleton 单例模式
}
}
diff --git a/GroupLine.App/GroupLine.App.csproj b/GroupLine.App/GroupLine.App.csproj
index f0bb5cd..672c08d 100644
--- a/GroupLine.App/GroupLine.App.csproj
+++ b/GroupLine.App/GroupLine.App.csproj
@@ -123,6 +123,11 @@
Designer
+
+
+
+
+
@@ -170,6 +175,11 @@
+
+
+
+
+
@@ -370,6 +380,21 @@
UserControlMenuItem.xaml
+
+ OilGuideMountView.xaml
+
+
+ RotorShrinkFitView.xaml
+
+
+ KPBarrelShrinkFitView.xaml
+
+
+ KPReliefValveAsmView.xaml
+
+
+ KPExhCoverSealTestView.xaml
+
Designer
MSBuild:Compile
@@ -590,35 +615,42 @@
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
diff --git a/GroupLine.App/MainWindow.xaml.cs b/GroupLine.App/MainWindow.xaml.cs
index dde5ca4..dbd1b34 100644
--- a/GroupLine.App/MainWindow.xaml.cs
+++ b/GroupLine.App/MainWindow.xaml.cs
@@ -54,6 +54,11 @@ using GroupLine.App.View.KPUpBurnEb;
using GroupLine.App.View.KPRingWeldMachDw;
using GroupLine.App.View.KPRingWeldMachUp;
using GroupLine.App.View.KPShrinkTub;
+using GroupLine.App.View.OilGuideMount;
+using GroupLine.App.View.RotorShrinkFit;
+using GroupLine.App.View.KPBarrelShrinkFit;
+using GroupLine.App.View.KPReliefValveAsm;
+using GroupLine.App.View.KPExhCoverSealTest;
namespace GroupLine.App
{
@@ -168,6 +173,11 @@ namespace GroupLine.App
DeviceGroup.Add(new SubItem("K/P型环焊机底部焊接", new KPRingWeldMachDwView()));
DeviceGroup.Add(new SubItem("K/P型环焊机顶部焊接", new KPRingWeldMachUpView()));
DeviceGroup.Add(new SubItem("K/P型缩管", new KPShrinkTubView()));
+ DeviceGroup.Add(new SubItem("导油板敲入", new OilGuideMountView()));
+ DeviceGroup.Add(new SubItem("转子烧嵌", new RotorShrinkFitView()));
+ DeviceGroup.Add(new SubItem("KP型筒体烧嵌", new KPBarrelShrinkFitView()));
+ DeviceGroup.Add(new SubItem("KP溢流阀组装机", new KPReliefValveAsmView()));
+ DeviceGroup.Add(new SubItem("KP排气盖板安装气密检测", new KPExhCoverSealTestView()));
var menuKanban = new List();
diff --git a/GroupLine.App/ModelDto/KPBarrelShrinkFitDto.cs b/GroupLine.App/ModelDto/KPBarrelShrinkFitDto.cs
new file mode 100644
index 0000000..5c70cd8
--- /dev/null
+++ b/GroupLine.App/ModelDto/KPBarrelShrinkFitDto.cs
@@ -0,0 +1,69 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(KPBarrelShrinkFitDto))]
+ public class KPBarrelShrinkFitDto : ValidateModelBase
+ {
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+ private string _BarrelNo;
+ ///
+ /// 筒体编号
+ ///
+ public string BarrelNo
+ {
+ get { return _BarrelNo; }
+ set { _BarrelNo = value; RaisePropertyChanged(() => BarrelNo); }
+ }
+
+ private string _StatorNo;
+ ///
+ /// 定子编号
+ ///
+ public string StatorNo
+ {
+ get { return _StatorNo; }
+ set { _StatorNo = value; RaisePropertyChanged(() => StatorNo); }
+ }
+
+ private string _OperatorNo;
+ ///
+ /// 员工编号
+ ///
+ public string OperatorNo
+ {
+ get { return _OperatorNo; }
+ set { _OperatorNo = value; RaisePropertyChanged(() => OperatorNo); }
+ }
+
+ private decimal _BarrelTemp;
+ ///
+ /// 筒体温度
+ ///
+ public decimal BarrelTemp
+ {
+ get { return _BarrelTemp; }
+ set { _BarrelTemp = value; RaisePropertyChanged(() => BarrelTemp); }
+ }
+
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+ }
+}
diff --git a/GroupLine.App/ModelDto/KPExhCoverSealTestDto.cs b/GroupLine.App/ModelDto/KPExhCoverSealTestDto.cs
new file mode 100644
index 0000000..7aa847f
--- /dev/null
+++ b/GroupLine.App/ModelDto/KPExhCoverSealTestDto.cs
@@ -0,0 +1,177 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(KPExhCoverSealTestDto))]
+ public class KPExhCoverSealTestDto : ValidateModelBase
+ {
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+ private string _ModelName;
+ ///
+ /// 机型
+ ///
+ public string ModelName
+ {
+ get { return _ModelName; }
+ set { _ModelName = value; RaisePropertyChanged(() => ModelName); }
+ }
+
+ private string _MvDiscNo;
+ ///
+ /// 动盘编号
+ ///
+ public string MvDiscNo
+ {
+ get { return _MvDiscNo; }
+ set { _MvDiscNo = value; RaisePropertyChanged(() => MvDiscNo); }
+ }
+
+ private string _StDiscNo;
+ ///
+ /// 静盘编号
+ ///
+ public string StDiscNo
+ {
+ get { return _StDiscNo; }
+ set { _StDiscNo = value; RaisePropertyChanged(() => StDiscNo); }
+ }
+
+ private decimal _CycleTime;
+ ///
+ /// 节拍
+ ///
+ public decimal CycleTime
+ {
+ get { return _CycleTime; }
+ set { _CycleTime = value; RaisePropertyChanged(() => CycleTime); }
+ }
+
+ private int _ScrewCount;
+ ///
+ /// 螺丝数量
+ ///
+ public int ScrewCount
+ {
+ get { return _ScrewCount; }
+ set { _ScrewCount = value; RaisePropertyChanged(() => ScrewCount); }
+ }
+
+ private string _Result;
+ ///
+ /// 判定
+ ///
+ public string Result
+ {
+ get { return _Result; }
+ set { _Result = ConvertOkNg(value); RaisePropertyChanged(() => Result); }
+ }
+
+ private decimal _FinalTorque1;
+ public decimal FinalTorque1 { get { return _FinalTorque1; } set { _FinalTorque1 = value; RaisePropertyChanged(() => FinalTorque1); } }
+ private decimal _FinalAngle1;
+ public decimal FinalAngle1 { get { return _FinalAngle1; } set { _FinalAngle1 = value; RaisePropertyChanged(() => FinalAngle1); } }
+
+ private decimal _FinalTorque2;
+ public decimal FinalTorque2 { get { return _FinalTorque2; } set { _FinalTorque2 = value; RaisePropertyChanged(() => FinalTorque2); } }
+ private decimal _FinalAngle2;
+ public decimal FinalAngle2 { get { return _FinalAngle2; } set { _FinalAngle2 = value; RaisePropertyChanged(() => FinalAngle2); } }
+
+ private decimal _FinalTorque3;
+ public decimal FinalTorque3 { get { return _FinalTorque3; } set { _FinalTorque3 = value; RaisePropertyChanged(() => FinalTorque3); } }
+ private decimal _FinalAngle3;
+ public decimal FinalAngle3 { get { return _FinalAngle3; } set { _FinalAngle3 = value; RaisePropertyChanged(() => FinalAngle3); } }
+
+ private decimal _FinalTorque4;
+ public decimal FinalTorque4 { get { return _FinalTorque4; } set { _FinalTorque4 = value; RaisePropertyChanged(() => FinalTorque4); } }
+ private decimal _FinalAngle4;
+ public decimal FinalAngle4 { get { return _FinalAngle4; } set { _FinalAngle4 = value; RaisePropertyChanged(() => FinalAngle4); } }
+
+ private decimal _FinalTorque5;
+ public decimal FinalTorque5 { get { return _FinalTorque5; } set { _FinalTorque5 = value; RaisePropertyChanged(() => FinalTorque5); } }
+ private decimal _FinalAngle5;
+ public decimal FinalAngle5 { get { return _FinalAngle5; } set { _FinalAngle5 = value; RaisePropertyChanged(() => FinalAngle5); } }
+
+ private decimal _FinalTorque6;
+ public decimal FinalTorque6 { get { return _FinalTorque6; } set { _FinalTorque6 = value; RaisePropertyChanged(() => FinalTorque6); } }
+ private decimal _FinalAngle6;
+ public decimal FinalAngle6 { get { return _FinalAngle6; } set { _FinalAngle6 = value; RaisePropertyChanged(() => FinalAngle6); } }
+
+ private decimal _FinalTorque7;
+ public decimal FinalTorque7 { get { return _FinalTorque7; } set { _FinalTorque7 = value; RaisePropertyChanged(() => FinalTorque7); } }
+ private decimal _FinalAngle7;
+ public decimal FinalAngle7 { get { return _FinalAngle7; } set { _FinalAngle7 = value; RaisePropertyChanged(() => FinalAngle7); } }
+
+ private decimal _FinalTorque8;
+ public decimal FinalTorque8 { get { return _FinalTorque8; } set { _FinalTorque8 = value; RaisePropertyChanged(() => FinalTorque8); } }
+ private decimal _FinalAngle8;
+ public decimal FinalAngle8 { get { return _FinalAngle8; } set { _FinalAngle8 = value; RaisePropertyChanged(() => FinalAngle8); } }
+
+ private decimal _FinalTorque9;
+ public decimal FinalTorque9 { get { return _FinalTorque9; } set { _FinalTorque9 = value; RaisePropertyChanged(() => FinalTorque9); } }
+ private decimal _FinalAngle9;
+ public decimal FinalAngle9 { get { return _FinalAngle9; } set { _FinalAngle9 = value; RaisePropertyChanged(() => FinalAngle9); } }
+
+ private decimal _FinalTorque10;
+ public decimal FinalTorque10 { get { return _FinalTorque10; } set { _FinalTorque10 = value; RaisePropertyChanged(() => FinalTorque10); } }
+ private decimal _FinalAngle10;
+ public decimal FinalAngle10 { get { return _FinalAngle10; } set { _FinalAngle10 = value; RaisePropertyChanged(() => FinalAngle10); } }
+
+ private decimal _FinalTorque11;
+ public decimal FinalTorque11 { get { return _FinalTorque11; } set { _FinalTorque11 = value; RaisePropertyChanged(() => FinalTorque11); } }
+ private decimal _FinalAngle11;
+ public decimal FinalAngle11 { get { return _FinalAngle11; } set { _FinalAngle11 = value; RaisePropertyChanged(() => FinalAngle11); } }
+
+ private decimal _FinalTorque12;
+ public decimal FinalTorque12 { get { return _FinalTorque12; } set { _FinalTorque12 = value; RaisePropertyChanged(() => FinalTorque12); } }
+ private decimal _FinalAngle12;
+ public decimal FinalAngle12 { get { return _FinalAngle12; } set { _FinalAngle12 = value; RaisePropertyChanged(() => FinalAngle12); } }
+
+ private string _OperatorNo;
+ ///
+ /// 员工编号
+ ///
+ public string OperatorNo
+ {
+ get { return _OperatorNo; }
+ set { _OperatorNo = value; RaisePropertyChanged(() => OperatorNo); }
+ }
+
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+ ///
+ /// 将0/1转换为OK/NG。
+ ///
+ /// 源值。
+ /// 展示文本。
+ private static string ConvertOkNg(string value)
+ {
+ switch (value)
+ {
+ case "0":
+ return "OK";
+ case "1":
+ return "NG";
+ default:
+ return value;
+ }
+ }
+ }
+}
diff --git a/GroupLine.App/ModelDto/KPReliefValveAsmDto.cs b/GroupLine.App/ModelDto/KPReliefValveAsmDto.cs
new file mode 100644
index 0000000..eb2f7f8
--- /dev/null
+++ b/GroupLine.App/ModelDto/KPReliefValveAsmDto.cs
@@ -0,0 +1,197 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(KPReliefValveAsmDto))]
+ public class KPReliefValveAsmDto : ValidateModelBase
+ {
+ ///
+ /// ID
+ ///
+ private long _Id;
+ public long Id
+ {
+ get { return _Id; }
+ set { _Id = value; RaisePropertyChanged(() => Id); }
+ }
+
+ private string _ModelName;
+ ///
+ /// 机型
+ ///
+ public string ModelName
+ {
+ get { return _ModelName; }
+ set { _ModelName = value; RaisePropertyChanged(() => ModelName); }
+ }
+
+ private string _MvDiscNo;
+ ///
+ /// 动盘编号
+ ///
+ public string MvDiscNo
+ {
+ get { return _MvDiscNo; }
+ set { _MvDiscNo = value; RaisePropertyChanged(() => MvDiscNo); }
+ }
+
+ private string _StDiscNo;
+ ///
+ /// 静盘编号
+ ///
+ public string StDiscNo
+ {
+ get { return _StDiscNo; }
+ set { _StDiscNo = value; RaisePropertyChanged(() => StDiscNo); }
+ }
+
+ private decimal _CycleTime;
+ ///
+ /// 节拍
+ ///
+ public decimal CycleTime
+ {
+ get { return _CycleTime; }
+ set { _CycleTime = value; RaisePropertyChanged(() => CycleTime); }
+ }
+
+ private int _ScrewCount;
+ ///
+ /// 螺丝数量
+ ///
+ public int ScrewCount
+ {
+ get { return _ScrewCount; }
+ set { _ScrewCount = value; RaisePropertyChanged(() => ScrewCount); }
+ }
+
+ private string _Result;
+ ///
+ /// 判定
+ ///
+ public string Result
+ {
+ get { return _Result; }
+ set { _Result = ConvertOkNg(value); RaisePropertyChanged(() => Result); }
+ }
+
+ private decimal _FinalTorque1;
+ ///
+ /// 最终扭矩1
+ ///
+ public decimal FinalTorque1
+ {
+ get { return _FinalTorque1; }
+ set { _FinalTorque1 = value; RaisePropertyChanged(() => FinalTorque1); }
+ }
+
+ private decimal _FinalAngle1;
+ ///
+ /// 最终角度1
+ ///
+ public decimal FinalAngle1
+ {
+ get { return _FinalAngle1; }
+ set { _FinalAngle1 = value; RaisePropertyChanged(() => FinalAngle1); }
+ }
+
+ 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 string _OperatorNo;
+ ///
+ /// 员工编号
+ ///
+ public string OperatorNo
+ {
+ get { return _OperatorNo; }
+ set { _OperatorNo = value; RaisePropertyChanged(() => OperatorNo); }
+ }
+
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+ ///
+ /// 将0/1转换为OK/NG。
+ ///
+ /// 源值。
+ /// 展示文本。
+ private static string ConvertOkNg(string value)
+ {
+ switch (value)
+ {
+ case "0":
+ return "OK";
+ case "1":
+ return "NG";
+ default:
+ return value;
+ }
+ }
+ }
+}
diff --git a/GroupLine.App/ModelDto/OilGuideMountDto.cs b/GroupLine.App/ModelDto/OilGuideMountDto.cs
new file mode 100644
index 0000000..9de7bcf
--- /dev/null
+++ b/GroupLine.App/ModelDto/OilGuideMountDto.cs
@@ -0,0 +1,165 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(OilGuideMountDto))]
+ public class OilGuideMountDto : 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 string _BracketNo;
+ ///
+ /// 支架编号
+ ///
+ public string BracketNo
+ {
+ get { return _BracketNo; }
+ set { _BracketNo = value; RaisePropertyChanged(() => BracketNo); }
+ }
+
+ private string _BracketCastingNo;
+ ///
+ /// 支架铸件号
+ ///
+ public string BracketCastingNo
+ {
+ get { return _BracketCastingNo; }
+ set { _BracketCastingNo = value; RaisePropertyChanged(() => BracketCastingNo); }
+ }
+
+ private string _OperatorNo;
+ ///
+ /// 员工编号
+ ///
+ public string OperatorNo
+ {
+ get { return _OperatorNo; }
+ set { _OperatorNo = value; RaisePropertyChanged(() => OperatorNo); }
+ }
+
+ private string _PlaceNoDamage;
+ ///
+ /// 放入时无磕碰
+ ///
+ public string PlaceNoDamage
+ {
+ get { return _PlaceNoDamage; }
+ set { _PlaceNoDamage = ConvertOkNg(value); RaisePropertyChanged(() => PlaceNoDamage); }
+ }
+
+ private string _OilGuidePlate;
+ ///
+ /// 导油板
+ ///
+ public string OilGuidePlate
+ {
+ get { return _OilGuidePlate; }
+ set { _OilGuidePlate = ConvertNotDoOk(value); RaisePropertyChanged(() => OilGuidePlate); }
+ }
+
+ private string _FeelerGaugeCheck;
+ ///
+ /// 塞尺检测
+ ///
+ public string FeelerGaugeCheck
+ {
+ get { return _FeelerGaugeCheck; }
+ set { _FeelerGaugeCheck = ConvertNotDoOk(value); RaisePropertyChanged(() => FeelerGaugeCheck); }
+ }
+
+ private string _BuriedPlug;
+ ///
+ /// 埋塞
+ ///
+ public string BuriedPlug
+ {
+ get { return _BuriedPlug; }
+ set { _BuriedPlug = ConvertNotDoOk(value); RaisePropertyChanged(() => BuriedPlug); }
+ }
+
+ private string _HelicalScrew;
+ ///
+ /// 螺旋螺钉
+ ///
+ public string HelicalScrew
+ {
+ get { return _HelicalScrew; }
+ set { _HelicalScrew = ConvertNotDoOk(value); RaisePropertyChanged(() => HelicalScrew); }
+ }
+
+ private string _AirTightCheck;
+ ///
+ /// 气密检测
+ ///
+ public string AirTightCheck
+ {
+ get { return _AirTightCheck; }
+ set { _AirTightCheck = ConvertNotDoOk(value); RaisePropertyChanged(() => AirTightCheck); }
+ }
+
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+
+ ///
+ /// 将0/1转换为OK/NG。
+ ///
+ /// 源值。
+ /// 展示文本。
+ private static string ConvertOkNg(string value)
+ {
+ switch (value)
+ {
+ case "0":
+ return "OK";
+ case "1":
+ return "NG";
+ default:
+ return value;
+ }
+ }
+
+ ///
+ /// 将0/1转换为不做/OK。
+ ///
+ /// 源值。
+ /// 展示文本。
+ private static string ConvertNotDoOk(string value)
+ {
+ switch (value)
+ {
+ case "0":
+ return "不做";
+ case "1":
+ return "OK";
+ default:
+ return value;
+ }
+ }
+ }
+}
diff --git a/GroupLine.App/ModelDto/PLowWeldDto.cs b/GroupLine.App/ModelDto/PLowWeldDto.cs
index 95ba474..42fcbd3 100644
--- a/GroupLine.App/ModelDto/PLowWeldDto.cs
+++ b/GroupLine.App/ModelDto/PLowWeldDto.cs
@@ -98,6 +98,27 @@ private string _OpNo;
get { return _OpNo; }
set { _OpNo = value; RaisePropertyChanged(() => OpNo); }
}
+
+private decimal _GapblockDepth;
+ ///
+ /// 间隙块深度
+ ///
+ public decimal GapblockDepth
+ {
+ get { return _GapblockDepth; }
+ set { _GapblockDepth = value; RaisePropertyChanged(() => GapblockDepth); }
+ }
+
+private string _PalletNo;
+ ///
+ /// 托盘号
+ ///
+ public string PalletNo
+ {
+ get { return _PalletNo; }
+ set { _PalletNo = value; RaisePropertyChanged(() => PalletNo); }
+ }
+
private DateTime _CreateTime;
///
/// 创建时间
diff --git a/GroupLine.App/ModelDto/RotorShrinkFitDto.cs b/GroupLine.App/ModelDto/RotorShrinkFitDto.cs
new file mode 100644
index 0000000..281e0ae
--- /dev/null
+++ b/GroupLine.App/ModelDto/RotorShrinkFitDto.cs
@@ -0,0 +1,59 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace GroupLine.App.ModelDto
+{
+ [MetadataType(typeof(RotorShrinkFitDto))]
+ public class RotorShrinkFitDto : 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 _BracketNo;
+ ///
+ /// 支架编号
+ ///
+ public string BracketNo
+ {
+ get { return _BracketNo; }
+ set { _BracketNo = value; RaisePropertyChanged(() => BracketNo); }
+ }
+
+ private string _OperatorNo;
+ ///
+ /// 员工编号
+ ///
+ public string OperatorNo
+ {
+ get { return _OperatorNo; }
+ set { _OperatorNo = value; RaisePropertyChanged(() => OperatorNo); }
+ }
+
+ private DateTime _CreateTime;
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime
+ {
+ get { return _CreateTime; }
+ set { _CreateTime = value; RaisePropertyChanged(() => CreateTime); }
+ }
+ }
+}
diff --git a/GroupLine.App/ReportFile/KPBarrelShrinkFitTemplate.xlsx b/GroupLine.App/ReportFile/KPBarrelShrinkFitTemplate.xlsx
new file mode 100644
index 0000000..079ec72
Binary files /dev/null and b/GroupLine.App/ReportFile/KPBarrelShrinkFitTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/KPExhCoverSealTestTemplate.xlsx b/GroupLine.App/ReportFile/KPExhCoverSealTestTemplate.xlsx
new file mode 100644
index 0000000..1bb9ef8
Binary files /dev/null and b/GroupLine.App/ReportFile/KPExhCoverSealTestTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/KPReliefValveAsmTemplate.xlsx b/GroupLine.App/ReportFile/KPReliefValveAsmTemplate.xlsx
new file mode 100644
index 0000000..cbedc2d
Binary files /dev/null and b/GroupLine.App/ReportFile/KPReliefValveAsmTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/OilGuideMountTemplate.xlsx b/GroupLine.App/ReportFile/OilGuideMountTemplate.xlsx
new file mode 100644
index 0000000..494380b
Binary files /dev/null and b/GroupLine.App/ReportFile/OilGuideMountTemplate.xlsx differ
diff --git a/GroupLine.App/ReportFile/RotorShrinkFitTemplate.xlsx b/GroupLine.App/ReportFile/RotorShrinkFitTemplate.xlsx
new file mode 100644
index 0000000..6abf6a7
Binary files /dev/null and b/GroupLine.App/ReportFile/RotorShrinkFitTemplate.xlsx differ
diff --git a/GroupLine.App/View/KPBarrelShrinkFit/KPBarrelShrinkFitView.xaml b/GroupLine.App/View/KPBarrelShrinkFit/KPBarrelShrinkFitView.xaml
new file mode 100644
index 0000000..516bcf0
--- /dev/null
+++ b/GroupLine.App/View/KPBarrelShrinkFit/KPBarrelShrinkFitView.xaml
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/KPBarrelShrinkFit/KPBarrelShrinkFitView.xaml.cs b/GroupLine.App/View/KPBarrelShrinkFit/KPBarrelShrinkFitView.xaml.cs
new file mode 100644
index 0000000..c7da820
--- /dev/null
+++ b/GroupLine.App/View/KPBarrelShrinkFit/KPBarrelShrinkFitView.xaml.cs
@@ -0,0 +1,15 @@
+using System.Windows.Controls;
+
+namespace GroupLine.App.View.KPBarrelShrinkFit
+{
+ ///
+ /// KPBarrelShrinkFitView.xaml 的交互逻辑
+ ///
+ public partial class KPBarrelShrinkFitView : UserControl
+ {
+ public KPBarrelShrinkFitView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/KPExhCoverSealTest/KPExhCoverSealTestView.xaml b/GroupLine.App/View/KPExhCoverSealTest/KPExhCoverSealTestView.xaml
new file mode 100644
index 0000000..a2eac41
--- /dev/null
+++ b/GroupLine.App/View/KPExhCoverSealTest/KPExhCoverSealTestView.xaml
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/KPExhCoverSealTest/KPExhCoverSealTestView.xaml.cs b/GroupLine.App/View/KPExhCoverSealTest/KPExhCoverSealTestView.xaml.cs
new file mode 100644
index 0000000..1374a2e
--- /dev/null
+++ b/GroupLine.App/View/KPExhCoverSealTest/KPExhCoverSealTestView.xaml.cs
@@ -0,0 +1,15 @@
+using System.Windows.Controls;
+
+namespace GroupLine.App.View.KPExhCoverSealTest
+{
+ ///
+ /// KPExhCoverSealTestView.xaml 的交互逻辑
+ ///
+ public partial class KPExhCoverSealTestView : UserControl
+ {
+ public KPExhCoverSealTestView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/KPReliefValveAsm/KPReliefValveAsmView.xaml b/GroupLine.App/View/KPReliefValveAsm/KPReliefValveAsmView.xaml
new file mode 100644
index 0000000..fccfb7c
--- /dev/null
+++ b/GroupLine.App/View/KPReliefValveAsm/KPReliefValveAsmView.xaml
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/KPReliefValveAsm/KPReliefValveAsmView.xaml.cs b/GroupLine.App/View/KPReliefValveAsm/KPReliefValveAsmView.xaml.cs
new file mode 100644
index 0000000..87b2a9a
--- /dev/null
+++ b/GroupLine.App/View/KPReliefValveAsm/KPReliefValveAsmView.xaml.cs
@@ -0,0 +1,15 @@
+using System.Windows.Controls;
+
+namespace GroupLine.App.View.KPReliefValveAsm
+{
+ ///
+ /// KPReliefValveAsmView.xaml 的交互逻辑
+ ///
+ public partial class KPReliefValveAsmView : UserControl
+ {
+ public KPReliefValveAsmView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/OilGuideMount/OilGuideMountView.xaml b/GroupLine.App/View/OilGuideMount/OilGuideMountView.xaml
new file mode 100644
index 0000000..6a4fc48
--- /dev/null
+++ b/GroupLine.App/View/OilGuideMount/OilGuideMountView.xaml
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/OilGuideMount/OilGuideMountView.xaml.cs b/GroupLine.App/View/OilGuideMount/OilGuideMountView.xaml.cs
new file mode 100644
index 0000000..c157e53
--- /dev/null
+++ b/GroupLine.App/View/OilGuideMount/OilGuideMountView.xaml.cs
@@ -0,0 +1,15 @@
+using System.Windows.Controls;
+
+namespace GroupLine.App.View.OilGuideMount
+{
+ ///
+ /// OilGuideMountView.xaml 的交互逻辑
+ ///
+ public partial class OilGuideMountView : UserControl
+ {
+ public OilGuideMountView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/View/PLowWeld/PLowWeldView.xaml b/GroupLine.App/View/PLowWeld/PLowWeldView.xaml
index a754f87..6affbd7 100644
--- a/GroupLine.App/View/PLowWeld/PLowWeldView.xaml
+++ b/GroupLine.App/View/PLowWeld/PLowWeldView.xaml
@@ -162,6 +162,16 @@
Binding="{Binding OpNo}"
Header="员工编号" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GroupLine.App/View/RotorShrinkFit/RotorShrinkFitView.xaml.cs b/GroupLine.App/View/RotorShrinkFit/RotorShrinkFitView.xaml.cs
new file mode 100644
index 0000000..6921697
--- /dev/null
+++ b/GroupLine.App/View/RotorShrinkFit/RotorShrinkFitView.xaml.cs
@@ -0,0 +1,15 @@
+using System.Windows.Controls;
+
+namespace GroupLine.App.View.RotorShrinkFit
+{
+ ///
+ /// RotorShrinkFitView.xaml 的交互逻辑
+ ///
+ public partial class RotorShrinkFitView : UserControl
+ {
+ public RotorShrinkFitView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/GroupLine.App/ViewModel/KPBarrelShrinkFitViewModel.cs b/GroupLine.App/ViewModel/KPBarrelShrinkFitViewModel.cs
new file mode 100644
index 0000000..56eed7b
--- /dev/null
+++ b/GroupLine.App/ViewModel/KPBarrelShrinkFitViewModel.cs
@@ -0,0 +1,222 @@
+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 KPBarrelShrinkFitViewModel : ViewModelBase
+ {
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "KP型筒体烧嵌";
+
+ private string CurrentMachineNameTemplate = "KPBarrelShrinkFitTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ public KPBarrelShrinkFitViewModel()
+ {
+ 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; }
+ }
+
+ private string machineName;
+
+ public string MachineName
+ {
+ get { return machineName; }
+ set { machineName = value; RaisePropertyChanged(() => MachineName); }
+ }
+
+ private string searchBarrelNo;
+
+ public string SearchBarrelNo
+ {
+ get { return searchBarrelNo; }
+ set { searchBarrelNo = value; RaisePropertyChanged(() => SearchBarrelNo); }
+ }
+
+ 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); }
+ }
+
+ 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(SearchBarrelNo))
+ {
+ mulConQueryable = mulConQueryable.Where(t => t.BarrelNo.Contains(SearchBarrelNo));
+ }
+
+ 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 listData = mulConQueryable.OrderByDescending(a => a.CreateTime).ToList();
+ ListModelDto.Clear();
+ foreach (var item in listData)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(string.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace, ex.Message));
+ }
+ }
+
+ 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;
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ if (string.IsNullOrEmpty(dialog.SelectedPath))
+ {
+ MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ return;
+ }
+
+ filePath = dialog.SelectedPath;
+ }
+
+ var listData = ListModelDto.ToList();
+ string templateFilePath = Environment.CurrentDirectory;
+ string tPath = templateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+
+ XSSFWorkbook wk;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close();
+ }
+
+ ISheet sheet = wk.GetSheetAt(0);
+ 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++)
+ {
+ IRow row = sheet.CreateRow(i + 1);
+ row.CreateCell(0).SetCellValue(listData[i].BarrelNo.ToString());
+ row.CreateCell(1).SetCellValue(listData[i].StatorNo.ToString());
+ row.CreateCell(2).SetCellValue(listData[i].OperatorNo.ToString());
+ row.CreateCell(3).SetCellValue(listData[i].BarrelTemp.ToString());
+ row.CreateCell(4).SetCellValue(listData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(4).CellStyle = style0;
+ }
+
+ using (MemoryStream ms = new MemoryStream())
+ {
+ 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();
+ }
+ }
+
+ MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(string.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace, ex.Message));
+ }
+ }
+ }
+}
diff --git a/GroupLine.App/ViewModel/KPExhCoverSealTestViewModel.cs b/GroupLine.App/ViewModel/KPExhCoverSealTestViewModel.cs
new file mode 100644
index 0000000..5389aed
--- /dev/null
+++ b/GroupLine.App/ViewModel/KPExhCoverSealTestViewModel.cs
@@ -0,0 +1,250 @@
+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 KPExhCoverSealTestViewModel : ViewModelBase
+ {
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "KP排气盖板安装气密检测";
+
+ private string CurrentMachineNameTemplate = "KPExhCoverSealTestTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ public KPExhCoverSealTestViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap()
+ .ForMember(dest => dest.Result, opt => opt.MapFrom(src => src.Result.ToString())));
+ autoMapper = config.CreateMapper();
+ }
+
+ private ObservableCollection _ListModelDto;
+
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ private string machineName;
+
+ public string MachineName
+ {
+ get { return machineName; }
+ set { machineName = value; RaisePropertyChanged(() => MachineName); }
+ }
+
+ private string searchMvDiscNo;
+
+ public string SearchMvDiscNo
+ {
+ get { return searchMvDiscNo; }
+ set { searchMvDiscNo = value; RaisePropertyChanged(() => SearchMvDiscNo); }
+ }
+
+ 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); }
+ }
+
+ 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(SearchMvDiscNo))
+ {
+ mulConQueryable = mulConQueryable.Where(t => t.MvDiscNo.Contains(SearchMvDiscNo));
+ }
+
+ 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 listData = mulConQueryable.OrderByDescending(a => a.CreateTime).ToList();
+ ListModelDto.Clear();
+ foreach (var item in listData)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(string.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace, ex.Message));
+ }
+ }
+
+ 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;
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ if (string.IsNullOrEmpty(dialog.SelectedPath))
+ {
+ MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ return;
+ }
+
+ filePath = dialog.SelectedPath;
+ }
+
+ var listData = ListModelDto.ToList();
+ string templateFilePath = Environment.CurrentDirectory;
+ string tPath = templateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+
+ XSSFWorkbook wk;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close();
+ }
+
+ ISheet sheet = wk.GetSheetAt(0);
+ 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++)
+ {
+ IRow row = sheet.CreateRow(i + 1);
+ row.CreateCell(0).SetCellValue(listData[i].ModelName.ToString());
+ row.CreateCell(1).SetCellValue(listData[i].MvDiscNo.ToString());
+ row.CreateCell(2).SetCellValue(listData[i].StDiscNo.ToString());
+ row.CreateCell(3).SetCellValue(listData[i].CycleTime.ToString());
+ row.CreateCell(4).SetCellValue(listData[i].ScrewCount.ToString());
+ row.CreateCell(5).SetCellValue(listData[i].Result.ToString());
+ row.CreateCell(6).SetCellValue(listData[i].FinalTorque1.ToString());
+ row.CreateCell(7).SetCellValue(listData[i].FinalAngle1.ToString());
+ row.CreateCell(8).SetCellValue(listData[i].FinalTorque2.ToString());
+ row.CreateCell(9).SetCellValue(listData[i].FinalAngle2.ToString());
+ row.CreateCell(10).SetCellValue(listData[i].FinalTorque3.ToString());
+ row.CreateCell(11).SetCellValue(listData[i].FinalAngle3.ToString());
+ row.CreateCell(12).SetCellValue(listData[i].FinalTorque4.ToString());
+ row.CreateCell(13).SetCellValue(listData[i].FinalAngle4.ToString());
+ row.CreateCell(14).SetCellValue(listData[i].FinalTorque5.ToString());
+ row.CreateCell(15).SetCellValue(listData[i].FinalAngle5.ToString());
+ row.CreateCell(16).SetCellValue(listData[i].FinalTorque6.ToString());
+ row.CreateCell(17).SetCellValue(listData[i].FinalAngle6.ToString());
+ row.CreateCell(18).SetCellValue(listData[i].FinalTorque7.ToString());
+ row.CreateCell(19).SetCellValue(listData[i].FinalAngle7.ToString());
+ row.CreateCell(20).SetCellValue(listData[i].FinalTorque8.ToString());
+ row.CreateCell(21).SetCellValue(listData[i].FinalAngle8.ToString());
+ row.CreateCell(22).SetCellValue(listData[i].FinalTorque9.ToString());
+ row.CreateCell(23).SetCellValue(listData[i].FinalAngle9.ToString());
+ row.CreateCell(24).SetCellValue(listData[i].FinalTorque10.ToString());
+ row.CreateCell(25).SetCellValue(listData[i].FinalAngle10.ToString());
+ row.CreateCell(26).SetCellValue(listData[i].FinalTorque11.ToString());
+ row.CreateCell(27).SetCellValue(listData[i].FinalAngle11.ToString());
+ row.CreateCell(28).SetCellValue(listData[i].FinalTorque12.ToString());
+ row.CreateCell(29).SetCellValue(listData[i].FinalAngle12.ToString());
+ row.CreateCell(30).SetCellValue(listData[i].OperatorNo.ToString());
+ row.CreateCell(31).SetCellValue(listData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(31).CellStyle = style0;
+ }
+
+ using (MemoryStream ms = new MemoryStream())
+ {
+ 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();
+ }
+ }
+
+ MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(string.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace, ex.Message));
+ }
+ }
+ }
+}
diff --git a/GroupLine.App/ViewModel/KPReliefValveAsmViewModel.cs b/GroupLine.App/ViewModel/KPReliefValveAsmViewModel.cs
new file mode 100644
index 0000000..c3cd3ae
--- /dev/null
+++ b/GroupLine.App/ViewModel/KPReliefValveAsmViewModel.cs
@@ -0,0 +1,234 @@
+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 KPReliefValveAsmViewModel : ViewModelBase
+ {
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "KP溢流阀组装机";
+
+ private string CurrentMachineNameTemplate = "KPReliefValveAsmTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ public KPReliefValveAsmViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap()
+ .ForMember(dest => dest.Result, opt => opt.MapFrom(src => src.Result.ToString())));
+ autoMapper = config.CreateMapper();
+ }
+
+ private ObservableCollection _ListModelDto;
+
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ private string machineName;
+
+ public string MachineName
+ {
+ get { return machineName; }
+ set { machineName = value; RaisePropertyChanged(() => MachineName); }
+ }
+
+ private string searchMvDiscNo;
+
+ public string SearchMvDiscNo
+ {
+ get { return searchMvDiscNo; }
+ set { searchMvDiscNo = value; RaisePropertyChanged(() => SearchMvDiscNo); }
+ }
+
+ 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); }
+ }
+
+ 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(SearchMvDiscNo))
+ {
+ mulConQueryable = mulConQueryable.Where(t => t.MvDiscNo.Contains(SearchMvDiscNo));
+ }
+
+ 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 listData = mulConQueryable.OrderByDescending(a => a.CreateTime).ToList();
+ ListModelDto.Clear();
+ foreach (var item in listData)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(string.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace, ex.Message));
+ }
+ }
+
+ 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;
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ if (string.IsNullOrEmpty(dialog.SelectedPath))
+ {
+ MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ return;
+ }
+
+ filePath = dialog.SelectedPath;
+ }
+
+ var listData = ListModelDto.ToList();
+ string templateFilePath = Environment.CurrentDirectory;
+ string tPath = templateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+
+ XSSFWorkbook wk;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close();
+ }
+
+ ISheet sheet = wk.GetSheetAt(0);
+ 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++)
+ {
+ IRow row = sheet.CreateRow(i + 1);
+ row.CreateCell(0).SetCellValue(listData[i].ModelName.ToString());
+ row.CreateCell(1).SetCellValue(listData[i].MvDiscNo.ToString());
+ row.CreateCell(2).SetCellValue(listData[i].StDiscNo.ToString());
+ row.CreateCell(3).SetCellValue(listData[i].CycleTime.ToString());
+ row.CreateCell(4).SetCellValue(listData[i].ScrewCount.ToString());
+ row.CreateCell(5).SetCellValue(listData[i].Result.ToString());
+ row.CreateCell(6).SetCellValue(listData[i].FinalTorque1.ToString());
+ row.CreateCell(7).SetCellValue(listData[i].FinalAngle1.ToString());
+ row.CreateCell(8).SetCellValue(listData[i].FinalTorque2.ToString());
+ row.CreateCell(9).SetCellValue(listData[i].FinalAngle2.ToString());
+ row.CreateCell(10).SetCellValue(listData[i].FinalTorque3.ToString());
+ row.CreateCell(11).SetCellValue(listData[i].FinalAngle3.ToString());
+ row.CreateCell(12).SetCellValue(listData[i].FinalTorque4.ToString());
+ row.CreateCell(13).SetCellValue(listData[i].FinalAngle4.ToString());
+ row.CreateCell(14).SetCellValue(listData[i].OperatorNo.ToString());
+ row.CreateCell(15).SetCellValue(listData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(15).CellStyle = style0;
+ }
+
+ using (MemoryStream ms = new MemoryStream())
+ {
+ 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();
+ }
+ }
+
+ MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(string.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace, ex.Message));
+ }
+ }
+ }
+}
diff --git a/GroupLine.App/ViewModel/OilGuideMountViewModel.cs b/GroupLine.App/ViewModel/OilGuideMountViewModel.cs
new file mode 100644
index 0000000..520b688
--- /dev/null
+++ b/GroupLine.App/ViewModel/OilGuideMountViewModel.cs
@@ -0,0 +1,263 @@
+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 OilGuideMountViewModel : ViewModelBase
+ {
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "导油板敲入";
+
+ private string CurrentMachineNameTemplate = "OilGuideMountTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ ///
+ /// 实例化函数
+ ///
+ public OilGuideMountViewModel()
+ {
+ ListModelDto = new ObservableCollection();
+ SearchStartDate = DateTime.Now.AddDays(-1).ToShortDateString();
+ SearchEndDate = DateTime.Now.AddDays(2).ToShortDateString();
+
+ MachineName = CurrentMachineName + " - 搜索条件";
+
+ var config = new MapperConfiguration(cfg => cfg.CreateMap()
+ .ForMember(dest => dest.PlaceNoDamage, opt => opt.MapFrom(src => src.PlaceNoDamage.ToString())));
+ autoMapper = config.CreateMapper();
+ }
+
+ ///
+ /// 列表集合
+ ///
+ private ObservableCollection _ListModelDto;
+
+ ///
+ /// 列表集合
+ ///
+ public ObservableCollection ListModelDto
+ {
+ get { return _ListModelDto; }
+ set { _ListModelDto = value; }
+ }
+
+ ///
+ /// 机器设备名称
+ ///
+ private string machineName;
+
+ public string MachineName
+ {
+ get { return machineName; }
+ set { machineName = value; RaisePropertyChanged(() => MachineName); }
+ }
+
+ ///
+ /// 搜索条件-曲轴编号
+ ///
+ 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); }
+ }
+
+ ///
+ /// 搜索命令
+ ///
+ 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 listData = mulConQueryable.OrderByDescending(a => a.CreateTime).ToList();
+ ListModelDto.Clear();
+ foreach (var item in listData)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(string.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace, ex.Message));
+ }
+ }
+
+ 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;
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ if (string.IsNullOrEmpty(dialog.SelectedPath))
+ {
+ MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ return;
+ }
+
+ filePath = dialog.SelectedPath;
+ }
+
+ var listData = ListModelDto.ToList();
+ string templateFilePath = Environment.CurrentDirectory;
+ string tPath = templateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+
+ XSSFWorkbook wk;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close();
+ }
+
+ ISheet sheet = wk.GetSheetAt(0);
+ 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++)
+ {
+ IRow row = sheet.CreateRow(i + 1);
+ row.CreateCell(0).SetCellValue(listData[i].CrankshaftNo.ToString());
+ row.CreateCell(1).SetCellValue(listData[i].BracketNo.ToString());
+ row.CreateCell(2).SetCellValue(listData[i].BracketCastingNo.ToString());
+ row.CreateCell(3).SetCellValue(listData[i].OperatorNo.ToString());
+ row.CreateCell(4).SetCellValue(listData[i].PlaceNoDamage.ToString());
+ row.CreateCell(5).SetCellValue(listData[i].OilGuidePlate.ToString());
+ row.CreateCell(6).SetCellValue(listData[i].FeelerGaugeCheck.ToString());
+ row.CreateCell(7).SetCellValue(listData[i].BuriedPlug.ToString());
+ row.CreateCell(8).SetCellValue(listData[i].HelicalScrew.ToString());
+ row.CreateCell(9).SetCellValue(listData[i].AirTightCheck.ToString());
+ row.CreateCell(10).SetCellValue(listData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(10).CellStyle = style0;
+ }
+
+ using (MemoryStream ms = new MemoryStream())
+ {
+ 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();
+ }
+ }
+
+ MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(string.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace, ex.Message));
+ }
+ }
+ }
+}
diff --git a/GroupLine.App/ViewModel/PLowWeldViewModel.cs b/GroupLine.App/ViewModel/PLowWeldViewModel.cs
index ae3a556..7d5f5e3 100644
--- a/GroupLine.App/ViewModel/PLowWeldViewModel.cs
+++ b/GroupLine.App/ViewModel/PLowWeldViewModel.cs
@@ -291,13 +291,15 @@ namespace GroupLine.App.ViewModel
row.CreateCell(6).SetCellValue(ListData[i].FelerGgeResult.ToString());
row.CreateCell(7).SetCellValue(ListData[i].MagnetResult.ToString());
row.CreateCell(8).SetCellValue(ListData[i].OpNo.ToString());
- row.CreateCell(9).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+ row.CreateCell(9).SetCellValue(ListData[i].GapblockDepth.ToString());
+ row.CreateCell(10).SetCellValue(ListData[i].PalletNo.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(9).CellStyle = style0;
+ row.GetCell(11).CellStyle = style0;
//row.GetCell(26).CellStyle = style0;
//if (ListDat[i].UpperGroupStandDiffResult == "NG")
//{
diff --git a/GroupLine.App/ViewModel/RotorShrinkFitViewModel.cs b/GroupLine.App/ViewModel/RotorShrinkFitViewModel.cs
new file mode 100644
index 0000000..c340112
--- /dev/null
+++ b/GroupLine.App/ViewModel/RotorShrinkFitViewModel.cs
@@ -0,0 +1,221 @@
+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 RotorShrinkFitViewModel : ViewModelBase
+ {
+ private static Logger _Logger = LogManager.GetCurrentClassLogger();
+
+ private string CurrentMachineName = "转子烧嵌";
+
+ private string CurrentMachineNameTemplate = "RotorShrinkFitTemplate.xlsx";
+
+ private IMapper autoMapper;
+
+ public RotorShrinkFitViewModel()
+ {
+ 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; }
+ }
+
+ private string machineName;
+
+ public string MachineName
+ {
+ get { return machineName; }
+ set { machineName = value; RaisePropertyChanged(() => MachineName); }
+ }
+
+ private string searchRotorNo;
+
+ public string SearchRotorNo
+ {
+ get { return searchRotorNo; }
+ set { searchRotorNo = value; RaisePropertyChanged(() => SearchRotorNo); }
+ }
+
+ 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); }
+ }
+
+ 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(SearchRotorNo))
+ {
+ mulConQueryable = mulConQueryable.Where(t => t.RotorNo.Contains(SearchRotorNo));
+ }
+
+ 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 listData = mulConQueryable.OrderByDescending(a => a.CreateTime).ToList();
+ ListModelDto.Clear();
+ foreach (var item in listData)
+ {
+ ListModelDto.Add(autoMapper.Map(item));
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(string.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace, ex.Message));
+ }
+ }
+
+ 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;
+ if (dialog.ShowDialog() == DialogResult.OK)
+ {
+ if (string.IsNullOrEmpty(dialog.SelectedPath))
+ {
+ MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ return;
+ }
+
+ filePath = dialog.SelectedPath;
+ }
+
+ var listData = ListModelDto.ToList();
+ string templateFilePath = Environment.CurrentDirectory;
+ string tPath = templateFilePath + @"\ReportFile\" + CurrentMachineNameTemplate;
+
+ XSSFWorkbook wk;
+ using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ wk = new XSSFWorkbook(fs);
+ fs.Close();
+ }
+
+ ISheet sheet = wk.GetSheetAt(0);
+ 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++)
+ {
+ IRow row = sheet.CreateRow(i + 1);
+ row.CreateCell(0).SetCellValue(listData[i].RotorNo.ToString());
+ row.CreateCell(1).SetCellValue(listData[i].BracketNo.ToString());
+ row.CreateCell(2).SetCellValue(listData[i].OperatorNo.ToString());
+ row.CreateCell(3).SetCellValue(listData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
+
+ style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
+ row.GetCell(3).CellStyle = style0;
+ }
+
+ using (MemoryStream ms = new MemoryStream())
+ {
+ 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();
+ }
+ }
+
+ MessageBox.Show("生成成功");
+ }
+ else
+ {
+ MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
+ }
+ }
+ catch (Exception ex)
+ {
+ _Logger.Error(string.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace, ex.Message));
+ }
+ }
+ }
+}
diff --git a/GroupLine.App/ViewModel/ViewModelLocator.cs b/GroupLine.App/ViewModel/ViewModelLocator.cs
index c1e914d..5b5ba1c 100644
--- a/GroupLine.App/ViewModel/ViewModelLocator.cs
+++ b/GroupLine.App/ViewModel/ViewModelLocator.cs
@@ -82,6 +82,11 @@ namespace GroupLine.App.ViewModel
SimpleIoc.Default.Register();
SimpleIoc.Default.Register();
SimpleIoc.Default.Register();
+ SimpleIoc.Default.Register();
+ SimpleIoc.Default.Register();
+ SimpleIoc.Default.Register();
+ SimpleIoc.Default.Register();
+ SimpleIoc.Default.Register();
////if (ViewModelBase.IsInDesignModeStatic)
@@ -472,6 +477,46 @@ namespace GroupLine.App.ViewModel
}
}
+ public OilGuideMountViewModel OilGuideMount
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance();
+ }
+ }
+
+ public RotorShrinkFitViewModel RotorShrinkFit
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance();
+ }
+ }
+
+ public KPBarrelShrinkFitViewModel KPBarrelShrinkFit
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance();
+ }
+ }
+
+ public KPReliefValveAsmViewModel KPReliefValveAsm
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance();
+ }
+ }
+
+ public KPExhCoverSealTestViewModel KPExhCoverSealTest
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance();
+ }
+ }
+
public static void Cleanup()
{
// TODO Clear the ViewModels
diff --git a/GroupLine.Model/GroupLine.Model.csproj b/GroupLine.Model/GroupLine.Model.csproj
index 04a9bc2..3e268f2 100644
--- a/GroupLine.Model/GroupLine.Model.csproj
+++ b/GroupLine.Model/GroupLine.Model.csproj
@@ -44,6 +44,11 @@
+
+
+
+
+
diff --git a/GroupLine.Model/KPBarrelShrinkFit.cs b/GroupLine.Model/KPBarrelShrinkFit.cs
new file mode 100644
index 0000000..c4cebe6
--- /dev/null
+++ b/GroupLine.Model/KPBarrelShrinkFit.cs
@@ -0,0 +1,50 @@
+using FreeSql.DataAnnotations;
+using System;
+
+namespace GroupLine.Model
+{
+ ///
+ /// KP型筒体烧嵌
+ ///
+ [Table(Name = "dbo.KPBarrelShrinkFit")]
+ [Index("IX_CreateTime", "CreateTime", false)]
+ [Index("IX_BarrelNo", "BarrelNo", false)]
+ public class KPBarrelShrinkFit
+ {
+ ///
+ /// Id
+ ///
+ [Column(IsIdentity = true)]
+ public long Id { get; set; }
+
+ ///
+ /// 筒体编号
+ ///
+ [Column(DbType = "nvarchar(20)")]
+ public string BarrelNo { get; set; }
+
+ ///
+ /// 定子编号
+ ///
+ [Column(DbType = "nvarchar(16)")]
+ public string StatorNo { get; set; }
+
+ ///
+ /// 员工编号
+ ///
+ [Column(DbType = "nvarchar(4)")]
+ public string OperatorNo { get; set; }
+
+ ///
+ /// 筒体温度(℃)
+ ///
+ [Column(DbType = "decimal(8,1)")]
+ public decimal BarrelTemp { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [Column(DbType = "datetime DEFAULT(GETDATE())")]
+ public DateTime CreateTime { get; set; }
+ }
+}
diff --git a/GroupLine.Model/KPExhCoverSealTest.cs b/GroupLine.Model/KPExhCoverSealTest.cs
new file mode 100644
index 0000000..6fab882
--- /dev/null
+++ b/GroupLine.Model/KPExhCoverSealTest.cs
@@ -0,0 +1,212 @@
+using FreeSql.DataAnnotations;
+using System;
+
+namespace GroupLine.Model
+{
+ ///
+ /// KP排气盖板安装气密检测
+ ///
+ [Table(Name = "dbo.KPExhCoverSealTest")]
+ [Index("IX_CreateTime", "CreateTime", false)]
+ [Index("IX_MvDiscNo", "MvDiscNo", false)]
+ public class KPExhCoverSealTest
+ {
+ ///
+ /// Id
+ ///
+ [Column(IsIdentity = true)]
+ public long Id { get; set; }
+
+ ///
+ /// 机型
+ ///
+ [Column(DbType = "nvarchar(8)")]
+ public string ModelName { get; set; }
+
+ ///
+ /// 动盘编号
+ ///
+ [Column(DbType = "nvarchar(8)")]
+ public string MvDiscNo { get; set; }
+
+ ///
+ /// 静盘编号
+ ///
+ [Column(DbType = "nvarchar(8)")]
+ public string StDiscNo { get; set; }
+
+ ///
+ /// 节拍(S)
+ ///
+ [Column(DbType = "decimal(8,1)")]
+ public decimal CycleTime { get; set; }
+
+ ///
+ /// 螺丝数量(个)
+ ///
+ [Column(DbType = "int")]
+ public int ScrewCount { get; set; }
+
+ ///
+ /// 判定,0:OK,1:NG
+ ///
+ [Column(DbType = "nvarchar(5)")]
+ public int Result { get; set; }
+
+ ///
+ /// 最终扭矩1(N.M)
+ ///
+ [Column(DbType = "decimal(8,2)")]
+ public decimal FinalTorque1 { get; set; }
+
+ ///
+ /// 最终角度1(deg)
+ ///
+ [Column(DbType = "decimal(8,1)")]
+ public decimal FinalAngle1 { get; set; }
+
+ ///
+ /// 最终扭矩2(N.M)
+ ///
+ [Column(DbType = "decimal(8,2)")]
+ public decimal FinalTorque2 { get; set; }
+
+ ///
+ /// 最终角度2(deg)
+ ///
+ [Column(DbType = "decimal(8,1)")]
+ public decimal FinalAngle2 { get; set; }
+
+ ///
+ /// 最终扭矩3(N.M)
+ ///
+ [Column(DbType = "decimal(8,2)")]
+ public decimal FinalTorque3 { get; set; }
+
+ ///
+ /// 最终角度3(deg)
+ ///
+ [Column(DbType = "decimal(8,1)")]
+ public decimal FinalAngle3 { get; set; }
+
+ ///
+ /// 最终扭矩4(N.M)
+ ///
+ [Column(DbType = "decimal(8,2)")]
+ public decimal FinalTorque4 { get; set; }
+
+ ///
+ /// 最终角度4(deg)
+ ///
+ [Column(DbType = "decimal(8,1)")]
+ public decimal FinalAngle4 { get; set; }
+
+ ///
+ /// 最终扭矩5(N.M)
+ ///
+ [Column(DbType = "decimal(8,2)")]
+ public decimal FinalTorque5 { get; set; }
+
+ ///
+ /// 最终角度5(deg)
+ ///
+ [Column(DbType = "decimal(8,1)")]
+ public decimal FinalAngle5 { get; set; }
+
+ ///
+ /// 最终扭矩6(N.M)
+ ///
+ [Column(DbType = "decimal(8,2)")]
+ public decimal FinalTorque6 { get; set; }
+
+ ///
+ /// 最终角度6(deg)
+ ///
+ [Column(DbType = "decimal(8,1)")]
+ public decimal FinalAngle6 { get; set; }
+
+ ///
+ /// 最终扭矩7(N.M)
+ ///
+ [Column(DbType = "decimal(8,2)")]
+ public decimal FinalTorque7 { get; set; }
+
+ ///
+ /// 最终角度7(deg)
+ ///
+ [Column(DbType = "decimal(8,1)")]
+ public decimal FinalAngle7 { get; set; }
+
+ ///
+ /// 最终扭矩8(N.M)
+ ///
+ [Column(DbType = "decimal(8,2)")]
+ public decimal FinalTorque8 { get; set; }
+
+ ///
+ /// 最终角度8(deg)
+ ///
+ [Column(DbType = "decimal(8,1)")]
+ public decimal FinalAngle8 { get; set; }
+
+ ///
+ /// 最终扭矩9(N.M)
+ ///
+ [Column(DbType = "decimal(8,2)")]
+ public decimal FinalTorque9 { get; set; }
+
+ ///
+ /// 最终角度9(deg)
+ ///
+ [Column(DbType = "decimal(8,1)")]
+ public decimal FinalAngle9 { get; set; }
+
+ ///
+ /// 最终扭矩10(N.M)
+ ///
+ [Column(DbType = "decimal(8,2)")]
+ public decimal FinalTorque10 { get; set; }
+
+ ///
+ /// 最终角度10(deg)
+ ///
+ [Column(DbType = "decimal(8,1)")]
+ public decimal FinalAngle10 { get; set; }
+
+ ///
+ /// 最终扭矩11(N.M)
+ ///
+ [Column(DbType = "decimal(8,2)")]
+ public decimal FinalTorque11 { get; set; }
+
+ ///
+ /// 最终角度11(deg)
+ ///
+ [Column(DbType = "decimal(8,1)")]
+ public decimal FinalAngle11 { get; set; }
+
+ ///
+ /// 最终扭矩12(N.M)
+ ///
+ [Column(DbType = "decimal(8,2)")]
+ public decimal FinalTorque12 { get; set; }
+
+ ///
+ /// 最终角度12(deg)
+ ///
+ [Column(DbType = "decimal(8,1)")]
+ public decimal FinalAngle12 { get; set; }
+
+ ///
+ /// 员工编号
+ ///
+ [Column(DbType = "nvarchar(10)")]
+ public string OperatorNo { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [Column(DbType = "datetime DEFAULT(GETDATE())")]
+ public DateTime CreateTime { get; set; }
+ }
+}
diff --git a/GroupLine.Model/KPReliefValveAsm.cs b/GroupLine.Model/KPReliefValveAsm.cs
new file mode 100644
index 0000000..7767d8b
--- /dev/null
+++ b/GroupLine.Model/KPReliefValveAsm.cs
@@ -0,0 +1,116 @@
+using FreeSql.DataAnnotations;
+using System;
+
+namespace GroupLine.Model
+{
+ ///
+ /// KP溢流阀组装机
+ ///
+ [Table(Name = "dbo.KPReliefValveAsm")]
+ [Index("IX_CreateTime", "CreateTime", false)]
+ [Index("IX_MvDiscNo", "MvDiscNo", false)]
+ public class KPReliefValveAsm
+ {
+ ///
+ /// Id
+ ///
+ [Column(IsIdentity = true)]
+ public long Id { get; set; }
+
+ ///
+ /// 机型
+ ///
+ [Column(DbType = "nvarchar(8)")]
+ public string ModelName { get; set; }
+
+ ///
+ /// 动盘编号
+ ///
+ [Column(DbType = "nvarchar(8)")]
+ public string MvDiscNo { get; set; }
+
+ ///
+ /// 静盘编号
+ ///
+ [Column(DbType = "nvarchar(8)")]
+ public string StDiscNo { get; set; }
+
+ ///
+ /// 节拍(S)
+ ///
+ [Column(DbType = "decimal(8,1)")]
+ public decimal CycleTime { get; set; }
+
+ ///
+ /// 螺丝数量(个)
+ ///
+ [Column(DbType = "int")]
+ public int ScrewCount { get; set; }
+
+ ///
+ /// 判定,0:OK,1:NG
+ ///
+ [Column(DbType = "nvarchar(6)")]
+ public int Result { get; set; }
+
+ ///
+ /// 最终扭矩1(N.M)
+ ///
+ [Column(DbType = "decimal(8,2)")]
+ public decimal FinalTorque1 { get; set; }
+
+ ///
+ /// 最终角度1(deg)
+ ///
+ [Column(DbType = "decimal(8,1)")]
+ public decimal FinalAngle1 { get; set; }
+
+ ///
+ /// 最终扭矩2(N.M)
+ ///
+ [Column(DbType = "decimal(8,2)")]
+ public decimal FinalTorque2 { get; set; }
+
+ ///
+ /// 最终角度2(deg)
+ ///
+ [Column(DbType = "decimal(8,1)")]
+ public decimal FinalAngle2 { get; set; }
+
+ ///
+ /// 最终扭矩3(N.M)
+ ///
+ [Column(DbType = "decimal(8,2)")]
+ public decimal FinalTorque3 { get; set; }
+
+ ///
+ /// 最终角度3(deg)
+ ///
+ [Column(DbType = "decimal(8,1)")]
+ public decimal FinalAngle3 { get; set; }
+
+ ///
+ /// 最终扭矩4(N.M)
+ ///
+ [Column(DbType = "decimal(8,2)")]
+ public decimal FinalTorque4 { get; set; }
+
+ ///
+ /// 最终角度4(deg)
+ ///
+ [Column(DbType = "decimal(8,1)")]
+ public decimal FinalAngle4 { get; set; }
+
+ ///
+ /// 员工编号
+ ///
+ [Column(DbType = "nvarchar(10)")]
+ public string OperatorNo { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [Column(DbType = "datetime DEFAULT(GETDATE())")]
+ public DateTime CreateTime { get; set; }
+ }
+}
diff --git a/GroupLine.Model/OilGuideMount.cs b/GroupLine.Model/OilGuideMount.cs
new file mode 100644
index 0000000..96aa3a7
--- /dev/null
+++ b/GroupLine.Model/OilGuideMount.cs
@@ -0,0 +1,86 @@
+using FreeSql.DataAnnotations;
+using System;
+
+namespace GroupLine.Model
+{
+ ///
+ /// 导油板敲入
+ ///
+ [Table(Name = "dbo.OilGuideMount")]
+ [Index("IX_CreateTime", "CreateTime", false)]
+ [Index("IX_CrankshaftNo", "CrankshaftNo", false)]
+ public class OilGuideMount
+ {
+ ///
+ /// Id
+ ///
+ [Column(IsIdentity = true)]
+ public long Id { get; set; }
+
+ ///
+ /// 曲轴编号
+ ///
+ [Column(DbType = "nvarchar(9)")]
+ public string CrankshaftNo { get; set; }
+
+ ///
+ /// 支架编号
+ ///
+ [Column(DbType = "nvarchar(8)")]
+ public string BracketNo { get; set; }
+
+ ///
+ /// 支架铸件号
+ ///
+ [Column(DbType = "nvarchar(4)")]
+ public string BracketCastingNo { get; set; }
+
+ ///
+ /// 员工编号
+ ///
+ [Column(DbType = "nvarchar(6)")]
+ public string OperatorNo { get; set; }
+
+ ///
+ /// 放入时无磕碰,0:OK,1:NG
+ ///
+ [Column(DbType = "nvarchar(6)")]
+ public int PlaceNoDamage { get; set; }
+
+ ///
+ /// 导油板,0:不做,1:OK
+ ///
+ [Column(DbType = "int")]
+ public int OilGuidePlate { get; set; }
+
+ ///
+ /// 塞尺检测,0:不做,1:OK
+ ///
+ [Column(DbType = "int")]
+ public int FeelerGaugeCheck { get; set; }
+
+ ///
+ /// 埋塞,0:不做,1:OK
+ ///
+ [Column(DbType = "int")]
+ public int BuriedPlug { get; set; }
+
+ ///
+ /// 螺旋螺钉,0:不做,1:OK
+ ///
+ [Column(DbType = "int")]
+ public int HelicalScrew { get; set; }
+
+ ///
+ /// 气密检测,0:不做,1:OK
+ ///
+ [Column(DbType = "int")]
+ public int AirTightCheck { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [Column(DbType = "datetime DEFAULT(GETDATE())")]
+ public DateTime CreateTime { get; set; }
+ }
+}
diff --git a/GroupLine.Model/PLowWeld.cs b/GroupLine.Model/PLowWeld.cs
index 325f04d..f128199 100644
--- a/GroupLine.Model/PLowWeld.cs
+++ b/GroupLine.Model/PLowWeld.cs
@@ -23,47 +23,62 @@ namespace GroupLine.Model
///
[Column(DbType = "nvarchar(20)")]
public string CylinderNo { get; set; }
-///
+ ///
/// 曲轴编号
///
[Column(DbType = "nvarchar(10)")]
public string CrankshaftNo { get; set; }
-///
+ ///
/// 下部编号
///
[Column(DbType = "nvarchar(10)")]
public string DownNo { get; set; }
-///
+ ///
/// 下部铸件编号
///
[Column(DbType = "nvarchar(10)")]
public string DoCastNo { get; set; }
-///
+ ///
/// 定子压入深度
///
[Column(DbType = "decimal(8, 2)")]
public decimal StatorPressDep { get; set; }
-///
+ ///
/// 转子压入深度
///
[Column(DbType = "decimal(8, 2)")]
public decimal RotorPressDep { get; set; }
-///
+ ///
/// 塞尺检查(OK)
///
[Column(DbType = "nvarchar(6)")]
public string FelerGgeResult { get; set; }
-///
+ ///
/// 磁石检查(OK)
///
[Column(DbType = "nvarchar(6)")]
public string MagnetResult { get; set; }
-///
+
+
+ ///
/// 员工编号
///
[Column(DbType = "nvarchar(6)")]
public string OpNo { get; set; }
-///
+
+ ///
+ /// 间隙块深度
+ ///
+ [Column(DbType = "decimal(8, 2)")]
+ public decimal GapblockDepth { get; set; }
+
+ ///
+ /// 托盘号
+ ///
+ [Column(DbType = "nvarchar(6)")]
+ public string PalletNo { get; set; }
+
+ ///
/// 创建时间
///
[Column(DbType = "datetime DEFAULT(GETDATE())")]
diff --git a/GroupLine.Model/RotorShrinkFit.cs b/GroupLine.Model/RotorShrinkFit.cs
new file mode 100644
index 0000000..7e6ae37
--- /dev/null
+++ b/GroupLine.Model/RotorShrinkFit.cs
@@ -0,0 +1,44 @@
+using FreeSql.DataAnnotations;
+using System;
+
+namespace GroupLine.Model
+{
+ ///
+ /// 转子烧嵌
+ ///
+ [Table(Name = "dbo.RotorShrinkFit")]
+ [Index("IX_CreateTime", "CreateTime", false)]
+ [Index("IX_RotorNo", "RotorNo", false)]
+ public class RotorShrinkFit
+ {
+ ///
+ /// Id
+ ///
+ [Column(IsIdentity = true)]
+ public long Id { get; set; }
+
+ ///
+ /// 转子编号
+ ///
+ [Column(DbType = "nvarchar(16)")]
+ public string RotorNo { get; set; }
+
+ ///
+ /// 支架编号
+ ///
+ [Column(DbType = "nvarchar(8)")]
+ public string BracketNo { get; set; }
+
+ ///
+ /// 员工编号
+ ///
+ [Column(DbType = "nvarchar(6)")]
+ public string OperatorNo { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [Column(DbType = "datetime DEFAULT(GETDATE())")]
+ public DateTime CreateTime { get; set; }
+ }
+}