5 Commits 6fe5c5d016 ... 0ed84d9daa

Author SHA1 Message Date
  callm 0ed84d9daa Merge repos.ubtob.net:usoft/mes-client 2 months ago
  callm a103f19848 修改支持HTTPS链接 2 months ago
  callm 8d8c12e729 修改拆解限制 2 months ago
  callm cc533e2b95 BUG优化 2 months ago
  callm 5961656125 修改默认数据库链接 2 months ago

+ 1 - 1
UAS_MES_HYSX/DataOperate/DataHelper.cs

@@ -10,7 +10,7 @@ namespace UAS_MES_NEW.DataOperate
     class DataHelper
     {
         //系统默认的的连接字符串 
-        private string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.5)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+        private string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES_ZS;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.5)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
 
         //public static readonly string ERPAddesss = "http://192.168.1.5:8099/mes/";
 

+ 3 - 2
UAS_MES_HYSX/Login.cs

@@ -75,6 +75,7 @@ namespace UAS_MES_NEW
             try
             {
                 dh = new DataHelper();
+                SystemInf.dh = dh;
                 //将账套的信息查询出来赋给下拉框
                 DbComboxData = (DataTable)dh.ExecuteSql("select ms_pwd,ma_user,ma_user||'#'||ma_inneraddress db_user from master", "select");
                 DB.DataSource = DbComboxData;
@@ -104,12 +105,12 @@ namespace UAS_MES_NEW
             SystemInf.ScreenHeight = Screen.PrimaryScreen.WorkingArea.Height;
             //重新执行一遍构造函数使得重置之后的链接字符串生效
             dh = new DataHelper();
-            SystemInf.dh = dh;
+          
             string ErrorMessage = "";
             //验证用户名和密码
             if (LogicHandler.CheckUserLogin(UserName.Text, PassWord.Text, DBUser, out ErrorMessage))
             {
-                DataTable dt = (DataTable)dh.ExecuteSql("select nvl(em_modifypassword,0)em_modifypassword,nvl(em_passwordctl,0)em_passwordctl from employee where em_code='" + UserName.Text + "'", "select");
+                DataTable dt = (DataTable)dh.ExecuteSql("select nvl(em_modifypassword,0)em_modifypassword,nvl(em_passwordctl,0)em_passwordctl from employee where upper(em_code)='" + UserName.Text.ToUpper() + "'", "select");
                 if (dt.Rows[0]["em_passwordctl"].ToString() != "0")
                 {
                     if (dt.Rows[0]["em_modifypassword"].ToString() == "0")

+ 14 - 6
UAS_MES_JH/FunctionCode/Make/Make_TestCollectionqrcode.cs

@@ -727,15 +727,23 @@ namespace UAS_MES_NEW.Make
                             OperateResult.AppendText("<<序列号:" + ms_sncode.Text + " MMI2信息异常\n", Color.Red);
                             return;
                         }
-                        if (dh.CheckExist("product", "pr_code  = '" + ma_prodcode.Text + "' and pr_volume = -1 ") && !bt.Contains("UNKNOWN"))
+                        if (dh.CheckExist("product", "pr_code  = '" + ma_prodcode.Text + "' and pr_volume = -1 "))
                         {
-                            OperateResult.AppendText("<<序列号:" + ms_sncode.Text + " BT信息异常\n", Color.Red);
-                            return;
+                            bool shouldNotIntercept = !string.IsNullOrEmpty(bt) || bt.Contains("UNKNOWN");
+                            if (!shouldNotIntercept)  // 若不满足不拦截条件,则拦截
+                            {
+                                OperateResult.AppendText("<<序列号:" + ms_sncode.Text + " BT信息异常\n", Color.Red);
+                                return;
+                            }
                         }
-                        if (dh.CheckExist("product", "pr_code  = '" + ma_prodcode.Text + "' and pr_height = -1 ") && !mac.Contains("UNKNOWN"))
+                        if (dh.CheckExist("product", "pr_code  = '" + ma_prodcode.Text + "' and pr_height = -1 "))
                         {
-                            OperateResult.AppendText("<<序列号:" + ms_sncode.Text + " WIFI信息异常\n", Color.Red);
-                            return;
+                            bool shouldNotIntercept = !string.IsNullOrEmpty(bt) || mac.Contains("UNKNOWN");
+                            if (!shouldNotIntercept)  // 若不满足不拦截条件,则拦截
+                            {
+                                OperateResult.AppendText("<<序列号:" + ms_sncode.Text + " WIFI信息异常\n", Color.Red);
+                                return;
+                            }
                         }
                         if (dh.CheckExist("product", "pr_code  = '" + ma_prodcode.Text + "' and pr_palletheight = -1 ") && othid.Contains("UNKNOWN"))
                         {

+ 6 - 1
UAS_MES_YDCY/FunctionCode/Packing/Packing_PalletCollection.cs

@@ -452,7 +452,7 @@ namespace UAS_MES_NEW.Packing
                 if (Delete == "Yes")
                 {
                     sql.Clear();
-                    sql.Append("select nvl(pa_iostatus,0) pa_iostatus,pa_outno from package where pa_outboxcode='" + pa_outboxcode.Text + "' and pa_type=3");
+                    sql.Append("select pa_tag,nvl(pa_iostatus,0) pa_iostatus,pa_outno from package where pa_outboxcode='" + pa_outboxcode.Text + "' and pa_type=3");
                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     if (dt.Rows.Count > 0)
                     {
@@ -466,6 +466,11 @@ namespace UAS_MES_NEW.Packing
                             OperateResult.AppendText(">>栈板" + pa_outboxcode.Text + "处于入库状态,不允许操作\n", Color.Red);
                             return;
                         }
+                        if (dt.Rows[0]["pa_tag"].ToString() == "MidBox")
+                        {
+                            OperateResult.AppendText(">>栈板" + pa_outboxcode.Text + "类型为中箱,请在中箱装栈板界面解除\n", Color.Red);
+                            return;
+                        }
                     }
                     else
                     {

+ 57 - 44
UAS_MES_ZKLH/FunctionCode/Query/Query_SOP.Designer.cs

@@ -41,6 +41,11 @@ namespace UAS_MES_NEW.Query
             this.SendSop = new System.Windows.Forms.Button();
             this.JPG = new System.Windows.Forms.RadioButton();
             this.SendDGV = new System.Windows.Forms.DataGridView();
+            this.CheckColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.fp_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.fp_path = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.psd_iskey = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.issend = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ChooseALL = new System.Windows.Forms.Button();
             this.GetSOP = new System.Windows.Forms.Button();
             this.ChoosePrint = new System.Windows.Forms.Button();
@@ -64,11 +69,7 @@ namespace UAS_MES_NEW.Query
             this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ps_prodcode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
-            this.CheckColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.fp_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.fp_path = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.psd_iskey = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.issend = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.PDF = new System.Windows.Forms.RadioButton();
             ((System.ComponentModel.ISupportInitialize)(this.SendDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.X)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.Y)).BeginInit();
@@ -188,6 +189,47 @@ namespace UAS_MES_NEW.Query
             this.SendDGV.TabIndex = 22;
             this.SendDGV.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.SendDGV_CellPainting);
             // 
+            // CheckColumn
+            // 
+            this.CheckColumn.DataPropertyName = "CheckColumn";
+            this.CheckColumn.HeaderText = "勾选";
+            this.CheckColumn.MinimumWidth = 100;
+            this.CheckColumn.Name = "CheckColumn";
+            this.CheckColumn.Width = 200;
+            // 
+            // fp_name
+            // 
+            this.fp_name.DataPropertyName = "fp_name";
+            this.fp_name.HeaderText = "文件名";
+            this.fp_name.MinimumWidth = 10;
+            this.fp_name.Name = "fp_name";
+            this.fp_name.Width = 200;
+            // 
+            // fp_path
+            // 
+            this.fp_path.DataPropertyName = "fp_path";
+            this.fp_path.HeaderText = "路径";
+            this.fp_path.MinimumWidth = 10;
+            this.fp_path.Name = "fp_path";
+            this.fp_path.Width = 200;
+            // 
+            // psd_iskey
+            // 
+            this.psd_iskey.DataPropertyName = "psd_iskey";
+            this.psd_iskey.HeaderText = "是否关键工序";
+            this.psd_iskey.MinimumWidth = 10;
+            this.psd_iskey.Name = "psd_iskey";
+            this.psd_iskey.Width = 200;
+            // 
+            // issend
+            // 
+            this.issend.DataPropertyName = "issend";
+            this.issend.HeaderText = "是否成功发送";
+            this.issend.MinimumWidth = 10;
+            this.issend.Name = "issend";
+            this.issend.Visible = false;
+            this.issend.Width = 200;
+            // 
             // ChooseALL
             // 
             this.ChooseALL.Location = new System.Drawing.Point(865, 61);
@@ -423,52 +465,22 @@ namespace UAS_MES_NEW.Query
             this.ps_prodcode.TextBoxEnable = false;
             this.ps_prodcode.UserControlTextChanged += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox.OnTextChange(this.ps_prodcode_UserControlTextChanged);
             // 
-            // CheckColumn
-            // 
-            this.CheckColumn.DataPropertyName = "CheckColumn";
-            this.CheckColumn.HeaderText = "勾选";
-            this.CheckColumn.MinimumWidth = 100;
-            this.CheckColumn.Name = "CheckColumn";
-            this.CheckColumn.Width = 200;
-            // 
-            // fp_name
-            // 
-            this.fp_name.DataPropertyName = "fp_name";
-            this.fp_name.HeaderText = "文件名";
-            this.fp_name.MinimumWidth = 10;
-            this.fp_name.Name = "fp_name";
-            this.fp_name.Width = 200;
-            // 
-            // fp_path
+            // PDF
             // 
-            this.fp_path.DataPropertyName = "fp_path";
-            this.fp_path.HeaderText = "路径";
-            this.fp_path.MinimumWidth = 10;
-            this.fp_path.Name = "fp_path";
-            this.fp_path.Width = 200;
-            // 
-            // psd_iskey
-            // 
-            this.psd_iskey.DataPropertyName = "psd_iskey";
-            this.psd_iskey.HeaderText = "是否关键工序";
-            this.psd_iskey.MinimumWidth = 10;
-            this.psd_iskey.Name = "psd_iskey";
-            this.psd_iskey.Width = 200;
-            // 
-            // issend
-            // 
-            this.issend.DataPropertyName = "issend";
-            this.issend.HeaderText = "是否成功发送";
-            this.issend.MinimumWidth = 10;
-            this.issend.Name = "issend";
-            this.issend.Visible = false;
-            this.issend.Width = 200;
+            this.PDF.AutoSize = true;
+            this.PDF.Location = new System.Drawing.Point(368, 534);
+            this.PDF.Name = "PDF";
+            this.PDF.Size = new System.Drawing.Size(77, 28);
+            this.PDF.TabIndex = 42;
+            this.PDF.Text = "PDF";
+            this.PDF.UseVisualStyleBackColor = true;
             // 
             // Query_SOP
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1945, 1234);
+            this.Controls.Add(this.PDF);
             this.Controls.Add(this.label9);
             this.Controls.Add(this.RowCount);
             this.Controls.Add(this.VaildDate);
@@ -552,5 +564,6 @@ namespace UAS_MES_NEW.Query
         private System.Windows.Forms.CheckBox VaildDate;
         private System.Windows.Forms.NumericUpDown RowCount;
         private System.Windows.Forms.Label label9;
+        private System.Windows.Forms.RadioButton PDF;
     }
 }

