Browse Source

修改内容提交

callm 3 months ago
parent
commit
7c8c1d454f

+ 7 - 0
UAS_MES_YDCY/FunctionCode/Make/Make_ColorBoxLabelPrint.cs

@@ -192,6 +192,13 @@ namespace UAS_MES_NEW.Make
                     LogicHandler.GetMakeInfo(sncode.Text, out oMakeCode, out status, out ErrorMessage);
                     if (LogicHandler.CheckStepSNAndMacode(oMakeCode, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage))
                     {
+                        string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsID + "'").ToString();
+                        if (nextstepcode != User.CurrentStepCode)
+                        {
+                            string stname = dh.getFieldDataByCondition("step", "st_name", "st_code='" + nextstepcode + "'").ToString();
+                            OperateResult.AppendText("<<序列号:" + sncode.Text + "下一工序是" + stname + ",不是当前岗位的工序\n", Color.Red, sncode);
+                            return;
+                        }
                         //获取工单的其他信息
                         sql.Clear();
                         sql.Append("select ma_code,nvl(ma_unlimitin,0)ma_unlimitin,pr_code,pr_detail,pr_spec from  ");

+ 1 - 1
UAS_MES_YDCY/FunctionCode/Make/Make_FeedingCollection.cs

@@ -401,7 +401,7 @@ namespace UAS_MES_NEW.Make
             sql.Append("sp_bomversion='" + ma_bomversion.Text + "' and sp_craftcode='" + ms_craftcode.Text + "' and sp_stepcode='" + User.CurrentStepCode + "' ");
             sql.Append("And sp_mothercode ='" + ma_prodcode.Text + "' and sp_tracekind=1 and not exists(select 1 from craftmaterial where ");
             sql.Append("cm_sncode in (select '" + ms_firstsn + "' from dual union select sn from makesnrelation where firstsn='" + ms_firstsn + "') and cm_makecode='" + ma_code.Text + "' and cm_fsoncode=");
-            sql.Append("sp_fsoncode and cm_status=0) group by sp_fsoncode,sp_id order by SP_DETNO asc");
+            sql.Append("sp_fsoncode and cm_status=0 and cm_stepcode=sp_stepcode) group by sp_fsoncode,sp_id order by SP_DETNO asc");
             dt1 = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             code.Clear();
             //用于记录提醒的数据长度

+ 7 - 0
UAS_MES_YDCY/FunctionCode/Make/Make_FuselageLabelPrint.cs

@@ -131,6 +131,13 @@ namespace UAS_MES_NEW.Make
                         oMakeCode = ma_code.Text;
                     if (LogicHandler.CheckStepSNAndMacode(oMakeCode, User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsId, out oErrorMessage))
                     {
+                        string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsId + "'").ToString();
+                        if (nextstepcode != User.CurrentStepCode)
+                        {
+                            string stname = dh.getFieldDataByCondition("step", "st_name", "st_code='" + nextstepcode + "'").ToString();
+                            OperateResult.AppendText("<<序列号:" + sncode.Text + "下一工序是" + stname + ",不是当前岗位的工序\n", Color.Red, sncode);
+                            return;
+                        }
                         //IF (如果ma_code 为空)THEN
                         if (ma_code.Text == "" || ma_code.Text != oMakeCode)
                         {

+ 2 - 0
UAS_MES_YDCY/FunctionCode/Make/Make_TestCollection.cs

@@ -883,6 +883,8 @@ namespace UAS_MES_NEW.Make
                 dh.ExecuteSql("delete from sninfo where si_sn='" + ms_sncode + "'", "delete");
                 dh.ExecuteSql("delete from makesnrelation where sn='" + ms_sncode + "' and makecode='" + ms_makecode + "'", "delete");
                 dh.ExecuteSql("update makeserial set ms_sncode=ms_firstsn,ms_imei1='',ms_imei3='',ms_imei4='',ms_mac='',ms_bt='',ms_netcode='',ms_imei2='',ms_beforesn='' where ms_sncode='" + ms_sncode + "' and ms_makecode='" + ma_code.Text + "'", "update");
+                dh.ExecuteSql("update makeaddresslist set mal_sncode='',mal_status=0 where mal_sncode='"+ms_sncode+"' and mal_makecode='"+ms_makecode+"'", "update");
+                dh.ExecuteSql("update makeimeilist set mil_sncode='',mil_status=0 where mil_sncode='"+ms_sncode+"' and mil_makecode='"+ms_makecode+"'", "update");
                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "解绑", "解绑成功", ms_sncode, ob_checkno.Text);
                 OperateResult.AppendText(">>" + ms_sncode + "解绑成功\n", Color.Green);
             }

