Forráskód Böngészése

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

caosy 6 éve
szülő
commit
3488c86cf1

+ 15 - 0
UAS-出货标签管理(吉利通)/CustomControl/SerialPortWithTag.cs

@@ -15,6 +15,8 @@ namespace UAS_LabelMachine.CustomControl
 
         private string tag;
 
+        int sleepTime;
+
         public SerialPortWithTag()
         {
             InitializeComponent();
@@ -32,5 +34,18 @@ namespace UAS_LabelMachine.CustomControl
                 tag = value;
             }
         }
+
+        public int SleepTime
+        {
+            get
+            {
+                return sleepTime;
+            }
+
+            set
+            {
+                sleepTime = value;
+            }
+        }
     }
 }

+ 165 - 4
UAS-出货标签管理(吉利通)/CustomerRule.Designer.cs

@@ -55,8 +55,21 @@
             this.groupBox1 = new System.Windows.Forms.GroupBox();
             this.cu_print_middc = new System.Windows.Forms.CheckBox();
             this.cu_print_outdc = new System.Windows.Forms.CheckBox();
+            this.cu_print_checkdatecode = new System.Windows.Forms.CheckBox();
+            this.label6 = new System.Windows.Forms.Label();
+            this.groupBox2 = new System.Windows.Forms.GroupBox();
+            this.groupBox3 = new System.Windows.Forms.GroupBox();
+            this.radioButton5 = new System.Windows.Forms.RadioButton();
+            this.radioButton4 = new System.Windows.Forms.RadioButton();
+            this.radioButton3 = new System.Windows.Forms.RadioButton();
+            this.radioButton2 = new System.Windows.Forms.RadioButton();
+            this.radioButton1 = new System.Windows.Forms.RadioButton();
+            this.FormatExample = new System.Windows.Forms.Label();
+            this.FormatExample1 = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.cu_print_papercount)).BeginInit();
             this.groupBox1.SuspendLayout();
+            this.groupBox2.SuspendLayout();
+            this.groupBox3.SuspendLayout();
             this.SuspendLayout();
             // 
             // cu_print_midlotno
@@ -254,7 +267,7 @@
             // 
             this.Expression.AutoSize = true;
             this.Expression.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.Expression.Location = new System.Drawing.Point(301, 110);
+            this.Expression.Location = new System.Drawing.Point(24, 57);
             this.Expression.Name = "Expression";
             this.Expression.Size = new System.Drawing.Size(62, 21);
             this.Expression.TabIndex = 57;
@@ -267,7 +280,7 @@
             this.Equal.AutoSize = true;
             this.Equal.Checked = true;
             this.Equal.Font = new System.Drawing.Font("微软雅黑", 9F);
-            this.Equal.Location = new System.Drawing.Point(301, 73);
+            this.Equal.Location = new System.Drawing.Point(24, 20);
             this.Equal.Name = "Equal";
             this.Equal.Size = new System.Drawing.Size(50, 21);
             this.Equal.TabIndex = 58;
@@ -344,17 +357,150 @@
             this.cu_print_outdc.Text = "合并DC";
             this.cu_print_outdc.UseVisualStyleBackColor = true;
             // 
