From 3eabfd8dfa2574efbe8ce8d4a64862c16ad04823 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周六, 14 12月 2024 14:34:02 +0800
Subject: [PATCH] 222

---
 LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOperationTask/WmsOperationTaskService.cs  |   17 
 CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/DataProcess_RobotBuffer_ModeChange.cs                   |  206 +++++-----
 CC/iWareCC_ASRS/ThreadService/01_BZ01工位(清灰,洗板后工位)/DataProcess_BZ01.cs                                  |    7 
 LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Connected Services/CCWcfService/Reference.cs         |    8 
 CC/iWareCC_ASRS/FormCC.cs                                                                              |  230 +----------
 /dev/null                                                                                              |  102 -----
 CC/iWareCC_ASRS/FormCC.Designer.cs                                                                     |  163 -------
 CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Outbound/CC_DataProcess_RobotBuffer_ForceOutbound.cs    |  102 +++++
 CC/iWareCC_ASRS/WCF/CCWcfService.cs                                                                    |   33 +
 CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Outbound/5、DataProcess_RobotBuffer_PesonOutbound.cs     |  117 +++++
 CC/iWareCC_ASRS/WCF/ICCWcfService.cs                                                                   |    8 
 CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Outbound/1、DataProcess_RobotBuffer_AutoQiTaoOutbound.cs |  194 ++++----
 CC/iWareCC_ASRS/iWareCC.csproj                                                                         |    3 
 13 files changed, 528 insertions(+), 662 deletions(-)

diff --git a/CC/iWareCC_ASRS/FormCC.Designer.cs b/CC/iWareCC_ASRS/FormCC.Designer.cs
index f61236f..0405d2d 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.button2 = new System.Windows.Forms.Button();
             this.btn1 = new System.Windows.Forms.Button();
             this.tb_taskNo = new System.Windows.Forms.TextBox();
             this.label1 = new System.Windows.Forms.Label();
@@ -94,18 +95,8 @@
             this.button24 = new System.Windows.Forms.Button();
             this.tb_PackageCode = new System.Windows.Forms.TextBox();
             this.label23 = new System.Windows.Forms.Label();
-            this.button23 = new System.Windows.Forms.Button();
-            this.tb_wlm = new System.Windows.Forms.TextBox();
-            this.label22 = new System.Windows.Forms.Label();
-            this.button22 = new System.Windows.Forms.Button();
             this.button20 = new System.Windows.Forms.Button();
             this.tb_TongJi = new System.Windows.Forms.TextBox();
-            this.checkBox_NowDay = new System.Windows.Forms.CheckBox();
-            this.dateTimePicker_End = new System.Windows.Forms.DateTimePicker();
-            this.label16 = new System.Windows.Forms.Label();
-            this.dateTimePicker_Start = new System.Windows.Forms.DateTimePicker();
-            this.btn_TongJi = new System.Windows.Forms.Button();
-            this.button5 = new System.Windows.Forms.Button();
             this.tabDevice = new System.Windows.Forms.TabPage();
             this.groupBox5 = new System.Windows.Forms.GroupBox();
             this.lbl_Warning_FX = new System.Windows.Forms.Label();
@@ -123,7 +114,6 @@
             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.button2 = new System.Windows.Forms.Button();
             this.tabControl1.SuspendLayout();
             this.tPModeChoice.SuspendLayout();
             this.panel_Model.SuspendLayout();
@@ -594,9 +584,9 @@
             this.ckDataProcess_RobotBuffer_AutoQiTaoOutbound.Location = new System.Drawing.Point(2, 269);
             this.ckDataProcess_RobotBuffer_AutoQiTaoOutbound.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.ckDataProcess_RobotBuffer_AutoQiTaoOutbound.Name = "ckDataProcess_RobotBuffer_AutoQiTaoOutbound";
-            this.ckDataProcess_RobotBuffer_AutoQiTaoOutbound.Size = new System.Drawing.Size(271, 19);
+            this.ckDataProcess_RobotBuffer_AutoQiTaoOutbound.Size = new System.Drawing.Size(239, 19);
             this.ckDataProcess_RobotBuffer_AutoQiTaoOutbound.TabIndex = 40;
-            this.ckDataProcess_RobotBuffer_AutoQiTaoOutbound.Text = "机器人缓存岛 自动齐套出库 线程";
+            this.ckDataProcess_RobotBuffer_AutoQiTaoOutbound.Text = "机器人缓存岛 齐包出库 线程";
             this.ckDataProcess_RobotBuffer_AutoQiTaoOutbound.UseVisualStyleBackColor = true;
             this.ckDataProcess_RobotBuffer_AutoQiTaoOutbound.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged);
             // 
@@ -610,7 +600,7 @@
             this.lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask.Size = new System.Drawing.Size(70, 15);
             this.lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask.TabIndex = 39;
             this.lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask.Text = "label11";
-            this.lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask.Click += new System.EventHandler(this.lbl_Alert_Place1014ClearStoreTask_Click);
+            
             // 
             // ck_DataProcess_RobotBuffer_IssueOutboundTask
             // 
@@ -865,18 +855,8 @@
             this.tabPage3.Controls.Add(this.button24);
             this.tabPage3.Controls.Add(this.tb_PackageCode);
             this.tabPage3.Controls.Add(this.label23);
-            this.tabPage3.Controls.Add(this.button23);
-            this.tabPage3.Controls.Add(this.tb_wlm);
-            this.tabPage3.Controls.Add(this.label22);
-            this.tabPage3.Controls.Add(this.button22);
             this.tabPage3.Controls.Add(this.button20);
             this.tabPage3.Controls.Add(this.tb_TongJi);
-            this.tabPage3.Controls.Add(this.checkBox_NowDay);
-            this.tabPage3.Controls.Add(this.dateTimePicker_End);
-            this.tabPage3.Controls.Add(this.label16);
-            this.tabPage3.Controls.Add(this.dateTimePicker_Start);
-            this.tabPage3.Controls.Add(this.btn_TongJi);
-            this.tabPage3.Controls.Add(this.button5);
             this.tabPage3.Location = new System.Drawing.Point(4, 28);
             this.tabPage3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.tabPage3.Name = "tabPage3";
@@ -885,6 +865,18 @@
             this.tabPage3.TabIndex = 9;
             this.tabPage3.Text = "数据维护&统计";
             this.tabPage3.UseVisualStyleBackColor = true;
+            // 
+            // button2
+            // 
+            this.button2.BackColor = System.Drawing.Color.Aqua;
+            this.button2.Location = new System.Drawing.Point(1022, 349);
+            this.button2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.button2.Name = "button2";
+            this.button2.Size = new System.Drawing.Size(155, 48);
+            this.button2.TabIndex = 161;
+            this.button2.Text = "更新库存表中的次序字段";
+            this.button2.UseVisualStyleBackColor = false;
+            this.button2.Click += new System.EventHandler(this.button2_Click);
             // 
             // btn1
             // 
@@ -966,46 +958,6 @@
             this.label23.TabIndex = 153;
             this.label23.Text = "包号:";
             // 
-            // button23
-            // 
-            this.button23.BackColor = System.Drawing.Color.Aqua;
-            this.button23.Location = new System.Drawing.Point(808, 349);
-            this.button23.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.button23.Name = "button23";
-            this.button23.Size = new System.Drawing.Size(155, 48);
-            this.button23.TabIndex = 152;
-            this.button23.Text = "临时-测试btjReceive";
-            this.button23.UseVisualStyleBackColor = false;
-            this.button23.Click += new System.EventHandler(this.button23_Click);
-            // 
-            // tb_wlm
-            // 
-            this.tb_wlm.Location = new System.Drawing.Point(898, 206);
-            this.tb_wlm.Name = "tb_wlm";
-            this.tb_wlm.Size = new System.Drawing.Size(339, 25);
-            this.tb_wlm.TabIndex = 151;
-            // 
-            // label22
-            // 
-            this.label22.AutoSize = true;
-            this.label22.Location = new System.Drawing.Point(794, 209);
-            this.label22.Name = "label22";
-            this.label22.Size = new System.Drawing.Size(60, 15);
-            this.label22.TabIndex = 150;
-            this.label22.Text = "物料码:";
-            // 
-            // button22
-            // 
-            this.button22.BackColor = System.Drawing.Color.Aqua;
-            this.button22.Location = new System.Drawing.Point(808, 262);
-            this.button22.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.button22.Name = "button22";
-            this.button22.Size = new System.Drawing.Size(155, 48);
-            this.button22.TabIndex = 149;
-            this.button22.Text = "临时-测试getEngineInfo";
-            this.button22.UseVisualStyleBackColor = false;
-            this.button22.Click += new System.EventHandler(this.button22_Click);
-            // 
             // button20
             // 
             this.button20.BackColor = System.Drawing.Color.DarkOrange;
@@ -1026,67 +978,6 @@
             this.tb_TongJi.Name = "tb_TongJi";
             this.tb_TongJi.Size = new System.Drawing.Size(748, 459);
             this.tb_TongJi.TabIndex = 13;
