Browse Source

添加SN生成

callm 2 weeks ago
parent
commit
cd4bcb8699

+ 1 - 1
UAS_MES_ZDXW/App.config

@@ -72,7 +72,7 @@
   <applicationSettings>
     <UAS_MES_NEW.Properties.Settings>
       <setting name="MES" serializeAs="String">
-        <value>Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.81.208)(PORT=11665)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</value>
+        <value>Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.101.253)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</value>
       </setting>
     </UAS_MES_NEW.Properties.Settings>
   </applicationSettings>

+ 8 - 0
UAS_MES_ZDXW/FunctionCode/Query/ArrayList.cs

@@ -0,0 +1,8 @@
+using System.Collections;
+
+namespace UAS_MES_NEW.Query
+{
+    internal class ArrayList<T> : ArrayList
+    {
+    }
+}

+ 305 - 216
UAS_MES_ZDXW/FunctionCode/Query/Query_SN.Designer.cs

@@ -29,210 +29,121 @@
         private void InitializeComponent()
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Query_SN));
-            this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
-            this.label5 = new System.Windows.Forms.Label();
-            this.label3 = new System.Windows.Forms.Label();
-            this.date = new System.Windows.Forms.DateTimePicker();
-            this.label6 = new System.Windows.Forms.Label();
+            this.ma_salecode_label = new System.Windows.Forms.Label();
+            this.ma_qty = new System.Windows.Forms.Label();
             this.label7 = new System.Windows.Forms.Label();
-            this.label9 = new System.Windows.Forms.Label();
-            this.label10 = new System.Windows.Forms.Label();
-            this.label11 = new System.Windows.Forms.Label();
-            this.currentSerial = new System.Windows.Forms.NumericUpDown();
-            this.Printer = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
-            this.Print = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            this.num = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.seriallength = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.label5 = new System.Windows.Forms.Label();
+            this.pr_detail = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.label8 = new System.Windows.Forms.Label();
             this.pr_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.Export = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
-            ((System.ComponentModel.ISupportInitialize)(this.currentSerial)).BeginInit();
+            this.Export = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.Setting = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.PrinterList = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.PrintTest = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.OneColumn = new System.Windows.Forms.RadioButton();
+            this.TwoColumn = new System.Windows.Forms.RadioButton();
+            this.ThreeColumn = new System.Windows.Forms.RadioButton();
+            this.FourColumn = new System.Windows.Forms.RadioButton();
+            this.GenSN = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.label1 = new System.Windows.Forms.Label();
+            this.ma_count = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.msl_type = new System.Windows.Forms.ComboBox();
+            this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
             this.SuspendLayout();
             // 
-            // label5
-            // 
-            this.label5.AutoSize = true;
-            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(106, 112);
-            this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(146, 41);
-            this.label5.TabIndex = 11;
-            this.label5.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(106, 274);
-            this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(146, 41);
-            this.label3.TabIndex = 13;
-            this.label3.Text = "流水长度";
-            // 
-            // date
-            // 
-            this.date.Location = new System.Drawing.Point(305, 197);
-            this.date.Name = "date";
-            this.date.Size = new System.Drawing.Size(388, 35);
-            this.date.TabIndex = 17;
-            this.date.Value = new System.DateTime(2020, 9, 7, 0, 0, 0, 0);
-            // 
-            // label6
-            // 
-            this.label6.AutoSize = true;
-            this.label6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label6.Location = new System.Drawing.Point(106, 195);
-            this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(82, 41);
-            this.label6.TabIndex = 18;
-            this.label6.Text = "日期";
+            // ma_salecode_label
+            // 
+            this.ma_salecode_label.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.ma_salecode_label.AutoSize = true;
+            this.ma_salecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_salecode_label.Location = new System.Drawing.Point(142, 143);
+            this.ma_salecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_salecode_label.Name = "ma_salecode_label";
+            this.ma_salecode_label.Size = new System.Drawing.Size(178, 41);
+            this.ma_salecode_label.TabIndex = 20;
+            this.ma_salecode_label.Text = "打印机列表";
+            // 
+            // ma_qty
+            // 
+            this.ma_qty.AutoSize = true;
+            this.ma_qty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_qty.Location = new System.Drawing.Point(349, 270);
+            this.ma_qty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_qty.Name = "ma_qty";
+            this.ma_qty.Size = new System.Drawing.Size(0, 41);
+            this.ma_qty.TabIndex = 236;
             // 
             // label7
             // 
             this.label7.AutoSize = true;
             this.label7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label7.Location = new System.Drawing.Point(106, 344);
+            this.label7.Location = new System.Drawing.Point(171, 270);
             this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(126, 41);
-            this.label7.TabIndex = 19;
-            this.label7.Text = "SN数量";
-            // 
-            // label9
-            // 
-            this.label9.AutoSize = true;
-            this.label9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label9.Location = new System.Drawing.Point(106, 44);
-            this.label9.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label9.Name = "label9";
-            this.label9.Size = new System.Drawing.Size(114, 41);
-            this.label9.TabIndex = 23;
-            this.label9.Text = "工单号";
-            // 
-            // label10
-            // 
-            this.label10.AutoSize = true;
-            this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label10.Location = new System.Drawing.Point(106, 415);
-            this.label10.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label10.Name = "label10";
-            this.label10.Size = new System.Drawing.Size(146, 41);
-            this.label10.TabIndex = 25;
-            this.label10.Text = "当前流水";
-            // 
-            // label11
-            // 
-            this.label11.AutoSize = true;
-            this.label11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label11.Location = new System.Drawing.Point(836, 44);
-            this.label11.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label11.Name = "label11";
-            this.label11.Size = new System.Drawing.Size(178, 41);
-            this.label11.TabIndex = 29;
-            this.label11.Text = "打印机列表";
-            // 
-            // currentSerial
-            // 
-            this.currentSerial.Location = new System.Drawing.Point(305, 421);
-            this.currentSerial.Name = "currentSerial";
-            this.currentSerial.Size = new System.Drawing.Size(388, 35);
-            this.currentSerial.TabIndex = 30;
-            // 
-            // Printer
-            // 
-            this.Printer.Location = new System.Drawing.Point(1030, 47);
-            this.Printer.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
-            this.Printer.Name = "Printer";
-            this.Printer.Size = new System.Drawing.Size(378, 45);
-            this.Printer.TabIndex = 28;
-            // 
-            // Print
-            // 
-            this.Print.AllPower = null;
-            this.Print.BackColor = System.Drawing.Color.Transparent;
-            this.Print.DownImage = ((System.Drawing.Image)(resources.GetObject("Print.DownImage")));
-            this.Print.Image = null;
-            this.Print.IsShowBorder = true;
-            this.Print.Location = new System.Drawing.Point(519, 488);
-            this.Print.Margin = new System.Windows.Forms.Padding(6);
-            this.Print.MoveImage = ((System.Drawing.Image)(resources.GetObject("Print.MoveImage")));
-            this.Print.Name = "Print";
-            this.Print.NormalImage = ((System.Drawing.Image)(resources.GetObject("Print.NormalImage")));
-            this.Print.Power = null;
-            this.Print.Size = new System.Drawing.Size(150, 56);
-            this.Print.TabIndex = 27;
-            this.Print.Text = "打印";
-            this.Print.UseVisualStyleBackColor = false;
-            this.Print.Visible = false;
-            this.Print.Click += new System.EventHandler(this.Print_Click);
-            // 
-            // num
-            // 
-            this.num.AllPower = null;
-            this.num.BackColor = System.Drawing.Color.White;
-            this.num.ID = null;
-            this.num.Location = new System.Drawing.Point(305, 345);
-            this.num.Margin = new System.Windows.Forms.Padding(6);
-            this.num.Name = "num";
-            this.num.Power = null;
-            this.num.Size = new System.Drawing.Size(388, 35);
-            this.num.Str = null;
-            this.num.Str1 = null;
-            this.num.Str2 = null;
-            this.num.TabIndex = 20;
-            // 
-            // seriallength
-            // 
-            this.seriallength.AllPower = null;
-            this.seriallength.BackColor = System.Drawing.Color.White;
-            this.seriallength.ID = null;
-            this.seriallength.Location = new System.Drawing.Point(305, 275);
-            this.seriallength.Margin = new System.Windows.Forms.Padding(6);
-            this.seriallength.Name = "seriallength";
-            this.seriallength.Power = null;
-            this.seriallength.Size = new System.Drawing.Size(388, 35);
-            this.seriallength.Str = null;
-            this.seriallength.Str1 = null;
-            this.seriallength.Str2 = null;
-            this.seriallength.TabIndex = 14;
-            this.seriallength.Text = "6";
+            this.label7.Size = new System.Drawing.Size(146, 41);
+            this.label7.TabIndex = 234;
+            this.label7.Text = "工单数量";
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label5.Location = new System.Drawing.Point(171, 204);
+            this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(146, 41);
+            this.label5.TabIndex = 232;
+            this.label5.Text = "工单编号";
+            // 
+            // pr_detail
+            // 
+            this.pr_detail.AutoSize = true;
+            this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pr_detail.Location = new System.Drawing.Point(349, 463);
+            this.pr_detail.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_detail.Name = "pr_detail";
+            this.pr_detail.Size = new System.Drawing.Size(0, 41);
+            this.pr_detail.TabIndex = 241;
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label4.Location = new System.Drawing.Point(171, 463);
+            this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(146, 41);
+            this.label4.TabIndex = 240;
+            this.label4.Text = "产品名称";
+            // 
+            // label8
+            // 
+            this.label8.AutoSize = true;
+            this.label8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label8.Location = new System.Drawing.Point(171, 386);
+            this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(146, 41);
+            this.label8.TabIndex = 238;
+            this.label8.Text = "产品代码";
             // 
             // pr_code
             // 
             this.pr_code.AllPower = null;
             this.pr_code.BackColor = System.Drawing.Color.White;
             this.pr_code.ID = null;
