From 740c78ec823e6c1af7781338424317a55d424240 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周五, 13 12月 2024 16:32:05 +0800
Subject: [PATCH] 222

---
 LA24030_LuLiPackageLine_Pda/components/buttonModal.vue               |    3 +
 CC/iWareCC_ASRS/FormCC.Designer.cs                                   |   59 ++++++++++++++++---
 CC/iWareCC_ASRS/FormCC.cs                                            |   68 ++++++++++++++++++++++
 CC/iWareCC_ASRS/ThreadService/03_BZ12(机器人码包工位)/1、DataProcess_BZ12.cs |    2 
 4 files changed, 120 insertions(+), 12 deletions(-)

diff --git a/CC/iWareCC_ASRS/FormCC.Designer.cs b/CC/iWareCC_ASRS/FormCC.Designer.cs
index 6201dae..c9d34e3 100644
--- a/CC/iWareCC_ASRS/FormCC.Designer.cs
+++ b/CC/iWareCC_ASRS/FormCC.Designer.cs
@@ -86,6 +86,7 @@
             this.ckBDataProcess_RobotBuffer_ForceOutbound = new System.Windows.Forms.CheckBox();
             this.ckBDataProcess_BZ12_FinishTask = new System.Windows.Forms.CheckBox();
             this.tabPage3 = new System.Windows.Forms.TabPage();
+            this.button1 = new System.Windows.Forms.Button();
             this.button25 = new System.Windows.Forms.Button();
             this.button24 = new System.Windows.Forms.Button();
             this.tb_PackageCode = new System.Windows.Forms.TextBox();
@@ -119,7 +120,9 @@
             this.lbl_Warning_FJ = new System.Windows.Forms.Label();
             this.lbl_XinTiao_FJ = new System.Windows.Forms.Label();
             this.lbl_Mode_FJ = new System.Windows.Forms.Label();
-            this.button1 = new System.Windows.Forms.Button();
+            this.tb_taskNo = new System.Windows.Forms.TextBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.btn1 = new System.Windows.Forms.Button();
             this.tabControl1.SuspendLayout();
             this.tPModeChoice.SuspendLayout();
             this.panel_Model.SuspendLayout();
@@ -852,6 +855,9 @@
             // 
             // tabPage3
             // 
+            this.tabPage3.Controls.Add(this.btn1);
+            this.tabPage3.Controls.Add(this.tb_taskNo);
+            this.tabPage3.Controls.Add(this.label1);
             this.tabPage3.Controls.Add(this.button1);
             this.tabPage3.Controls.Add(this.button25);
             this.tabPage3.Controls.Add(this.button24);
@@ -877,6 +883,18 @@
             this.tabPage3.TabIndex = 9;
             this.tabPage3.Text = "数据维护&统计";
             this.tabPage3.UseVisualStyleBackColor = true;
+            // 
+            // button1
+            // 
+            this.button1.BackColor = System.Drawing.Color.Red;
+            this.button1.Location = new System.Drawing.Point(817, 568);
+            this.button1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.button1.Name = "button1";
+            this.button1.Size = new System.Drawing.Size(238, 48);
+            this.button1.TabIndex = 157;
+            this.button1.Text = "一键初始化除立体库中的板件";
+            this.button1.UseVisualStyleBackColor = false;
+            this.button1.Click += new System.EventHandler(this.button1_Click);
             // 
             // button25
             // 
@@ -1257,17 +1275,33 @@
             this.lbl_Mode_FJ.Text = "设备模式: ";
             this.lbl_Mode_FJ.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
-            // button1
+            // tb_taskNo
             // 
-            this.button1.BackColor = System.Drawing.Color.Red;
-            this.button1.Location = new System.Drawing.Point(817, 568);
-            this.button1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.button1.Name = "button1";
-            this.button1.Size = new System.Drawing.Size(238, 48);
-            this.button1.TabIndex = 157;
-            this.button1.Text = "一键初始化除立体库中的板件";
-            this.button1.UseVisualStyleBackColor = false;
-            this.button1.Click += new System.EventHandler(this.button1_Click);
+            this.tb_taskNo.Location = new System.Drawing.Point(902, 642);
+            this.tb_taskNo.Name = "tb_taskNo";
+            this.tb_taskNo.Size = new System.Drawing.Size(339, 25);
+            this.tb_taskNo.TabIndex = 159;
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(836, 652);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(60, 15);
+            this.label1.TabIndex = 158;
+            this.label1.Text = "任务号:";
+            // 
+            // btn1
+            // 
+            this.btn1.BackColor = System.Drawing.Color.Red;
+            this.btn1.Location = new System.Drawing.Point(856, 688);
+            this.btn1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.btn1.Name = "btn1";
+            this.btn1.Size = new System.Drawing.Size(155, 48);
+            this.btn1.TabIndex = 160;
+            this.btn1.Text = "入库任务强制完成";
+            this.btn1.UseVisualStyleBackColor = false;
+            this.btn1.Click += new System.EventHandler(this.btn1_Click);
             // 
             // FormCC
             // 
@@ -1400,6 +1434,9 @@
         private System.Windows.Forms.Label lbl_XinTiao_FX;
         private System.Windows.Forms.Label lbl_Mode_FX;
         private System.Windows.Forms.Button button1;