+            // cu_print_checkdatecode
+            // 
+            this.cu_print_checkdatecode.AutoSize = true;
+            this.cu_print_checkdatecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.cu_print_checkdatecode.Location = new System.Drawing.Point(596, 220);
+            this.cu_print_checkdatecode.Name = "cu_print_checkdatecode";
+            this.cu_print_checkdatecode.Size = new System.Drawing.Size(137, 25);
+            this.cu_print_checkdatecode.TabIndex = 65;
+            this.cu_print_checkdatecode.Tag = "QTY";
+            this.cu_print_checkdatecode.Text = "校验DateCode";
+            this.cu_print_checkdatecode.UseVisualStyleBackColor = true;
+            // 
+            // 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(297, 514);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(106, 21);
+            this.label6.TabIndex = 66;
+            this.label6.Text = "日期格式示例";
+            // 
+            // groupBox2
+            // 
+            this.groupBox2.Controls.Add(this.Equal);
+            this.groupBox2.Controls.Add(this.Expression);
+            this.groupBox2.Location = new System.Drawing.Point(290, 69);
+            this.groupBox2.Name = "groupBox2";
+            this.groupBox2.Size = new System.Drawing.Size(104, 100);
+            this.groupBox2.TabIndex = 67;
+            this.groupBox2.TabStop = false;
+            // 
+            // groupBox3
+            // 
+            this.groupBox3.Controls.Add(this.radioButton5);
+            this.groupBox3.Controls.Add(this.radioButton4);
+            this.groupBox3.Controls.Add(this.radioButton3);
+            this.groupBox3.Controls.Add(this.radioButton2);
+            this.groupBox3.Controls.Add(this.radioButton1);
+            this.groupBox3.Location = new System.Drawing.Point(290, 540);
+            this.groupBox3.Name = "groupBox3";
+            this.groupBox3.Size = new System.Drawing.Size(660, 45);
+            this.groupBox3.TabIndex = 68;
+            this.groupBox3.TabStop = false;
+            // 
+            // radioButton5
+            // 
+            this.radioButton5.AutoSize = true;
+            this.radioButton5.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.radioButton5.Location = new System.Drawing.Point(576, 15);
+            this.radioButton5.Name = "radioButton5";
+            this.radioButton5.Size = new System.Drawing.Size(62, 21);
+            this.radioButton5.TabIndex = 63;
+            this.radioButton5.TabStop = true;
+            this.radioButton5.Text = "表达式";
+            this.radioButton5.UseVisualStyleBackColor = true;
+            this.radioButton5.Visible = false;
+            // 
+            // radioButton4
+            // 
+            this.radioButton4.AutoSize = true;
+            this.radioButton4.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.radioButton4.Location = new System.Drawing.Point(147, 15);
+            this.radioButton4.Name = "radioButton4";
+            this.radioButton4.Size = new System.Drawing.Size(80, 21);
+            this.radioButton4.TabIndex = 62;
+            this.radioButton4.TabStop = true;
+            this.radioButton4.Text = "M/d/yyyy";
+            this.radioButton4.UseVisualStyleBackColor = true;
+            this.radioButton4.CheckedChanged += new System.EventHandler(this.DateFormat_CheckedChanged);
+            // 
+            // radioButton3
+            // 
+            this.radioButton3.AutoSize = true;
+            this.radioButton3.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.radioButton3.Location = new System.Drawing.Point(426, 15);
+            this.radioButton3.Name = "radioButton3";
+            this.radioButton3.Size = new System.Drawing.Size(62, 21);
+            this.radioButton3.TabIndex = 61;
+            this.radioButton3.TabStop = true;
+            this.radioButton3.Text = "表达式";
+            this.radioButton3.UseVisualStyleBackColor = true;
+            this.radioButton3.Visible = false;
+            // 
+            // radioButton2
+            // 
+            this.radioButton2.AutoSize = true;
+            this.radioButton2.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.radioButton2.Location = new System.Drawing.Point(290, 15);
+            this.radioButton2.Name = "radioButton2";
+            this.radioButton2.Size = new System.Drawing.Size(100, 21);
+            this.radioButton2.TabIndex = 60;
+            this.radioButton2.TabStop = true;
+            this.radioButton2.Text = "yyyy/MM/dd";
+            this.radioButton2.UseVisualStyleBackColor = true;
+            this.radioButton2.CheckedChanged += new System.EventHandler(this.DateFormat_CheckedChanged);
+            // 
+            // radioButton1
+            // 
+            this.radioButton1.AutoSize = true;
+            this.radioButton1.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.radioButton1.Location = new System.Drawing.Point(11, 15);
+            this.radioButton1.Name = "radioButton1";
+            this.radioButton1.Size = new System.Drawing.Size(68, 21);
+            this.radioButton1.TabIndex = 59;
+            this.radioButton1.TabStop = true;
+            this.radioButton1.Text = "M/d/yy";
+            this.radioButton1.UseVisualStyleBackColor = true;
+            this.radioButton1.CheckedChanged += new System.EventHandler(this.DateFormat_CheckedChanged);
+            // 
+            // FormatExample
+            // 
+            this.FormatExample.AutoSize = true;
+            this.FormatExample.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.FormatExample.Location = new System.Drawing.Point(406, 514);
+            this.FormatExample.Name = "FormatExample";
+            this.FormatExample.Size = new System.Drawing.Size(96, 21);
+            this.FormatExample.TabIndex = 69;
+            this.FormatExample.Text = "2019-01-30";
+            // 
+            // FormatExample1
+            // 
+            this.FormatExample1.AutoSize = true;
+            this.FormatExample1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.FormatExample1.Location = new System.Drawing.Point(527, 514);
+            this.FormatExample1.Name = "FormatExample1";
+            this.FormatExample1.Size = new System.Drawing.Size(0, 21);
+            this.FormatExample1.TabIndex = 70;
+            // 
             // CustomerRule
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1082, 634);
+            this.Controls.Add(this.FormatExample1);
+            this.Controls.Add(this.FormatExample);
+            this.Controls.Add(this.groupBox3);
+            this.Controls.Add(this.groupBox2);
+            this.Controls.Add(this.label6);
+            this.Controls.Add(this.cu_print_checkdatecode);
             this.Controls.Add(this.cu_print_outdc);
             this.Controls.Add(this.cu_print_middc);
             this.Controls.Add(this.groupBox1);
             this.Controls.Add(this.label5);