+ 80 - 80
UAS_MES_YDCY/FunctionCode/Query/Query_LoadMake.Designer.cs

@@ -33,6 +33,14 @@
             this.ms_makecode_label = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
             this.DGV = new System.Windows.Forms.DataGridView();
+            this.lm_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+            this.lm_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.lm_linecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.lm_uptime = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.lm_downtime = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.lm_inman = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.lm_mannum = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.mancount = new System.Windows.Forms.NumericUpDown();
             this.label2 = new System.Windows.Forms.Label();
             this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -48,14 +56,6 @@
             this.li_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SearchTextBox();
             this.ChangeMan = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            this.lm_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
-            this.lm_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.lm_linecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.lm_uptime = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.lm_downtime = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.lm_inman = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.lm_mannum = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.DGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.mancount)).BeginInit();
             this.SuspendLayout();
@@ -102,6 +102,76 @@
             this.DGV.Size = new System.Drawing.Size(1922, 971);
             this.DGV.TabIndex = 218;
             // 
+            // lm_id
+            // 
+            this.lm_id.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
+            this.lm_id.DataPropertyName = "lm_id";
+            this.lm_id.HeaderText = "ID";
+            this.lm_id.MinimumWidth = 10;
+            this.lm_id.Name = "lm_id";
+            this.lm_id.Visible = false;
+            this.lm_id.Width = 10;
+            // 
+            // choose
+            // 
+            this.choose.HeaderText = "勾选";
+            this.choose.MinimumWidth = 10;
+            this.choose.Name = "choose";
+            this.choose.Width = 80;
+            // 
+            // lm_makecode
+            // 
+            this.lm_makecode.DataPropertyName = "lm_makecode";
+            this.lm_makecode.HeaderText = "工单号";
+            this.lm_makecode.MinimumWidth = 10;
+            this.lm_makecode.Name = "lm_makecode";
+            this.lm_makecode.ReadOnly = true;
+            this.lm_makecode.Width = 150;
+            // 
+            // lm_linecode
+            // 
+            this.lm_linecode.DataPropertyName = "lm_linecode";
+            this.lm_linecode.HeaderText = "线别";
+            this.lm_linecode.MinimumWidth = 10;
+            this.lm_linecode.Name = "lm_linecode";
+            this.lm_linecode.ReadOnly = true;
+            this.lm_linecode.Width = 200;
+            // 
+            // lm_uptime
+            // 
+            this.lm_uptime.DataPropertyName = "lm_uptime";
+            this.lm_uptime.HeaderText = "上线时间";
+            this.lm_uptime.MinimumWidth = 10;
+            this.lm_uptime.Name = "lm_uptime";
+            this.lm_uptime.ReadOnly = true;
+            this.lm_uptime.Width = 200;
+            // 
+            // lm_downtime
+            // 
+            this.lm_downtime.DataPropertyName = "lm_downtime";
+            this.lm_downtime.HeaderText = "下线时间";
+            this.lm_downtime.MinimumWidth = 10;
+            this.lm_downtime.Name = "lm_downtime";
+            this.lm_downtime.ReadOnly = true;
+            this.lm_downtime.Width = 200;
+            // 
+            // lm_inman
+            // 
+            this.lm_inman.DataPropertyName = "lm_inman";
+            this.lm_inman.HeaderText = "录入人";
+            this.lm_inman.MinimumWidth = 10;
+            this.lm_inman.Name = "lm_inman";
+            this.lm_inman.ReadOnly = true;
+            this.lm_inman.Width = 80;
+            // 
+            // lm_mannum
+            // 
+            this.lm_mannum.DataPropertyName = "lm_mannum";
+            this.lm_mannum.HeaderText = "拉线人数";
+            this.lm_mannum.MinimumWidth = 10;
+            this.lm_mannum.Name = "lm_mannum";
+            this.lm_mannum.Width = 80;
+            // 
             // mancount
             // 
             this.mancount.Location = new System.Drawing.Point(976, 19);