-            // 
-            // checkBox_NowDay
-            // 
-            this.checkBox_NowDay.AutoSize = true;
-            this.checkBox_NowDay.Location = new System.Drawing.Point(533, 132);
-            this.checkBox_NowDay.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.checkBox_NowDay.Name = "checkBox_NowDay";
-            this.checkBox_NowDay.Size = new System.Drawing.Size(59, 19);
-            this.checkBox_NowDay.TabIndex = 12;
-            this.checkBox_NowDay.Text = "今天";
-            this.checkBox_NowDay.UseVisualStyleBackColor = true;
-            this.checkBox_NowDay.CheckedChanged += new System.EventHandler(this.checkBox_NowDay_CheckedChanged);
-            // 
-            // dateTimePicker_End
-            // 
-            this.dateTimePicker_End.Location = new System.Drawing.Point(295, 130);
-            this.dateTimePicker_End.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.dateTimePicker_End.Name = "dateTimePicker_End";
-            this.dateTimePicker_End.Size = new System.Drawing.Size(200, 25);
-            this.dateTimePicker_End.TabIndex = 11;
-            // 
-            // label16
-            // 
-            this.label16.AutoSize = true;
-            this.label16.Location = new System.Drawing.Point(253, 138);
-            this.label16.Name = "label16";
-            this.label16.Size = new System.Drawing.Size(22, 15);
-            this.label16.TabIndex = 10;
-            this.label16.Text = "至";
-            // 
-            // dateTimePicker_Start
-            // 
-            this.dateTimePicker_Start.Location = new System.Drawing.Point(37, 130);
-            this.dateTimePicker_Start.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.dateTimePicker_Start.Name = "dateTimePicker_Start";
-            this.dateTimePicker_Start.Size = new System.Drawing.Size(200, 25);
-            this.dateTimePicker_Start.TabIndex = 9;
-            // 
-            // btn_TongJi
-            // 
-            this.btn_TongJi.BackColor = System.Drawing.Color.Aqua;
-            this.btn_TongJi.Location = new System.Drawing.Point(631, 118);
-            this.btn_TongJi.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.btn_TongJi.Name = "btn_TongJi";
-            this.btn_TongJi.Size = new System.Drawing.Size(155, 48);
-            this.btn_TongJi.TabIndex = 8;
-            this.btn_TongJi.Text = "统计信息";
-            this.btn_TongJi.UseVisualStyleBackColor = false;
-            this.btn_TongJi.Click += new System.EventHandler(this.btn_TongJi_Click);
-            // 
-            // button5
-            // 
-            this.button5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
-            this.button5.Location = new System.Drawing.Point(36, 20);
-            this.button5.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.button5.Name = "button5";
-            this.button5.Size = new System.Drawing.Size(177, 48);
-            this.button5.TabIndex = 7;
-            this.button5.Text = "手动库存维护";
-            this.button5.UseVisualStyleBackColor = false;
-            this.button5.Click += new System.EventHandler(this.button5_Click);
             // 
             // tabDevice
             // 
@@ -1305,18 +1196,6 @@
             this.lbl_Mode_FJ.Text = "设备模式: ";
             this.lbl_Mode_FJ.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
-            // button2
-            // 
-            this.button2.BackColor = System.Drawing.Color.Aqua;
-            this.button2.Location = new System.Drawing.Point(1022, 349);
-            this.button2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.button2.Name = "button2";
-            this.button2.Size = new System.Drawing.Size(155, 48);
-            this.button2.TabIndex = 161;
-            this.button2.Text = "更新库存表中的次序字段";
-            this.button2.UseVisualStyleBackColor = false;
-            this.button2.Click += new System.EventHandler(this.button2_Click);
-            // 
             // FormCC
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
@@ -1394,16 +1273,10 @@
         private System.Windows.Forms.Label lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask;
         private System.Windows.Forms.CheckBox ck_DataProcess_RobotBuffer_IssueOutboundTask;
         private System.Windows.Forms.TabPage tabPage3;
-        private System.Windows.Forms.Button button5;
         private System.Windows.Forms.Label lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound;
         private System.Windows.Forms.CheckBox ckDataProcess_RobotBuffer_AutoQiTaoOutbound;
         private System.Windows.Forms.Label lbl_DataProcess_RobotBuffer_ModeChange;
         private System.Windows.Forms.CheckBox ck_DataProcess_RobotBuffer_ModeChange;
-        private System.Windows.Forms.Button btn_TongJi;
-        private System.Windows.Forms.Label label16;
-        private System.Windows.Forms.DateTimePicker dateTimePicker_Start;
-        private System.Windows.Forms.DateTimePicker dateTimePicker_End;
-        private System.Windows.Forms.CheckBox checkBox_NowDay;
         private System.Windows.Forms.Button button20;
         private System.Windows.Forms.TextBox tb_TongJi;
         private System.Windows.Forms.Label lbl_Alert_DataProcess_RobotBuffer_FinishTaskForOutbound;
@@ -1418,12 +1291,8 @@
         private System.Windows.Forms.CheckBox ck_DataProcess_BZ39;
         private System.Windows.Forms.Label lbl_alert_DataProcess_BZ01;
         private System.Windows.Forms.CheckBox ck_AutoIssueInStoreTask;
-        private System.Windows.Forms.Button button22;
         private System.Windows.Forms.Label lbl_alert_DataProcess_269;
         private System.Windows.Forms.CheckBox ck_DataProcess_269;
-        private System.Windows.Forms.TextBox tb_wlm;
-        private System.Windows.Forms.Label label22;
-        private System.Windows.Forms.Button button23;
         private System.Windows.Forms.Label lbl_RobotMode;
         private System.Windows.Forms.Button button24;
         private System.Windows.Forms.TextBox tb_PackageCode;
diff --git a/CC/iWareCC_ASRS/FormCC.cs b/CC/iWareCC_ASRS/FormCC.cs
index bab25df..bf2ba72 100644
--- a/CC/iWareCC_ASRS/FormCC.cs
+++ b/CC/iWareCC_ASRS/FormCC.cs
@@ -208,12 +208,13 @@
 
 
 
-            new Thread(DataProcess_RobotBuffer_ModeChange.Handler).Start();
+            //new Thread(DataProcess_RobotBuffer_ModeChange.Handler).Start();
 
             new Thread(DataProcess_RobotBuffer_IssueOutboundTask.Handler).Start();
 
 
-            new Thread(DataProcess_RobotBuffer_AutoQiTaoOutbound.Handler).Start();
+            //new Thread(DataProcess_RobotBuffer_AutoQiTaoOutbound.Handler).Start();
+            new Thread(DataProcess_RobotBuffer_PesonOutbound.Handler).Start();
 
             new Thread(DataProcess_RobotBuffer_FinishTaskForOutbound.Handler).Start();
 
