Переглянути джерело

Merge branch 'master' of ssh://10.10.101.21/source/mes-client

Hcsy 8 роки тому
батько
коміт
f8b68894b5

+ 2 - 2
UAS-MES/FunctionCode/Make/Make_FeedingCollection.cs

@@ -81,7 +81,7 @@ namespace UAS_MES.Make
         {
             DBFind = ma_code.ReturnData;
             BaseUtil.SetFormValue(this.Controls, DBFind);
-            string ifforsn = dh.getFieldDataByCondition("make left join stepbom on ma_prodcode=sb_prodcode left join stepproduct on sb_id=sp_sbid", "nvl(sp_ifforsn,0) sp_ifforsn", "ma_code='" + ma_code.Text + "' and sp_craftcode='" + ma_craftcode.Text + "' and sb_bomversion='" + ma_bomversion.Text + "' order by sp_detno").ToString();
+            string ifforsn = dh.getFieldDataByCondition("make left join stepbom on ma_prodcode=sb_prodcode left join stepproduct on sb_id=sp_sbid", "nvl(sp_ifforsn,0) sp_ifforsn", "ma_code='" + ma_code.Text + "' and sp_craftcode='" + ma_craftcode.Text + "' and sp_stepcode='"+User.CurrentStepCode+"' and sb_bomversion='" + ma_bomversion.Text + "' order by sp_detno").ToString();
             if (ifforsn != "" && ifforsn != "0")
                 iflastsn.Checked = true;
             else
@@ -217,7 +217,7 @@ namespace UAS_MES.Make
                     ms_status = dt.Rows[0]["ms_status"].ToString();
                     ms_firstsn = dt.Rows[0]["ms_firstsn"].ToString();
                     BaseUtil.SetFormValue(this.Controls, dt);
-                    string ifforsn = dh.getFieldDataByCondition("make left join stepbom on ma_prodcode=sb_prodcode left join stepproduct on sb_id=sp_sbid", "nvl(sp_ifforsn,0) sp_ifforsn", "ma_code='" + ma_code.Text + "' and sp_craftcode='" + ma_craftcode.Text + "' and sb_bomversion='" + ma_bomversion.Text + "' order by sp_detno").ToString();
+                    string ifforsn = dh.getFieldDataByCondition("make left join stepbom on ma_prodcode=sb_prodcode left join stepproduct on sb_id=sp_sbid", "nvl(sp_ifforsn,0) sp_ifforsn", "ma_code='" + ma_code.Text + "' and sp_stepcode='"+User.CurrentStepCode+"'  and sp_craftcode='" + ma_craftcode.Text + "' and sb_bomversion='" + ma_bomversion.Text + "' order by sp_detno").ToString();
                     if (ifforsn != "" && ifforsn != "0")
                         iflastsn.Checked = true;
                     else

+ 49 - 37
UAS-MES/FunctionCode/Make/Make_UpdateCollectCode.Designer.cs

@@ -34,7 +34,6 @@
             this.psr_length = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.label1 = new System.Windows.Forms.Label();
-            this.label2 = new System.Windows.Forms.Label();
             this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -48,6 +47,7 @@
             this.Imei3 = new UAS_MES.CustomControl.CustomCheckBox.CustomCheckBox();
             this.inputValue = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
+            this.label3 = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.collectCodeRules)).BeginInit();
             this.collects.SuspendLayout();
             this.SuspendLayout();
@@ -60,11 +60,12 @@
             this.psr_prefix,
             this.psr_length,
             this.Column1});
-            this.collectCodeRules.Location = new System.Drawing.Point(279, 70);
+            this.collectCodeRules.Location = new System.Drawing.Point(248, 58);
+            this.collectCodeRules.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.collectCodeRules.Name = "collectCodeRules";
             this.collectCodeRules.RowHeadersVisible = false;
             this.collectCodeRules.RowTemplate.Height = 30;
-            this.collectCodeRules.Size = new System.Drawing.Size(733, 235);
+            this.collectCodeRules.Size = new System.Drawing.Size(652, 196);
             this.collectCodeRules.TabIndex = 6;
             // 
             // psr_type