-            this.pr_code.Location = new System.Drawing.Point(305, 118);
-            this.pr_code.Margin = new System.Windows.Forms.Padding(6);
+            this.pr_code.Location = new System.Drawing.Point(356, 395);
             this.pr_code.Name = "pr_code";
             this.pr_code.Power = null;
             this.pr_code.Size = new System.Drawing.Size(388, 35);
             this.pr_code.Str = null;
             this.pr_code.Str1 = null;
             this.pr_code.Str2 = null;
-            this.pr_code.TabIndex = 12;
-            // 
-            // Export
-            // 
-            this.Export.AllPower = null;
-            this.Export.BackColor = System.Drawing.Color.Transparent;
-            this.Export.DownImage = ((System.Drawing.Image)(resources.GetObject("Export.DownImage")));
-            this.Export.Image = null;
-            this.Export.IsShowBorder = true;
-            this.Export.Location = new System.Drawing.Point(305, 488);
-            this.Export.Margin = new System.Windows.Forms.Padding(6);
-            this.Export.MoveImage = ((System.Drawing.Image)(resources.GetObject("Export.MoveImage")));
-            this.Export.Name = "Export";
-            this.Export.NormalImage = ((System.Drawing.Image)(resources.GetObject("Export.NormalImage")));
-            this.Export.Power = null;
-            this.Export.Size = new System.Drawing.Size(150, 56);
-            this.Export.TabIndex = 0;
-            this.Export.Text = "导出";
-            this.Export.UseVisualStyleBackColor = false;
-            this.Export.Click += new System.EventHandler(this.Export_Click);
+            this.pr_code.TabIndex = 239;
             // 
             // ma_code
             // 
@@ -242,70 +153,248 @@
             this.ma_code.DBTitle = "";
             this.ma_code.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.ma_code.FormName = null;
-            this.ma_code.Location = new System.Drawing.Point(305, 47);
+            this.ma_code.Location = new System.Drawing.Point(356, 204);
             this.ma_code.Margin = new System.Windows.Forms.Padding(6);
             this.ma_code.Name = "ma_code";
             this.ma_code.Power = "";
             this.ma_code.ReturnData = null;
             this.ma_code.SelectField = null;
             this.ma_code.SetValueField = null;
-            this.ma_code.Size = new System.Drawing.Size(388, 46);
-            this.ma_code.TabIndex = 217;
+            this.ma_code.Size = new System.Drawing.Size(409, 46);
+            this.ma_code.TabIndex = 233;
             this.ma_code.TableName = null;
             this.ma_code.Tag = "makecode";
             this.ma_code.TextBoxEnable = true;
             // 