@@ -258,8 +259,7 @@
         }
         private void FormCC_Load(object sender, EventArgs e)
         {
-            dateTimePicker_Start.Value = DateTime.Now;
-            dateTimePicker_End.Value = DateTime.Now;
+           
 
 
             /*
@@ -1238,224 +1238,34 @@
 
 
 
-        private void button5_Click(object sender, EventArgs e)
-        {
-            if (SystemValue.isStartedModel)
-            {
-                WZ.Useful.Commons.MessageUtil.ShowError("鎵嬪姩搴撲綅缁存姢锛岄渶瑕佸皢妯″紡鍏抽棴锛�");
-                return;
-            }
-            //鎵嬪姩搴撲綅缁存姢
-            SrmStockForm frm = new SrmStockForm();
-            frm.ShowDialog();
-        }
 
 
 
+       
 
-        private void btn_TongJi_Click(object sender, EventArgs e)
-        {
-            //缁熻
+      
 
-            int store_FDJ = 0;//鐜版湁鍙戝姩鏈烘暟
-            int store_EmptySalver = 0;//绌烘墭鐩樻暟閲�
-            int store_EmptySalver_TS = 0;//绌烘墭鐩樻墭鏁�
+      
 
-            int count_In_FDJ = 0;//鏌ヨ鏌愬ぉ鍏ュ簱浜嗗灏戝彂鍔ㄦ満
-            int count_In_EmptySalver = 0;//鏌ヨ鏌愬ぉ鍏ュ簱浜嗗灏� 绌烘墭鐩�
-            int count_In_EmptySalver_TS = 0;//鏌ヨ鏌愬ぉ鍏ュ簱浜嗗灏� 绌烘墭鐩樻墭鏁�
-
-            int count_Out_FDJ = 0;//鏌ヨ鏌愬ぉ鍑哄簱浜嗗灏戝彂鍔ㄦ満
-            int count_Out_EmptySalver = 0;//鏌ヨ鏌愬ぉ鍑哄簱浜嗗灏� 绌烘墭鐩�
-            int count_Out_EmptySalver_TS = 0;//鏌ヨ鏌愬ぉ鍑哄簱浜嗗灏� 绌烘墭鐩樻墭鏁�
-
-            int count_ZY_EmptySalver = 0;//鏌ヨ鏌愬ぉ杞繍浜嗗灏� 绌烘墭鐩�
-            int count_ZY_EmptySalver_TS = 0;//鏌ヨ鏌愬ぉ杞繍浜嗗灏� 绌烘墭鐩樻墭鏁�
-
-            //鏌愭鏃堕棿鐨勭粺璁�
-            var str_start = this.dateTimePicker_Start.Value.ToString("yyyy-MM-dd" + " " + "00:00:00");
-            var str_end = this.dateTimePicker_End.Value.ToString("yyyy-MM-dd" + " " + "23:59:59");
-            var start = Convert.ToDateTime(str_start);
-            var end = Convert.ToDateTime(str_end);
-
-            int allPlacesCount = 0;
-            using (DbModel edm = new DbModel())
-            {
-
-                var queryMaterialType_涓�鑸墿鏂� = (int)MaterialTypeEnum.涓�鑸墿鏂�;
-                var queryMaterialType_鎵樼洏 = (int)MaterialTypeEnum.鎵樼洏;
-                var queryInOutFlag_In = (int)MainInOutFlagEnum.鍏ュ簱;
-                var queryInOutFlag_Out = (int)MainInOutFlagEnum.鍑哄簱;
-                var queryInOutFlag_ZY = (int)MainInOutFlagEnum.杞繍;
-
-                var allPlaces = edm.Base_Station.Where(x => x.IsSrmStation == true).ToList();
-                allPlaces = StationHandler.FindCommonFilter(allPlaces);
-                allPlacesCount = allPlaces.Count;
-
-                store_FDJ = edm.V_Store.Where(x => x.MaterialType == queryMaterialType_涓�鑸墿鏂�).Count();
+      
 
 
-                store_EmptySalver_TS = edm.V_Store.Where(x => x.MaterialType == queryMaterialType_鎵樼洏).Count();
-                store_EmptySalver = store_EmptySalver_TS == 0 ? 0 : edm.V_Store.Where(x => x.MaterialType == queryMaterialType_鎵樼洏).Sum(x => (int)x.Qty);
-
-
-
-                //鏌ヨ鏌愬ぉ鍏ュ簱浜嗗灏戝彂鍔ㄦ満
-                var taskState = (int)MainTaskStatusEnum.宸插畬鎴�;
-                count_In_FDJ = edm.Task_Main.Where(x => x.MaterialType == queryMaterialType_涓�鑸墿鏂� && x.InOutFlag == queryInOutFlag_In && x.TaskState == taskState && (x.FinishTime >= start && x.FinishTime <= end)).Count();
-
-                //鏌ヨ鏌愬ぉ鍏ュ簱浜嗗灏戞墭鐩�
-                count_In_EmptySalver_TS = edm.Task_Main.Where(x => x.MaterialType == queryMaterialType_鎵樼洏 && x.InOutFlag == queryInOutFlag_In && x.TaskState == taskState && (x.FinishTime >= start && x.FinishTime <= end)).Count();
-                count_In_EmptySalver = count_In_EmptySalver_TS == 0 ? 0 : edm.Task_Main.Where(x => x.MaterialType == queryMaterialType_鎵樼洏 && x.InOutFlag == queryInOutFlag_In && x.TaskState == taskState && (x.FinishTime >= start && x.FinishTime <= end)).Sum(x => (int)x.Qty);
-
-                //鏌ヨ鏌愬ぉ鍑哄簱浜嗗灏戝彂鍔ㄦ満
-                count_Out_FDJ = edm.Task_Main.Where(x => x.MaterialType == queryMaterialType_涓�鑸墿鏂� && x.InOutFlag == queryInOutFlag_Out && x.TaskState == taskState && (x.FinishTime >= start && x.FinishTime <= end)).Count();
-
-                //鏌ヨ鏌愬ぉ鍏ュ簱浜嗗灏戞墭鐩�
-                count_Out_EmptySalver_TS = edm.Task_Main.Where(x => x.MaterialType == queryMaterialType_鎵樼洏 && x.InOutFlag == queryInOutFlag_Out && x.TaskState == taskState && (x.FinishTime >= start && x.FinishTime <= end)).Count();
-                count_Out_EmptySalver = count_Out_EmptySalver_TS == 0 ? 0 : edm.Task_Main.Where(x => x.MaterialType == queryMaterialType_鎵樼洏 && x.InOutFlag == queryInOutFlag_Out && x.TaskState == taskState && (x.FinishTime >= start && x.FinishTime <= end)).Sum(x => (int)x.Qty);
-
-                //鏌ヨ鏌愬ぉ杞繍浜嗗灏戞墭鐩橈紙娉ㄦ剰锛氬彧鏌ヨ鍘�1014浣嶇疆鐨勶級
-                count_ZY_EmptySalver_TS = edm.Task_Main.Where(x => x.MaterialType == queryMaterialType_鎵樼洏 && x.InOutFlag == queryInOutFlag_ZY && x.TaskState == taskState && (x.FinishTime >= start && x.FinishTime <= end) && x.RealToPlace == "1014").Count();
-                count_ZY_EmptySalver = count_ZY_EmptySalver_TS == 0 ? 0 : edm.Task_Main.Where(x => x.MaterialType == queryMaterialType_鎵樼洏 && x.InOutFlag == queryInOutFlag_ZY && x.TaskState == taskState && (x.FinishTime >= start && x.FinishTime <= end) && x.RealToPlace == "1014").Sum(x => (int)x.Qty);
-
-            }
-
-            //鏄剧ず
-            //var aa = "\r\n";
-            var str = "";
-            str += "鏃堕棿鑼冨洿: " + str_start + "鑷�" + str_end + " \r\n";
-            str += "==================銆愬簱瀛樸��========================= \r\n";
-            str += "鐜版湁鍙戝姩鏈烘暟: " + store_FDJ + "  \r\n";
-            str += "鐜版湁绌烘墭鐩樻暟: " + store_EmptySalver + " \r\n";
-            str += "鐜版湁绌烘墭鐩樻墭鏁�: " + store_EmptySalver_TS + " \r\n";
-            str += "鎬诲簱浣�" + allPlacesCount + ",鏈夊彂鍔ㄦ満鎴栨墭鐩樺簱浣�" + (store_FDJ + store_EmptySalver_TS) + ",搴撳瓨鍗犳瘮: " + CSharpHelper.ExecPercent((store_FDJ + store_EmptySalver_TS), allPlacesCount) + " \r\n";
-            str += "\r\n";
-
-            str += "==================銆愬叆搴撱��========================= \r\n";
-            str += "鍏ュ簱鍙戝姩鏈烘暟: " + count_In_FDJ + " \r\n";
-            str += "鍏ュ簱绌烘墭鐩樻暟: " + count_In_EmptySalver + " \r\n";
-            str += "鍏ュ簱绌烘墭鐩樻墭鏁�: " + count_In_EmptySalver_TS + " \r\n";
-            str += "\r\n";
-
-            str += "==================銆愬嚭搴撱��========================= \r\n";
-            str += "鍑哄簱鍙戝姩鏈烘暟: " + count_Out_FDJ + " \r\n";
-            str += "鍑哄簱绌烘墭鐩樻暟: " + count_Out_EmptySalver + " \r\n";
-            str += "鍑哄簱绌烘墭鐩樻墭鏁�: " + count_Out_EmptySalver_TS + " \r\n";
-            str += "\r\n";
-
-            str += "==================銆愯浆杩愭墭鐩樸��========================= \r\n";
-            str += "杞繍绌烘墭鐩樻暟: " + count_ZY_EmptySalver + " \r\n";
-            str += "杞繍绌烘墭鐩樻墭鏁�: " + count_ZY_EmptySalver_TS + " \r\n";
-            str += "\r\n";
-
-            this.tb_TongJi.Text = str;
-        }
-
-        private void checkBox_NowDay_CheckedChanged(object sender, EventArgs e)
-        {
-            if (this.checkBox_NowDay.Checked)
-            {
-                dateTimePicker_Start.Value = DateTime.Now;
-                dateTimePicker_End.Value = DateTime.Now;
-            }
-        }
-
-        private void rBOnlyIn_CheckedChanged(object sender, EventArgs e)
-        {
-            SetModelCheckBoxToSystemValue();
-        }
-
-        private void btnSMQZYZTG1_Click(object sender, EventArgs e)
-        {
-            DobtnSMQZYZTG(EDevice.涓�鍙峰爢鍨涙満);
-        }
-
-        private void DobtnSMQZYZTG(EDevice device)
-        {
-            MessageBoxButtons messButton = MessageBoxButtons.OKCancel;
-            DialogResult dr = MessageBox.Show("娉ㄦ剰锛氬叆搴撳彛鎵爜寮哄埗楠岃瘉閫氳繃鍔熻兘锛屼粎閫傜敤浜庢壂鐮佸櫒娌℃湁鎵埌鐮侊紝浣嗘槸瀹為檯鎵樼洏鐮佸拰鍫嗗灈鏈鸿鎵ц鐨勪换鍔℃墭鐩樼爜涓�鑷寸殑鎯呭喌锛佸鏋滃爢鍨涙満瑕佹墽琛岀殑浠诲姟璺熷疄闄呮墭鐩樼爜涓嶇锛岃涓嶈鐐瑰嚮璇ユ寜閽紝鍙婃椂鑱旂郴绠$悊鍛樿繃鏉ュ鐞嗐�傛偍纭畾瑕佹搷浣滃悧?", "纭", messButton);
-            if (dr == DialogResult.OK)//濡傛灉鐐瑰嚮鈥滅‘瀹氣�濇寜閽�
-            {
-                var stationCode = MyExtendHelper.GetRgvStationCodeBySrm(device);
-                var srm = FormCC.srmViewDict[(int)device];
-                //鍙湁褰撳爢鍨涙満鏈変换鍔℃墽琛屾椂锛屽苟涓旀槸鍏ュ簱浠诲姟鐨勬椂鍊欐墠鍒ゆ柇
-                var realSrmSourcePlace = (int)device + "-" + srm.SrmSourcePlace;
-                if (srm.R_TaskNo > 0 && (srm.R_State == (int)ESrmState.鍙栬揣涓� || srm.R_State == (int)ESrmState.鍙栬揣瀹氫綅涓�)
-                   && SysGloble.Dict_SpecialPlace_IN.ContainsKey(realSrmSourcePlace))
-                {
-                    var result = MyExtendHelper.WriteScanValidateACK(false, "鍏ュ簱鍙f壂鐮佸己鍒堕獙璇侀�氳繃", stationCode, srm.R_TaskNo, true, "", "");
-                    if (result)
-                    {
-                        MyExtendHelper.SetSrm_IN_SMQZYZTG(device, true);
-                        MessageBox.Show("鍏ュ簱鍙f壂鐮佸己鍒堕獙璇侀�氳繃 鎴愬姛锛�");
-                    }
-                    else
-                    {
-                        MessageBox.Show("鍏ュ簱鍙f壂鐮佸己鍒堕獙璇侀�氳繃 澶辫触锛�");
-                    }
-                }
-                else
-                {
-                    MessageBox.Show(device.ToString() + "浠诲姟鍙蜂笉鏄ぇ浜�0锛屾垨鑰� 鐘舵�佷笉鏄� '鍙栬揣涓�'鎴�'鍙栬揣瀹氫綅涓�'锛屼笉鍏佽鎿嶄綔");
-                }
-            }
-            else//濡傛灉鐐瑰嚮鈥滃彇娑堚�濇寜閽�
-            {
-
-            }
-        }
-
-
-        private void button22_Click(object sender, EventArgs e)
-        {
-            var cargNo = this.tb_wlm.Text.Trim();
-            var ret = WmsRequestHelper.test_getEngineInfo(cargNo);
-
-
-            //杞崲鍚�
-            MesRetModel2<MesRetProductModel> retModel = JsonConvert.DeserializeObject<MesRetModel2<MesRetProductModel>>(ret);
-
-            this.tb_TongJi.Text = "MES杩斿洖锛�" + ret + "\r\n" +
-                "杞崲鍚�:" + "\r\n" +
-                JsonConvert.SerializeObject(retModel)
-                ;
-        }
-
-        private void button23_Click(object sender, EventArgs e)
-        {
-            var cargNo = this.tb_wlm.Text.Trim();
-            var ret = WmsRequestHelper.test_btjReceive(cargNo);
-
-
-            //杞崲鍚�
-            MessageModel<string> retModel = JsonConvert.DeserializeObject<MessageModel<string>>(ret);
-
-            this.tb_TongJi.Text = "WMS杩斿洖锛�" + ret + "\r\n" +
-                "杞崲鍚�:" + "\r\n" +
-                JsonConvert.SerializeObject(retModel);
-        }
-
-        private void lbl_Alert_Place1014ClearStoreTask_Click(object sender, EventArgs e)
-        {
-
-        }
 
         private void button24_Click(object sender, EventArgs e)
         {
-            //寮哄埗璇ュ寘鍙峰嚭搴�
-            var packageCode = this.tb_PackageCode.Text.Trim();
+            ////寮哄埗璇ュ寘鍙峰嚭搴�
+            //var packageCode = this.tb_PackageCode.Text.Trim();
 
-            var alertMsg = "";
-            CC_DataProcess_RobotBuffer_ForceOutbound.Handler(packageCode, ref alertMsg);
-            if (!string.IsNullOrEmpty(alertMsg))
-            {
-                MessageBox.Show("閿欒:" + alertMsg);
-            }
-            else
-            {
-                MessageBox.Show("宸插鐞�");
-            }
+            //var alertMsg = "";
+            //CC_DataProcess_RobotBuffer_ForceOutbound.Handler(packageCode, ref alertMsg);
+            //if (!string.IsNullOrEmpty(alertMsg))
+            //{
+            //    MessageBox.Show("閿欒:" + alertMsg);
+            //}
+            //else
+            //{
+            //    MessageBox.Show("宸插鐞�");
+            //}
         }
 
         private void button25_Click(object sender, EventArgs e)
diff --git "a/CC/iWareCC_ASRS/ThreadService/01_BZ01\345\267\245\344\275\215\357\274\210\346\270\205\347\201\260\357\274\214\346\264\227\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/DataProcess_BZ01.cs" "b/CC/iWareCC_ASRS/ThreadService/01_BZ01\345\267\245\344\275\215\357\274\210\346\270\205\347\201\260\357\274\214\346\264\227\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/DataProcess_BZ01.cs"
index 48b1470..9136880 100644
--- "a/CC/iWareCC_ASRS/ThreadService/01_BZ01\345\267\245\344\275\215\357\274\210\346\270\205\347\201\260\357\274\214\346\264\227\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/DataProcess_BZ01.cs"
+++ "b/CC/iWareCC_ASRS/ThreadService/01_BZ01\345\267\245\344\275\215\357\274\210\346\270\205\347\201\260\357\274\214\346\264\227\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/DataProcess_BZ01.cs"
@@ -46,6 +46,7 @@
                             continue;
                         }
 
+
                         var rgvLocation = StationLocationEnum.BZ01.ToString();
                         /*
                          * 1銆佷粠鏁版嵁搴撲腑鍒ゆ柇鏄惁榻愬
@@ -353,6 +354,10 @@
         /// <returns></returns>
         private static bool IsAllloRunOutTaskMode(WmsDBModel wmsDB, mes_batchOrderUPI_new curUpiObj)
         {
+            //涓嶅啀鍒ゆ柇 銆怑ditby shaocx,2024-12-14銆�
+            return false;
+
+            /*
             //棣栧厛鏌ヨ鏁版嵁搴撲腑鏄惁鏈� 瑕佸嚭搴撶殑鏁版嵁
             var isExistOutTaskForNewCreated = wmsDB.wms_rbline_task.Where(x =>
             (x.RbTaskType == (int)RbTaskTypeEnum.榻愬寘鍑哄簱浠诲姟 || x.RbTaskType == (int)RbTaskTypeEnum.寮哄埗鍑哄簱浠诲姟)
@@ -420,6 +425,8 @@
 
             FormCC.IsAllowRunOutMode = true;
             return true;
+
+            //*/
         }
 
         /// <summary>