-            this.Controls.Add(this.Equal);
-            this.Controls.Add(this.Expression);
             this.Controls.Add(this.cu_print_checkonly);
             this.Controls.Add(this.cu_print_papercount);
             this.Controls.Add(this.label4);
@@ -380,6 +526,10 @@
             ((System.ComponentModel.ISupportInitialize)(this.cu_print_papercount)).EndInit();
             this.groupBox1.ResumeLayout(false);
             this.groupBox1.PerformLayout();
+            this.groupBox2.ResumeLayout(false);
+            this.groupBox2.PerformLayout();
+            this.groupBox3.ResumeLayout(false);
+            this.groupBox3.PerformLayout();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -412,5 +562,16 @@
         private System.Windows.Forms.GroupBox groupBox1;
         private System.Windows.Forms.CheckBox cu_print_middc;
         private System.Windows.Forms.CheckBox cu_print_outdc;
+        private System.Windows.Forms.CheckBox cu_print_checkdatecode;
+        private System.Windows.Forms.Label label6;
+        private System.Windows.Forms.GroupBox groupBox2;
+        private System.Windows.Forms.GroupBox groupBox3;
+        private System.Windows.Forms.RadioButton radioButton5;
+        private System.Windows.Forms.RadioButton radioButton4;
+        private System.Windows.Forms.RadioButton radioButton3;
+        private System.Windows.Forms.RadioButton radioButton2;
+        private System.Windows.Forms.RadioButton radioButton1;
+        private System.Windows.Forms.Label FormatExample;
+        private System.Windows.Forms.Label FormatExample1;
     }
 }

+ 8 - 1
UAS-出货标签管理(吉利通)/CustomerRule.cs

@@ -50,7 +50,7 @@ namespace UAS_LabelMachine
             {
                 CUCODE = e.Node.Tag.ToString();
                 sql.Clear();
-                sql.Append("select cu_print_midlotno,cu_print_midspec,cu_print_recheck,cu_print_midpo,cu_print_midprod,nvl(cu_print_custprodmatchmodel,'Equal')cu_print_custprodmatchmodel,cu_print_outlotno,cu_print_outspec,cu_print_outpo");
+                sql.Append("select cu_print_midlotno,cu_print_midspec,cu_print_checkdatecode,cu_print_recheck,cu_print_midpo,cu_print_midprod,nvl(cu_print_custprodmatchmodel,'Equal')cu_print_custprodmatchmodel,cu_print_outlotno,cu_print_outspec,cu_print_outpo");
                 sql.Append(",cu_print_outprod,cu_print_checkonly,nvl(cu_print_papercount,0)cu_print_papercount,cu_print_regexpression from customer where cu_code='" + e.Node.Tag + "'");
                 dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
                 if (dt.Rows.Count > 0)
@@ -99,6 +99,7 @@ namespace UAS_LabelMachine
             sql.Append("cu_print_papercount='" + cu_print_papercount.Value + "',");
             sql.Append("cu_print_custprodmatchmodel='" + (Equal.Checked ? "Equal" : "Expression") + "',");
             sql.Append("cu_print_recheck='" + (CustProdAndSpec.Checked ? "CP" : "BR") + "',");
+            sql.Append("cu_print_checkdatecode='" + (cu_print_checkdatecode.Checked ? -1 : 0) + "',");
             sql.Append("cu_print_regexpression=:cu_print_regexpression where cu_code='" + CUCODE + "'");
             dh.ExecuteSql(sql.ToString(), "update", cu_print_regexpression.Text);
             MessageBox.Show("保存成功!", "提示");
@@ -134,5 +135,11 @@ namespace UAS_LabelMachine
             else
                 cu_print_regexpression.Enabled = true;
         }