+            // Export
+            // 
+            this.Export.AllPower = null;
+            this.Export.BackColor = System.Drawing.Color.Transparent;
+            this.Export.DownImage = ((System.Drawing.Image)(resources.GetObject("Export.DownImage")));
+            this.Export.Image = null;
+            this.Export.IsShowBorder = true;
+            this.Export.Location = new System.Drawing.Point(603, 658);
+            this.Export.Margin = new System.Windows.Forms.Padding(6);
+            this.Export.MoveImage = ((System.Drawing.Image)(resources.GetObject("Export.MoveImage")));
+            this.Export.Name = "Export";
+            this.Export.NormalImage = ((System.Drawing.Image)(resources.GetObject("Export.NormalImage")));
+            this.Export.Power = null;
+            this.Export.Size = new System.Drawing.Size(150, 56);
+            this.Export.TabIndex = 32;
+            this.Export.Text = "导出";
+            this.Export.UseVisualStyleBackColor = false;
+            this.Export.Click += new System.EventHandler(this.Export_Click);
+            // 
+            // Setting
+            // 
+            this.Setting.AllPower = null;
+            this.Setting.BackColor = System.Drawing.Color.Transparent;
+            this.Setting.DownImage = ((System.Drawing.Image)(resources.GetObject("Setting.DownImage")));
+            this.Setting.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Setting.Image = ((System.Drawing.Image)(resources.GetObject("Setting.Image")));
+            this.Setting.IsShowBorder = true;
+            this.Setting.Location = new System.Drawing.Point(988, 143);
+            this.Setting.Margin = new System.Windows.Forms.Padding(4);
+            this.Setting.MoveImage = ((System.Drawing.Image)(resources.GetObject("Setting.MoveImage")));
+            this.Setting.Name = "Setting";
+            this.Setting.NormalImage = ((System.Drawing.Image)(resources.GetObject("Setting.NormalImage")));
+            this.Setting.Power = null;
+            this.Setting.Size = new System.Drawing.Size(126, 48);
+            this.Setting.TabIndex = 23;
+            this.Setting.Text = "参数设置";
+            this.Setting.UseVisualStyleBackColor = true;
+            this.Setting.Click += new System.EventHandler(this.Setting_Click);
+            // 
+            // PrinterList
+            // 
+            this.PrinterList.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.PrinterList.Location = new System.Drawing.Point(356, 143);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(6, 8, 6, 8);
+            this.PrinterList.Name = "PrinterList";
+            this.PrinterList.Size = new System.Drawing.Size(426, 62);
+            this.PrinterList.TabIndex = 22;
+            // 
+            // PrintTest
+            // 
+            this.PrintTest.AllPower = null;
+            this.PrintTest.BackColor = System.Drawing.Color.Transparent;
+            this.PrintTest.DownImage = ((System.Drawing.Image)(resources.GetObject("PrintTest.DownImage")));
+            this.PrintTest.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.PrintTest.Image = ((System.Drawing.Image)(resources.GetObject("PrintTest.Image")));
+            this.PrintTest.IsShowBorder = true;
+            this.PrintTest.Location = new System.Drawing.Point(826, 143);
+            this.PrintTest.Margin = new System.Windows.Forms.Padding(4);
+            this.PrintTest.MoveImage = ((System.Drawing.Image)(resources.GetObject("PrintTest.MoveImage")));
+            this.PrintTest.Name = "PrintTest";
+            this.PrintTest.NormalImage = ((System.Drawing.Image)(resources.GetObject("PrintTest.NormalImage")));
+            this.PrintTest.Power = null;
+            this.PrintTest.Size = new System.Drawing.Size(126, 48);
+            this.PrintTest.TabIndex = 21;
+            this.PrintTest.Text = "打印测试";
+            this.PrintTest.UseVisualStyleBackColor = true;
+            this.PrintTest.Click += new System.EventHandler(this.PrintTest_Click);
+            // 
+            // OneColumn
+            // 
+            this.OneColumn.AutoSize = true;
+            this.OneColumn.Location = new System.Drawing.Point(356, 598);
+            this.OneColumn.Name = "OneColumn";
+            this.OneColumn.Size = new System.Drawing.Size(89, 28);
+            this.OneColumn.TabIndex = 242;
+            this.OneColumn.TabStop = true;
+            this.OneColumn.Text = "单排";
+            this.OneColumn.UseVisualStyleBackColor = true;
+            // 
+            // TwoColumn
+            // 
+            this.TwoColumn.AutoSize = true;
+            this.TwoColumn.Location = new System.Drawing.Point(465, 598);
+            this.TwoColumn.Name = "TwoColumn";
+            this.TwoColumn.Size = new System.Drawing.Size(89, 28);
+            this.TwoColumn.TabIndex = 243;
+            this.TwoColumn.TabStop = true;
+            this.TwoColumn.Text = "双排";
+            this.TwoColumn.UseVisualStyleBackColor = true;
+            // 
+            // ThreeColumn
+            // 
+            this.ThreeColumn.AutoSize = true;
+            this.ThreeColumn.Checked = true;
+            this.ThreeColumn.Location = new System.Drawing.Point(583, 598);
+            this.ThreeColumn.Name = "ThreeColumn";
+            this.ThreeColumn.Size = new System.Drawing.Size(89, 28);
+            this.ThreeColumn.TabIndex = 244;
+            this.ThreeColumn.TabStop = true;
+            this.ThreeColumn.Text = "三排";
+            this.ThreeColumn.UseVisualStyleBackColor = true;
+            // 
+            // FourColumn
+            // 
+            this.FourColumn.AutoSize = true;
+            this.FourColumn.Location = new System.Drawing.Point(693, 598);
+            this.FourColumn.Name = "FourColumn";
+            this.FourColumn.Size = new System.Drawing.Size(89, 28);
+            this.FourColumn.TabIndex = 245;
+            this.FourColumn.TabStop = true;
+            this.FourColumn.Text = "四排";
+            this.FourColumn.UseVisualStyleBackColor = true;
+            // 
+            // GenSN
+            // 
+            this.GenSN.AccessibleRole = System.Windows.Forms.AccessibleRole.PageTabList;
+            this.GenSN.AllPower = null;
+            this.GenSN.BackColor = System.Drawing.Color.Transparent;
+            this.GenSN.DownImage = ((System.Drawing.Image)(resources.GetObject("GenSN.DownImage")));
+            this.GenSN.Image = null;
+            this.GenSN.IsShowBorder = true;
+            this.GenSN.Location = new System.Drawing.Point(358, 658);
+            this.GenSN.Margin = new System.Windows.Forms.Padding(6);
+            this.GenSN.MoveImage = ((System.Drawing.Image)(resources.GetObject("GenSN.MoveImage")));
+            this.GenSN.Name = "GenSN";
+            this.GenSN.NormalImage = ((System.Drawing.Image)(resources.GetObject("GenSN.NormalImage")));
+            this.GenSN.Power = null;
+            this.GenSN.Size = new System.Drawing.Size(150, 56);
+            this.GenSN.TabIndex = 246;
+            this.GenSN.Text = "生成SN";
+            this.GenSN.UseVisualStyleBackColor = false;
+            this.GenSN.Click += new System.EventHandler(this.GenSN_Click);
+            // 
+            // label1
+            // 
+            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(171, 329);
+            this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(146, 41);
+            this.label1.TabIndex = 248;
+            this.label1.Text = "工单数量";
+            // 
+            // ma_count
+            // 
+            this.ma_count.AllPower = null;
+            this.ma_count.BackColor = System.Drawing.Color.White;
+            this.ma_count.ID = null;
+            this.ma_count.Location = new System.Drawing.Point(356, 338);
+            this.ma_count.Name = "ma_count";
+            this.ma_count.Power = null;
+            this.ma_count.Size = new System.Drawing.Size(152, 35);
+            this.ma_count.Str = null;
+            this.ma_count.Str1 = null;
+            this.ma_count.Str2 = null;
+            this.ma_count.TabIndex = 249;
+            // 
+            // msl_type
+            // 
+            this.msl_type.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.msl_type.FormattingEnabled = true;
+            this.msl_type.Items.AddRange(new object[] {
+            "转号前",
+            "转号后"});
+            this.msl_type.Location = new System.Drawing.Point(356, 531);
+            this.msl_type.Name = "msl_type";
+            this.msl_type.Size = new System.Drawing.Size(183, 32);
+            this.msl_type.TabIndex = 250;
+            // 
             // Query_SN
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1494, 1075);
-            this.Controls.Add(this.ma_code);
-            this.Controls.Add(this.currentSerial);
-            this.Controls.Add(this.label11);
-            this.Controls.Add(this.Printer);
-            this.Controls.Add(this.Print);
-            this.Controls.Add(this.label10);
-            this.Controls.Add(this.label9);
-            this.Controls.Add(this.num);
-            this.Controls.Add(this.label7);
-            this.Controls.Add(this.label6);
-            this.Controls.Add(this.date);
-            this.Controls.Add(this.seriallength);
-            this.Controls.Add(this.label3);
+            this.ClientSize = new System.Drawing.Size(2034, 1118);
+            this.Controls.Add(this.msl_type);
+            this.Controls.Add(this.ma_count);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.GenSN);
+            this.Controls.Add(this.FourColumn);
+            this.Controls.Add(this.ThreeColumn);
+            this.Controls.Add(this.TwoColumn);
+            this.Controls.Add(this.OneColumn);
+            this.Controls.Add(this.pr_detail);
+            this.Controls.Add(this.label4);
             this.Controls.Add(this.pr_code);
+            this.Controls.Add(this.label8);
+            this.Controls.Add(this.ma_qty);
+            this.Controls.Add(this.label7);
+            this.Controls.Add(this.ma_code);
             this.Controls.Add(this.label5);
             this.Controls.Add(this.Export);