diff --git "a/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/DataProcess_RobotBuffer_ModeChange.cs" "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/DataProcess_RobotBuffer_ModeChange.cs"
index e89e4a8..7341d69 100644
--- "a/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/DataProcess_RobotBuffer_ModeChange.cs"
+++ "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/DataProcess_RobotBuffer_ModeChange.cs"
@@ -1,109 +1,109 @@
-锘縰sing Admin.NET.Application;
-using iWareCC.Common.Helper;
-using iWareCC.StationService;
-using iWareCommon.Common.Globle;
-using iWareCommon.Utils;
-using iWareModel;
-using iWareSql.DataAccess;
-using iWareSql.DBModel;
-using iWareSql.WmsDBModel;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.ServiceModel.Configuration;
-using System.Text;
-using System.Threading;
-using System.Threading.Tasks;
-using WZ.Useful.Commons;
-using XiGang.Core.Model;
+锘�//using Admin.NET.Application;
+//using iWareCC.Common.Helper;
+//using iWareCC.StationService;
+//using iWareCommon.Common.Globle;
+//using iWareCommon.Utils;
+//using iWareModel;
+//using iWareSql.DataAccess;
+//using iWareSql.DBModel;
+//using iWareSql.WmsDBModel;
+//using System;
+//using System.Collections.Generic;
+//using System.Linq;
+//using System.ServiceModel.Configuration;
+//using System.Text;
+//using System.Threading;
+//using System.Threading.Tasks;
+//using WZ.Useful.Commons;
+//using XiGang.Core.Model;
 
