Преглед изворни кода

烘烤物料规格、拼板导入限制范围

yhluo пре 2 дана
родитељ
комит
1c6e06f2f8

+ 13 - 1
UAS_MES_WEIP/FunctionCode/Make/Make_BakingManage.Designer.cs

@@ -76,6 +76,7 @@
             this.ESTIMATE_TIME = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.IN_NAME = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.BAKING_TIME = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.PR_SPEC = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Container.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.DataBox)).BeginInit();
             this.SNDetails.SuspendLayout();
@@ -117,7 +118,8 @@
             this.IN_DATE,
             this.ESTIMATE_TIME,
             this.IN_NAME,
-            this.BAKING_TIME});
+            this.BAKING_TIME,
+            this.PR_SPEC});
             this.DataBox.Dock = System.Windows.Forms.DockStyle.Fill;
             this.DataBox.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
             this.DataBox.Location = new System.Drawing.Point(3, 327);
@@ -633,6 +635,15 @@
             this.BAKING_TIME.ReadOnly = true;
             this.BAKING_TIME.Width = 150;
             // 
+            // PR_SPEC
+            // 
+            this.PR_SPEC.DataPropertyName = "PR_SPEC";
+            this.PR_SPEC.HeaderText = "物料规格";
+            this.PR_SPEC.MinimumWidth = 8;
+            this.PR_SPEC.Name = "PR_SPEC";
+            this.PR_SPEC.ReadOnly = true;
+            this.PR_SPEC.Width = 220;
+            // 
             // Make_BakingManage
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 24F);
@@ -709,5 +720,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn ESTIMATE_TIME;
         private System.Windows.Forms.DataGridViewTextBoxColumn IN_NAME;
         private System.Windows.Forms.DataGridViewTextBoxColumn BAKING_TIME;
+        private System.Windows.Forms.DataGridViewTextBoxColumn PR_SPEC;
     }
 }

+ 6 - 2
UAS_MES_WEIP/FunctionCode/Make/Make_BakingManage.cs

@@ -145,8 +145,12 @@ namespace UAS_MES_NEW.Make
         private void LoadBaking()
         {
             SQL.Clear();
-            SQL.Append($@"SELECT work_order,box_no,reel_no,in_date,in_name,estimate_time,trunc((sysdate - in_date) * 24) || ':' || lpad(trunc(MOD((sysdate - in_date) * 24 * 60, 60)), 2, '0')
-                || ':' || lpad(trunc(MOD((sysdate - in_date) * 24 * 60 * 60, 60)),2,'0') baking_time,nvl(baking_qty,0) baking_qty FROM baking_log WHERE status = '烘烤中' ORDER BY in_date DESC");
+            /*SQL.Append($@"SELECT work_order,box_no,reel_no,in_date,in_name,estimate_time,trunc((sysdate - in_date) * 24) || ':' || lpad(trunc(MOD((sysdate - in_date) * 24 * 60, 60)), 2, '0')
+                || ':' || lpad(trunc(MOD((sysdate - in_date) * 24 * 60 * 60, 60)),2,'0') baking_time,nvl(baking_qty,0) baking_qty FROM baking_log WHERE status = '烘烤中' ORDER BY in_date DESC");*/
+
+            SQL.Append($@"SELECT work_order,box_no,reel_no,in_date,in_name,estimate_time,trunc((sysdate - in_date) * 24)|| ':'|| lpad(trunc(MOD((sysdate - in_date) * 24 * 60, 60)),2,'0')|| ':'
+                || lpad(trunc(MOD((sysdate - in_date) * 24 * 60 * 60, 60)),2,'0') baking_time,nvl(baking_qty, 0) baking_qty,pr_spec FROM baking_log LEFT JOIN barcode ON reel_no = bar_code
+                LEFT JOIN product@wp ON bar_prodid = pr_id WHERE status = '烘烤中' ORDER BY in_date DESC");
             dt = (DataTable)dh.ExecuteSql(SQL.ToString(), "select");
             DataBox.DataSource = dt;
         }

+ 3 - 0
UAS_MES_WEIP/FunctionCode/Make/Make_BakingManage.resx

@@ -141,4 +141,7 @@
   <metadata name="BAKING_TIME.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="PR_SPEC.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>

+ 12 - 0
UAS_MES_WEIP/FunctionCode/Make/Make_SMTBind.cs

@@ -675,6 +675,18 @@ namespace UAS_MES_NEW.Make
             //}
             //BaseUtil.FillDgvWithDataTable(LabelDataGridView, dt);
 
+            DataTable checkDt; 
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                string sbCode = dt.Rows[i]["打码内容"].ToString().Trim();
+                checkDt = (DataTable)dh.ExecuteSql($@"select * from MAKESNRULEDETAIL where msd_makecode='{ma_code.Text.Trim()}' and msd_sncode='{sbCode}' and msd_type='before'", "select");
+                if(checkDt.Rows.Count == 0)
+                {
+                    OperateResult.AppendText(">>请先在网页端镭雕生成条码,再导入范围内中条码\n", Color.Red);
+                    return;
+                }
+            }
+
             List<string> maincodelist = new List<string>();
             List<string> nowcodelist = new List<string>();
             for (int i = 0; i < dt.Rows.Count; i++)