@@ -99,21 +100,12 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(275, 27);
+            this.label1.Location = new System.Drawing.Point(244, 22);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(110, 31);
+            this.label1.Size = new System.Drawing.Size(92, 27);
             this.label1.TabIndex = 7;
             this.label1.Text = "防呆规则";
             // 
-            // label2
-            // 
-            this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(54, 583);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(62, 18);
-            this.label2.TabIndex = 91;
-            this.label2.Text = "采集栏";
-            // 
             // dataGridViewTextBoxColumn1
             // 
             this.dataGridViewTextBoxColumn1.HeaderText = "采集项";
@@ -147,9 +139,11 @@
             this.collects.Controls.Add(this.Imei1);
             this.collects.Controls.Add(this.Imei2);
             this.collects.Controls.Add(this.Imei3);
-            this.collects.Location = new System.Drawing.Point(27, 18);
+            this.collects.Location = new System.Drawing.Point(24, 15);
+            this.collects.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.collects.Name = "collects";
-            this.collects.Size = new System.Drawing.Size(185, 287);
+            this.collects.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.collects.Size = new System.Drawing.Size(164, 239);
             this.collects.TabIndex = 92;
             this.collects.TabStop = false;
             this.collects.TextColor = System.Drawing.Color.Black;
@@ -157,10 +151,11 @@
             // Mac
             // 
             this.Mac.AutoSize = true;
-            this.Mac.Location = new System.Drawing.Point(37, 31);
+            this.Mac.Location = new System.Drawing.Point(33, 26);
+            this.Mac.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Mac.Name = "Mac";
             this.Mac.Power = null;
-            this.Mac.Size = new System.Drawing.Size(106, 22);
+            this.Mac.Size = new System.Drawing.Size(93, 19);
             this.Mac.TabIndex = 5;
             this.Mac.Text = "MAC/WIFI";
             this.Mac.UseVisualStyleBackColor = true;
@@ -169,10 +164,11 @@
             // Bt
             // 
             this.Bt.AutoSize = true;
-            this.Bt.Location = new System.Drawing.Point(37, 74);
+            this.Bt.Location = new System.Drawing.Point(33, 62);
+            this.Bt.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Bt.Name = "Bt";
             this.Bt.Power = null;
-            this.Bt.Size = new System.Drawing.Size(52, 22);
+            this.Bt.Size = new System.Drawing.Size(45, 19);
             this.Bt.TabIndex = 4;
             this.Bt.Text = "BT";
             this.Bt.UseVisualStyleBackColor = true;
@@ -181,10 +177,11 @@
             // NetCode
             // 
             this.NetCode.AutoSize = true;
-            this.NetCode.Location = new System.Drawing.Point(37, 112);
+            this.NetCode.Location = new System.Drawing.Point(33, 93);
+            this.NetCode.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.NetCode.Name = "NetCode";
             this.NetCode.Power = null;
-            this.NetCode.Size = new System.Drawing.Size(70, 22);
+            this.NetCode.Size = new System.Drawing.Size(59, 19);
             this.NetCode.TabIndex = 3;
             this.NetCode.Text = "网标";
             this.NetCode.UseVisualStyleBackColor = true;
@@ -193,10 +190,11 @@
             // Imei1
             // 
             this.Imei1.AutoSize = true;
-            this.Imei1.Location = new System.Drawing.Point(37, 156);
+            this.Imei1.Location = new System.Drawing.Point(33, 130);
+            this.Imei1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Imei1.Name = "Imei1";
             this.Imei1.Power = null;
-            this.Imei1.Size = new System.Drawing.Size(79, 22);
+            this.Imei1.Size = new System.Drawing.Size(69, 19);
             this.Imei1.TabIndex = 2;
             this.Imei1.Text = "IMEI1";
             this.Imei1.UseVisualStyleBackColor = true;
@@ -205,10 +203,11 @@
             // Imei2
             // 
             this.Imei2.AutoSize = true;
-            this.Imei2.Location = new System.Drawing.Point(37, 196);
+            this.Imei2.Location = new System.Drawing.Point(33, 163);
+            this.Imei2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Imei2.Name = "Imei2";
             this.Imei2.Power = null;