@@ -240,7 +310,7 @@
             this.li_code.TabIndex = 215;
             this.li_code.TableName = null;
             this.li_code.Tag = "msl_makecode";
-            this.li_code.TextBoxEnable = true;
+            this.li_code.TextBoxEnable = false;
             // 
             // ma_code
             // 
@@ -261,7 +331,7 @@
             this.ma_code.TabIndex = 213;
             this.ma_code.TableName = null;
             this.ma_code.Tag = "msl_makecode";
-            this.ma_code.TextBoxEnable = true;
+            this.ma_code.TextBoxEnable = false;
             // 
             // ChangeMan
             // 
@@ -282,76 +352,6 @@
             this.ChangeMan.UseVisualStyleBackColor = false;
             this.ChangeMan.Click += new System.EventHandler(this.ChangeMan_Click);
             // 
-            // lm_id
-            // 
-            this.lm_id.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
-            this.lm_id.DataPropertyName = "lm_id";
-            this.lm_id.HeaderText = "ID";
-            this.lm_id.MinimumWidth = 10;
-            this.lm_id.Name = "lm_id";
-            this.lm_id.Visible = false;
-            this.lm_id.Width = 10;
-            // 
-            // choose
-            // 
-            this.choose.HeaderText = "勾选";
-            this.choose.MinimumWidth = 10;
-            this.choose.Name = "choose";
-            this.choose.Width = 80;
-            // 
-            // lm_makecode
-            // 
-            this.lm_makecode.DataPropertyName = "lm_makecode";
-            this.lm_makecode.HeaderText = "工单号";
-            this.lm_makecode.MinimumWidth = 10;
-            this.lm_makecode.Name = "lm_makecode";
-            this.lm_makecode.ReadOnly = true;
-            this.lm_makecode.Width = 150;
-            // 
-            // lm_linecode
-            // 
-            this.lm_linecode.DataPropertyName = "lm_linecode";
-            this.lm_linecode.HeaderText = "线别";
-            this.lm_linecode.MinimumWidth = 10;
-            this.lm_linecode.Name = "lm_linecode";
-            this.lm_linecode.ReadOnly = true;
-            this.lm_linecode.Width = 200;
-            // 
-            // lm_uptime
-            // 
-            this.lm_uptime.DataPropertyName = "lm_uptime";
-            this.lm_uptime.HeaderText = "上线时间";
-            this.lm_uptime.MinimumWidth = 10;
-            this.lm_uptime.Name = "lm_uptime";
-            this.lm_uptime.ReadOnly = true;
-            this.lm_uptime.Width = 200;
-            // 
-            // lm_downtime
-            // 
-            this.lm_downtime.DataPropertyName = "lm_downtime";
-            this.lm_downtime.HeaderText = "下线时间";
-            this.lm_downtime.MinimumWidth = 10;
-            this.lm_downtime.Name = "lm_downtime";
-            this.lm_downtime.ReadOnly = true;
-            this.lm_downtime.Width = 200;
-            // 
-            // lm_inman
-            // 
-            this.lm_inman.DataPropertyName = "lm_inman";
-            this.lm_inman.HeaderText = "录入人";
-            this.lm_inman.MinimumWidth = 10;
-            this.lm_inman.Name = "lm_inman";
-            this.lm_inman.ReadOnly = true;
-            this.lm_inman.Width = 80;
-            // 
-            // lm_mannum
-            // 
-            this.lm_mannum.DataPropertyName = "lm_mannum";
-            this.lm_mannum.HeaderText = "拉线人数";
-            this.lm_mannum.MinimumWidth = 10;
-            this.lm_mannum.Name = "lm_mannum";
-            this.lm_mannum.Width = 80;
-            // 
             // Query_LoadMake
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);

+ 24 - 0
UAS_MES_YDCY/FunctionCode/Query/Query_LoadMake.resx