+
+        private void DateFormat_CheckedChanged(object sender, EventArgs e)
+        {
+            Control ctl = sender as Control;
+            FormatExample1.Text = Convert.ToDateTime(FormatExample.Text).ToString(ctl.Text);
+        }
     }
 }

+ 4 - 0
UAS-出货标签管理(吉利通)/Entity/SystemInf.cs

@@ -5,5 +5,9 @@
         public static DataHelper dh;
 
         public static AccessDBHelper adh;
+
+        public static AccessDBHelper front_adh;
+
+        public static AccessDBHelper back_adh;
     }
 }

+ 10 - 1
UAS-出货标签管理(吉利通)/Login.cs

@@ -12,7 +12,12 @@ namespace UAS_LabelMachine
     public partial class Login : Form
     {
         DataHelper dh;
+        //前端操作
         AccessDBHelper adh;
+        //后端操作
+        AccessDBHelper adh1;
+        //数据上传操作
+        AccessDBHelper adh2;
         DataTable dt;
 
         public Login()
@@ -34,8 +39,12 @@ namespace UAS_LabelMachine
             //启动时压缩数据库
             BaseUtil.CompactAccessDB("LabelPrint.accdb");
             adh = new AccessDBHelper("LabelPrint.accdb");
+            adh1 = new AccessDBHelper("LabelPrint.accdb");
+            adh2 = new AccessDBHelper("LabelPrint.accdb");
             SystemInf.dh = dh;
-            SystemInf.adh = adh;
+            SystemInf.front_adh = adh;
+            SystemInf.back_adh = adh1;
+            SystemInf.adh = adh2;
             //获取账套信息
             dt = (DataTable)dh.ExecuteSql("select ma_function,ms_pwd,ma_user from master ", "select");
             DataTable MasterDB = dt.Clone();

+ 19 - 41
UAS-出货标签管理(吉利通)/PublicMethod/AccessDBHelper.cs

@@ -108,7 +108,6 @@ namespace UAS_LabelMachine
             OleDbDataAdapter ad = new OleDbDataAdapter(command);
             ad.Fill(dt);
             ad.Dispose();
-            
             return dt;
         }
 
@@ -137,7 +136,6 @@ namespace UAS_LabelMachine
                 ad.Fill(dt);
             }
             ad.Dispose();
-            
             if (dt.Rows.Count > 0)
             {
                 return dt.Rows[0][0];
@@ -167,7 +165,6 @@ namespace UAS_LabelMachine
             {
 
             }
-            
         }
 
         public void DeleleFile(string accessFile)
@@ -259,26 +256,6 @@ namespace UAS_LabelMachine
                 tx.Rollback();
                 throw new Exception(E.Message);
             }
-            
-            //string[][] param_array = new string[dt.Columns.Count][];
-            //for (int i = 0; i < dt.Columns.Count; i++)
-            //{
-            //    param_array[i] = new string[dt.Rows.Count];
-            //}
-            ////变量所有的行,如果有主键为空的则移除,不为空的进行参数的拼接
-            //for (int i = dt.Rows.Count - 1; i >= 0; i--)
-            //{
-            //    //当为新添加行的时候才去设置参数,设置过后索引+1
-            //    for (int j = 0; j < dt.Columns.Count; j++)
-            //    {
-            //        param_array[j][i] = dt.Rows[i][j].ToString();
-            //    }
-            //}
-            //for (int i = 0; i < dt.Columns.Count; i++)
-            //{
-            //    command.Parameters.AddWithValue(dt.Columns[i].ColumnName, param_array[i]);
-            //}
-            //command.ExecuteNonQuery();
         }
 
         public void BatchInsert(string tableName, DataTable dt)