-            this.Imei2.Size = new System.Drawing.Size(79, 22);
+            this.Imei2.Size = new System.Drawing.Size(69, 19);
             this.Imei2.TabIndex = 1;
             this.Imei2.Text = "IMEI2";
             this.Imei2.UseVisualStyleBackColor = true;
@@ -217,10 +216,11 @@
             // Imei3
             // 
             this.Imei3.AutoSize = true;
-            this.Imei3.Location = new System.Drawing.Point(37, 239);
+            this.Imei3.Location = new System.Drawing.Point(33, 199);
+            this.Imei3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Imei3.Name = "Imei3";
             this.Imei3.Power = null;
-            this.Imei3.Size = new System.Drawing.Size(79, 22);
+            this.Imei3.Size = new System.Drawing.Size(69, 19);
             this.Imei3.TabIndex = 0;
             this.Imei3.Text = "IMEI3";
             this.Imei3.UseVisualStyleBackColor = true;
@@ -231,10 +231,11 @@
             this.inputValue.AllPower = null;
             this.inputValue.BackColor = System.Drawing.Color.White;
             this.inputValue.ID = null;
-            this.inputValue.Location = new System.Drawing.Point(195, 573);
+            this.inputValue.Location = new System.Drawing.Point(173, 477);
+            this.inputValue.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.inputValue.Name = "inputValue";
             this.inputValue.Power = null;
-            this.inputValue.Size = new System.Drawing.Size(257, 28);
+            this.inputValue.Size = new System.Drawing.Size(229, 25);
             this.inputValue.Str = null;
             this.inputValue.Str1 = null;
             this.inputValue.Str2 = null;
@@ -244,25 +245,36 @@
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(27, 327);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
+            this.OperateResult.Location = new System.Drawing.Point(24, 272);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(1006, 228);
+            this.OperateResult.Size = new System.Drawing.Size(895, 191);
             this.OperateResult.TabIndex = 88;
             this.OperateResult.Text = "";
             // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label3.Location = new System.Drawing.Point(95, 475);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(72, 27);
+            this.label3.TabIndex = 93;
+            this.label3.Text = "输入框";
+            // 
             // Make_UpdateCollectCode
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1120, 614);
+            this.ClientSize = new System.Drawing.Size(996, 512);
+            this.Controls.Add(this.label3);
             this.Controls.Add(this.collects);
-            this.Controls.Add(this.label2);
             this.Controls.Add(this.inputValue);
             this.Controls.Add(this.OperateResult);
             this.Controls.Add(this.label1);
             this.Controls.Add(this.collectCodeRules);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Name = "Make_UpdateCollectCode";
             this.Text = "Make!UpdateCollectCode";
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Make_UpdateCollectCode_FormClosing);
@@ -281,7 +293,6 @@
         private System.Windows.Forms.Label label1;
         private CustomControl.RichText.RichTextAutoBottom OperateResult;
         private CustomControl.TextBoxWithIcon.EnterTextBox inputValue;
-        private System.Windows.Forms.Label label2;
         private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder collects;
         private CustomControl.CustomCheckBox.CustomCheckBox Imei3;
         private CustomControl.CustomCheckBox.CustomCheckBox Imei2;
@@ -297,5 +308,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn psr_prefix;
         private System.Windows.Forms.DataGridViewTextBoxColumn psr_length;
         private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
+        private System.Windows.Forms.Label label3;
     }
 }

+ 12 - 0
UAS-MES/FunctionCode/Make/Make_UpdateCollectCode.resx

@@ -129,4 +129,16 @@
   <metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="psr_type.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="psr_prefix.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="psr_length.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>

+ 1 - 1
UAS_XmlAnalysor/App.config

@@ -6,7 +6,7 @@
         </sectionGroup>
     </configSections>
     <startup> 
-        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/>
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
     </startup>
     <userSettings>
         <UAS_XmlAnalysor.Properties.Settings>

+ 45 - 46
UAS_XmlAnalysor/Form1.Designer.cs

@@ -57,10 +57,10 @@
             // StartWatch
             // 
             this.StartWatch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.StartWatch.Location = new System.Drawing.Point(145, 256);