+            this.Controls.Add(this.Setting);
+            this.Controls.Add(this.PrinterList);
+            this.Controls.Add(this.PrintTest);
+            this.Controls.Add(this.ma_salecode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Margin = new System.Windows.Forms.Padding(6);
             this.Name = "Query_SN";
-            this.Tag = "Query!SpecialReport";
-            this.Text = "Query_SpecialReport";
-            this.Load += new System.EventHandler(this.Query_SpecialReport_Load);
-            ((System.ComponentModel.ISupportInitialize)(this.currentSerial)).EndInit();
+            this.Tag = "Query_SN";
+            this.Text = "打印机调试";
+            this.Load += new System.EventHandler(this.SystemSetting_PrinterTest_Load);
             this.ResumeLayout(false);
             this.PerformLayout();
 
         }
 
         #endregion
-
+        private System.Windows.Forms.Label ma_salecode_label;
+        private CustomControl.ButtonUtil.NormalButton PrintTest;
+        private CustomControl.ComBoxWithFocus.PrinterCombox PrinterList;
+        private CustomControl.ButtonUtil.NormalButton Setting;
         private CustomControl.ButtonUtil.NormalButton Export;
-        private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
-        private CustomControl.TextBoxWithIcon.EnterTextBox pr_code;
-        private System.Windows.Forms.Label label5;
-        private CustomControl.TextBoxWithIcon.EnterTextBox seriallength;
-        private System.Windows.Forms.Label label3;
-        private System.Windows.Forms.DateTimePicker date;
-        private System.Windows.Forms.Label label6;
-        private CustomControl.TextBoxWithIcon.EnterTextBox num;
+        private System.Windows.Forms.Label ma_qty;
         private System.Windows.Forms.Label label7;
-        private System.Windows.Forms.Label label9;
-        private System.Windows.Forms.Label label10;
-        private CustomControl.ButtonUtil.NormalButton Print;
-        private CustomControl.ComBoxWithFocus.PrinterCombox Printer;
-        private System.Windows.Forms.Label label11;
-        private System.Windows.Forms.NumericUpDown currentSerial;
         private CustomControl.TextBoxWithIcon.SearchTextBox ma_code;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.Label pr_detail;
+        private System.Windows.Forms.Label label4;
+        private CustomControl.TextBoxWithIcon.EnterTextBox pr_code;
+        private System.Windows.Forms.Label label8;
+        private System.Windows.Forms.RadioButton OneColumn;
+        private System.Windows.Forms.RadioButton TwoColumn;
+        private System.Windows.Forms.RadioButton ThreeColumn;
+        private System.Windows.Forms.RadioButton FourColumn;
+        private CustomControl.ButtonUtil.NormalButton GenSN;
+        private System.Windows.Forms.Label label1;
+        private CustomControl.TextBoxWithIcon.EnterTextBox ma_count;
+        private System.Windows.Forms.ComboBox msl_type;
+        private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
     }
 }

+ 288 - 69
UAS_MES_ZDXW/FunctionCode/Query/Query_SN.cs

@@ -1,13 +1,14 @@
-using LabelManager2;
+using NPOI.SS.Formula.Functions;
+using Seagull.BarTender.Print;
 using System;
 using System.Data;
+using System.Drawing;
+using System.Drawing.Printing;
 using System.Security.Cryptography;
-using System.Text;
-using System.Threading;
+using System.Text.RegularExpressions;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
-using UAS_MES_NEW.PublicForm;
 using UAS_MES_NEW.PublicMethod;
 
 namespace UAS_MES_NEW.Query