-namespace iWareCC.ThreadService
-{
-    /// <summary>
-    /// 鏈哄櫒浜虹紦瀛樺矝 妯″紡鍒囨崲 澶勭悊
-    /// </summary>
-    public static class DataProcess_RobotBuffer_ModeChange
-    {
-        public static async void Handler()
-        {
-            var alertMsg = "";
-            LogType logType = LogType.DataProcess_RobotBuffer_ModeChange;
-            while (true)
-            {
-                Thread.Sleep(2000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
-                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange = string.Empty;
-                try
-                {//SystemValue.isAllowRuning_DataProcess_RobotBuffer_ModeChange &&
-                    if ( SystemValue.isStartedModel)
-                    {
-                        var rgvLocation = StationLocationEnum.BZ39.ToString();
-                        if (FormCC.IsAllowRunOutMode)
-                        {
-                            using (WmsDBModel wmsDB = new WmsDBModel())
-                            {
-                                var rbRunMode = wmsDB.wms_rbline_runmode.FirstOrDefault();
+//namespace iWareCC.ThreadService
+//{
+//    /// <summary>
+//    /// 鏈哄櫒浜虹紦瀛樺矝 妯″紡鍒囨崲 澶勭悊
+//    /// </summary>
+//    public static class DataProcess_RobotBuffer_ModeChange
+//    {
+//        public static async void Handler()
+//        {
+//            var alertMsg = "";
+//            LogType logType = LogType.DataProcess_RobotBuffer_ModeChange;
+//            while (true)
+//            {
+//                Thread.Sleep(2000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
+//                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange = string.Empty;
+//                try
+//                {//SystemValue.isAllowRuning_DataProcess_RobotBuffer_ModeChange &&
+//                    if ( SystemValue.isStartedModel)
+//                    {
+//                        var rgvLocation = StationLocationEnum.BZ39.ToString();
+//                        if (FormCC.IsAllowRunOutMode)
+//                        {
+//                            using (WmsDBModel wmsDB = new WmsDBModel())
+//                            {
+//                                var rbRunMode = wmsDB.wms_rbline_runmode.FirstOrDefault();
 
-                                if (TaskHandler.ValidateNoFinishOutTaskForRobotBuffer(wmsDB))
-                                {//涓嶅瓨鍦�
-                                    rbRunMode.LineRunMode = (int)RbRunModeEnum.鍏ュ簱妯″紡;
-                                    rbRunMode.LineRunModeName = RbRunModeEnum.鍏ュ簱妯″紡.ToString();
-                                    rbRunMode.UpdateTime = DateTime.Now;
+//                                if (TaskHandler.ValidateNoFinishOutTaskForRobotBuffer(wmsDB))
+//                                {//涓嶅瓨鍦�
+//                                    rbRunMode.LineRunMode = (int)RbRunModeEnum.鍏ュ簱妯″紡;
+//                                    rbRunMode.LineRunModeName = RbRunModeEnum.鍏ュ簱妯″紡.ToString();
+//                                    rbRunMode.UpdateTime = DateTime.Now;
 
-                                    //鎺ㄩ�佺粰PLC鍒囨崲妯″紡
-                                    using (StationServiceClient client = new StationServiceClient())
-                                    {
-                                        var res = await client.ChangeModeAsync((int)EDevice.Station, (int)RbRunModeEnum.鍏ュ簱妯″紡, rgvLocation);
-                                        if (!res.result)
-                                        {
-                                            SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange = $"{rgvLocation.ToString()}-鎺ㄩ�佺粰PLC鍒囨崲妯″紡 澶辫触,ChangeModeAsync 杩斿洖:{res.resMsg}";
-                                            continue;
-                                        }
-                                        else
-                                        {
-                                            Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-鎺ㄩ�佺粰PLC鍒囨崲妯″紡 鎴愬姛,ChangeModeAsync锛屽弬鏁�: 绔欑偣{rgvLocation}");
-                                        }
-                                    }
-                                    FormCC.IsAllowRunOutMode = false;
-                                }
-                                else
-                                {//瀛樺湪
-                                    if (rbRunMode.LineRunMode == (int)RbRunModeEnum.鍑哄簱妯″紡)
-                                    {
-                                        SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange = $"宸茬粡鏄嚭搴撴ā寮忎簡,姝ゆ寰幆缁撴潫";
-                                        continue;
-                                    }
-                                    rbRunMode.LineRunMode = (int)RbRunModeEnum.鍑哄簱妯″紡;
-                                    rbRunMode.LineRunModeName = RbRunModeEnum.鍑哄簱妯″紡.ToString();
-                                    rbRunMode.UpdateTime = DateTime.Now;
+//                                    //鎺ㄩ�佺粰PLC鍒囨崲妯″紡
+//                                    using (StationServiceClient client = new StationServiceClient())
+//                                    {
+//                                        var res = await client.ChangeModeAsync((int)EDevice.Station, (int)RbRunModeEnum.鍏ュ簱妯″紡, rgvLocation);
+//                                        if (!res.result)
+//                                        {
+//                                            SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange = $"{rgvLocation.ToString()}-鎺ㄩ�佺粰PLC鍒囨崲妯″紡 澶辫触,ChangeModeAsync 杩斿洖:{res.resMsg}";
+//                                            continue;
+//                                        }
+//                                        else
+//                                        {
+//                                            Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-鎺ㄩ�佺粰PLC鍒囨崲妯″紡 鎴愬姛,ChangeModeAsync锛屽弬鏁�: 绔欑偣{rgvLocation}");
+//                                        }
+//                                    }
+//                                    FormCC.IsAllowRunOutMode = false;
+//                                }
+//                                else
+//                                {//瀛樺湪
+//                                    if (rbRunMode.LineRunMode == (int)RbRunModeEnum.鍑哄簱妯″紡)
+//                                    {
+//                                        SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange = $"宸茬粡鏄嚭搴撴ā寮忎簡,姝ゆ寰幆缁撴潫";
+//                                        continue;
+//                                    }
+//                                    rbRunMode.LineRunMode = (int)RbRunModeEnum.鍑哄簱妯″紡;
+//                                    rbRunMode.LineRunModeName = RbRunModeEnum.鍑哄簱妯″紡.ToString();
+//                                    rbRunMode.UpdateTime = DateTime.Now;
 
-                                    //鎺ㄩ�佺粰PLC鍒囨崲妯″紡
-                                    using (StationServiceClient client = new StationServiceClient())
-                                    {
-                                        var res = await client.ChangeModeAsync((int)EDevice.Station, (int)RbRunModeEnum.鍑哄簱妯″紡, rgvLocation);
-                                        if (!res.result)
-                                        {
-                                            SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange = $"{rgvLocation.ToString()}-鎺ㄩ�佺粰PLC鍒囨崲妯″紡 澶辫触,ChangeModeAsync 杩斿洖:{res.resMsg}";
-                                            continue;
-                                        }
-                                        else
-                                        {
-                                            Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-鎺ㄩ�佺粰PLC鍒囨崲妯″紡 鎴愬姛,ChangeModeAsync锛屽弬鏁�: 绔欑偣{rgvLocation}");
-                                        }
-                                    }
-                                }
+//                                    //鎺ㄩ�佺粰PLC鍒囨崲妯″紡
+//                                    using (StationServiceClient client = new StationServiceClient())
+//                                    {
+//                                        var res = await client.ChangeModeAsync((int)EDevice.Station, (int)RbRunModeEnum.鍑哄簱妯″紡, rgvLocation);
+//                                        if (!res.result)
+//                                        {
+//                                            SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange = $"{rgvLocation.ToString()}-鎺ㄩ�佺粰PLC鍒囨崲妯″紡 澶辫触,ChangeModeAsync 杩斿洖:{res.resMsg}";
+//                                            continue;
+//                                        }
+//                                        else
+//                                        {
+//                                            Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-鎺ㄩ�佺粰PLC鍒囨崲妯″紡 鎴愬姛,ChangeModeAsync锛屽弬鏁�: 绔欑偣{rgvLocation}");
+//                                        }
+//                                    }
+//                                }
 
-                                wmsDB.SaveChanges();
-                            }
-                        }
-                    }
-                }
-                catch (Exception ex)
-                {
-                    SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange += " 鍑虹幇寮傚父:" + ex.Message + SysGloble.SPLIT_STR;
-                    Log4NetHelper.WriteErrorLog(logType, " 鍑虹幇寮傚父锛�" + ex.Message, ex);
-                }
-            }
-        }
+//                                wmsDB.SaveChanges();
+//                            }
+//                        }
+//                    }
+//                }
+//                catch (Exception ex)
+//                {
+//                    SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange += " 鍑虹幇寮傚父:" + ex.Message + SysGloble.SPLIT_STR;
+//                    Log4NetHelper.WriteErrorLog(logType, " 鍑虹幇寮傚父锛�" + ex.Message, ex);
+//                }
+//            }
+//        }
 
-    }
-}
+//    }
+//}
diff --git "a/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/1\343\200\201DataProcess_RobotBuffer_AutoQiTaoOutbound.cs" "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/1\343\200\201DataProcess_RobotBuffer_AutoQiTaoOutbound.cs"
index 28e726c..0290d12 100644
--- "a/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/1\343\200\201DataProcess_RobotBuffer_AutoQiTaoOutbound.cs"
+++ "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/1\343\200\201DataProcess_RobotBuffer_AutoQiTaoOutbound.cs"
@@ -1,111 +1,111 @@
-锘縰sing Admin.NET.Application;
-using iWareCC.Common.Helper;
-using iWareCommon.Common.Globle;
-using iWareCommon.Utils;
-using iWareModel;
-using iWareSql.DataAccess;
-using iWareSql.WmsDBModel;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading;
-using System.Threading.Tasks;
+锘�//using Admin.NET.Application;
+//using iWareCC.Common.Helper;
+//using iWareCommon.Common.Globle;
+//using iWareCommon.Utils;
+//using iWareModel;
+//using iWareSql.DataAccess;
+//using iWareSql.WmsDBModel;
+//using System;
+//using System.Collections.Generic;
+//using System.Linq;
+//using System.Threading;
+//using System.Threading.Tasks;
 
-namespace iWareCC.ThreadService
-{
-    /// <summary>
-    /// 鏈哄櫒浜虹紦瀛樺矝 鑷姩榻愬鍑哄簱 澶勭悊
-    /// </summary>
-    public static class DataProcess_RobotBuffer_AutoQiTaoOutbound
-    {
-        public static async void Handler()
-        {
-            var alertMsg = "";
-            LogType logType = LogType.DataProcess_RobotBuffer_AutoQiTaoOutbound;
-            while (true)
-            {
-                Thread.Sleep(2000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
-                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound = string.Empty;
-                try
-                {//SystemValue.isAllowRuning_DataProcess_RobotBuffer_AutoQiTaoOutbound && 
-                    if (SystemValue.isStartedModel)
-                    {
+//namespace iWareCC.ThreadService
+//{
+//    /// <summary>
+//    /// 鏈哄櫒浜虹紦瀛樺矝 鑷姩榻愬鍑哄簱 澶勭悊
+//    /// </summary>
+//    public static class DataProcess_RobotBuffer_AutoQiTaoOutbound
+//    {
+//        public static async void Handler()
+//        {
+//            var alertMsg = "";
+//            LogType logType = LogType.DataProcess_RobotBuffer_AutoQiTaoOutbound;
+//            while (true)
+//            {
+//                Thread.Sleep(2000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
+//                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound = string.Empty;
+//                try
+//                {//SystemValue.isAllowRuning_DataProcess_RobotBuffer_AutoQiTaoOutbound && 
+//                    if (SystemValue.isStartedModel)
+//                    {
 
-                        using (WmsDBModel wmsDB = new WmsDBModel())
-                        {
-                            List<wms_stock_quan> qunList = wmsDB.wms_stock_quan.Where(x => x.StockStatus == (int)StockStatusEnum.鍦ㄥ簱).ToList();
-                            var queryPageckCodeList = qunList.Select(x => x.PackageCode).Distinct().ToList();
-                            List<mes_batchOrderUPI_new> upiList = wmsDB.mes_batchOrderUPI_new.Where(x => queryPageckCodeList.Contains(x.PackageCode)).ToList();
-                            var groups = qunList.GroupBy(x => x.PackageCode);
-                            foreach (var group in groups)
-                            {
-                                var packageCode = group.Key;
-                                var allCount = upiList.Where(x => x.PackageCode == packageCode).Count();
-                                if (allCount == group.ToList().Count())
-                                {
-                                    //婊¤冻榻愬锛屽嚭搴�
-                                    //娉ㄦ剰锛氭帓搴忎弗鏍兼寜鐓� 娆″簭 杩涜鎺掑簭銆� 锛侊紒锛侊紒锛侊紒锛侊紒
-                                    var doList = upiList.Where(x => x.PackageCode == packageCode).OrderBy(x => x.Shelf).ToList();
-                                    foreach (var item in doList)
-                                    {
-                                        item.UpiStatus = (int)UpiStatusEnum.宸查綈鍖�;
-                                        item.UpdateTime = DateTime.Now;
+//                        using (WmsDBModel wmsDB = new WmsDBModel())
+//                        {
+//                            List<wms_stock_quan> qunList = wmsDB.wms_stock_quan.Where(x => x.StockStatus == (int)StockStatusEnum.鍦ㄥ簱).ToList();
+//                            var queryPageckCodeList = qunList.Select(x => x.PackageCode).Distinct().ToList();
+//                            List<mes_batchOrderUPI_new> upiList = wmsDB.mes_batchOrderUPI_new.Where(x => queryPageckCodeList.Contains(x.PackageCode)).ToList();
+//                            var groups = qunList.GroupBy(x => x.PackageCode);
+//                            foreach (var group in groups)
+//                            {
+//                                var packageCode = group.Key;
+//                                var allCount = upiList.Where(x => x.PackageCode == packageCode).Count();
+//                                if (allCount == group.ToList().Count())
+//                                {
+//                                    //婊¤冻榻愬锛屽嚭搴�
+//                                    //娉ㄦ剰锛氭帓搴忎弗鏍兼寜鐓� 娆″簭 杩涜鎺掑簭銆� 锛侊紒锛侊紒锛侊紒锛侊紒
+//                                    var doList = upiList.Where(x => x.PackageCode == packageCode).OrderBy(x => x.Shelf).ToList();
+//                                    foreach (var item in doList)
+//                                    {
+//                                        item.UpiStatus = (int)UpiStatusEnum.宸查綈鍖�;
+//                                        item.UpdateTime = DateTime.Now;
 
-                                        var stock = group.ToList().Find(b => b.Upi == item.UPI);
-                                        stock.StockStatus = (int)StockStatusEnum.榻愬寘寰呭嚭搴�;
+//                                        var stock = group.ToList().Find(b => b.Upi == item.UPI);
+//                                        stock.StockStatus = (int)StockStatusEnum.榻愬寘寰呭嚭搴�;
 
-                                        //鐢熸垚鍑哄簱浠诲姟
-                                        //璁板綍浠诲姟
-                                        var _id = Yitter.IdGenerator.YitIdHelper.NextId();
-                                        var plcTaskNo = BusinessHelper.CreatePlcTaskId();
-                                        plcTaskNo = MyExtendHelper.GetNewTaskNo(wmsDB, RbTaskTypeEnum.榻愬寘鍑哄簱浠诲姟, plcTaskNo);
-                                        var new_task = new wms_rbline_task()
-                                        {
-                                            Id = _id,
-                                            TaskNo = plcTaskNo,
+//                                        //鐢熸垚鍑哄簱浠诲姟
+//                                        //璁板綍浠诲姟
+//                                        var _id = Yitter.IdGenerator.YitIdHelper.NextId();
+//                                        var plcTaskNo = BusinessHelper.CreatePlcTaskId();
+//                                        plcTaskNo = MyExtendHelper.GetNewTaskNo(wmsDB, RbTaskTypeEnum.榻愬寘鍑哄簱浠诲姟, plcTaskNo);
+//                                        var new_task = new wms_rbline_task()
+//                                        {
+//                                            Id = _id,
+//                                            TaskNo = plcTaskNo,
 
-                                            Upi = stock.Upi,
-                                            Length = stock.Length,
-                                            Width = stock.Width,
-                                            Thk = stock.Thk,
+//                                            Upi = stock.Upi,
+//                                            Length = stock.Length,
+//                                            Width = stock.Width,
+//                                            Thk = stock.Thk,
 
-                                            PlanNo = stock.PlanNo,
-                                            OrderId = stock.OrderId,
-                                            PackageCode = stock.PackageCode,
-                                            PlaceCode = stock.PlaceCode,
-                                            RbTaskType = (int)RbTaskTypeEnum.榻愬寘鍑哄簱浠诲姟,
-                                            TaskStatus = (int)TaskStatusEnum.鏂板缓,
-                                            TaskMsg = "鍑哄簱浠诲姟",
+//                                            PlanNo = stock.PlanNo,
+//                                            OrderId = stock.OrderId,
+//                                            PackageCode = stock.PackageCode,
+//                                            PlaceCode = stock.PlaceCode,
+//                                            RbTaskType = (int)RbTaskTypeEnum.榻愬寘鍑哄簱浠诲姟,
+//                                            TaskStatus = (int)TaskStatusEnum.鏂板缓,
+//                                            TaskMsg = "鍑哄簱浠诲姟",
 
 
-                                            CreateTime = DateTime.Now,
-                                            CreateUserName = SysGloble.WCSSystem,
-                                            UpdateTime = DateTime.Now,
-                                            UpdateUserName = SysGloble.WCSSystem,
-                                        };
+//                                            CreateTime = DateTime.Now,
+//                                            CreateUserName = SysGloble.WCSSystem,
+//                                            UpdateTime = DateTime.Now,
+//                                            UpdateUserName = SysGloble.WCSSystem,
+//                                        };
 
-                                        wmsDB.wms_rbline_task.Add(new_task);
+//                                        wmsDB.wms_rbline_task.Add(new_task);
 
-                                        var place = StationHandler.GetPlaceByPlaceCode(stock.PlaceCode, wmsDB);
-                                        place.PlaceStatus = (int)PlaceStatusEnum.閿佸畾;
+//                                        var place = StationHandler.GetPlaceByPlaceCode(stock.PlaceCode, wmsDB);
+//                                        place.PlaceStatus = (int)PlaceStatusEnum.閿佸畾;
 
-                                        Thread.Sleep(100);
-                                    }
-                                }
-                            }
+//                                        Thread.Sleep(100);
+//                                    }
+//                                }
+//                            }
 
-                            wmsDB.SaveChanges();
-                        }
+//                            wmsDB.SaveChanges();
+//                        }
 
-                    }
-                }
-                catch (Exception ex)
-                {
-                    SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound += " 鍑虹幇寮傚父:" + ex.Message + SysGloble.SPLIT_STR;
-                    Log4NetHelper.WriteErrorLog(logType, " 鍑虹幇寮傚父锛�" + ex.Message, ex);
-                }
-            }
-        }
+//                    }
+//                }
+//                catch (Exception ex)
+//                {
+//                    SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound += " 鍑虹幇寮傚父:" + ex.Message + SysGloble.SPLIT_STR;
+//                    Log4NetHelper.WriteErrorLog(logType, " 鍑虹幇寮傚父锛�" + ex.Message, ex);
+//                }
+//            }
+//        }
 
-    }
-}
+//    }
+//}
diff --git "a/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/5\343\200\201CC_DataProcess_RobotBuffer_ForceOutbound.cs" "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/5\343\200\201CC_DataProcess_RobotBuffer_ForceOutbound.cs"
deleted file mode 100644
index 6120476..0000000
--- "a/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/5\343\200\201CC_DataProcess_RobotBuffer_ForceOutbound.cs"
+++ /dev/null
@@ -1,102 +0,0 @@
-锘縰sing Admin.NET.Application;
-using iWareCC.Common.Helper;
-using iWareCommon.Common.Globle;
-using iWareCommon.Utils;
-using iWareModel;
-using iWareSql.DataAccess;
-using iWareSql.WmsDBModel;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace iWareCC.ThreadService
-{
-    /// <summary>
-    /// 鏈哄櫒浜虹紦瀛樺矝 浜哄伐寮哄埗鍑哄簱 澶勭悊
-    /// </summary>
-    public static class CC_DataProcess_RobotBuffer_ForceOutbound
-    {
-        public static bool Handler(string packageCode, ref string alertMsg)
-        {
-            alertMsg = "";
-            LogType logType = LogType.DataProcess_RobotBuffer_AutoQiTaoOutbound;
-
-            try
-            {
-
-                var rgvLocation = StationLocationEnum.BZ39.ToString();
-                var obj = FormCC.stationView.R_StationForReadCommList.Where(x => x.StationCode == rgvLocation.ToString()).FirstOrDefault();
-                if (obj.R_ForceOutboundMode == false)
-                {
-                    alertMsg = "PLC涓嶆槸寮哄埗鍑哄簱妯″紡";
-                    return false;
-                }
-                using (WmsDBModel wmsDB = new WmsDBModel())
-                {
-                    List<wms_stock_quan> qunList = wmsDB.wms_stock_quan.Where(x => x.StockStatus == (int)StockStatusEnum.鍦ㄥ簱
-                        && x.PackageCode == packageCode
-                    ).ToList();
-
-                    foreach (var x in qunList)
-                    {
-                        x.StockStatus = (int)StockStatusEnum.浜哄伐寮哄埗寰呭嚭搴�;
-
-                        //鐢熸垚鍑哄簱浠诲姟
-                        //璁板綍浠诲姟
-                        var _id = Yitter.IdGenerator.YitIdHelper.NextId();
-                        var plcTaskNo = BusinessHelper.CreatePlcTaskId();
-                        plcTaskNo = MyExtendHelper.GetNewTaskNo(wmsDB, RbTaskTypeEnum.寮哄埗鍑哄簱浠诲姟, plcTaskNo);
-                        var new_task = new wms_rbline_task()
-                        {
-                            Id = _id,
-                            TaskNo = plcTaskNo,
-
-                            Upi = x.Upi,
-                            Length = x.Length,
-                            Width = x.Width,
-                            Thk = x.Thk,
-
-                            PlanNo = x.PlanNo,
-                            OrderId = x.OrderId,
-                            PackageCode = x.PackageCode,
-                            PlaceCode = x.PlaceCode,
-                            RbTaskType = (int)RbTaskTypeEnum.寮哄埗鍑哄簱浠诲姟,
-                            TaskStatus = (int)TaskStatusEnum.鏂板缓,
-                            TaskMsg = "浜哄伐寮哄埗寰呭嚭搴�",
-
-
-                            CreateTime = DateTime.Now,
-                            CreateUserName = SysGloble.WCSSystem,
-                            UpdateTime = DateTime.Now,
-                            UpdateUserName = SysGloble.WCSSystem,
-                        };
-
-                        wmsDB.wms_rbline_task.Add(new_task);
-
-                        var place = StationHandler.GetPlaceByPlaceCode(x.PlaceCode, wmsDB);
-                        place.PlaceStatus = (int)PlaceStatusEnum.閿佸畾;
-
-                        Thread.Sleep(100);
-                    }
-
-
-
-                    wmsDB.SaveChanges();
-                }
-
-                return true;
-
-            }
-            catch (Exception ex)
-            {
-                alertMsg = " 鍑虹幇寮傚父:" + ex.Message;
-                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound += " 鍑虹幇寮傚父:" + ex.Message + SysGloble.SPLIT_STR;
-                Log4NetHelper.WriteErrorLog(logType, " 鍑虹幇寮傚父锛�" + ex.Message, ex);
-
-                return false;
-            }
-        }
-    }
-}
diff --git "a/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/5\343\200\201DataProcess_RobotBuffer_PesonOutbound.cs" "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/5\343\200\201DataProcess_RobotBuffer_PesonOutbound.cs"
new file mode 100644
index 0000000..64d9125
--- /dev/null
+++ "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/5\343\200\201DataProcess_RobotBuffer_PesonOutbound.cs"
@@ -0,0 +1,117 @@
+锘縰sing Admin.NET.Application;
+using iWareCC.Common.Helper;
+using iWareCommon.Common.Globle;
+using iWareCommon.Utils;
+using iWareModel;
+using iWareSql.DataAccess;
+using iWareSql.WmsDBModel;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace iWareCC.ThreadService
+{
+    /// <summary>
+    /// 鏈哄櫒浜虹紦瀛樺矝 浜哄伐榻愬寘寰呭嚭搴� 澶勭悊
+    /// </summary>
+    public static class DataProcess_RobotBuffer_PesonOutbound
+    {
+        public static async void Handler()
+        {
+            var alertMsg = "";
+            LogType logType = LogType.DataProcess_RobotBuffer_AutoQiTaoOutbound;
+            while (true)
+            {
+                Thread.Sleep(2000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
+                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound = string.Empty;
+                try
+                {//SystemValue.isAllowRuning_DataProcess_RobotBuffer_AutoQiTaoOutbound && 
+                    if (SystemValue.isStartedModel)
+                    {
+
+                        var rgvLocation = StationLocationEnum.BZ39.ToString();
+                        if (FormCC.stationView == null)
+                        {
+                            SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound = $"{rgvLocation.ToString()}-鑾峰彇PLC瀵硅薄涓簄ull";
+                            continue;
+                        }
+                        var obj = FormCC.stationView.R_StationForReadCommList.Where(x => x.StationCode == rgvLocation.ToString()).FirstOrDefault();
+                        if (obj.R_OutboundMode == false)
+                        {
+                            alertMsg = "PLC涓嶆槸榻愬寘鍑哄簱妯″紡";
+                            continue;
+                        }
+                        using (WmsDBModel wmsDB = new WmsDBModel())
+                        {
+                            List<wms_stock_quan> qunList = wmsDB.wms_stock_quan.Where(x => x.StockStatus == (int)StockStatusEnum.榻愬寘寰呭嚭搴�
+                            ).OrderBy(x => x.PackageCode).ToList();
+
+                            //鎸夌収鍖呭垎缁勫鐞� 
+                            var groups = qunList.GroupBy(x => x.PackageCode);
+                            foreach (var group in groups)
+                            {
+                                //娉ㄦ剰锛氭帓搴忎弗鏍兼寜鐓� 娆″簭 杩涜鎺掑簭銆� 锛侊紒锛侊紒锛侊紒锛侊紒
+                                var stockList = group.ToList().OrderBy(x => x.Shelf).ToList();
+
+                                foreach (var x in stockList)
+                                {
+                                    x.StockStatus = (int)StockStatusEnum.浜哄伐榻愬寘鍑哄簱浠诲姟宸插垱寤�;
+                                    x.StockStatusName = StockStatusEnum.浜哄伐榻愬寘鍑哄簱浠诲姟宸插垱寤�.ToString();
+
+                                    //鐢熸垚鍑哄簱浠诲姟
+                                    //璁板綍浠诲姟
+                                    var _id = Yitter.IdGenerator.YitIdHelper.NextId();
+                                    var plcTaskNo = BusinessHelper.CreatePlcTaskId();
+                                    plcTaskNo = MyExtendHelper.GetNewTaskNo(wmsDB, RbTaskTypeEnum.榻愬寘鍑哄簱浠诲姟, plcTaskNo);
+                                    var new_task = new wms_rbline_task()
+                                    {
+                                        Id = _id,
+                                        TaskNo = plcTaskNo,
+
+                                        Upi = x.Upi,
+                                        Length = x.Length,
+                                        Width = x.Width,
+                                        Thk = x.Thk,
+
+                                        PlanNo = x.PlanNo,
+                                        OrderId = x.OrderId,
+                                        PackageCode = x.PackageCode,
+                                        PlaceCode = x.PlaceCode,
+                                        RbTaskType = (int)RbTaskTypeEnum.榻愬寘鍑哄簱浠诲姟,
+                                        TaskStatus = (int)TaskStatusEnum.鏂板缓,
+                                        TaskMsg = "榻愬寘鍑哄簱浠诲姟",
+
+
+                                        CreateTime = DateTime.Now,
+                                        CreateUserName = SysGloble.WCSSystem,
+                                        UpdateTime = DateTime.Now,
+                                        UpdateUserName = SysGloble.WCSSystem,
+                                    };
+
+                                    wmsDB.wms_rbline_task.Add(new_task);
+
+                                    var place = StationHandler.GetPlaceByPlaceCode(x.PlaceCode, wmsDB);
+                                    place.PlaceStatus = (int)PlaceStatusEnum.閿佸畾;
+
+                                    Thread.Sleep(100);
+                                }
+                            }
+
+                            wmsDB.SaveChanges();
+                        }
+
+                    }
+                }
+                catch (Exception ex)
+                {
+                    SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound += " 鍑虹幇寮傚父:" + ex.Message + SysGloble.SPLIT_STR;
+                    Log4NetHelper.WriteErrorLog(logType, " 鍑虹幇寮傚父锛�" + ex.Message, ex);
+                }
+            }
+        }
+
+    }
+}
diff --git "a/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/CC_DataProcess_RobotBuffer_ForceOutbound.cs" "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/CC_DataProcess_RobotBuffer_ForceOutbound.cs"
new file mode 100644
index 0000000..3d7c1a9
--- /dev/null
+++ "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/CC_DataProcess_RobotBuffer_ForceOutbound.cs"
@@ -0,0 +1,102 @@
+锘�//using Admin.NET.Application;
+//using iWareCC.Common.Helper;
+//using iWareCommon.Common.Globle;
+//using iWareCommon.Utils;
+//using iWareModel;
+//using iWareSql.DataAccess;
+//using iWareSql.WmsDBModel;
+//using System;
+//using System.Collections.Generic;
+//using System.Linq;
+//using System.Threading;
+//using System.Threading.Tasks;
+
+//namespace iWareCC.ThreadService
+//{
+//    /// <summary>
+//    /// 鏈哄櫒浜虹紦瀛樺矝 浜哄伐寮哄埗鍑哄簱 澶勭悊
+//    /// </summary>
+//    public static class CC_DataProcess_RobotBuffer_ForceOutbound
+//    {
+//        public static bool Handler(string packageCode, ref string alertMsg)
+//        {
+//            alertMsg = "";
+//            LogType logType = LogType.DataProcess_RobotBuffer_AutoQiTaoOutbound;
+
+//            try
+//            {
+
+//                var rgvLocation = StationLocationEnum.BZ39.ToString();
+//                var obj = FormCC.stationView.R_StationForReadCommList.Where(x => x.StationCode == rgvLocation.ToString()).FirstOrDefault();
+//                if (obj.R_ForceOutboundMode == false)
+//                {
+//                    alertMsg = "PLC涓嶆槸寮哄埗鍑哄簱妯″紡";
+//                    return false;
+//                }
+//                using (WmsDBModel wmsDB = new WmsDBModel())
+//                {
+//                    List<wms_stock_quan> qunList = wmsDB.wms_stock_quan.Where(x => x.StockStatus == (int)StockStatusEnum.鍦ㄥ簱
+//                        && x.PackageCode == packageCode
+//                    ).ToList();
+
+//                    foreach (var x in qunList)
+//                    {
+//                        x.StockStatus = (int)StockStatusEnum.浜哄伐寮哄埗寰呭嚭搴�;
+
+//                        //鐢熸垚鍑哄簱浠诲姟
+//                        //璁板綍浠诲姟
+//                        var _id = Yitter.IdGenerator.YitIdHelper.NextId();
+//                        var plcTaskNo = BusinessHelper.CreatePlcTaskId();
+//                        plcTaskNo = MyExtendHelper.GetNewTaskNo(wmsDB, RbTaskTypeEnum.寮哄埗鍑哄簱浠诲姟, plcTaskNo);
+//                        var new_task = new wms_rbline_task()
+//                        {
+//                            Id = _id,
+//                            TaskNo = plcTaskNo,
+
+//                            Upi = x.Upi,
+//                            Length = x.Length,
+//                            Width = x.Width,
+//                            Thk = x.Thk,
+
+//                            PlanNo = x.PlanNo,
+//                            OrderId = x.OrderId,
+//                            PackageCode = x.PackageCode,
+//                            PlaceCode = x.PlaceCode,
+//                            RbTaskType = (int)RbTaskTypeEnum.寮哄埗鍑哄簱浠诲姟,
+//                            TaskStatus = (int)TaskStatusEnum.鏂板缓,
+//                            TaskMsg = "浜哄伐寮哄埗寰呭嚭搴�",
+
+
+//                            CreateTime = DateTime.Now,
+//                            CreateUserName = SysGloble.WCSSystem,
+//                            UpdateTime = DateTime.Now,
+//                            UpdateUserName = SysGloble.WCSSystem,
+//                        };
+
+//                        wmsDB.wms_rbline_task.Add(new_task);
+
+//                        var place = StationHandler.GetPlaceByPlaceCode(x.PlaceCode, wmsDB);
+//                        place.PlaceStatus = (int)PlaceStatusEnum.閿佸畾;
+
+//                        Thread.Sleep(100);
+//                    }
+
+
+
+//                    wmsDB.SaveChanges();
+//                }
+
+//                return true;
+
+//            }
+//            catch (Exception ex)
+//            {
+//                alertMsg = " 鍑虹幇寮傚父:" + ex.Message;
+//                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound += " 鍑虹幇寮傚父:" + ex.Message + SysGloble.SPLIT_STR;
+//                Log4NetHelper.WriteErrorLog(logType, " 鍑虹幇寮傚父锛�" + ex.Message, ex);
+
+//                return false;
+//            }
+//        }
+//    }
+//}
diff --git a/CC/iWareCC_ASRS/WCF/CCWcfService.cs b/CC/iWareCC_ASRS/WCF/CCWcfService.cs
index a67adc4..3bbca78 100644
--- a/CC/iWareCC_ASRS/WCF/CCWcfService.cs
+++ b/CC/iWareCC_ASRS/WCF/CCWcfService.cs
@@ -61,6 +61,37 @@
         }
 
 
-
+        /// <summary>
+        /// 楠岃瘉妯″紡
+        /// </summary>
+        /// <param name="flag"></param>
+        /// <returns></returns>
+        public FunRetEntity ValidateMode(int flag)
+        {
+            try
+            {
+                var rgvLocation = StationLocationEnum.BZ39.ToString();
+                var obj = FormCC.stationView.R_StationForReadCommList.Where(x => x.StationCode == rgvLocation.ToString()).FirstOrDefault();
+                if (flag == 1)
+                {//瑕佸己鍒跺嚭搴�
+                    if (obj.R_ForceOutboundMode == false)
+                    {
+                        return FunRetEntity.Fail("PLC涓嶆槸寮哄埗鍑哄簱妯″紡");
+                    }
+                }
+                else
+                {
+                    if (obj.R_OutboundMode == false)
+                    {
+                        return FunRetEntity.Fail("PLC涓嶆槸鍑哄簱妯″紡");
+                    }
+                }
+                return FunRetEntity.Success("鎴愬姛", "");
+            }
+            catch (Exception ex)
+            {
+                return FunRetEntity.Fail("寮傚父:" + ex.Message);
+            }
+        }
     }
 }