-            this.StartWatch.Margin = new System.Windows.Forms.Padding(2);
+            this.StartWatch.Location = new System.Drawing.Point(193, 320);
+            this.StartWatch.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.StartWatch.Name = "StartWatch";
-            this.StartWatch.Size = new System.Drawing.Size(64, 28);
+            this.StartWatch.Size = new System.Drawing.Size(85, 35);
             this.StartWatch.TabIndex = 0;
             this.StartWatch.Text = "开始监控";
             this.StartWatch.UseVisualStyleBackColor = true;
@@ -70,10 +70,10 @@
             // 
             this.StopWatch.Enabled = false;
             this.StopWatch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.StopWatch.Location = new System.Drawing.Point(249, 256);
-            this.StopWatch.Margin = new System.Windows.Forms.Padding(2);
+            this.StopWatch.Location = new System.Drawing.Point(332, 320);
+            this.StopWatch.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.StopWatch.Name = "StopWatch";
-            this.StopWatch.Size = new System.Drawing.Size(64, 28);
+            this.StopWatch.Size = new System.Drawing.Size(85, 35);
             this.StopWatch.TabIndex = 1;
             this.StopWatch.Text = "停止监控";
             this.StopWatch.UseVisualStyleBackColor = true;
@@ -83,29 +83,28 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(27, 139);
-            this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label1.Location = new System.Drawing.Point(36, 174);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(84, 20);
+            this.label1.Size = new System.Drawing.Size(107, 25);
             this.label1.TabIndex = 2;
             this.label1.Text = "监控文件夹";
             // 
             // FolderPath
             // 
             this.FolderPath.Enabled = false;
-            this.FolderPath.Location = new System.Drawing.Point(112, 139);
-            this.FolderPath.Margin = new System.Windows.Forms.Padding(2);
+            this.FolderPath.Location = new System.Drawing.Point(149, 174);
+            this.FolderPath.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.FolderPath.Name = "FolderPath";
-            this.FolderPath.Size = new System.Drawing.Size(220, 21);
+            this.FolderPath.Size = new System.Drawing.Size(292, 25);
             this.FolderPath.TabIndex = 3;
             // 
             // ChooseFolder
             // 
             this.ChooseFolder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ChooseFolder.Location = new System.Drawing.Point(346, 139);
-            this.ChooseFolder.Margin = new System.Windows.Forms.Padding(2);
+            this.ChooseFolder.Location = new System.Drawing.Point(461, 174);
+            this.ChooseFolder.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.ChooseFolder.Name = "ChooseFolder";
-            this.ChooseFolder.Size = new System.Drawing.Size(78, 24);
+            this.ChooseFolder.Size = new System.Drawing.Size(104, 30);
             this.ChooseFolder.TabIndex = 6;
             this.ChooseFolder.Text = "选择文件夹";
             this.ChooseFolder.UseVisualStyleBackColor = true;
@@ -113,20 +112,20 @@
             // 
             // OperateResult
             // 
-            this.OperateResult.Location = new System.Drawing.Point(446, 11);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(2);
+            this.OperateResult.Location = new System.Drawing.Point(595, 14);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(197, 270);
+            this.OperateResult.Size = new System.Drawing.Size(280, 336);
             this.OperateResult.TabIndex = 7;
             this.OperateResult.Text = "";
             // 
             // Clean
             // 
             this.Clean.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Clean.Location = new System.Drawing.Point(516, 287);
-            this.Clean.Margin = new System.Windows.Forms.Padding(2);
+            this.Clean.Location = new System.Drawing.Point(699, 359);
+            this.Clean.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Clean.Name = "Clean";
-            this.Clean.Size = new System.Drawing.Size(56, 24);
+            this.Clean.Size = new System.Drawing.Size(75, 30);
             this.Clean.TabIndex = 8;
             this.Clean.Text = "清除";
             this.Clean.UseVisualStyleBackColor = true;
@@ -135,10 +134,10 @@
             // ChooseBackUpFolder
             // 
             this.ChooseBackUpFolder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ChooseBackUpFolder.Location = new System.Drawing.Point(346, 201);