@@ -15,31 +16,54 @@ namespace UAS_MES_NEW.Query
     public partial class Query_SN : Form
     {
 
-        DataHelper dh = SystemInf.dh;
+        int serialnum = 0;
+        //客户的流水号
+        int custserialnum = 0;
 
-        ApplicationClass lbl;
+        Engine engine = new Engine();
 
-        Thread InitPrint;
+        LabelFormatDocument format;
 
-        DataTable Dbfind;
+        DataHelper dh = SystemInf.dh;
 
-        Document doc;
+        //前缀条件
 
+        //生成条码的流水号
+
+        DataTable Dbfind;
         public Query_SN()
         {
             InitializeComponent();
         }
 
-        private void Export_Click(object sender, EventArgs e)
+        private void PrintTest_Click(object sender, EventArgs e)
+        {
+            PrintDocument print = new PrintDocument();
+            print.PrinterSettings.PrinterName = PrinterList.Text;
+            print.PrintPage += Print_PrintPage;
+            print.Print();
+        }
+
+        private void Print_PrintPage(object sender, PrintPageEventArgs e)
         {
-            ExcelExport("");
+            Graphics g = e.Graphics;
+            float leftMargin = 10f; //左边距
+            SolidBrush myBrush = new SolidBrush(Color.Black);//刷子
+            float yPosition = 5f;//行定位
+            Font printFont = new Font("微软雅黑", 20f, FontStyle.Bold);//设置字体
+            yPosition += printFont.GetHeight(g);//另起一行
+            g.DrawString("成功连接此打印机", printFont, myBrush, leftMargin, yPosition, new StringFormat());
         }
 
-        //选择导出Excel时是选择导出数据的还是模板
-        private void ExcelExport(string DataOrTemplet)
+        private void Setting_Click(object sender, EventArgs e)
+        {
+            PrintDialog printd = new PrintDialog();
+            printd.PrinterSettings.PrinterName = PrinterList.Text;
+            printd.ShowDialog();
+        }
+
+        private void Export_Click(object sender, EventArgs e)
         {
-            //Data表示导出数据
-            //Templet表示导出模板
             MD5 md5 = MD5.Create();
             folderBrowserDialog1.Description = "选择导出的路径";
             DialogResult result = folderBrowserDialog1.ShowDialog();
@@ -47,86 +71,281 @@ namespace UAS_MES_NEW.Query
             {
                 string FolderPath = folderBrowserDialog1.SelectedPath;
                 ExcelHandler eh = new ExcelHandler();
-                DataTable dt = new DataTable();
-                dt.Columns.Add("工单号");
-                dt.Columns.Add("序列号");
-                for (decimal i = currentSerial.Value; i < currentSerial.Value + int.Parse(num.Text); i++)
-                {
-                    DataRow dr = dt.NewRow();
-                    dr["工单号"] = ma_code.Text;
-                    string serial = ma_code.Text
-                        + lpad(int.Parse(seriallength.Text), (i + 1).ToString());
-                    dr["序列号"] = serial;
-                    dt.Rows.Add(dr);
-                }
+                DataTable dt = (DataTable)dh.ExecuteSql("select msl_makecode 工单号,msl_sncode 序列号 from makesnlist " +
+                    "where msl_makecode='" + ma_code.Text + "' order by msl_sncode", "select");
                 eh.ExportExcel(dt, FolderPath);
             }
         }
 
-        private void Query_SpecialReport_Load(object sender, EventArgs e)
+        public string BarcodeMethod1(string Prefix, string Suffix, int Index, int Length, int radix, string char_out)
         {
-            InitPrint = new Thread(InPrint);
-            SetLoadingWindow stw = new SetLoadingWindow(InitPrint, "初始化打印程序");
-            BaseUtil.SetFormCenter(stw);
-            stw.ShowDialog();
-            doc = lbl.Documents.Open(System.Windows.Forms.Application.StartupPath + @"\SN.lab");
+            string str = Prefix;
+            //如果是流水则需要在前面加0
+            string serialcode = BaseUtil.DToAny(custserialnum, radix, char_out);
+            for (int j = serialcode.ToString().Length; j < Length; j++)
+            {
+                serialcode = "0" + serialcode;
+            }
+            str += serialcode;
+            str += Suffix;
+            custserialnum = custserialnum + 1;
+            return str;
+        }
+
+        private static string lpad(int length, string number)
+        {
+            while (number.Length < length)
+            {
+                number = "0" + number;
+            }
+            number = number.Substring(number.Length - length, length);
+            return number;
+        }
+
+        private void SystemSetting_PrinterTest_Load(object sender, EventArgs e)
+        {
+            engine.Start();
+
 
             ma_code.TableName = " make left join product on ma_prodcode=pr_code";
-            ma_code.SelectField = "ma_code # 工单编号,ma_prodcode # 产品编号,pr_spec # 型号";
+            ma_code.SelectField = "ma_code # 工单编号,pr_code # 产品编号,pr_spec # 型号";
             ma_code.FormName = Name;
             ma_code.SetValueField = new string[] { "ma_code" };
-            ma_code.Condition = "ma_statuscode='STARTED'";
+            //ma_code.Condition = "ma_statuscode='STARTED'";
             ma_code.DbChange += pr_code_DbChange;
         }
 
-
         private void pr_code_DbChange(object sender, EventArgs e)
         {
             Dbfind = ma_code.ReturnData;
             BaseUtil.SetFormValue(this.Controls, Dbfind);
+            DataTable dt = (DataTable)dh.ExecuteSql("select ma_qty,ma_prodcode,pr_detail from make left join product on ma_prodcode=pr_code  where ma_code='" + ma_code.Text + "'", "select");
+            if (dt.Rows.Count > 0)
+            {
+                pr_code.Text = dt.Rows[0]["ma_prodcode"].ToString();
+                ma_qty.Text = dt.Rows[0]["ma_qty"].ToString();
+                pr_detail.Text = dt.Rows[0]["pr_detail"].ToString();
+            }
+            ma_count.Text = ma_qty.Text;
         }
 
-        private void InPrint()
+        private void GenSN_Click(object sender, EventArgs e)
         {
-            try
+            string Prefix = "";
+
+            string Suffix = "";
+            //获取编码规则
+            if (!dh.CheckExist("make", "ma_code='" + ma_code.Text + "'"))
             {
-                lbl = new ApplicationClass();
-                BaseUtil.WriteLbl();
+                MessageBox.Show("工单号不存在");
+                return;
             }
-            catch (Exception)
+            DataTable dt = (DataTable)dh.ExecuteSql("select pr_exbarcode,ma_qty from make left join product on ma_prodcode=pr_code where ma_code='" + ma_code.Text + "'", "select");
+            string pr_exbarcode = "";
+            string ma_qty = "";
+            if (dt.Rows.Count > 0)
             {
-                MessageBox.Show("未正确安装CodeSoft软件");
+                pr_exbarcode = dt.Rows[0]["pr_exbarcode"].ToString();
+                ma_qty = dt.Rows[0]["ma_qty"].ToString();
             }
-        }
-
-        private static string MD5Encoding(string rawPass)
-        {
-            // 创建MD5类的默认实例:MD5CryptoServiceProvider
-            MD5 md5 = MD5.Create();
-            byte[] bs = Encoding.UTF8.GetBytes(rawPass);
-            byte[] hs = md5.ComputeHash(bs);
-            StringBuilder stb = new StringBuilder();
-            foreach (byte b in hs)
+            if (dh.getRowCount("makesnlist", "msl_makecode='" + ma_code.Text + "' and msl_type='" + (msl_type.Text == "转号前" ? "before" : "after") + "'") + int.Parse(ma_count.Text) > int.Parse(ma_qty))
             {
-                // 以十六进制格式格式化
-                stb.Append(b.ToString("x2"));
+                MessageBox.Show("工单号" + ma_code.Text + "生产序列号超出工单数");
+                return;
             }
-            return stb.ToString().ToUpper();
-        }
-
-        private static string lpad(int length, string number)
-        {
-            while (number.Length < length)
+            DataTable Nr = (DataTable)dh.ExecuteSql("select nrd_detno,nrd_name,nrd_type,nrd_radix,nrd_sql,nrd_length,nrd_content,nvl(nr_changenum,0)nr_changenum from NoRuleDetail left join norule on nrd_nrid=nr_id where nr_code='" + pr_exbarcode + "' order by nrd_detno", "select");
+            //如果没有则取公共规则
+            if (Nr.Rows.Count == 0)
+                Nr = (DataTable)dh.ExecuteSql("select nrd_detno,nrd_name,nrd_radix,nrd_type,nrd_sql,nrd_length,nrd_content,nvl(nr_changenum,0)nr_changenum from NoRuleDetail left join norule on nrd_nrid=nr_id where nr_custcode is null and nr_isdefault <> 0 order by nrd_detno", "select");
+            //用于过滤参数的正则表达式
+            Regex match = new Regex("{\\w+}");
+            //用于存放每一项的明细的数据
+            string[] NrData = new string[Nr.Rows.Count];
+            //流水号的索引
+            int SerialNumIndex = 0;
+            //流水长度
+            int SerialNumLength = 0;
+            //存放键值对
+            int Radix = 10;
+            string PrefixFixed = "";
+            string char_out = "";
+            string nr_changenum = Nr.Rows[0]["nr_changenum"].ToString();
+            //如果是
+            if (nr_changenum != "-1")
             {
-                number = "0" + number;
+                for (int m = 0; m < Nr.Rows.Count; m++)
+                {
+                    switch (Nr.Rows[m]["nrd_type"].ToString())
+                    {
+                        //常量直接进行拼接
+                        case "常量":
+                            NrData[m] = Nr.Rows[m]["nrd_sql"].ToString();
+                            Prefix += NrData[m];
+                            Suffix += NrData[m];
+                            break;
+                        case "SQL":
+                            string SQL = Nr.Rows[m]["nrd_sql"].ToString();
+                            DataTable Temp;
+                            //如果不包含参数替换
+                            if (SQL.IndexOf("{") == 0)
+                            {
+                                Temp = (DataTable)dh.ExecuteSql(SQL, "select");
+                            }
+                            else
+                            {
+                                //替换参数后重新执行SQL
+                                foreach (System.Text.RegularExpressions.Match mch in match.Matches(SQL))
+                                {
+                                    SQL = SQL.Replace(mch.Value.Trim(), "'" + ma_code.Text + "'");
+                                }
+                                Temp = (DataTable)dh.ExecuteSql(SQL, "select");
+                            }
+                            if (Temp.Rows.Count > 0)
+                            {
+                                NrData[m] = Temp.Rows[0][0].ToString();
+                                Prefix += NrData[m];
+                                Suffix += NrData[m];
+                            }
+                            else
+                            {
+                                NrData[m] = "";
+                                Prefix += NrData[m];
+                                Suffix += NrData[m];
+                            }
+                            break;
+                        //流水需要通过MaxNumber去取
+                        case "流水":
+                            NrData[m] = dh.getFieldDataByCondition("RuleMaxNum", "rmn_maxnumber", "rmn_nrcode='" + pr_exbarcode + "'").ToString();
+                            Suffix = "";
+                            PrefixFixed = Prefix;
+                            //设置当前流水
+                            custserialnum = int.Parse(NrData[m] == "" ? "0" : NrData[m]);
+                            SerialNumIndex = m;
+                            SerialNumLength = int.Parse(Nr.Rows[m]["nrd_length"].ToString());
+                            Radix = int.Parse(Nr.Rows[m]["nrd_radix"].ToString());
+                            char_out = Nr.Rows[m]["nrd_content"].ToString();
+                            break;
+                        default:
+                            break;
+                    }
+                }
+                //获取最大的流水号
+                string maxnum = dh.getFieldDataByCondition("RuleMaxNum", "rmn_maxnumber", "rmn_nrcode='" + pr_exbarcode + "' and rmn_prefix='" + Prefix + "'").ToString();
+                //如果流水号为空则插入一条新记录,从1开始取
+                if (maxnum == "")
+                {
+                    dh.ExecuteSql("insert into RuleMaxNum(rmn_id,rmn_nrcode,rmn_prefix,rmn_maxnumber) values(RuleMaxNum_seq.nextval,'" + pr_exbarcode + "','" + Prefix + "','1')", "insert");
+                    custserialnum = 1;
+                }
+                //如果流水号不为空则取当前流水
+                else
+                {
+                    custserialnum = int.Parse(maxnum);
+                }
+                //遍历整个Grid,勾选的项目全部进行条码生成
+                ArrayList<string> custbarcode = new ArrayList<string>();
+                for (int i = 0; i < int.Parse(ma_count.Text); i++)
+                {
+                    string data = BarcodeMethod1(PrefixFixed, Suffix, SerialNumIndex, SerialNumLength, Radix, char_out);
+                    if (!custbarcode.Contains(data))
+                        custbarcode.Add(data);
+                }
+                //插入条码
+                string sql = "insert into makesnlist(MSL_ID, MSL_INDATE, MSL_MAKECODE, MSL_SNCODE,msl_status,MSL_TYPE)" +
+                    "select makesnlist_seq.nextval,sysdate,'" + ma_code.Text + "',:custbarcode,0,'" + (msl_type.Text == "转号前" ? "before" : "after") + "' from dual where :custbarcode not in " +
+                  "(select msl_sncode from makesnlist)";
+                dh.BatchInsert(sql, new string[] { "custbarcode", "custbarcode" }, custbarcode.ToArray(), custbarcode.ToArray());
+                //更新最大流水号
+                dh.UpdateByCondition("RuleMaxNum", "rmn_maxnumber='" + custserialnum + "'", "rmn_nrcode='" + pr_exbarcode + "' and rmn_prefix='" + Prefix + "'");
             }
-            number = number.Substring(number.Length - length, length);
-            return number;
-        }
-
-        private void Print_Click(object sender, EventArgs e)
-        {
-
+            else
+            {
+                for (int m = 0; m < Nr.Rows.Count; m++)
+                {
+                    switch (Nr.Rows[m]["nrd_type"].ToString())
+                    {
+                        //常量直接进行拼接
+                        case "常量":
+                            NrData[m] = Nr.Rows[m]["nrd_sql"].ToString();
+                            Prefix += NrData[m];
+                            Suffix += NrData[m];
+                            break;
+                        case "SQL":
+                            string SQL = Nr.Rows[m]["nrd_sql"].ToString();
+                            DataTable Temp;
+                            //如果不包含参数替换
+                            if (SQL.IndexOf("{") == 0)
+                            {
+                                Temp = (DataTable)dh.ExecuteSql(SQL, "select");
+                            }
+                            else
+                            {
+                                //替换参数后重新执行SQL
+                                foreach (System.Text.RegularExpressions.Match mch in match.Matches(SQL))
+                                {
+                                    SQL = SQL.Replace(mch.Value.Trim(), "'" + ma_code.Text + "'");
+                                }
+                                Temp = (DataTable)dh.ExecuteSql(SQL, "select");
+                            }
+                            if (Temp.Rows.Count > 0)
+                            {
+                                NrData[m] = Temp.Rows[0][0].ToString();
+                                Prefix += NrData[m];
+                                Suffix += NrData[m];
+                            }
+                            else
+                            {
+                                NrData[m] = "";
+                                Prefix += NrData[m];
+                                Suffix += NrData[m];
+                            }
+                            break;
+                        //流水需要通过MaxNumber去取
+                        case "流水":
+                            NrData[m] = dh.getFieldDataByCondition("RuleMaxNum", "rmn_maxnumber", "rmn_nrcode='" + pr_exbarcode + "'").ToString();
+                            Suffix = "";
+                            PrefixFixed = Prefix;
+                            //设置当前流水
+                            custserialnum = int.Parse(NrData[m] == "" ? "0" : NrData[m]);
+                            SerialNumIndex = m;
+                            SerialNumLength = int.Parse(Nr.Rows[m]["nrd_length"].ToString());
+                            Radix = int.Parse(Nr.Rows[m]["nrd_radix"].ToString());
+                            char_out = Nr.Rows[m]["nrd_content"].ToString();
+                            break;
+                        default:
+                            break;
+                    }
+                }
+                //获取最大的流水号
+                string maxnum = dh.getFieldDataByCondition("RuleMaxNum", "rmn_maxnumber", "rmn_nrcode='" + pr_exbarcode + "'").ToString();
+                //如果流水号为空则插入一条新记录,从1开始取
+                if (maxnum == "")
+                {
+                    dh.ExecuteSql("insert into RuleMaxNum(rmn_id,rmn_nrcode,rmn_maxnumber) values(RuleMaxNum_seq.nextval,'" + pr_exbarcode + "','1')", "insert");
+                    custserialnum = 1;
+                }
+                //如果流水号不为空则取当前流水
+                else
+                {
+                    custserialnum = int.Parse(maxnum);
+                }
+                //遍历整个Grid,勾选的项目全部进行条码生成
+                ArrayList<string> custbarcode = new ArrayList<string>();
+                for (int i = 0; i < int.Parse(ma_count.Text); i++)
+                {
+                    string data = BarcodeMethod1(PrefixFixed, Suffix, SerialNumIndex, SerialNumLength, Radix, char_out);
+                    if (!custbarcode.Contains(data))
+                        custbarcode.Add(data);
+                }
+                string sql = "insert into makesnlist(MSL_ID, MSL_INDATE, MSL_MAKECODE, MSL_SNCODE, MSL_TYPE,msl_status)" +
+              "select makesnlist_seq.nextval,sysdate,'" + ma_code.Text + "',:custbarcode,'before',0 from dual where :custbarcode not in " +
+              "(select msl_sncode from makesnlist)";
+                dh.BatchInsert(sql, new string[] { "custbarcode", "custbarcode" }, custbarcode.ToArray(), custbarcode.ToArray());
+                //更新最大流水号
+                dh.UpdateByCondition("RuleMaxNum", "rmn_maxnumber='" + custserialnum + "'", "rmn_nrcode='" + pr_exbarcode + "'");
+            }
+            //插入条码
+            MessageBox.Show("工单" + ma_code.Text + "生成SN清单成功");
         }
     }