diff --git a/CC/iWareCC_ASRS/WCF/ICCWcfService.cs b/CC/iWareCC_ASRS/WCF/ICCWcfService.cs
index 4f8afb7..9078cba 100644
--- a/CC/iWareCC_ASRS/WCF/ICCWcfService.cs
+++ b/CC/iWareCC_ASRS/WCF/ICCWcfService.cs
@@ -31,7 +31,13 @@
         /// <returns></returns>
         [OperationContract]
         FunRetEntity WriteStation_AllowIn();
-
+        /// <summary>
+        /// 楠岃瘉妯″紡
+        /// </summary>
+        /// <param name="flag"></param>
+        /// <returns></returns>
+        [OperationContract]
+        FunRetEntity ValidateMode(int flag);
 
     }
 }
diff --git a/CC/iWareCC_ASRS/iWareCC.csproj b/CC/iWareCC_ASRS/iWareCC.csproj
index af7b640..1a8e151 100644
--- a/CC/iWareCC_ASRS/iWareCC.csproj
+++ b/CC/iWareCC_ASRS/iWareCC.csproj
@@ -165,8 +165,9 @@
     <Compile Include="ThreadService\01_BZ01宸ヤ綅锛堟竻鐏帮紝娲楁澘鍚庡伐浣嶏級\DataProcess_BZ01.cs" />
     <Compile Include="ThreadService\02_BZ39宸ヤ綅锛堣ˉ鏉垮悗宸ヤ綅锛塡DataProcess_RobotBuffer_ModeChange.cs" />
     <Compile Include="ThreadService\02_BZ39宸ヤ綅锛堣ˉ鏉垮悗宸ヤ綅锛塡Inbound\2銆丏ataProcess_BZ39_IssueInboundTask.cs" />