-            this.ChooseBackUpFolder.Margin = new System.Windows.Forms.Padding(2);
+            this.ChooseBackUpFolder.Location = new System.Drawing.Point(461, 251);
+            this.ChooseBackUpFolder.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.ChooseBackUpFolder.Name = "ChooseBackUpFolder";
-            this.ChooseBackUpFolder.Size = new System.Drawing.Size(78, 24);
+            this.ChooseBackUpFolder.Size = new System.Drawing.Size(104, 30);
             this.ChooseBackUpFolder.TabIndex = 11;
             this.ChooseBackUpFolder.Text = "选择文件夹";
             this.ChooseBackUpFolder.UseVisualStyleBackColor = true;
@@ -147,20 +146,19 @@
             // BackUpFolderPath
             // 
             this.BackUpFolderPath.Enabled = false;
-            this.BackUpFolderPath.Location = new System.Drawing.Point(112, 201);
-            this.BackUpFolderPath.Margin = new System.Windows.Forms.Padding(2);
+            this.BackUpFolderPath.Location = new System.Drawing.Point(149, 251);
+            this.BackUpFolderPath.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.BackUpFolderPath.Name = "BackUpFolderPath";
-            this.BackUpFolderPath.Size = new System.Drawing.Size(220, 21);
+            this.BackUpFolderPath.Size = new System.Drawing.Size(292, 25);
             this.BackUpFolderPath.TabIndex = 10;
             // 
             // label2
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(27, 201);
-            this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label2.Location = new System.Drawing.Point(36, 251);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(84, 20);
+            this.label2.Size = new System.Drawing.Size(107, 25);
             this.label2.TabIndex = 9;
             this.label2.Text = "备份文件夹";
             // 
@@ -168,29 +166,27 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(27, 80);
-            this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label3.Location = new System.Drawing.Point(36, 100);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(69, 20);
+            this.label3.Size = new System.Drawing.Size(88, 25);
             this.label3.TabIndex = 12;
             this.label3.Text = "岗位资源";
             // 
             // Source
             // 
-            this.Source.Location = new System.Drawing.Point(112, 79);
-            this.Source.Margin = new System.Windows.Forms.Padding(2);
+            this.Source.Location = new System.Drawing.Point(149, 99);
+            this.Source.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Source.Name = "Source";
-            this.Source.Size = new System.Drawing.Size(220, 21);
+            this.Source.Size = new System.Drawing.Size(292, 25);
             this.Source.TabIndex = 13;
             // 
             // label4
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(27, 23);
-            this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label4.Location = new System.Drawing.Point(36, 29);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(69, 20);
+            this.label4.Size = new System.Drawing.Size(88, 25);
             this.label4.TabIndex = 14;
             this.label4.Text = "账套选择";
             // 
@@ -198,17 +194,19 @@
             // 
             this.Master.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.Master.FormattingEnabled = true;
-            this.Master.Location = new System.Drawing.Point(112, 23);
+            this.Master.Location = new System.Drawing.Point(149, 29);
+            this.Master.Margin = new System.Windows.Forms.Padding(4);
             this.Master.Name = "Master";
-            this.Master.Size = new System.Drawing.Size(220, 20);
+            this.Master.Size = new System.Drawing.Size(292, 23);
             this.Master.TabIndex = 15;
             // 
             // AutoStart
             // 
             this.AutoStart.AutoSize = true;
-            this.AutoStart.Location = new System.Drawing.Point(343, 26);
+            this.AutoStart.Location = new System.Drawing.Point(457, 32);
+            this.AutoStart.Margin = new System.Windows.Forms.Padding(4);
             this.AutoStart.Name = "AutoStart";
-            this.AutoStart.Size = new System.Drawing.Size(96, 16);
+            this.AutoStart.Size = new System.Drawing.Size(119, 19);
             this.AutoStart.TabIndex = 16;
             this.AutoStart.Text = "开机自动启动";
             this.AutoStart.UseVisualStyleBackColor = true;
@@ -216,9 +214,9 @@
             // 
             // Form1
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(665, 316);
+            this.ClientSize = new System.Drawing.Size(887, 395);
             this.Controls.Add(this.AutoStart);
             this.Controls.Add(this.Master);
             this.Controls.Add(this.label4);
@@ -234,7 +232,8 @@
             this.Controls.Add(this.label1);
             this.Controls.Add(this.StopWatch);
             this.Controls.Add(this.StartWatch);