@@ -293,16 +270,10 @@ namespace UAS_LabelMachine
             using (OleDbCommandBuilder builder = new OleDbCommandBuilder(adapter))
             {
                 adapter.InsertCommand = builder.GetInsertCommand();
-                for (int i = 0; i < adapter.InsertCommand.Parameters.Count; i++)
-                {
-                    Console.WriteLine(adapter.InsertCommand.Parameters[i].ParameterName);
-                }
                 foreach (string one in columnList)
                 {
-                    Console.WriteLine(one.ToLower());
                     adapter.InsertCommand.Parameters.Add(new OleDbParameter(one.ToLower(), "Test"));
                 }
-                Console.WriteLine(adapter.Update(dt));
             }
         }
 
@@ -319,7 +290,6 @@ namespace UAS_LabelMachine
             OleDbDataAdapter ad = new OleDbDataAdapter(command);
             ad.Fill(dt);
             ad.Dispose();
-            
             return int.Parse(dt.Rows[0][0].ToString());
         }
 
@@ -539,7 +509,6 @@ namespace UAS_LabelMachine
                 ad.Fill(dt);
             }
             ad.Dispose();
-            
             return int.Parse(dt.Rows[0][0].ToString()) > 0;
         }
 
@@ -637,7 +606,7 @@ namespace UAS_LabelMachine
                     }
                     break;
             }
-            
+
             return result;
         }
 
@@ -650,7 +619,7 @@ namespace UAS_LabelMachine
             SQL = SQL.Replace("?", ":Param");
             command = new OleDbCommand(SQL, this._odcConnection);
             command.ExecuteNonQuery();
-            
+
         }
 
         public int GetDistinctRowCount(string TableName, string Field)
@@ -674,7 +643,7 @@ namespace UAS_LabelMachine
                 ad.Fill(dt);
             }
             ad.Dispose();
-            
+
             return int.Parse(dt.Rows[0][0].ToString());
         }
 
@@ -797,7 +766,6 @@ namespace UAS_LabelMachine
                 command.Connection.Open();
                 Rowcount = command.ExecuteNonQuery();
             }
-            
             return Rowcount;
         }
 
@@ -827,7 +795,6 @@ namespace UAS_LabelMachine
             }
             for (int i = 0; i < command.Parameters.Count; i++)
                 param[i] = command.Parameters[i].Value.ToString();
-            
         }
 
         /// <summary>
@@ -866,7 +833,6 @@ namespace UAS_LabelMachine
                 tx.Rollback();
                 throw new Exception(E.Message);
             }
-            
         }
 
         /// <summary>
@@ -936,12 +902,11 @@ namespace UAS_LabelMachine
             if (dt.Rows.Count > 0)
             {
                 ad.Dispose();
-                
+
                 return dt.Rows[0][0];
             }
             else
             {
-                
                 return "";
             }
         }
@@ -981,11 +946,24 @@ namespace UAS_LabelMachine
         public void AddColumFromDataTable(DataTable dt, string tablename)
         {
             DataTable dt2 = (DataTable)ExecuteSql("select top 1 * from " + tablename + "", "select");
-            foreach (var item in dt.Columns)
+            foreach (DataColumn item in dt.Columns)
             {
                 if (!dt2.Columns.Contains(item.ToString()))
                 {
-                    ExecuteSql("alter table " + tablename + " add [" + item.ToString() + "] varchar(200) NULL", "update");
+                    switch (item.DataType.ToString())
+                    {
+                        case "System.String":
+                            ExecuteSql("alter table " + tablename + " add [" + item.ToString() + "] varchar(200) NULL", "update");
+                            break;
+                        case "System.Decimal":
+                            ExecuteSql("alter table " + tablename + " add [" + item.ToString() + "] number NULL", "update");
+                            break;
+                        case "System.DateTime":
+                            ExecuteSql("alter table " + tablename + " add [" + item.ToString() + "] date NULL", "update");
+                            break;
+                        default:
+                            break;
+                    }
                 }
             }
         }