+    <Compile Include="ThreadService\02_BZ39宸ヤ綅锛堣ˉ鏉垮悗宸ヤ綅锛塡Outbound\5銆丏ataProcess_RobotBuffer_PesonOutbound.cs" />
     <Compile Include="ThreadService\02_BZ39宸ヤ綅锛堣ˉ鏉垮悗宸ヤ綅锛塡Outbound\4銆丏ataProcess_RobotBuffer_ForceOutbound.cs" />
-    <Compile Include="ThreadService\02_BZ39宸ヤ綅锛堣ˉ鏉垮悗宸ヤ綅锛塡Outbound\5銆丆C_DataProcess_RobotBuffer_ForceOutbound.cs" />
+    <Compile Include="ThreadService\02_BZ39宸ヤ綅锛堣ˉ鏉垮悗宸ヤ綅锛塡Outbound\CC_DataProcess_RobotBuffer_ForceOutbound.cs" />
     <Compile Include="ThreadService\02_BZ39宸ヤ綅锛堣ˉ鏉垮悗宸ヤ綅锛塡Outbound\2銆丏ataProcess_RobotBuffer_IssueOutboundTask.cs" />
     <Compile Include="ThreadService\02_BZ39宸ヤ綅锛堣ˉ鏉垮悗宸ヤ綅锛塡Outbound\1銆丏ataProcess_RobotBuffer_AutoQiTaoOutbound.cs" />
     <Compile Include="ThreadService\02_BZ39宸ヤ綅锛堣ˉ鏉垮悗宸ヤ綅锛塡Outbound\3銆丏ataProcess_RobotBuffer_FinishTaskForOutbound.cs" />
diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Connected Services/CCWcfService/Reference.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Connected Services/CCWcfService/Reference.cs
index 81e9aee..26a3cc8 100644
--- a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Connected Services/CCWcfService/Reference.cs
+++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Connected Services/CCWcfService/Reference.cs
@@ -74,6 +74,9 @@
         
         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ICCWcfService/WriteStation_AllowIn", ReplyAction="http://tempuri.org/ICCWcfService/WriteStation_AllowInResponse")]
         System.Threading.Tasks.Task<CCWcfService.FunRetEntity> WriteStation_AllowInAsync();
+        
+        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ICCWcfService/ValidateMode", ReplyAction="http://tempuri.org/ICCWcfService/ValidateModeResponse")]
+        System.Threading.Tasks.Task<CCWcfService.FunRetEntity> ValidateModeAsync(int flag);
     }
     
     [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
@@ -136,6 +139,11 @@
             return base.Channel.WriteStation_AllowInAsync();
         }
         
+        public System.Threading.Tasks.Task<CCWcfService.FunRetEntity> ValidateModeAsync(int flag)
+        {
+            return base.Channel.ValidateModeAsync(flag);
+        }
+        
         public virtual System.Threading.Tasks.Task OpenAsync()
         {
             return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndOpen));
diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOperationTask/WmsOperationTaskService.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOperationTask/WmsOperationTaskService.cs
index d61602b..831130c 100644
--- a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOperationTask/WmsOperationTaskService.cs
+++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOperationTask/WmsOperationTaskService.cs
@@ -9,6 +9,7 @@
 using Admin.NET.Application.Service.WmsTask.WmsRbLineTask.Dto;
 using Furion.DatabaseAccessor;
 using Admin.NET.Application.Service.WmsCommonnQuery.Dto;
+using Admin.NET.Application.CommonHelper;
 
 namespace Admin.NET.Application;
 /// <summary>
@@ -102,6 +103,14 @@
             updateQuanList.AddRange(quanList);
         }
 
+        //妯″紡鍒ゆ柇
+        var client = await WCFServiceHelper.GetWCFService_SAPCC_Client(_sysConfigRep);
+        var res = await client.ValidateModeAsync(1);
+        if (res.result == false)
+        {
+            throw Oops.Oh(res.resMsg);
+        }
+
         await _wmsStockQuanRep.UpdateRangeAsync(updateQuanList);
 
     }
@@ -152,6 +161,14 @@
             updateQuanList.AddRange(quanList);
         }
 
+        //妯″紡鍒ゆ柇
+        var client = await WCFServiceHelper.GetWCFService_SAPCC_Client(_sysConfigRep);
+        var res = await client.ValidateModeAsync(2);
+        if (res.result == false)
+        {
+            throw Oops.Oh(res.resMsg);
+        }
+
         await _wmsStockQuanRep.UpdateRangeAsync(updateQuanList);
 
     }

--
Gitblit v1.9.3