From 2b03b9a1007c5fe0e90d663fba86b088d6894e3b Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周六, 15 6月 2024 16:34:02 +0800 Subject: [PATCH] 增加测试 --- DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_05.cs | 38 ++ DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.Designer.cs | 61 +++ DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/Settings.settings | 7 DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Model/MiddleModel/WorkPieceLogMiddle.cs | 88 ++++ DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_DataCapture.sln | 12 DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.resx | 120 ++++++ DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/App.config | 9 DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/Resources.resx | 117 ++++++ DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.cs | 47 ++ DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/App.config | 49 ++ DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/Properties/AssemblyInfo.cs | 20 + DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/Resources.Designer.cs | 63 +++ DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/UnitTest1.cs | 41 ++ DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Program.cs | 22 + DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/SystemHelper.cs | 51 ++ DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/Settings.Designer.cs | 26 + DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/iWare_SCADA_FormTest2.csproj | 91 +++++ DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/AssemblyInfo.cs | 36 ++ DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Model/TableModel/QualityDataInfo.cs | 90 +++++ DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/iWare_SCADA_BusinessLogical.csproj | 1 DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/iWare_SCADA_Test.csproj | 75 ++++ DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/packages.config | 5 22 files changed, 1,068 insertions(+), 1 deletions(-) diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_05.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_05.cs index 96e2b29..ae9bc7b 100644 --- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_05.cs +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_05.cs @@ -277,6 +277,43 @@ //閲嶉噺缁勫埆 wplog.QualityOP80To9 = oP80Info.OP80ItemInfolist.Where(o => o.鍚嶇О.Equals("Weight Class")).FirstOrDefault()?.鐘舵��; //wplog.Remarks = (wplog.Remarks ?? "") + $"OP80涓嬬嚎瀹屾垚璇诲彇鏂囦欢{file.FullName},鏁版嵁銆恵wplog.OP80NewCode??"绌�"}銆戙�恵wplog.QualityOP80To1 ?? "绌�"}銆戙�恵wplog.QualityOP80To2 ?? "绌�"}銆戙�恵wplog.QualityOP80To3 ?? "绌�"}銆戙�恵wplog.QualityOP80To4 ?? "绌�"}銆戙�恵wplog.QualityOP80To5 ?? "绌�"}銆�"; + + //鏂板OP80鐨勪竴浜涜川閲忔暟鎹� 銆怑ditby shaocx,2024-06-13銆� + wplog.QualityOP80_Houdu = oP80Info.OP80ItemInfolist.Where(o => o.鍚嶇О.Equals("Big_End_Thickness")).FirstOrDefault()?.缁濆鍊�; + wplog.QualityOP80_ZXJ = oP80Info.OP80ItemInfolist.Where(o => o.鍚嶇О.Equals("Distance of Two Head")).FirstOrDefault()?.缁濆鍊�; + wplog.QualityOP80_DTKYZD = oP80Info.OP80ItemInfolist.Where(o => o.鍚嶇О.Equals("Big_End_Cylindricity")).FirstOrDefault()?.缁濆鍊�; + wplog.QualityOP80_XTSMYD = oP80Info.OP80ItemInfolist.Where(o => o.鍚嶇О.Equals("Small_End_Top_Roundn")).FirstOrDefault()?.缁濆鍊�; + wplog.QualityOP80_XTXMYD = oP80Info.OP80ItemInfolist.Where(o => o.鍚嶇О.Equals("Small_End_Bot_Roundn")).FirstOrDefault()?.缁濆鍊�; + + + wplog.QualityOP80_D_S_X = oP80Info.OP80ItemInfolist.Where(o => o.鍚嶇О.Equals("Big_End_Top_X_Dia.")).FirstOrDefault()?.缁濆鍊�; + wplog.QualityOP80_D_S_Y = oP80Info.OP80ItemInfolist.Where(o => o.鍚嶇О.Equals("Big_End_Top_Y_Dia.")).FirstOrDefault()?.缁濆鍊�; + wplog.QualityOP80_D_X_X = oP80Info.OP80ItemInfolist.Where(o => o.鍚嶇О.Equals("Big_End_Bot_X_Dia.")).FirstOrDefault()?.缁濆鍊�; + wplog.QualityOP80_D_X_Y = oP80Info.OP80ItemInfolist.Where(o => o.鍚嶇О.Equals("Big_End_Bot_Y_Dia.")).FirstOrDefault()?.缁濆鍊�; + //璁$畻澶уご瀛旂洿寰�,澶уご瀛旂洿寰�=锛堝ぇ澶翠笂闈鏂瑰悜鐩村緞+澶уご涓婇潰Y鏂瑰悜鐩村緞+澶уご涓嬮潰X鏂瑰悜鐩村緞+澶уご涓嬮潰Y鏂瑰悜鐩村緞锛�/4 + List<decimal> valueList = new List<decimal>() { + SystemHelper.GetDecimal(wplog.QualityOP80_D_S_X), + SystemHelper.GetDecimal(wplog.QualityOP80_D_S_Y), + SystemHelper.GetDecimal(wplog.QualityOP80_D_X_X), + SystemHelper.GetDecimal(wplog.QualityOP80_D_X_Y), + }; + wplog.QualityOP80_D_TKZJ = SystemHelper.CalcDecimalAvg(valueList, 3); + + + wplog.QualityOP80_X_S_X = oP80Info.OP80ItemInfolist.Where(o => o.鍚嶇О.Equals("Small_End_Top_X_Dia.")).FirstOrDefault()?.缁濆鍊�; + wplog.QualityOP80_X_S_Y = oP80Info.OP80ItemInfolist.Where(o => o.鍚嶇О.Equals("Small_End_Top_Y_Dia.")).FirstOrDefault()?.缁濆鍊�; + wplog.QualityOP80_X_X_X = oP80Info.OP80ItemInfolist.Where(o => o.鍚嶇О.Equals("Small_End_Bot_X_Dia.")).FirstOrDefault()?.缁濆鍊�; + wplog.QualityOP80_X_X_Y = oP80Info.OP80ItemInfolist.Where(o => o.鍚嶇О.Equals("Small_End_Bot_Y_Dia.")).FirstOrDefault()?.缁濆鍊�; + //璁$畻灏忓ご瀛旂洿寰�,灏忓ご瀛旂洿寰�=锛堝皬澶翠笂闈鏂瑰悜鐩村緞+灏忓ご涓婇潰Y鏂瑰悜鐩村緞+灏忓ご涓嬮潰X鏂瑰悜鐩村緞+灏忓ご涓嬮潰Y鏂瑰悜鐩村緞锛�/4 + valueList = new List<decimal>(); + valueList = new List<decimal>() { + SystemHelper.GetDecimal(wplog.QualityOP80_X_S_X), + SystemHelper.GetDecimal(wplog.QualityOP80_X_S_Y), + SystemHelper.GetDecimal(wplog.QualityOP80_X_X_X), + SystemHelper.GetDecimal(wplog.QualityOP80_X_X_Y), + }; + wplog.QualityOP80_X_TKZJ = SystemHelper.CalcDecimalAvg(valueList, 3); + } else { @@ -291,7 +328,6 @@ } } } - } catch (Exception ex) { diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/SystemHelper.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/SystemHelper.cs new file mode 100644 index 0000000..8b4eccb --- /dev/null +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/SystemHelper.cs @@ -0,0 +1,51 @@ +锘� +using iWare_SCADA_Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace iWare_SCADA_BusinessLogical.Utils +{ + /// <summary> + /// 绯荤粺甯姪绫� + /// </summary> + public class SystemHelper + { + /// <summary> + /// 瀛楃涓茶浆鎹ecimal绫诲瀷 + /// </summary> + /// <param name="value"></param> + /// <returns></returns> + public static decimal GetDecimal(string value) + { + if (string.IsNullOrEmpty(value)) + { + return 0; + } + decimal decimalValue = 0; + var isRight = decimal.TryParse(value, out decimalValue); + if (isRight) + { + return decimalValue; + } + return 0; + } + + /// <summary> + /// decimal闆嗗悎璁$畻骞冲潎鍊� + /// </summary> + /// <param name="valueList">闆嗗悎</param> + /// <param name="digits">绮惧害</param> + /// <returns></returns> + public static string CalcDecimalAvg(List<decimal> valueList, int digits) + { + var sum = valueList.Sum(); + var count = valueList.Count; + var bb = Convert.ToDecimal((sum / (decimal)count).ToString("f" + digits.ToString())); + return bb.ToString(); + } + + } +} diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/iWare_SCADA_BusinessLogical.csproj b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/iWare_SCADA_BusinessLogical.csproj index 4c9d8b1..c368587 100644 --- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/iWare_SCADA_BusinessLogical.csproj +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/iWare_SCADA_BusinessLogical.csproj @@ -153,6 +153,7 @@ <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> + <Compile Include="Utils\SystemHelper.cs" /> <Compile Include="Utils\ComboBoxHelper.cs" /> <Compile Include="Utils\ConfigHelper.cs" /> <Compile Include="Utils\CSVHelper.cs" /> diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_DataCapture.sln b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_DataCapture.sln index fcc542c..8c9f9b1 100644 --- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_DataCapture.sln +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_DataCapture.sln @@ -9,6 +9,10 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iWare_SCADA_BusinessLogical", "iWare_SCADA_BusinessLogical\iWare_SCADA_BusinessLogical.csproj", "{32708F19-FE1A-48F5-B373-8E1C776F216C}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iWare_SCADA_Test", "iWare_SCADA_Test\iWare_SCADA_Test.csproj", "{A3F6EBB4-D019-4246-9789-337B860BA31E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iWare_SCADA_FormTest2", "iWare_SCADA_FormTest\iWare_SCADA_FormTest2.csproj", "{3B160435-00C6-4321-9D3A-A30FD23F2D4B}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -27,6 +31,14 @@ {32708F19-FE1A-48F5-B373-8E1C776F216C}.Debug|Any CPU.Build.0 = Debug|Any CPU {32708F19-FE1A-48F5-B373-8E1C776F216C}.Release|Any CPU.ActiveCfg = Release|Any CPU {32708F19-FE1A-48F5-B373-8E1C776F216C}.Release|Any CPU.Build.0 = Release|Any CPU + {A3F6EBB4-D019-4246-9789-337B860BA31E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A3F6EBB4-D019-4246-9789-337B860BA31E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A3F6EBB4-D019-4246-9789-337B860BA31E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A3F6EBB4-D019-4246-9789-337B860BA31E}.Release|Any CPU.Build.0 = Release|Any CPU + {3B160435-00C6-4321-9D3A-A30FD23F2D4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3B160435-00C6-4321-9D3A-A30FD23F2D4B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3B160435-00C6-4321-9D3A-A30FD23F2D4B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3B160435-00C6-4321-9D3A-A30FD23F2D4B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/App.config b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/App.config new file mode 100644 index 0000000..c50a458 --- /dev/null +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/App.config @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<configuration> + <startup> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/> + </startup> + <appSettings> + <add key="OP80QualityData_Test" value="X:\CA4GC20TD_Test\"/> + </appSettings> +</configuration> diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.Designer.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.Designer.cs new file mode 100644 index 0000000..80464e5 --- /dev/null +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.Designer.cs @@ -0,0 +1,61 @@ +锘縩amespace iWare_SCADA_FormTest +{ + partial class Form1 + { + /// <summary> + /// 蹇呴渶鐨勮璁″櫒鍙橀噺銆� + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// 娓呯悊鎵�鏈夋鍦ㄤ娇鐢ㄧ殑璧勬簮銆� + /// </summary> + /// <param name="disposing">濡傛灉搴旈噴鏀炬墭绠¤祫婧愶紝涓� true锛涘惁鍒欎负 false銆�</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows 绐椾綋璁捐鍣ㄧ敓鎴愮殑浠g爜 + + /// <summary> + /// 璁捐鍣ㄦ敮鎸佹墍闇�鐨勬柟娉� - 涓嶈淇敼 + /// 浣跨敤浠g爜缂栬緫鍣ㄤ慨鏀规鏂规硶鐨勫唴瀹广�� + /// </summary> + private void InitializeComponent() + { + this.button1 = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(76, 55); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(135, 54); + this.button1.TabIndex = 0; + this.button1.Text = "娴嬭瘯绉诲姩鏂囦欢"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.button1); + this.Name = "Form1"; + this.Text = "Form1"; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button button1; + } +} + diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.cs new file mode 100644 index 0000000..f8ac998 --- /dev/null +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.cs @@ -0,0 +1,47 @@ +锘縰sing iWare_SCADA_BusinessLogical.Utils; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace iWare_SCADA_FormTest +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + } + + private void button1_Click(object sender, EventArgs e) + { + try + { + string path = ConfigHelper.GetConfigString("OP80QualityData_Test");//OP80鐨勫湴鍧� + + var newFiles = FileHelper.DetectNewFilesCSV(path, 300, DateTime.Now.AddDays(-100), DateTime.Now.AddDays(1)); + + foreach (System.IO.FileInfo file in newFiles) + { + MessageBox.Show("鎵惧埌鏂囦欢:" + file.FullName); + var toPath = file.FullName.Replace("CA4GC20TD_Test", "CA4GC20TD_COPY"); + MessageBox.Show("瑕佺Щ鍔ㄥ埌:" + file.FullName); + File.Move(file.FullName, toPath);//绉诲姩 + } + + MessageBox.Show("鎴愬姛"); + } + catch (Exception ex) + { + MessageBox.Show("寮傚父:" + ex.Message); + } + + } + } +} diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.resx b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.resx @@ -0,0 +1,120 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Program.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Program.cs new file mode 100644 index 0000000..c40ff52 --- /dev/null +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Program.cs @@ -0,0 +1,22 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace iWare_SCADA_FormTest +{ + internal static class Program + { + /// <summary> + /// 搴旂敤绋嬪簭鐨勪富鍏ュ彛鐐广�� + /// </summary> + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/AssemblyInfo.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..531d99a --- /dev/null +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +锘縰sing System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 鏈夊叧绋嬪簭闆嗙殑涓�鑸俊鎭敱浠ヤ笅 +// 鎺у埗銆傛洿鏀硅繖浜涚壒鎬у�煎彲淇敼 +// 涓庣▼搴忛泦鍏宠仈鐨勪俊鎭�� +[assembly: AssemblyTitle("iWare_SCADA_FormTest")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("寰蒋涓浗")] +[assembly: AssemblyProduct("iWare_SCADA_FormTest")] +[assembly: AssemblyCopyright("Copyright 漏 寰蒋涓浗 2024")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 灏� ComVisible 璁剧疆涓� false 浼氫娇姝ょ▼搴忛泦涓殑绫诲瀷 +//瀵� COM 缁勪欢涓嶅彲瑙併�傚鏋滈渶瑕佷粠 COM 璁块棶姝ょ▼搴忛泦涓殑绫诲瀷 +//璇峰皢姝ょ被鍨嬬殑 ComVisible 鐗规�ц缃负 true銆� +[assembly: ComVisible(false)] + +// 濡傛灉姝ら」鐩悜 COM 鍏紑锛屽垯涓嬪垪 GUID 鐢ㄤ簬绫诲瀷搴撶殑 ID +[assembly: Guid("3b160435-00c6-4321-9d3a-a30fd23f2d4b")] + +// 绋嬪簭闆嗙殑鐗堟湰淇℃伅鐢变笅鍒楀洓涓�肩粍鎴�: +// +// 涓荤増鏈� +// 娆$増鏈� +// 鐢熸垚鍙� +// 淇鍙� +// +//鍙互鎸囧畾鎵�鏈夎繖浜涘�硷紝涔熷彲浠ヤ娇鐢ㄢ�滅敓鎴愬彿鈥濆拰鈥滀慨璁㈠彿鈥濈殑榛樿鍊� +//閫氳繃浣跨敤 "*"锛屽涓嬫墍绀�: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/Resources.Designer.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/Resources.Designer.cs new file mode 100644 index 0000000..f5a1463 --- /dev/null +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +锘�//------------------------------------------------------------------------------ +// <auto-generated> +// 姝や唬鐮佺敱宸ュ叿鐢熸垚銆� +// 杩愯鏃剁増鏈�:4.0.30319.42000 +// +// 瀵规鏂囦欢鐨勬洿鏀瑰彲鑳戒細瀵艰嚧涓嶆纭殑琛屼负锛屽苟涓斿鏋� +// 閲嶆柊鐢熸垚浠g爜锛岃繖浜涙洿鏀瑰皢浼氫涪澶便�� +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace iWare_SCADA_FormTest.Properties { + using System; + + + /// <summary> + /// 涓�涓己绫诲瀷鐨勮祫婧愮被锛岀敤浜庢煡鎵炬湰鍦板寲鐨勫瓧绗︿覆绛夈�� + /// </summary> + // 姝ょ被鏄敱 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() { + } + + /// <summary> + /// 杩斿洖姝ょ被浣跨敤鐨勭紦瀛樼殑 ResourceManager 瀹炰緥銆� + /// </summary> + [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("iWare_SCADA_FormTest.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// <summary> + /// 閲嶅啓褰撳墠绾跨▼鐨� CurrentUICulture 灞炴�э紝瀵� + /// 浣跨敤姝ゅ己绫诲瀷璧勬簮绫荤殑鎵�鏈夎祫婧愭煡鎵炬墽琛岄噸鍐欍�� + /// </summary> + [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/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/Resources.resx b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/Resources.resx @@ -0,0 +1,117 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/Settings.Designer.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/Settings.Designer.cs new file mode 100644 index 0000000..21911d4 --- /dev/null +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +锘�//------------------------------------------------------------------------------ +// <auto-generated> +// 姝や唬鐮佺敱宸ュ叿鐢熸垚銆� +// 杩愯鏃剁増鏈�:4.0.30319.42000 +// +// 瀵规鏂囦欢鐨勬洿鏀瑰彲鑳戒細瀵艰嚧涓嶆纭殑琛屼负锛屽苟涓斿鏋� +// 閲嶆柊鐢熸垚浠g爜锛岃繖浜涙洿鏀瑰皢浼氫涪澶便�� +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace iWare_SCADA_FormTest.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.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/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/Settings.settings b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/Settings.settings @@ -0,0 +1,7 @@ +锘�<?xml version='1.0' encoding='utf-8'?> +<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> + <Profiles> + <Profile Name="(Default)" /> + </Profiles> + <Settings /> +</SettingsFile> diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/iWare_SCADA_FormTest2.csproj b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/iWare_SCADA_FormTest2.csproj new file mode 100644 index 0000000..37303a2 --- /dev/null +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/iWare_SCADA_FormTest2.csproj @@ -0,0 +1,91 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{3B160435-00C6-4321-9D3A-A30FD23F2D4B}</ProjectGuid> + <OutputType>WinExe</OutputType> + <RootNamespace>iWare_SCADA_FormTest</RootNamespace> + <AssemblyName>iWare_SCADA_FormTest</AssemblyName> + <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> + <Deterministic>true</Deterministic> + <TargetFrameworkProfile /> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Deployment" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Form1.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="Form1.Designer.cs"> + <DependentUpon>Form1.cs</DependentUpon> + </Compile> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <EmbeddedResource Include="Form1.resx"> + <DependentUpon>Form1.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + <SubType>Designer</SubType> + </EmbeddedResource> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Resources.resx</DependentUpon> + <DesignTime>True</DesignTime> + </Compile> + <None Include="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + <Compile Include="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + </ItemGroup> + <ItemGroup> + <None Include="App.config" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\iWare_SCADA_BusinessLogical\iWare_SCADA_BusinessLogical.csproj"> + <Project>{32708f19-fe1a-48f5-b373-8e1c776f216c}</Project> + <Name>iWare_SCADA_BusinessLogical</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +</Project> \ No newline at end of file diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Model/MiddleModel/WorkPieceLogMiddle.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Model/MiddleModel/WorkPieceLogMiddle.cs index 9058223..6ba7d29 100644 --- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Model/MiddleModel/WorkPieceLogMiddle.cs +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Model/MiddleModel/WorkPieceLogMiddle.cs @@ -280,6 +280,94 @@ public string QualityOP80To10 { get; set; } + #region 鏂板OP80鐨勪竴浜涜川閲忔暟鎹� 銆怑ditby shaocx,2024-06-13銆� + + /// <summary> + /// OP80 璐ㄩ噺鏁版嵁-鍘氬害 + /// </summary> + public string QualityOP80_Houdu { get; set; } + + /// <summary> + /// OP80 璐ㄩ噺鏁版嵁-涓績璺� + /// </summary> + public string QualityOP80_ZXJ { get; set; } + + /// <summary> + /// OP80 璐ㄩ噺鏁版嵁-澶уご瀛斿渾鏌卞害 + /// </summary> + public string QualityOP80_DTKYZD { get; set; } + + /// <summary> + /// OP80 璐ㄩ噺鏁版嵁-灏忓ご涓婇潰鍦嗗害 + /// </summary> + public string QualityOP80_XTSMYD { get; set; } + + /// <summary> + /// OP80 璐ㄩ噺鏁版嵁-灏忓ご涓嬮潰鍦嗗害 + /// </summary> + public string QualityOP80_XTXMYD { get; set; } + + + #region 澶уご瀛旂洿寰� + + /// <summary> + /// OP80 璐ㄩ噺鏁版嵁-澶уご瀛旂洿寰�,澶уご瀛旂洿寰�=锛堝ぇ澶翠笂闈鏂瑰悜鐩村緞+澶уご涓婇潰Y鏂瑰悜鐩村緞+澶уご涓嬮潰X鏂瑰悜鐩村緞+澶уご涓嬮潰Y鏂瑰悜鐩村緞锛�/4 + /// </summary> + public string QualityOP80_D_TKZJ { get; set; } + + /// <summary> + /// OP80 璐ㄩ噺鏁版嵁-澶уご涓婇潰X鏂瑰悜鐩村緞 + /// </summary> + public string QualityOP80_D_S_X { get; set; } + + /// <summary> + /// OP80 璐ㄩ噺鏁版嵁-澶уご涓婇潰Y鏂瑰悜鐩村緞 + /// </summary> + public string QualityOP80_D_S_Y { get; set; } + + /// <summary> + /// OP80 璐ㄩ噺鏁版嵁-澶уご涓嬮潰X鏂瑰悜鐩村緞 + /// </summary> + public string QualityOP80_D_X_X { get; set; } + + /// <summary> + /// OP80 璐ㄩ噺鏁版嵁-澶уご涓嬮潰Y鏂瑰悜鐩村緞 + /// </summary> + public string QualityOP80_D_X_Y { get; set; } + + #endregion + + #region 灏忓ご瀛旂洿寰� + + /// <summary> + /// OP80 璐ㄩ噺鏁版嵁-灏忓ご瀛旂洿寰�,灏忓ご瀛旂洿寰�=锛堝皬澶翠笂闈鏂瑰悜鐩村緞+灏忓ご涓婇潰Y鏂瑰悜鐩村緞+灏忓ご涓嬮潰X鏂瑰悜鐩村緞+灏忓ご涓嬮潰Y鏂瑰悜鐩村緞锛�/4 + /// </summary> + public string QualityOP80_X_TKZJ { get; set; } + + /// <summary> + /// OP80 璐ㄩ噺鏁版嵁-灏忓ご涓婇潰X鏂瑰悜鐩村緞 + /// </summary> + public string QualityOP80_X_S_X { get; set; } + + /// <summary> + /// OP80 璐ㄩ噺鏁版嵁-灏忓ご涓婇潰Y鏂瑰悜鐩村緞 + /// </summary> + public string QualityOP80_X_S_Y { get; set; } + + /// <summary> + /// OP80 璐ㄩ噺鏁版嵁-灏忓ご涓嬮潰X鏂瑰悜鐩村緞 + /// </summary> + public string QualityOP80_X_X_X { get; set; } + + /// <summary> + /// OP80 璐ㄩ噺鏁版嵁-灏忓ご涓嬮潰Y鏂瑰悜鐩村緞 + /// </summary> + public string QualityOP80_X_X_Y { get; set; } + + #endregion + + #endregion + public string EquipmentCurrentState { get; set; } } //[NotMapped] diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Model/TableModel/QualityDataInfo.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Model/TableModel/QualityDataInfo.cs index a5ff07b..c6bd10e 100644 --- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Model/TableModel/QualityDataInfo.cs +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Model/TableModel/QualityDataInfo.cs @@ -212,6 +212,96 @@ public string UpdatedUserName { get; set; } public bool IsDeleted { get; set; } + + + #region 新增OP80的一些质量数据 【Editby shaocx,2024-06-13】 + + /// <summary> + /// OP80 质量数据-厚度 + /// </summary> + public string QualityOP80_Houdu { get; set; } + + /// <summary> + /// OP80 质量数据-中心距 + /// </summary> + public string QualityOP80_ZXJ { get; set; } + + /// <summary> + /// OP80 质量数据-大头孔圆柱度 + /// </summary> + public string QualityOP80_DTKYZD { get; set; } + + /// <summary> + /// OP80 质量数据-小头上面圆度 + /// </summary> + public string QualityOP80_XTSMYD { get; set; } + + /// <summary> + /// OP80 质量数据-小头下面圆度 + /// </summary> + public string QualityOP80_XTXMYD { get; set; } + + + #region 大头孔直径 + + /// <summary> + /// OP80 质量数据-大头孔直径,大头孔直径=(大头上面X方向直径+大头上面Y方向直径+大头下面X方向直径+大头下面Y方向直径)/4 + /// </summary> + public string QualityOP80_D_TKZJ { get; set; } + + /// <summary> + /// OP80 质量数据-大头上面X方向直径 + /// </summary> + public string QualityOP80_D_S_X { get; set; } + + /// <summary> + /// OP80 质量数据-大头上面Y方向直径 + /// </summary> + public string QualityOP80_D_S_Y { get; set; } + + /// <summary> + /// OP80 质量数据-大头下面X方向直径 + /// </summary> + public string QualityOP80_D_X_X { get; set; } + + /// <summary> + /// OP80 质量数据-大头下面Y方向直径 + /// </summary> + public string QualityOP80_D_X_Y { get; set; } + + #endregion + + #region 小头孔直径 + + /// <summary> + /// OP80 质量数据-小头孔直径,小头孔直径=(小头上面X方向直径+小头上面Y方向直径+小头下面X方向直径+小头下面Y方向直径)/4 + /// </summary> + public string QualityOP80_X_TKZJ { get; set; } + + /// <summary> + /// OP80 质量数据-小头上面X方向直径 + /// </summary> + public string QualityOP80_X_S_X { get; set; } + + /// <summary> + /// OP80 质量数据-小头上面Y方向直径 + /// </summary> + public string QualityOP80_X_S_Y { get; set; } + + /// <summary> + /// OP80 质量数据-小头下面X方向直径 + /// </summary> + public string QualityOP80_X_X_X { get; set; } + + /// <summary> + /// OP80 质量数据-小头下面Y方向直径 + /// </summary> + public string QualityOP80_X_X_Y { get; set; } + + #endregion + + #endregion + } /// <summary> diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/App.config b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/App.config new file mode 100644 index 0000000..43752b4 --- /dev/null +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/App.config @@ -0,0 +1,49 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<configuration> + <configSections> + <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> + <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> + </configSections> + + <appSettings> + + <!--net use x: \\192.168.216.133\Destination /savecred /persistent:yes + net use z: \\192.168.216.130\kistler /savecred /persistent:yes + net use y: \\192.168.216.6\data /savecred /persistent:yes + net use u: \\192.168.216.130\NutrunnerData /savecred /persistent:yes--> + + <!-- 鍒ゆ柇宸ュ簭鏄惁璺冲簭鐨勫熀鍑嗛厤缃� --> + <add key="WorkingProcedureAllStr" value="OP05OP10OP20OP30OP35OP40OP50OP60OP70OP80" /> + <add key="WorkPeiceIDPath" value="Y:\qualified" /> + <!-- op30宸ュ簭鐨勫伐浣嶈川閲忎俊鎭� --> + <add key="OP30QualityDataFor36Station" value="Z:\" /> + <add key="OP30QualityDataFor45Station" value="U:\" /> + <add key="OP60QualityData" value="V:\" /> + <add key="OP20QualityData" value="W:\" /> + <add key="OP80QualityData_Test" value="X:\CA4GC20TD_Test\" /> + <!--<add key="WorkPeiceIDPath" value="C:\Users\13650\Desktop\yiqi" />--> + <add key="HeartBeatAlertInterval" value="2000" /> + </appSettings> + <startup> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /> + </startup> + <entityFramework> + <providers> + <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> + </providers> + </entityFramework> + <connectionStrings> + <!--<add name="SCADA_DF22001_CORE" connectionString="Server=.;Database=iWare.SCADA;User=sa;Password=123abc.com;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />--> + <!--<add name="SCADA_DF22001_CORE" connectionString="Server=10.10.40.166;Database=iWare.SCADA;User=sa;Password=123abc.com;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />--> + <add name="SCADA_DF22001_CORE" connectionString="Server=.;Database=iWare.SCADA;User=sa;Password=123abc.com;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" /> + <add name="SCModel" connectionString="data source=.;initial catalog=SCTest_new;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" /> + </connectionStrings> + <runtime> + <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> + <dependentAssembly> + <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" /> + </dependentAssembly> + </assemblyBinding> + </runtime> +</configuration> \ No newline at end of file diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/Properties/AssemblyInfo.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..d2151ab --- /dev/null +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/Properties/AssemblyInfo.cs @@ -0,0 +1,20 @@ +锘縰sing System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("iWare_SCADA_Test")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("寰蒋涓浗")] +[assembly: AssemblyProduct("iWare_SCADA_Test")] +[assembly: AssemblyCopyright("Copyright 漏 寰蒋涓浗 2024")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +[assembly: ComVisible(false)] + +[assembly: Guid("a3f6ebb4-d019-4246-9789-337b860ba31e")] + +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/UnitTest1.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/UnitTest1.cs new file mode 100644 index 0000000..650ce41 --- /dev/null +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/UnitTest1.cs @@ -0,0 +1,41 @@ +锘縰sing iWare_SCADA_BusinessLogical.Utils; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Collections.Generic; +using System.IO; + +namespace iWare_SCADA_Test +{ + [TestClass] + public class UnitTest1 + { + [TestMethod] + public void TestMethod1() + { + + //璁$畻澶уご瀛旂洿寰�,澶уご瀛旂洿寰�=锛堝ぇ澶翠笂闈鏂瑰悜鐩村緞+澶уご涓婇潰Y鏂瑰悜鐩村緞+澶уご涓嬮潰X鏂瑰悜鐩村緞+澶уご涓嬮潰Y鏂瑰悜鐩村緞锛�/4 + List<decimal> valueList = new List<decimal>() { + SystemHelper.GetDecimal(""), + SystemHelper.GetDecimal("sss"), + SystemHelper.GetDecimal("12.365"), + SystemHelper.GetDecimal("201.24557"), + SystemHelper.GetDecimal("100"), + }; + var bb = SystemHelper.CalcDecimalAvg(valueList, 3); + Assert.Fail(); + } + + [TestMethod] + public void xx() + { + string path = ConfigHelper.GetConfigString("OP80QualityData_Test");//OP80鐨勫湴鍧� + + var newFiles = FileHelper.DetectNewFilesCSV(path, 300, DateTime.Now.AddDays(-10), DateTime.Now.AddDays(1)); + + foreach (System.IO.FileInfo file in newFiles) + { + File.Move(file.FullName, "../CA4GC20TD_COPY/" + file.Name);//绉诲姩 + } + } + } +} diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/iWare_SCADA_Test.csproj b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/iWare_SCADA_Test.csproj new file mode 100644 index 0000000..2eac1c9 --- /dev/null +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/iWare_SCADA_Test.csproj @@ -0,0 +1,75 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="..\packages\MSTest.TestAdapter.2.2.7\build\net45\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.2.2.7\build\net45\MSTest.TestAdapter.props')" /> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{A3F6EBB4-D019-4246-9789-337B860BA31E}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>iWare_SCADA_Test</RootNamespace> + <AssemblyName>iWare_SCADA_Test</AssemblyName> + <TargetFrameworkVersion>v4.8</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.0</VisualStudioVersion> + <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> + <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath> + <IsCodedUITest>False</IsCodedUITest> + <TestProjectType>UnitTest</TestProjectType> + <NuGetPackageImportStamp> + </NuGetPackageImportStamp> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\MSTest.TestFramework.2.2.7\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath> + </Reference> + <Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\MSTest.TestFramework.2.2.7\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Core" /> + </ItemGroup> + <ItemGroup> + <Compile Include="UnitTest1.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="App.config" /> + <None Include="packages.config" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\iWare_SCADA_BusinessLogical\iWare_SCADA_BusinessLogical.csproj"> + <Project>{32708f19-fe1a-48f5-b373-8e1c776f216c}</Project> + <Name>iWare_SCADA_BusinessLogical</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" /> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> + <PropertyGroup> + <ErrorText>杩欏彴璁$畻鏈轰笂缂哄皯姝ら」鐩紩鐢ㄧ殑 NuGet 绋嬪簭鍖呫�備娇鐢ㄢ�淣uGet 绋嬪簭鍖呰繕鍘熲�濆彲涓嬭浇杩欎簺绋嬪簭鍖呫�傛湁鍏虫洿澶氫俊鎭紝璇峰弬瑙� http://go.microsoft.com/fwlink/?LinkID=322105銆傜己灏戠殑鏂囦欢鏄� {0}銆�</ErrorText> + </PropertyGroup> + <Error Condition="!Exists('..\packages\MSTest.TestAdapter.2.2.7\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.2.2.7\build\net45\MSTest.TestAdapter.props'))" /> + <Error Condition="!Exists('..\packages\MSTest.TestAdapter.2.2.7\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.2.2.7\build\net45\MSTest.TestAdapter.targets'))" /> + </Target> + <Import Project="..\packages\MSTest.TestAdapter.2.2.7\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.2.2.7\build\net45\MSTest.TestAdapter.targets')" /> +</Project> \ No newline at end of file diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/packages.config b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/packages.config new file mode 100644 index 0000000..d35ea08 --- /dev/null +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/packages.config @@ -0,0 +1,5 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="MSTest.TestAdapter" version="2.2.7" targetFramework="net48" /> + <package id="MSTest.TestFramework" version="2.2.7" targetFramework="net48" /> +</packages> \ No newline at end of file -- Gitblit v1.9.3