浏览代码

斗牛MES修改提交

caosy 4 年之前
父节点
当前提交
37de92fb1d

+ 1 - 1
UAS_MES_DN/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=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.11.188)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</value>
+        <value>Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.8.0.97)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</value>
       </setting>
     </UAS_MES_NEW.Properties.Settings>
   </applicationSettings>

+ 1 - 1
UAS_MES_DN/FunctionCode/Make/Make_ColorBoxLoadPrint.cs

@@ -177,7 +177,7 @@ namespace UAS_MES_NEW.Make
                             string sp_barcoderule = dt1.Rows[RemainIndex]["sp_barcoderule"].ToString();
                             string sp_checkbarcode = dt1.Rows[RemainIndex]["sp_checkbarcode"].ToString();
                             string sp_checksalecode = dt1.Rows[RemainIndex]["sp_checksalecode"].ToString();
-                            if (LogicHandler.CheckSNBeforeLoad(ma_code.Text, code.Text, sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, sp_checksalecode, out ErrorMessage))
+                            if (LogicHandler.CheckSNBeforeLoad(ma_code.Text, code.Text, sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, sp_checksalecode,"", out ErrorMessage))
                             {
                                 //判断采集的条码和本次采集的也不能重复
                                 if (CollectData.Contains(code.Text) && sp_ifrepeat != "-1")

+ 1 - 1
UAS_MES_DN/FunctionCode/Make/Make_ColorBoxLoadPrintBZ.cs

@@ -176,7 +176,7 @@ namespace UAS_MES_NEW.Make
                             string sp_barcoderule = dt1.Rows[RemainIndex]["sp_barcoderule"].ToString();
                             string sp_checkbarcode = dt1.Rows[RemainIndex]["sp_checkbarcode"].ToString();
                             string sp_checksalecode = dt1.Rows[RemainIndex]["sp_checksalecode"].ToString();
-                            if (LogicHandler.CheckSNBeforeLoad(ma_code.Text, code.Text, sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, sp_checksalecode, out ErrorMessage))
+                            if (LogicHandler.CheckSNBeforeLoad(ma_code.Text, code.Text, sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, sp_checksalecode,"", out ErrorMessage))
                             {
                                 //判断采集的条码和本次采集的也不能重复
                                 if (CollectData.Contains(code.Text) && sp_ifrepeat != "-1")

+ 3 - 2
UAS_MES_DN/FunctionCode/Make/Make_Decompose.cs

@@ -261,7 +261,7 @@ namespace UAS_MES_NEW.Make
                             sql.Clear();
                             sql.Append("select max(sp_id)sp_id,max(sp_detno)sp_detno,min(sp_ifrepeat)sp_ifrepeat,sp_fsoncode,max(sp_barcoderule)");
                             sql.Append("sp_barcoderule, min(sp_checksalecode)sp_checksalecode,sp_tracekind,wm_concat(sp_soncode) sp_soncode,max(sp_ifuseregex)sp_ifuseregex,max(sp_ifforsn)");
-                            sql.Append("sp_ifforsn,max(sp_length)sp_length,max(sp_type)sp_type,replace(wm_concat(sp_prefix),',','|')sp_prefix,max(sp_regex)");
+                            sql.Append("sp_ifforsn,max(sp_length)sp_length,max(sp_description)sp_description,max(sp_type)sp_type,replace(wm_concat(sp_prefix),',','|')sp_prefix,max(sp_regex)");
                             sql.Append("sp_regex,max(substr(pr_spec,0,20))pr_detail from stepproduct left join product on pr_code=sp_fsoncode where ");
                             sql.Append("sp_bomversion='" + ma_bomversion + "' and  sp_craftcode='" + LabelDataGridView.Rows[i].Cells["cm_craftcode"].Value + "'and sp_mothercode ='" + LabelDataGridView.Rows[i].Cells["cm_maprodcode"].Value + "'");
                             sql.Append(" group by sp_fsoncode,sp_tracekind  order by SP_DETNO asc");
@@ -279,10 +279,11 @@ namespace UAS_MES_NEW.Make
                                 string sp_ifrepeat = dtbar.Rows[0]["sp_ifrepeat"].ToString();
                                 string sp_barcoderule = dtbar.Rows[0]["sp_barcoderule"].ToString();
                                 string sp_checksalecode = dtbar.Rows[0]["sp_checksalecode"].ToString();
+                                string sp_description = dtbar.Rows[0]["sp_description"].ToString();
                                 if (sp_tracekind == "1")
                                 {
                                     //上料校验规则判断
-                                    if (!LogicHandler.CheckSNBeforeLoad(LabelDataGridView.Rows[i].Cells["cm_makecode"].Value.ToString(), LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString(), sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, sp_checksalecode, out ErrorMessage))
+                                    if (!LogicHandler.CheckSNBeforeLoad(LabelDataGridView.Rows[i].Cells["cm_makecode"].Value.ToString(), LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString(), sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, sp_checksalecode, sp_description, out ErrorMessage))
                                     {
                                         OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                                         LoadData(sncode_1, sender, new KeyEventArgs(Keys.Enter));

+ 3 - 2
UAS_MES_DN/FunctionCode/Make/Make_Decompose_Ex.cs

@@ -261,7 +261,7 @@ namespace UAS_MES_NEW.Make
                             sql.Clear();
                             sql.Append("select max(sp_id)sp_id,max(sp_detno)sp_detno,min(sp_ifrepeat)sp_ifrepeat,min(sp_iflabelcheck)sp_iflabelcheck,sp_fsoncode,max(sp_barcoderule)");
                             sql.Append("sp_barcoderule, min(sp_checksalecode)sp_checksalecode,sp_tracekind,wm_concat(sp_soncode) sp_soncode,max(sp_ifuseregex)sp_ifuseregex,max(sp_ifforsn)");
-                            sql.Append("sp_ifforsn,max(sp_length)sp_length,max(sp_type)sp_type,replace(wm_concat(sp_prefix),',','|')sp_prefix,max(sp_regex)");
+                            sql.Append("sp_ifforsn,max(sp_length)sp_length,max(sp_description)sp_description,max(sp_type)sp_type,replace(wm_concat(sp_prefix),',','|')sp_prefix,max(sp_regex)");
                             sql.Append("sp_regex,max(pr_detail)pr_detail from stepproduct left join product on pr_code=sp_fsoncode where ");
                             sql.Append("sp_bomversion='" + ma_bomversion + "' and  sp_craftcode='" + LabelDataGridView.Rows[i].Cells["cm_craftcode"].Value + "'and sp_mothercode ='" + LabelDataGridView.Rows[i].Cells["cm_maprodcode"].Value + "'");
                             sql.Append(" group by sp_fsoncode,sp_tracekind  order by SP_DETNO asc");
@@ -280,10 +280,11 @@ namespace UAS_MES_NEW.Make
                                 string sp_barcoderule = dtbar.Rows[0]["sp_barcoderule"].ToString();
                                 string sp_checksalecode = dtbar.Rows[0]["sp_checksalecode"].ToString();
                                 string sp_iflabelcheck = dtbar.Rows[0]["sp_iflabelcheck"].ToString();
+                                string sp_description = dtbar.Rows[0]["sp_description"].ToString();
                                 if (sp_tracekind == "1")
                                 {
                                     //上料校验规则判断
-                                    if (!LogicHandler.CheckSNBeforeLoad(LabelDataGridView.Rows[i].Cells["cm_makecode"].Value.ToString(), LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString(), sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, sp_checksalecode, out ErrorMessage))
+                                    if (!LogicHandler.CheckSNBeforeLoad(LabelDataGridView.Rows[i].Cells["cm_makecode"].Value.ToString(), LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString(), sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, sp_checksalecode, sp_description, out ErrorMessage))
                                     {
                                         OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                                         LoadData(sncode_1, sender, new KeyEventArgs(Keys.Enter));

+ 15 - 4
UAS_MES_DN/FunctionCode/Make/Make_FeedingCollection.Designer.cs

@@ -76,6 +76,7 @@
             this.cm_makecode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pr_detail_ = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.cm_soncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.sp_description = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.cm_barcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).BeginInit();
@@ -294,7 +295,7 @@
             this.NoteForChange.AutoSize = true;
             this.NoteForChange.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.NoteForChange.Location = new System.Drawing.Point(11, 39);
-            this.NoteForChange.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.NoteForChange.Margin = new System.Windows.Forms.Padding(2);
             this.NoteForChange.Name = "NoteForChange";
             this.NoteForChange.Size = new System.Drawing.Size(99, 21);
             this.NoteForChange.TabIndex = 192;
@@ -311,6 +312,7 @@
             this.cm_makecode,
             this.pr_detail_,
             this.cm_soncode,
+            this.sp_description,
             this.cm_barcode,
             this.BarCode});
             this.LabelDataGridView.Location = new System.Drawing.Point(18, 108);
@@ -396,7 +398,7 @@
             // 
             this.StepCount.LineCode = null;
             this.StepCount.Location = new System.Drawing.Point(460, 344);
-            this.StepCount.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(2);
             this.StepCount.Name = "StepCount";
             this.StepCount.Size = new System.Drawing.Size(80, 22);
             this.StepCount.Source = null;
@@ -411,7 +413,7 @@
             this.ma_code.DBTitle = null;
             this.ma_code.FormName = null;
             this.ma_code.Location = new System.Drawing.Point(96, 13);
-            this.ma_code.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(2);
             this.ma_code.Name = "ma_code";
             this.ma_code.Power = null;
             this.ma_code.ReturnData = null;
@@ -430,7 +432,7 @@
             this.LockMakeCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.LockMakeCode.LeaveEvent = false;
             this.LockMakeCode.Location = new System.Drawing.Point(248, 15);
-            this.LockMakeCode.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.LockMakeCode.Margin = new System.Windows.Forms.Padding(2);
             this.LockMakeCode.Name = "LockMakeCode";
             this.LockMakeCode.Size = new System.Drawing.Size(51, 21);
             this.LockMakeCode.TabIndex = 140;
@@ -642,6 +644,14 @@
             this.cm_soncode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
             this.cm_soncode.Width = 60;
             // 
+            // sp_description
+            // 
+            this.sp_description.DataPropertyName = "sp_description";
+            this.sp_description.HeaderText = "包含";
+            this.sp_description.MinimumWidth = 60;
+            this.sp_description.Name = "sp_description";
+            this.sp_description.Width = 60;
+            // 
             // cm_barcode
             // 
             this.cm_barcode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
@@ -765,6 +775,7 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn cm_makecode;
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_detail_;
         private System.Windows.Forms.DataGridViewTextBoxColumn cm_soncode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn sp_description;
         private System.Windows.Forms.DataGridViewTextBoxColumn cm_barcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn BarCode;
     }

+ 4 - 2
UAS_MES_DN/FunctionCode/Make/Make_FeedingCollection.cs

@@ -159,7 +159,9 @@ namespace UAS_MES_NEW.Make
                             string sp_barcoderule = dt1.Rows[RemainIndex]["sp_barcoderule"].ToString();
                             string sp_checkbarcode = dt1.Rows[RemainIndex]["sp_checkbarcode"].ToString();
                             string sp_checksalecode = dt1.Rows[RemainIndex]["sp_checksalecode"].ToString();
-                            if (LogicHandler.CheckSNBeforeLoad(ma_code.Text, code.Text, sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, sp_checksalecode, out ErrorMessage))
+                            string sp_description = dt1.Rows[RemainIndex]["sp_description"].ToString();
+                            //sp_description
+                            if (LogicHandler.CheckSNBeforeLoad(ma_code.Text, code.Text, sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, sp_checksalecode, sp_description, out ErrorMessage))
                             {
                                 //判断采集的条码和本次采集的也不能重复
                                 if (CollectData.Contains(code.Text) && sp_ifrepeat != "-1")
@@ -374,7 +376,7 @@ namespace UAS_MES_NEW.Make
             sql.Append("select max(sp_id)sp_id,max(sp_detno)sp_detno,min(sp_ifrepeat)sp_ifrepeat,max(sp_checkbarcode)sp_checkbarcode,min(sp_checksalecode)sp_checksalecode,");
             sql.Append("sp_fsoncode,max(sp_barcoderule)sp_barcoderule,wm_concat(sp_soncode) sp_soncode,max(sp_ifuseregex)sp_ifuseregex,max(sp_ifforsn)");
             sql.Append("sp_ifforsn,max(sp_length)sp_length,max(sp_type)sp_type,replace(wm_concat(sp_prefix),',','|')sp_prefix,max(sp_regex)");
-            sql.Append("sp_regex,max(pr_detail)pr_detail,max(substr(pr_spec,0,20))pr_spec from stepproduct left join product on pr_code=sp_fsoncode where ");
+            sql.Append("sp_regex,max(pr_detail)pr_detail,max(sp_description) sp_description,max(substr(pr_spec,0,20))pr_spec from stepproduct left join product on pr_code=sp_fsoncode where ");
             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=");

+ 3 - 0
UAS_MES_DN/FunctionCode/Make/Make_FeedingCollection.resx

@@ -129,6 +129,9 @@
   <metadata name="cm_soncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="sp_description.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="cm_barcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

+ 1 - 1
UAS_MES_DN/FunctionCode/Make/Make_FeedingCollectionCombineFix.cs

@@ -239,7 +239,7 @@ namespace UAS_MES_NEW.Make
                                             string sp_checkbarcode = dt1.Rows[RemainIndex]["sp_checkbarcode"].ToString();
                                             string sp_checksalecode = dt1.Rows[RemainIndex]["sp_checksalecode"].ToString();
                                             string sp_ifbeforhandle = dt1.Rows[RemainIndex]["sp_ifbeforhandle"].ToString();
-                                            if (LogicHandler.CheckSNBeforeLoad(ma_code.Text, code.Text, sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, sp_checksalecode, out ErrorMessage))
+                                            if (LogicHandler.CheckSNBeforeLoad(ma_code.Text, code.Text, sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, sp_checksalecode,"", out ErrorMessage))
                                             {
                                                 if (sp_ifbeforhandle == "是")
                                                 {

+ 1 - 1
UAS_MES_DN/FunctionCode/Make/Make_PreFeedingCollection.cs

@@ -171,7 +171,7 @@ namespace UAS_MES_NEW.Make
                                 set.ShowDialog();
                                 return;
                             }
-                            if (LogicHandler.CheckSNBeforeLoad(ma_code.Text, code.Text, sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, sp_checksalecode, out ErrorMessage))
+                            if (LogicHandler.CheckSNBeforeLoad(ma_code.Text, code.Text, sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, sp_ifrepeat, sp_checksalecode,"", out ErrorMessage))
                             {
                                 //查询条码是否存在预加工列表
                                 if (dh.CheckExist("BEFOREHANDPROCESS", "bhp_barcode='" + code.Text + "'"))

+ 1 - 1
UAS_MES_DN/FunctionCode/Make/Make_TestCollectionBad.cs

@@ -548,7 +548,7 @@ namespace UAS_MES_NEW.Make
                 }
                 //不良信息采集,mb_status<>0的是之前维修保存的,不能删除
                 dh.ExecuteSql("delete from makebad where mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ma_code.Text + "' and nvl(mb_status,0)=0", "delete");
-                //normalButton1_Click(this, e);
+                normalButton1_Click(this, e);
                 if (LogicHandler.SetTestNGDetail(ms_sncode.Text, ma_code.Text, User.UserCode, User.UserSourceCode, "检查未通过", bgcode, bccode, bgname, bcname, bcremark, out ErrorMessage))
                 {
                     //存在的不良代码和

+ 1 - 0
UAS_MES_DN/Login.cs

@@ -93,6 +93,7 @@ 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=10.8.0.97)(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=" + Address + ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
             SystemInf.CurrentDB = DBUser;
             //设置屏幕的宽高信息

+ 6 - 1
UAS_MES_DN/PublicMethod/LogicHandler.cs

@@ -1059,7 +1059,7 @@ namespace UAS_MES_NEW.PublicMethod
             return param[4];
         }
 
-        public static bool CheckSNBeforeLoad(string iMakeCode, string iSN, string iFSonCode, string iSonCode, string iRule, string iPrefix, string iLength, string iIfRepeat, string iChecksalecode, out string ErrMessage)
+        public static bool CheckSNBeforeLoad(string iMakeCode, string iSN, string iFSonCode, string iSonCode, string iRule, string iPrefix, string iLength, string iIfRepeat, string iChecksalecode,string sp_description, out string ErrMessage)
         {
             DataTable dt;
             ErrMessage = "";
@@ -1142,6 +1142,11 @@ namespace UAS_MES_NEW.PublicMethod
                             return false;
                         }
                     }
+                    if (sp_description.Length > 0 && !iSN.Contains(sp_description))
+                    {
+                        ErrMessage = "条码" + iSN + "包含值不匹配";
+                        return false;
+                    }
                     int sp_length = int.Parse(iLength != "" ? iLength : "0");
                     //若有多个,以|分割
                     string[] pres = iPrefix.Split('|');

+ 1 - 1
UAS_MES_DN/UAS_MES_DN.csproj

@@ -4,7 +4,7 @@
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{4F7963D5-1759-4789-A36A-CFE93E56D2B3}</ProjectGuid>
+    <ProjectGuid>{7D83E695-236B-4B35-85CB-D82670F4CFC7}</ProjectGuid>
     <OutputType>WinExe</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>UAS_MES_NEW</RootNamespace>