-            this.Margin = new System.Windows.Forms.Padding(2);
+            this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.MaximizeBox = false;
             this.Name = "Form1";
             this.Text = "UAS_XML解析器";
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);

+ 19 - 3
UAS_XmlAnalysor/Form1.cs

@@ -29,6 +29,7 @@ namespace UAS_XmlAnalysor
         private void Form1_Load(object sender, EventArgs e)
         {
             CheckForIllegalCrossThreadCalls = false;
+            FormBorderStyle = FormBorderStyle.FixedSingle;
             InitDB = new Thread(ConnectDB);
             //添加监控事件
             XmlWatcher.Created += new FileSystemEventHandler(XmlWatcher_Created);
@@ -72,6 +73,19 @@ namespace UAS_XmlAnalysor
                 OperateResult.AppendText("请选择监控文件夹和备份文件夹\n");
                 return;
             }
+            else
+            {
+                if (!Directory.Exists(FolderPath.Text))
+                {
+                    OperateResult.AppendText("监控文件夹不存在\n");
+                    return;
+                }
+                if (!Directory.Exists(BackUpFolderPath.Text))
+                {
+                    OperateResult.AppendText("备份文件夹不存在\n");
+                    return;
+                }
+            }
             if (FolderPath.Text == BackUpFolderPath.Text)
             {
                 OperateResult.AppendText("监控文件夹和备份文件夹不能相同\n");
@@ -93,8 +107,6 @@ namespace UAS_XmlAnalysor
             XmlWatcher.Path = FolderPath.Text;
             XmlWatcher.Filter = "*.xml";
             XmlWatcher.EnableRaisingEvents = true;
-            string CacheString = FolderPath.Text + "|" + BackUpFolderPath.Text + "|" + Source.Text + "|" + Master.Text + "|" + AutoStart.Checked;
-            //写入前先删除文件
             try
             {
                 File.Delete(CachePath);
@@ -170,10 +182,14 @@ namespace UAS_XmlAnalysor
             string testDate = "";
             string testTime = "";
             XmlReader myReader = XmlReader.Create(FolderPath.Text + @"\" + e.Name);
+            //获取文件名的序列号,如SA123456.xml
             string sncode = e.Name.Split('.')[0];
-            string iMakeCode = dh.getFieldDataByCondition("makeserial", "ms_makecode", "ms_sncode='" + sncode + "'").ToString();
+            //获取序列号ID最大的工单号
+            string iMakeCode = dh.getFieldDataByCondition("makeserial", "ms_makecode", "ms_sncode='" + sncode + "' order by ms_id desc").ToString();
             OperateResult.AppendText("读取文件" + e.Name + "\n");
+            //获取采集的项目名称
             List<string> name = new List<string>();
+            //获取采集项目的结果
             List<string> result = new List<string>();
             int name_or_result = 0;
             while (myReader.Read())

+ 1 - 1
UAS_XmlAnalysor/Properties/AssemblyInfo.cs

@@ -8,7 +8,7 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyTitle("UAS_XmlAnalysor")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyCompany("深圳市优软科技有限公司")]
 [assembly: AssemblyProduct("UAS_XmlAnalysor")]
 [assembly: AssemblyCopyright("Copyright ©  2017")]
 [assembly: AssemblyTrademark("")]

+ 1 - 1
UAS_XmlAnalysor/Properties/Resources.Designer.cs

@@ -61,7 +61,7 @@ namespace UAS_XmlAnalysor.Properties {
         }
         
         /// <summary>
-        ///   查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。
+        ///   查找类似于 (Icon) 的 System.Drawing.Icon 类型的本地化资源。
         /// </summary>
         internal static System.Drawing.Icon xml_48px_1124003_easyicon_net {
             get {

+ 2 - 1
UAS_XmlAnalysor/UAS_XmlAnalysor.csproj

@@ -12,7 +12,8 @@
     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
-    <TargetFrameworkProfile>Client</TargetFrameworkProfile>
+    <TargetFrameworkProfile>
+    </TargetFrameworkProfile>
     <IsWebBootstrapper>true</IsWebBootstrapper>
     <PublishUrl>ftp://192.168.253.9/MESSetting/Xml/</PublishUrl>
     <Install>true</Install>