-}
+}

+ 271 - 9
UAS_MES_ZDXW/FunctionCode/Query/Query_SN.resx

@@ -117,11 +117,8 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
-  <metadata name="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
-  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
-  <data name="Print.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Export.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFfSURBVFhH5dhNTsJgFIXhM2WiCxL2oAEHrJKhQSYM
@@ -133,7 +130,7 @@
         7i/Okf8O11UAd6c3pS3u5v6/w/UvTaFspAxAMh4AAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Print.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Export.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF3SURBVFhH5djbSgJRFMbxHsP7wBfYT7jvu46QDIoI
@@ -146,7 +143,7 @@
         RK5CYII=
 </value>
   </data>
-  <data name="Print.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Export.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGpSURBVFhH5dg/ayJBGMfxB4YFXTARBAvBQhAsBEEQ
@@ -159,7 +156,7 @@
         42a73eNQWtiN/XCAB+GhVilVVUrFSqlfSikrMOzG/u+H6/+yQ4jdXN8e9AAAAABJRU5ErkJggg==
 </value>
   </data>
-  <data name="Export.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Setting.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFfSURBVFhH5dhNTsJgFIXhM2WiCxL2oAEHrJKhQSYM
@@ -171,7 +168,100 @@
         7i/Okf8O11UAd6c3pS3u5v6/w/UvTaFspAxAMh4AAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Export.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Setting.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        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
+        YII=
+</value>
+  </data>
+  <data name="Setting.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF3SURBVFhH5djbSgJRFMbxHsP7wBfYT7jvu46QDIoI
@@ -184,7 +274,176 @@
         RK5CYII=
 </value>
   </data>
-  <data name="Export.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Setting.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGpSURBVFhH5dg/ayJBGMfxB4YFXTARBAvBQhAsBEEQ
+        ZLnNzFu4I6aYV5kyF9tgbad1jrsYY9T4Z3fcnV2f45e38Sx8q6l+n2IWhpiZjDFVY8wPY8xPY4wVGHZj
+        fxUepLW+0Vrfz+fzR+fclgV+2I39cNBa31Icx/FisXi6XpnL8io27F8ul89xHN9RFEWTPM+ToihZet57
+        F0XRA43HYwsp7wvxwQEeNBqNbFmWnOW5+OAADxoOh7YoS3ZZJj44wIMGg4H1RcGpu4gPDvCgfr9vvfd8
+        TlPxwQEe1Ov1bO49H8+J+OAAD+p2uxaXzNfpJD44wIM6nY69ZDnvDkfxwQEe1G637SXLeLs/iA8O8KBW
+        q2XdJePNbi8+OMCDms2mxe9o/bkTHxzgQY1GwybO8WrzKT44wIPq9bpNUsdv64344AAPqtVq9pw6/vv+
+        IT44wIPCMJzsvg7Jv/UH/1m9iw3794ejC8PwgSqVyt3LbPZ8SpLvg9e3lbiwG/vhAA8KguA2CIL739Pp
+        42a73eNQWtiN/XCAB+GhVilVVUrFSqlfSikrMOzG/u+H6/+yQ4jdXN8e9AAAAABJRU5ErkJggg==
+</value>
+  </data>
+  <data name="PrintTest.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFfSURBVFhH5dhNTsJgFIXhM2WiCxL2oAEHrJKhQSYM
+        JIgzjSLIX0sRKPSPtl+Lo2uOgVbWcJu8CzhP8nVwISIAUAFwA+AWQFNh3M39lZMHrgDUu91uyxjji8KP
+        u7mfDgCuiVLt958fkjSTie3I62iqLu7m/sHgpQ2gRpSG6/nmc2bL23imtuHMkp0f5ADuidIMoljev+bq
+        o8PpH4NmcIjlY7JQHx0KlPCQyHBqqY8OJUqcyGhuq48OBUoUJzJeLNVHhwLlkKQysRz10eECZbpcqe8C
+        JU6NzJ1v9dGhQElSI9Zqoz46lCgmE3u9VR8dCpTUZOJsXPXRoUTJclltd+qjQ4FislzW7l59dChR8lw2
+        e099dDijNA5xYnZBKFvPVxv3x0lanA5qT71eOzsexQsjcf1AXdzN/XQ4H5l4fqs/djqtIIzC/Pgj2uJu
+        7i/Okf8O11UAd6c3pS3u5v6/w/UvTaFspAxAMh4AAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="PrintTest.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        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
+        YII=
+</value>
+  </data>
+  <data name="PrintTest.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF3SURBVFhH5djbSgJRFMbxHsP7wBfYT7jvu46QDIoI
+        C4QNQRAIgVBRSdpxpgZN83wYx5nZOjNqrvgEd73DGvhfzdX3g32ztohoS0iVElLtCakehVQdhmE39qfg
+        AZBtIdX70Y0TjsJ4SQw/7MZ+OAip0kDJnD3UdJAsyXIjKvWm7MJu7M+X6lpIlQWK3ZhEq8pgRvfdKdvK
+        /Rk1/XglpHKA0ulPF3Tb0eyDAzzWKL3pgq7bmn1wMChdPadiK2QfHAxKW8/pqhmwDw4GpRXOqdAI2AcH
+        g9IME7qs++yDg0H5DhK6qE3YBweD0vATOq967IODQfnyE1KOxz44GJTaJKb855h9cDAoVS+mU9tlHxwM
+        iuPFdGK57IPDH8o4ouO3EfvgYFA+xhEdvg7ZB4cNil3uhquc5dLBy5Bt2P/U0+Z0kN0tOhqHlpzt0v7z
+        gF3Yjf1w2ByZ0jjD7RSs8K7l/+Ant7Ab+8058t/hOiOkquBNMQy7sX99uP4F5D4U8hdr4uMAAAAASUVO
+        RK5CYII=
+</value>
+  </data>
+  <data name="PrintTest.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGpSURBVFhH5dg/ayJBGMfxB4YFXTARBAvBQhAsBEEQ
+        ZLnNzFu4I6aYV5kyF9tgbad1jrsYY9T4Z3fcnV2f45e38Sx8q6l+n2IWhpiZjDFVY8wPY8xPY4wVGHZj
+        fxUepLW+0Vrfz+fzR+fclgV+2I39cNBa31Icx/FisXi6XpnL8io27F8ul89xHN9RFEWTPM+ToihZet57
+        F0XRA43HYwsp7wvxwQEeNBqNbFmWnOW5+OAADxoOh7YoS3ZZJj44wIMGg4H1RcGpu4gPDvCgfr9vvfd8
+        TlPxwQEe1Ov1bO49H8+J+OAAD+p2uxaXzNfpJD44wIM6nY69ZDnvDkfxwQEe1G637SXLeLs/iA8O8KBW
+        q2XdJePNbi8+OMCDms2mxe9o/bkTHxzgQY1GwybO8WrzKT44wIPq9bpNUsdv64344AAPqtVq9pw6/vv+
+        IT44wIPCMJzsvg7Jv/UH/1m9iw3794ejC8PwgSqVyt3LbPZ8SpLvg9e3lbiwG/vhAA8KguA2CIL739Pp
+        42a73eNQWtiN/XCAB+GhVilVVUrFSqlfSikrMOzG/u+H6/+yQ4jdXN8e9AAAAABJRU5ErkJggg==
+</value>
+  </data>
+  <data name="GenSN.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFfSURBVFhH5dhNTsJgFIXhM2WiCxL2oAEHrJKhQSYM
+        JIgzjSLIX0sRKPSPtl+Lo2uOgVbWcJu8CzhP8nVwISIAUAFwA+AWQFNh3M39lZMHrgDUu91uyxjji8KP
+        u7mfDgCuiVLt958fkjSTie3I62iqLu7m/sHgpQ2gRpSG6/nmc2bL23imtuHMkp0f5ADuidIMoljev+bq
+        o8PpH4NmcIjlY7JQHx0KlPCQyHBqqY8OJUqcyGhuq48OBUoUJzJeLNVHhwLlkKQysRz10eECZbpcqe8C
+        JU6NzJ1v9dGhQElSI9Zqoz46lCgmE3u9VR8dCpTUZOJsXPXRoUTJclltd+qjQ4FislzW7l59dChR8lw2
+        e099dDijNA5xYnZBKFvPVxv3x0lanA5qT71eOzsexQsjcf1AXdzN/XQ4H5l4fqs/djqtIIzC/Pgj2uJu
+        7i/Okf8O11UAd6c3pS3u5v6/w/UvTaFspAxAMh4AAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="GenSN.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF3SURBVFhH5djbSgJRFMbxHsP7wBfYT7jvu46QDIoI
+        C4QNQRAIgVBRSdpxpgZN83wYx5nZOjNqrvgEd73DGvhfzdX3g32ztohoS0iVElLtCakehVQdhmE39qfg
+        AZBtIdX70Y0TjsJ4SQw/7MZ+OAip0kDJnD3UdJAsyXIjKvWm7MJu7M+X6lpIlQWK3ZhEq8pgRvfdKdvK
+        /Rk1/XglpHKA0ulPF3Tb0eyDAzzWKL3pgq7bmn1wMChdPadiK2QfHAxKW8/pqhmwDw4GpRXOqdAI2AcH
+        g9IME7qs++yDg0H5DhK6qE3YBweD0vATOq967IODQfnyE1KOxz44GJTaJKb855h9cDAoVS+mU9tlHxwM
+        iuPFdGK57IPDH8o4ouO3EfvgYFA+xhEdvg7ZB4cNil3uhquc5dLBy5Bt2P/U0+Z0kN0tOhqHlpzt0v7z
+        gF3Yjf1w2ByZ0jjD7RSs8K7l/+Ant7Ab+8058t/hOiOkquBNMQy7sX99uP4F5D4U8hdr4uMAAAAASUVO
+        RK5CYII=
+</value>
+  </data>
+  <data name="GenSN.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGpSURBVFhH5dg/ayJBGMfxB4YFXTARBAvBQhAsBEEQ
@@ -197,4 +456,7 @@
         42a73eNQWtiN/XCAB+GhVilVVUrFSqlfSikrMOzG/u+H6/+yQ4jdXN8e9AAAAABJRU5ErkJggg==
 </value>
   </data>