+        private System.Windows.Forms.TextBox tb_taskNo;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Button btn1;
     }
 }
 
diff --git a/CC/iWareCC_ASRS/FormCC.cs b/CC/iWareCC_ASRS/FormCC.cs
index 0960ab9..5cbd5a6 100644
--- a/CC/iWareCC_ASRS/FormCC.cs
+++ b/CC/iWareCC_ASRS/FormCC.cs
@@ -20,6 +20,7 @@
 using System;
 using System.Collections.Generic;
 using System.Data;
+using System.Data.Entity.Core.Metadata.Edm;
 using System.Drawing;
 using System.Linq;
 using System.Linq.Expressions;
@@ -29,6 +30,7 @@
 using System.Windows.Forms;
 using XiGang.Core.Model;
 using XiGang.Core.Model.ViewModels;
+using static WZ.Useful.Commons.NativeMethods;
 
 
 namespace iWareCC
@@ -1531,5 +1533,71 @@
                 MessageBox.Show("宸插鐞�");
             }
         }
+
+        private void btn1_Click(object sender, EventArgs e)
+        {
+            var taskNo = this.tb_taskNo.Text.Trim();
+
+            var alertMsg = "";
+            using (WmsDBModel wmsDB = new WmsDBModel())
+            {
+                var task = wmsDB.wms_rbline_task.Where(x => x.TaskNo == taskNo && x.RbTaskType == (int)RbTaskTypeEnum.鍏ュ簱浠诲姟 && x.TaskStatus == (int)TaskStatusEnum.宸蹭笅鍙�).FirstOrDefault();
+                if (task == null)
+                {
+                    MessageBox.Show("娌℃壘鍒颁换鍔�");
+                    return;
+                }
+
+                var upiCode = task.Upi;
+                var upiObj = wmsDB.mes_batchOrderUPI_new.Where(x => x.UPI == upiCode).FirstOrDefault();
+                if (upiObj == null)
+                {
+                    MessageBox.Show($"鏍规嵁UPI:{upiCode}娌℃湁鎵惧埌瀵硅薄 ");
+                    return;
+                }
+                //澧炲姞搴撳瓨
+                wms_stock_quan qun = new wms_stock_quan()
+                {
+                    Id = Yitter.IdGenerator.YitIdHelper.NextId(),
+                    Upi = upiCode,
+                    PlanNo = task.PlanNo,
+                    DetailName = upiObj.DetailName,
+                    OrderId = task.OrderId,
+                    CreateTime = DateTime.Now,
+                    CreateUserName = "CC",
+                    InTime = DateTime.Now,
+                    OperReason = "鍏ュ簱",
+                    PackageCode = task.PackageCode,
+                    Length = task.Length,
+                    Width = task.Width,
+                    Thk = task.Thk,
+                    PlaceCode = task.PlaceCode,
+                    StockStatus = (int)StockStatusEnum.鍦ㄥ簱,
+                    StockStatusName = StockStatusEnum.鍦ㄥ簱.ToString(),
+
+                };
+                wmsDB.wms_stock_quan.Add(qun);
+
+                task.TaskStatus = (int)TaskStatusEnum.宸插畬鎴�;
+                task.FinishedTime = DateTime.Now;
+
+
+                var place = StationHandler.GetPlaceByPlaceCode(task.PlaceCode, wmsDB);
+                place.PlaceStatus = (int)PlaceStatusEnum.姝e父;
+
+
+                WmsRecordUpiProcessHandler.SaveWmsRecordUpiProcess(wmsDB, upiObj, task.PlaceCode, "缂撳瓨鍏ュ簱瀹屾垚:" + task.PlaceCode);
+
+                wmsDB.SaveChanges();
+            }
+            if (!string.IsNullOrEmpty(alertMsg))
+            {
+                MessageBox.Show("閿欒:" + alertMsg);
+            }
+            else
+            {
+                MessageBox.Show("宸插鐞�");
+            }
+        }
     }
 }
diff --git "a/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/1\343\200\201DataProcess_BZ12.cs" "b/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/1\343\200\201DataProcess_BZ12.cs"
index f70e50a..c22b7f2 100644
--- "a/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/1\343\200\201DataProcess_BZ12.cs"
+++ "b/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/1\343\200\201DataProcess_BZ12.cs"
@@ -23,7 +23,7 @@
             LogType logType = LogType.DataProcess_BZ12;
             while (true)
             {
-                Thread.Sleep(2000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
+                Thread.Sleep(600);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
                 SystemWarningMsg._lbl_alert_DataProcess_BZ12 = string.Empty;
                 try
                 {
diff --git a/LA24030_LuLiPackageLine_Pda/components/buttonModal.vue b/LA24030_LuLiPackageLine_Pda/components/buttonModal.vue
index 5291243..474d492 100644
--- a/LA24030_LuLiPackageLine_Pda/components/buttonModal.vue
+++ b/LA24030_LuLiPackageLine_Pda/components/buttonModal.vue
@@ -112,4 +112,7 @@
 // uni-button{
 // 	// font-size: 16px !important;
 // }
+uni-button{
+	padding-right: 10px !important;
+}
 </style>

--
Gitblit v1.9.3