+ 3 - 3
UAS-出货标签管理(吉利通)/PublicMethod/DataHelper.cs

@@ -1095,7 +1095,7 @@ namespace UAS_LabelMachine
         /// </summary>
         /// <param name="ProcedureName"></param>
         /// <param name="param"></param>
-        public void CallProcedure(string ProcedureName,DataTable upload)
+        public void CallProcedure(string ProcedureName, DataTable upload)
         {
             StringBuilder sql = new StringBuilder();
             sql.Append("declare barcode BarCodeUpload_arr;begin barcode:=BarCodeUpload_arr(");
@@ -1104,12 +1104,12 @@ namespace UAS_LabelMachine
                 sql.Append("BarCodeUpload(");
                 for (int j = 0; j < upload.Columns.Count; j++)
                 {
-                    sql.Append("'"+upload.Rows[i][j].ToString()+"',");
+                    sql.Append("'" + upload.Rows[i][j].ToString() + "',");
                 }
                 sql.Remove(sql.Length - 1, 1);
                 sql.Append("),");
             }
-            sql.Remove(sql.Length-1,1);
+            sql.Remove(sql.Length - 1, 1);
             sql.Append(");sp_uploadbarcode(barcode);END;");
             command = new OracleCommand();
             command.Connection = connection;

+ 0 - 1
UAS-出货标签管理(吉利通)/PublicMethod/GlobalEventsHandler.cs