+ 157 - 112
UAS_MES_ZKLH/FunctionCode/Query/Query_SOP.cs

@@ -63,145 +63,189 @@ namespace UAS_MES_NEW.Query
                 MessageBox.Show("文件不能为空!");
                 return;
             }
-            ps_prodcode.Text = FilePath.Text.Substring(FilePath.Text.LastIndexOf(@"\") + 1).Replace(".xls", "").Replace(".xlsx", "");
-            pr_code_Leave(new object(), new EventArgs());
-            DataTable dt = (DataTable)dh.ExecuteSql("select * from productsop where ps_prodcode='" + ps_prodcode.Text + "' ", "select");
-            if (dt.Rows.Count == 0)
+            if (JPG.Checked)
             {
-                string code = LogicHandler.GetPiInoutCode("ProductSOP", "1");
-                ps_code.Text = code;
-                if (VaildDate.Checked)
+                ps_prodcode.Text = FilePath.Text.Substring(FilePath.Text.LastIndexOf(@"\") + 1).Replace(".xls", "").Replace(".xlsx", "");
+                pr_code_Leave(new object(), new EventArgs());
+                DataTable dt = (DataTable)dh.ExecuteSql("select * from productsop where ps_prodcode='" + ps_prodcode.Text + "' ", "select");
+                if (dt.Rows.Count == 0)
                 {
-                    dh.ExecuteSql("insert into productsop(ps_id,ps_code,ps_prodcode,ps_indate,ps_inman,ps_status,ps_statuscode,ps_vailddate)values(productsop_seq.nextval,'" + code + "','" + ps_prodcode.Text + "',sysdate,'" + User.UserName + "','在录入','ENTERING',to_date('" + DateCode.Value.ToString("yyyy-MM-dd") + "','yyyy-mm-dd'))", "insert");
+                    string code = LogicHandler.GetPiInoutCode("ProductSOP", "1");
+                    ps_code.Text = code;
+                    if (VaildDate.Checked)
+                    {
+                        dh.ExecuteSql("insert into productsop(ps_id,ps_code,ps_prodcode,ps_indate,ps_inman,ps_status,ps_statuscode,ps_vailddate)values(productsop_seq.nextval,'" + code + "','" + ps_prodcode.Text + "',sysdate,'" + User.UserName + "','在录入','ENTERING',to_date('" + DateCode.Value.ToString("yyyy-MM-dd") + "','yyyy-mm-dd'))", "insert");
+                    }
+                    else
+                    {
+                        dh.ExecuteSql("insert into productsop(ps_id,ps_code,ps_prodcode,ps_indate,ps_inman,ps_status,ps_statuscode)values(productsop_seq.nextval,'" + code + "','" + ps_prodcode.Text + "',sysdate,'" + User.UserName + "','在录入','ENTERING')", "insert");
+                    }
                 }
                 else