+  <metadata name="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
 </root>

+ 2 - 2
UAS_MES_ZDXW/Login.cs

@@ -93,8 +93,8 @@ namespace UAS_MES_NEW
             //设置选中数据库的链接
             string DBUser = DB.SelectedValue.ToString().Split('#')[0];
             string Address = DB.SelectedValue.ToString().Split('#')[1];
-            //DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" + Address + ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
-            DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.81.208)(PORT=11665)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+            DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" + Address + ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+            //DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.81.208)(PORT=11665)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
             SystemInf.CurrentDB = DBUser;
             //设置屏幕的宽高信息
             SystemInf.ScreenWidth = Screen.PrimaryScreen.WorkingArea.Width;

+ 2 - 2
UAS_MES_ZDXW/Properties/Settings.Designer.cs

@@ -122,8 +122,8 @@ namespace UAS_MES_NEW.Properties {
         [global::System.Configuration.ApplicationScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
         [global::System.Configuration.DefaultSettingValueAttribute("Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=fal" +
-            "se;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.81.2" +
-            "08)(PORT=11665)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));")]
+            "se;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1" +
+            "01.253)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));")]
         public string MES {
             get {
                 return ((string)(this["MES"]));

+ 1 - 1
UAS_MES_ZDXW/Properties/Settings.settings

@@ -27,7 +27,7 @@
       <Value Profile="(Default)">ftp://10.8.0.82|vsftpd|vsftpd</Value>
     </Setting>
     <Setting Name="MES" Type="System.String" Scope="Application">
-      <Value Profile="(Default)">Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.81.208)(PORT=11665)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</Value>
+      <Value Profile="(Default)">Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.101.253)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</Value>
     </Setting>
   </Settings>
 </SettingsFile>

+ 104 - 0
UAS_MES_ZDXW/PublicMethod/BaseUtil.cs

@@ -40,6 +40,110 @@ namespace UAS_MES_NEW.PublicMethod
             return !((c.Client.Poll(1000, SelectMode.SelectRead) && (c.Client.Available == 0)) || !c.Client.Connected);
         }
 
+        public static string GetRandomChar(string str)
+        {
+            byte[] buffer = Guid.NewGuid().ToByteArray();
+            int iSeed = BitConverter.ToInt32(buffer, 0);
+            Random random = new Random(iSeed);
+            string data = "";
+            for (int i = 0; i < 5; i++)
+            {
+                int index = random.Next(0, 31);
+                data += str[index];
+            }
+            return data;
+        }
+
+        public static string DToAny(double DB, int Type, string char_out)
+        {
+            string H = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+            long D;
+            double B;
+            string tempD = "", tempB = "";
+            for (int i = 0; i < char_out.Length; i++)
+            {
+                H = H.Replace(char_out[i].ToString(), "");
+            }
+            if (Type != H.Length && Type != 10 && Type != 16)
+            {
+                ShowError("字符长度截取错误,请检查进制和去除字符");
+                return "";
+            }
+            D = (long)DB;
+            B = DB - D;
+            if (D == 0)
+            {
+                tempD = "0";
+            }
+            while (D != 0)
+            {
+                tempD = H[(((int)D % Type))] + tempD;
+                D = D / Type;
+            }
+            for (int i = 0; i < 7; i++)
+            {
+                if (B == 0)
+                {
+                    break;
+                }
+                tempB += H[((int)(B * Type))];
+                B = B * Type - (int)(B * Type);
+            }
+            if (tempB == "")
+            {
+                return tempD;
+            }
+            else
+            {
+                return tempD + "." + tempB;
+            }
+        }
+
+        public static string DToAny(double DB, int Type)
+        {
+            string H = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+            string H1 = "23456789ABCDEFGHJKLMNPQRSTUVWXYZ";
+            long D;
+            double B;
+            string tempD = "", tempB = "";
+            if (Type == 32)
+            {
+                return GetRandomChar(H1);
+            }
+            else
+            {
+                D = (long)DB;
+                B = DB - D;
+                if (D == 0)
+                {
+                    tempD = "0";
+                }
+                while (D != 0)
+                {
+                    tempD = H[(((int)D % Type))] + tempD;
+                    D = D / Type;
+                }
+                for (int i = 0; i < 7; i++)
+                {
+                    if (B == 0)
+                    {
+                        break;
+                    }
+                    tempB += H[((int)(B * Type))];
+                    B = B * Type - (int)(B * Type);
+                }
+                if (tempB == "")
+                {
+                    return tempD;
+                }
+                else
+                {
+                    return tempD + "." + tempB;
+                }
+            }
+        }
+
+
         /// <summary>
         /// 通过DataTable的ColumnName和Caption来拼接一条语句
         /// </summary>

+ 1 - 0
UAS_MES_ZDXW/UAS_MES_ZDXW.csproj

@@ -897,6 +897,7 @@
     <Compile Include="FunctionCode\Packing\Packing_ProdWeightSet.Designer.cs">
       <DependentUpon>Packing_ProdWeightSet.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Query\ArrayList.cs" />
     <Compile Include="FunctionCode\Query\Query_ExeProgress.cs">
       <SubType>Form</SubType>
     </Compile>