@@ -144,6 +144,30 @@
   <metadata name="lm_mannum.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="lm_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="choose.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="lm_makecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="lm_linecode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="lm_uptime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="lm_downtime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="lm_inman.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="lm_mannum.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="DownLoadMake.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>

+ 0 - 1
UAS_MES_YDCY/FunctionCode/Warehouse/Warehouse_FinishedProductOut.Designer.cs

@@ -512,7 +512,6 @@
             this.NewProdInOut.TabIndex = 215;
             this.NewProdInOut.Text = "新增出货单";
             this.NewProdInOut.UseVisualStyleBackColor = false;
-            this.NewProdInOut.Visible = false;
             this.NewProdInOut.Click += new System.EventHandler(this.NewProdInOut_Click);
             // 
             // ProdDetail

+ 10 - 10
UAS_MES_YDCY/Login.Designer.cs

@@ -37,11 +37,11 @@
             this.panel1 = new System.Windows.Forms.Panel();
             this.label4 = new System.Windows.Forms.Label();
             this.Source = new System.Windows.Forms.TextBox();
-            this.DB = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
             this.label3 = new System.Windows.Forms.Label();
             this.LoginButton = new System.Windows.Forms.Button();
             this.panel2 = new System.Windows.Forms.Panel();
             this.label5 = new System.Windows.Forms.Label();
+            this.DB = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
             this.panel1.SuspendLayout();
             this.panel2.SuspendLayout();
             this.SuspendLayout();
@@ -134,15 +134,6 @@
             this.Source.TextChanged += new System.EventHandler(this.Source_TextChanged);
             this.Source.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Source_KeyDown);
             // 
-            // DB
-            // 
-            this.DB.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.DB.FormattingEnabled = true;
-            this.DB.Location = new System.Drawing.Point(94, 204);
-            this.DB.Name = "DB";
-            this.DB.Size = new System.Drawing.Size(200, 39);
-            this.DB.TabIndex = 3;
-            // 
             // label3
             // 
             this.label3.AutoSize = true;
@@ -188,6 +179,15 @@
             this.label5.TabIndex = 0;
             this.label5.Text = "UAS制造执行系统";
             // 
+            // DB
+            // 
+            this.DB.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.DB.FormattingEnabled = true;
+            this.DB.Location = new System.Drawing.Point(94, 204);
+            this.DB.Name = "DB";
+            this.DB.Size = new System.Drawing.Size(200, 39);
+            this.DB.TabIndex = 3;
+            // 
             // Login
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(14F, 31F);

+ 4 - 4
UAS_MES_YDCY/Login.cs

@@ -285,10 +285,10 @@ namespace UAS_MES_NEW
 
         private void PassWord_TextChanged(object sender, EventArgs e)
         {
-            //if (dh.getFieldDataByCondition("employee", "nvl(em_changesource,0)", "em_code='" + UserName.Text + "' and em_password='" + PassWord.Text + "'").ToString() != "0")
-            //{
-            //    Source.Enabled = true;
-            //}
+            if (dh.getFieldDataByCondition("employee", "nvl(em_changesource,0)", "em_code='" + UserName.Text + "' and em_password='" + PassWord.Text + "'").ToString() != "0")
+            {
+                Source.Enabled = true;
+            }
         }
     }
 }

+ 9 - 2
UAS_MES_YDCY/PublicMethod/Print.cs

@@ -421,9 +421,16 @@ namespace UAS_MES_NEW.PublicMethod
             format.PrintSetup.IdenticalCopiesOfLabel = PrintNum;
             format.Print();
             LogicHandler.DoCommandLog(iCaller, User.UserCode, "", User.UserLineCode, User.UserSourceCode, "打印", "成功打印", SnCode, "");
-            for (int k = 0; k < format.SubStrings.Count; k++)
+            try
             {
-                format.SubStrings[k].Value = null;
+                for (int k = 0; k < format.SubStrings.Count; k++)
+                {
+                    format.SubStrings[k].Value = null;
+                }
+            }
+            catch (Exception)
+            {
+
             }
             LogicHandler.doLabelPrintLog(SnCode, LabelType, MakeCode, ProdCode, User.UserSourceCode, User.CurrentStepCode, IfRePrint, User.UserCode);
             return true;