@@ -44,7 +44,6 @@ namespace UAS_Labeling.PublicMethod
             dh = new DataHelper();
             if (User.UserAccountType != "admin")
             {
-                if (dh.getRowCount("labelprintpower") > 0)
                 {
                     string sql = " select * from labelprintpower where lpp_emcode = '" + User.UserCode + "' and lpp_manual=1";
                     DataTable dt = (DataTable)dh.ExecuteSql(sql, "select");

+ 8 - 5
UAS-出货标签管理(吉利通)/PublicMethod/LogicHandler.cs

@@ -43,7 +43,7 @@ namespace UAS_LabelMachine.PublicMethod
         /// </summary>
         /// <param name="PLC"></param>
         /// <param name="Movement"></param>
-        public static void SendDataToPLC(SerialPortWithTag PLC, string Movement)
+        public static void SendDataToPLC(SerialPortWithTag PLC, string Movement, AccessDBHelper adh)
         {
             DataTable dt = (DataTable)adh.ExecuteSql("select * from plcinstruct", "select");
             if (PLC.IsOpen && dt.Rows.Count > 0)
@@ -108,11 +108,14 @@ namespace UAS_LabelMachine.PublicMethod
         public static bool CheckUploadData(string iInoutno)
         {
             DataTable dt = (DataTable)adh.ExecuteSql("select pib_id,pib_outboxcode1,pib_outboxcode2,pib_custmidboxcode,pib_custoutboxcode,pib_lotno,pib_datecode,pib_ifmodify,-1 as pib_ifupload,pib_ifpick,pib_ifprint,pib_ifrecheck from prodiobarcode where pib_inoutno='" + iInoutno + "' and pib_ifupload=0 and pib_ifrecheck=-1  ", "select");
-            dh.CallProcedure("sp_uploadbarcode", dt);
-            //更新本地数据为已上传
-            if (adh.UpdateByCondition("prodiobarcode", "pib_ifupload=-1", "pib_inoutno='" + iInoutno + "' and pib_ifrecheck=-1 and pib_ifupload<>-1") > 0)
+            if (dt.Rows.Count > 0)
             {
-                return true;
+                dh.CallProcedure("sp_uploadbarcode", dt);
+                //更新本地数据为已上传
+                if (adh.UpdateByCondition("prodiobarcode", "pib_ifupload=-1", "pib_inoutno='" + iInoutno + "' and pib_ifrecheck=-1 and pib_ifupload<>-1") > 0)
+                {
+                    return true;
+                }
             }
             return false;
         }

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 507 - 185
UAS-出货标签管理(吉利通)/UAS_出货标签管理.Designer.cs


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 350 - 177
UAS-出货标签管理(吉利通)/UAS_出货标签管理.cs


+ 12 - 0
UAS-出货标签管理(吉利通)/UAS_出货标签管理.resx

@@ -150,6 +150,15 @@
   <metadata name="pr_unit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="pib_year.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pib_month.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pib_day.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="pib_ifrecheck.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
@@ -183,6 +192,9 @@
   <metadata name="PLC1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>781, 18</value>
   </metadata>
+  <metadata name="ManBackendCheck.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>862, 18</value>
+  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>

+ 18 - 6
UAS-出货标签管理(泽天)/UAS_出货标签管理.cs

@@ -571,6 +571,10 @@ namespace UAS_LabelMachine
                 dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
                 if (dt.Rows.Count > 0)
                 {
+                    pi_cardcode.Text = dt.Rows[0]["pi_cardcode"].ToString();
+                    pi_title.Text = dt.Rows[0]["pi_title"].ToString();
+                    pi_date.Text = dt.Rows[0]["pi_date"].ToString();
+                    PI_ID = dt.Rows[0]["pi_id"].ToString();
                     switch (dt.Rows[0]["pi_combine_user"].ToString())
                     {
                         case "1":
@@ -582,8 +586,6 @@ namespace UAS_LabelMachine
                         default:
                             break;
                     }
-                    pi_cardcode.Text = dt.Rows[0]["pi_cardcode"].ToString();
-                    pi_title.Text = dt.Rows[0]["pi_title"].ToString();
                     if (pi_cardcode.Text != "ZGCC")
                     {
                         CustomerLabel.Enabled = false;
@@ -592,8 +594,7 @@ namespace UAS_LabelMachine
                     {
                         CustomerLabel.Enabled = true;
                     }
-                    pi_date.Text = dt.Rows[0]["pi_date"].ToString();
-                    PI_ID = dt.Rows[0]["pi_id"].ToString();
+       
                     OutBoxNum_Click(new object(), new EventArgs());
                     LoadPrcodeData();
                     //获取条码规则
@@ -1029,7 +1030,7 @@ namespace UAS_LabelMachine
                     MidReport.Print();
                     dh.UpdateByCondition("prodiobarcode", "pib_midifprint=-1", "pib_inoutno='" + pi_inoutno.Text + "' and pib_outboxcode1 in (" + pib_outboxcode1 + ")");
                     SelectRowIndex = -1;
-                    LogManager.DoCommandLog(pi_inoutno.Text, User.UserCode, "打印中盒" + pib_outboxcode1, "打印成功");
+                    LogManager.DoCommandLog(pi_inoutno.Text, User.UserCode, "打印中盒" + pib_outboxcode1.Replace("'",""), "打印成功");
                 }
                 Properties.Settings.Default.MPrinter = MidLabelPrinter.Text;
                 Properties.Settings.Default.Save();
@@ -1896,9 +1897,14 @@ namespace UAS_LabelMachine
             {
                 CombindetailTwo.Checked = false;
             }
-            if (LoadCheck)
+            if (LoadCheck) {
                 LoadPrcodeData();
+                string response = "";
+                string[] param = new string[] { PI_ID, "1", response };
+                dh.CallProcedure("USER_PRODOUT_GROUPQTY", param);
+            }
         }
+
         private void CombindetailTwo_CheckedChanged(object sender, EventArgs e)
         {
             if (CombindetailTwo.Checked)
@@ -1906,8 +1912,14 @@ namespace UAS_LabelMachine
                 Combindetail.Checked = false;
             }
             if (LoadCheck)
+            {
                 LoadPrcodeData();
+                string response = "";
+                string[] param = new string[] { PI_ID, "2", response };
+                dh.CallProcedure("USER_PRODOUT_GROUPQTY", param);
+            }
         }
+
         string SelectProdcode = "";
         int SelectRowIndex = -1;
         private void LabelInf_CellClick(object sender, DataGridViewCellEventArgs e)

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott