From 272ea6040258a7adfc807123036378915860fb90 Mon Sep 17 00:00:00 2001
From: zongzhibin <zongzhibin@weben-smart.com>
Date: 周日, 24 11月 2024 14:23:31 +0800
Subject: [PATCH] add

---
 CC/iWareSql/DataAccess/TaskHandler.cs                                                                      |   16 
 CC/iWareCommon/log4net_iWare.config                                                                        |   48 +-
 SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs                                           |   11 
 CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/DataProcess_RobotBuffer_ModeChange.cs                       |   79 ++-
 LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Configuration/Database.json                              |    6 
 CC/iWareCC_ASRS/WmsTask/MainTaskDecompose_ZPRK.cs                                                          |    2 
 CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Outbound/4、DataProcess_RobotBuffer_ForceOutbound.cs         |  102 ++++
 CC/iWareCC_ASRS/FormCC.cs                                                                                  |  114 ++---
 CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Inbound/2、DataProcess_RobotBuffer_FinishTask.cs             |    3 
 CC/iWareCC_ASRS/WmsTask/Place1014To1020Task.cs                                                             |   20 
 SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvComm.cs                                                  |   54 --
 CC/iWareCC_ASRS/Connected Services/StationService/StationService.wsdl                                      |   19 
 SDA/iWareSda/Devices/4-Station/StationModel/Station_CacheEntity.cs                                         |    5 
 CC/iWareCC_ASRS/FormCC.Designer.cs                                                                         |  214 ++++++---
 LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/mes_BatchOrderUPI_New/index.vue                        |    2 
 CC/iWareCC_ASRS/Connected Services/StationService/item3.xsd                                                |    9 
 CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs                                             |   60 ++
 SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs                                               |   79 +++
 CC/iWareCC_ASRS/Forms/SystemCheckForm.cs                                                                   |    2 
 CC/iWareUnitTest/App.config                                                                                |    3 
 CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Outbound/1、DataProcess_RobotBuffer_AutoQiTaoOutbound.cs     |  115 ++--
 CC/iWareCommon/BusinessHelper/BusinessHelper.cs                                                            |    2 
 CC/iWareUnitTest/Task_UnitTest.cs                                                                          |   10 
 CC/iWareCC_ASRS/Common/SystemWarningMsg.cs                                                                 |    6 
 SDA/iWareSda/Devices/4-Station/StationService/StationService.cs                                            |   33 +
 CC/iWareCC_ASRS/ThreadService/01_BZ01工位(清灰,洗板后工位)/DataProcess_BZ01.cs                                      |    2 
 CC/iWareCC_ASRS/WmsTask/EmptySalverTransferTask.cs                                                         |   34 
 CC/iWareCommon/Utils/Log4Net/LogType.cs                                                                    |    6 
 CC/iWareCC_ASRS/Common/SystemValue.cs                                                                      |    6 
 CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd                                                |   26 
 CC/iWareCC_ASRS/DeviceThreadFactory/DeviceThreadService/RgvThreadService/RgvTaskThreadService.cs           |    2 
 SDA/iWareSda/App.config                                                                                    |    4 
 CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Inbound/1、DataProcess_BZ39.cs                               |   10 
 CC/iWareSql/DataAccess/StationHandlerV2.cs                                                                 |    8 
 CC/iWareCC_ASRS/ThreadService/00_269工位/DataProcess_269.cs                                                  |    2 
 CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Outbound/2、DataProcess_RobotBuffer_IssueOutboundTask.cs     |  147 +++---
 CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Outbound/3、DataProcess_RobotBuffer_FinishTaskForOutbound.cs |    2 
 CC/iWareCC_ASRS/iWareCC.csproj                                                                             |    1 
 38 files changed, 812 insertions(+), 452 deletions(-)

diff --git a/CC/iWareCC_ASRS/Common/SystemValue.cs b/CC/iWareCC_ASRS/Common/SystemValue.cs
index 1b495dd..43dc6bd 100644
--- a/CC/iWareCC_ASRS/Common/SystemValue.cs
+++ b/CC/iWareCC_ASRS/Common/SystemValue.cs
@@ -132,7 +132,7 @@
         /// <summary>
         /// 鏄惁鍏佽鎵ц 浠诲姟鍒嗚В绾跨▼-缁勭洏鍏ュ簱
         /// </summary>
-        public static bool isAllowRuning_MainTaskDecompose_ZPRK = false;
+        public static bool isAllowRuning_DataProcess_RobotBuffer_ModeChange = false;
 
         /// <summary>
         /// 鏄惁鍏佽鎵ц 鍫嗗灈鏈哄叆鍙f壂鐮佹娴嬬嚎绋�
@@ -149,12 +149,12 @@
         /// <summary>
         /// 鏄惁鍏佽鎵ц AGV绾跨▼
         /// </summary>
-        public static bool isAllowRuning_Agv = false;
+        public static bool isAllowRuning_DataProcess_RobotBuffer_AutoQiTaoOutbound = false;
 
         /// <summary>
         /// 鏄惁鍏佽鎵ц 绌烘墭杞繍绾跨▼
         /// </summary>
-        public static bool isAllowRuning_EmptySalverTransfer = false;
+        public static bool isAllowRuning_DataProcess_RobotBuffer_IssueOutboundTask = false;
 
         /// <summary>
         /// 鏄惁鍏佽鎵ц 鑷姩缁勭洏浠诲姟
diff --git a/CC/iWareCC_ASRS/Common/SystemWarningMsg.cs b/CC/iWareCC_ASRS/Common/SystemWarningMsg.cs
index 2121757..0387ee2 100644
--- a/CC/iWareCC_ASRS/Common/SystemWarningMsg.cs
+++ b/CC/iWareCC_ASRS/Common/SystemWarningMsg.cs
@@ -63,7 +63,7 @@
         /// <summary>
         /// RGV浠诲姟瀹屾垚纭鐨勮鍛婃秷鎭�
         /// </summary>
-        public static string _lbl_Alert_RgvReleaseFinish = string.Empty;
+        public static string _lbl_Alert_DataProcess_RobotBuffer_ModeChange = string.Empty;
 
         /// <summary>
         /// RGV浠诲姟瀹屾垚纭鐨勮鍛婃秷鎭紙琛ュ伩锛�
@@ -111,7 +111,7 @@
         /// <summary>
         /// 绌烘墭鐩樿浆杩� 鐨勮鍛婃秷鎭�
         /// </summary>
-        public static string _lbl_Alert_EmptySalverTransfer = string.Empty;
+        public static string _lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound = string.Empty;
 
 
         /// <summary>
@@ -137,7 +137,7 @@
         /// <summary>
         /// 1014鍒�1020 鐨勮鍛婃秷鎭�
         /// </summary>
-        public static string _lbl_Alert_Place1014To1020TaskTask = string.Empty;
+        public static string _lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = string.Empty;
 
         /// <summary>
         /// 鍑哄簱浠诲姟閫氱煡MES 鐨勮鍛婃秷鎭�
diff --git a/CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs b/CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs
index 4c79d93..15f96cd 100644
--- a/CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs
+++ b/CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs
@@ -194,6 +194,9 @@
         private short R_DestinationField;
         
         [System.Runtime.Serialization.OptionalFieldAttribute()]
+        private bool R_ForceOutboundModeField;
+        
+        [System.Runtime.Serialization.OptionalFieldAttribute()]
         private bool R_InboundFinishField;
         
         [System.Runtime.Serialization.OptionalFieldAttribute()]
@@ -302,6 +305,19 @@
                 if ((this.R_DestinationField.Equals(value) != true)) {
                     this.R_DestinationField = value;
                     this.RaisePropertyChanged("R_Destination");
+                }
+            }
+        }
+        
+        [System.Runtime.Serialization.DataMemberAttribute()]
+        public bool R_ForceOutboundMode {
+            get {
+                return this.R_ForceOutboundModeField;
+            }
+            set {
+                if ((this.R_ForceOutboundModeField.Equals(value) != true)) {
+                    this.R_ForceOutboundModeField = value;
+                    this.RaisePropertyChanged("R_ForceOutboundMode");
                 }
             }
         }
@@ -562,7 +578,7 @@
         private int W_Destination_InField;
         
         [System.Runtime.Serialization.OptionalFieldAttribute()]
-        private string W_Destination_OutField;
+        private int W_Destination_OutField;
         
         [System.Runtime.Serialization.OptionalFieldAttribute()]
         private bool W_EndMarkField;
@@ -574,7 +590,7 @@
         private bool W_InboundFinishConfirmField;
         
         [System.Runtime.Serialization.OptionalFieldAttribute()]
-        private int W_Inbound_TaskIDField;
+        private short W_Inbound_TaskIDField;
         
         [System.Runtime.Serialization.OptionalFieldAttribute()]
         private bool W_IsRotateField;
@@ -586,10 +602,13 @@
         private short W_LengthField;
         
         [System.Runtime.Serialization.OptionalFieldAttribute()]
+        private short W_ModeField;
+        
+        [System.Runtime.Serialization.OptionalFieldAttribute()]
         private bool W_OutboundFinishConfirmField;
         
         [System.Runtime.Serialization.OptionalFieldAttribute()]
-        private int W_Outbound_TaskIDField;
+        private short W_Outbound_TaskIDField;
         
         [System.Runtime.Serialization.OptionalFieldAttribute()]
         private string W_PackageLengthField;
@@ -703,12 +722,12 @@
         }
         
         [System.Runtime.Serialization.DataMemberAttribute()]
-        public string W_Destination_Out {
+        public int W_Destination_Out {
             get {
                 return this.W_Destination_OutField;
             }
             set {
-                if ((object.ReferenceEquals(this.W_Destination_OutField, value) != true)) {
+                if ((this.W_Destination_OutField.Equals(value) != true)) {
                     this.W_Destination_OutField = value;
                     this.RaisePropertyChanged("W_Destination_Out");
                 }
@@ -755,7 +774,7 @@
         }
         
         [System.Runtime.Serialization.DataMemberAttribute()]
-        public int W_Inbound_TaskID {
+        public short W_Inbound_TaskID {
             get {
                 return this.W_Inbound_TaskIDField;
             }
@@ -807,6 +826,19 @@
         }
         
         [System.Runtime.Serialization.DataMemberAttribute()]
+        public short W_Mode {
+            get {
+                return this.W_ModeField;
+            }
+            set {
+                if ((this.W_ModeField.Equals(value) != true)) {
+                    this.W_ModeField = value;
+                    this.RaisePropertyChanged("W_Mode");
+                }
+            }
+        }
+        
+        [System.Runtime.Serialization.DataMemberAttribute()]
         public bool W_OutboundFinishConfirm {
             get {
                 return this.W_OutboundFinishConfirmField;
@@ -820,7 +852,7 @@
         }
         
         [System.Runtime.Serialization.DataMemberAttribute()]
-        public int W_Outbound_TaskID {
+        public short W_Outbound_TaskID {
             get {
                 return this.W_Outbound_TaskIDField;
             }
@@ -1687,6 +1719,12 @@
         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/OutboundFinishConfirm", ReplyAction="http://tempuri.org/IStationService/OutboundFinishConfirmResponse")]
         System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> OutboundFinishConfirmAsync(int deviceId, bool value, string stationCode);
         
+        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/ChangeMode", ReplyAction="http://tempuri.org/IStationService/ChangeModeResponse")]
+        iWareCC.StationService.SdaResEntity ChangeMode(int deviceId, int value, string stationCode);
+        
+        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/ChangeMode", ReplyAction="http://tempuri.org/IStationService/ChangeModeResponse")]
+        System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> ChangeModeAsync(int deviceId, int value, string stationCode);
+        
         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/WriteInStoreTaskInfo", ReplyAction="http://tempuri.org/IStationService/WriteInStoreTaskInfoResponse")]
         iWareCC.StationService.SdaResEntity WriteInStoreTaskInfo(int deviceId, string stationCode, string toPlaceNo, short length, short width, short height, int inbound_TaskID);
         
@@ -1853,6 +1891,14 @@
             return base.Channel.OutboundFinishConfirmAsync(deviceId, value, stationCode);
         }
         
+        public iWareCC.StationService.SdaResEntity ChangeMode(int deviceId, int value, string stationCode) {
+            return base.Channel.ChangeMode(deviceId, value, stationCode);
+        }
+        
+        public System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> ChangeModeAsync(int deviceId, int value, string stationCode) {
+            return base.Channel.ChangeModeAsync(deviceId, value, stationCode);
+        }
+        
         public iWareCC.StationService.SdaResEntity WriteInStoreTaskInfo(int deviceId, string stationCode, string toPlaceNo, short length, short width, short height, int inbound_TaskID) {
             return base.Channel.WriteInStoreTaskInfo(deviceId, stationCode, toPlaceNo, length, width, height, inbound_TaskID);
         }
diff --git a/CC/iWareCC_ASRS/Connected Services/StationService/StationService.wsdl b/CC/iWareCC_ASRS/Connected Services/StationService/StationService.wsdl
index 3b9e7fb..68448b7 100644
--- a/CC/iWareCC_ASRS/Connected Services/StationService/StationService.wsdl
+++ b/CC/iWareCC_ASRS/Connected Services/StationService/StationService.wsdl
@@ -81,6 +81,12 @@
   <wsdl:message name="IStationService_OutboundFinishConfirm_OutputMessage">
     <wsdl:part name="parameters" element="tns:OutboundFinishConfirmResponse" />
   </wsdl:message>
+  <wsdl:message name="IStationService_ChangeMode_InputMessage">
+    <wsdl:part name="parameters" element="tns:ChangeMode" />
+  </wsdl:message>
+  <wsdl:message name="IStationService_ChangeMode_OutputMessage">
+    <wsdl:part name="parameters" element="tns:ChangeModeResponse" />
+  </wsdl:message>
   <wsdl:message name="IStationService_WriteInStoreTaskInfo_InputMessage">
     <wsdl:part name="parameters" element="tns:WriteInStoreTaskInfo" />
   </wsdl:message>
@@ -171,6 +177,10 @@
     <wsdl:operation name="OutboundFinishConfirm">
       <wsdl:input wsaw:Action="http://tempuri.org/IStationService/OutboundFinishConfirm" message="tns:IStationService_OutboundFinishConfirm_InputMessage" />
       <wsdl:output wsaw:Action="http://tempuri.org/IStationService/OutboundFinishConfirmResponse" message="tns:IStationService_OutboundFinishConfirm_OutputMessage" />
+    </wsdl:operation>
+    <wsdl:operation name="ChangeMode">
+      <wsdl:input wsaw:Action="http://tempuri.org/IStationService/ChangeMode" message="tns:IStationService_ChangeMode_InputMessage" />
+      <wsdl:output wsaw:Action="http://tempuri.org/IStationService/ChangeModeResponse" message="tns:IStationService_ChangeMode_OutputMessage" />
     </wsdl:operation>
     <wsdl:operation name="WriteInStoreTaskInfo">
       <wsdl:input wsaw:Action="http://tempuri.org/IStationService/WriteInStoreTaskInfo" message="tns:IStationService_WriteInStoreTaskInfo_InputMessage" />
@@ -311,6 +321,15 @@
         <soap:body use="literal" />
       </wsdl:output>
     </wsdl:operation>
+    <wsdl:operation name="ChangeMode">
+      <soap:operation soapAction="http://tempuri.org/IStationService/ChangeMode" style="document" />
+      <wsdl:input>
+        <soap:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
     <wsdl:operation name="WriteInStoreTaskInfo">
       <soap:operation soapAction="http://tempuri.org/IStationService/WriteInStoreTaskInfo" style="document" />
       <wsdl:input>
diff --git a/CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd b/CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd
index b096074..c0d973c 100644
--- a/CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd
+++ b/CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd
@@ -187,6 +187,22 @@
       </xs:sequence>
     </xs:complexType>
   </xs:element>
+  <xs:element name="ChangeMode">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element minOccurs="0" name="deviceId" type="xs:int" />
+        <xs:element minOccurs="0" name="value" type="xs:int" />
+        <xs:element minOccurs="0" name="stationCode" nillable="true" type="xs:string" />
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="ChangeModeResponse">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element xmlns:q13="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="ChangeModeResult" nillable="true" type="q13:SdaResEntity" />
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
   <xs:element name="WriteInStoreTaskInfo">
     <xs:complexType>
       <xs:sequence>
@@ -203,7 +219,7 @@
   <xs:element name="WriteInStoreTaskInfoResponse">
     <xs:complexType>
       <xs:sequence>
-        <xs:element xmlns:q13="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteInStoreTaskInfoResult" nillable="true" type="q13:SdaResEntity" />
+        <xs:element xmlns:q14="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteInStoreTaskInfoResult" nillable="true" type="q14:SdaResEntity" />
       </xs:sequence>
     </xs:complexType>
   </xs:element>
@@ -220,7 +236,7 @@
   <xs:element name="WriteOutStoreTaskInfoResponse">
     <xs:complexType>
       <xs:sequence>
-        <xs:element xmlns:q14="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteOutStoreTaskInfoResult" nillable="true" type="q14:SdaResEntity" />
+        <xs:element xmlns:q15="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteOutStoreTaskInfoResult" nillable="true" type="q15:SdaResEntity" />
       </xs:sequence>
     </xs:complexType>
   </xs:element>
@@ -276,7 +292,7 @@
   <xs:element name="WriteStation_FinishACKResponse">
     <xs:complexType>
       <xs:sequence>
-        <xs:element xmlns:q17="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_FinishACKResult" nillable="true" type="q17:SdaResEntity" />
+        <xs:element xmlns:q16="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_FinishACKResult" nillable="true" type="q16:SdaResEntity" />
       </xs:sequence>
     </xs:complexType>
   </xs:element>
@@ -294,7 +310,7 @@
   <xs:element name="WriteScanValidateACKResponse">
     <xs:complexType>
       <xs:sequence>
-        <xs:element xmlns:q18="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteScanValidateACKResult" nillable="true" type="q18:SdaResEntity" />
+        <xs:element xmlns:q16="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteScanValidateACKResult" nillable="true" type="q16:SdaResEntity" />
       </xs:sequence>
     </xs:complexType>
   </xs:element>
@@ -312,7 +328,7 @@
   <xs:element name="WriteStation_XigangGetDataForOutResponse">
     <xs:complexType>
       <xs:sequence>
-        <xs:element xmlns:q19="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_XigangGetDataForOutResult" nillable="true" type="q19:SdaResEntity" />
+        <xs:element xmlns:q18="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_XigangGetDataForOutResult" nillable="true" type="q18:SdaResEntity" />
       </xs:sequence>
     </xs:complexType>
   </xs:element>
diff --git a/CC/iWareCC_ASRS/Connected Services/StationService/item3.xsd b/CC/iWareCC_ASRS/Connected Services/StationService/item3.xsd
index ca24714..62271f4 100644
--- a/CC/iWareCC_ASRS/Connected Services/StationService/item3.xsd
+++ b/CC/iWareCC_ASRS/Connected Services/StationService/item3.xsd
@@ -12,6 +12,7 @@
       <xs:element minOccurs="0" name="R_AlarmCode" type="xs:short" />
       <xs:element minOccurs="0" name="R_AlarmCodeMsg" nillable="true" type="xs:string" />
       <xs:element minOccurs="0" name="R_Destination" type="xs:short" />
+      <xs:element minOccurs="0" name="R_ForceOutboundMode" type="xs:boolean" />
       <xs:element minOccurs="0" name="R_InboundFinish" type="xs:boolean" />
       <xs:element minOccurs="0" name="R_InboundNumber" nillable="true" type="xs:string" />
       <xs:element minOccurs="0" name="R_Inbound_TaskID" type="xs:short" />
@@ -45,16 +46,16 @@
       <xs:element minOccurs="0" name="W_CartonWidth" nillable="true" type="xs:string" />
       <xs:element minOccurs="0" name="W_DataFinish" type="xs:boolean" />
       <xs:element minOccurs="0" name="W_Destination_In" type="xs:int" />
-      <xs:element minOccurs="0" name="W_Destination_Out" nillable="true" type="xs:string" />
-      <xs:element minOccurs="0" name="W_EndMark" type="xs:boolean" />
+      <xs:element minOccurs="0" name="W_Destination_Out" type="xs:int" />
       <xs:element minOccurs="0" name="W_Height" type="xs:short" />
       <xs:element minOccurs="0" name="W_InboundFinishConfirm" type="xs:boolean" />
-      <xs:element minOccurs="0" name="W_Inbound_TaskID" type="xs:int" />
+      <xs:element minOccurs="0" name="W_Inbound_TaskID" type="xs:short" />
       <xs:element minOccurs="0" name="W_IsRotate" type="xs:boolean" />
       <xs:element minOccurs="0" name="W_KittingInfo" type="xs:short" />
       <xs:element minOccurs="0" name="W_Length" type="xs:short" />
+      <xs:element minOccurs="0" name="W_Mode" type="xs:short" />
       <xs:element minOccurs="0" name="W_OutboundFinishConfirm" type="xs:boolean" />
-      <xs:element minOccurs="0" name="W_Outbound_TaskID" type="xs:int" />
+      <xs:element minOccurs="0" name="W_Outbound_TaskID" type="xs:short" />
       <xs:element minOccurs="0" name="W_PackageLength" nillable="true" type="xs:string" />
       <xs:element minOccurs="0" name="W_PackageWidth" nillable="true" type="xs:string" />
       <xs:element minOccurs="0" name="W_PalletizingPlaceX" type="xs:short" />
diff --git a/CC/iWareCC_ASRS/DeviceThreadFactory/DeviceThreadService/RgvThreadService/RgvTaskThreadService.cs b/CC/iWareCC_ASRS/DeviceThreadFactory/DeviceThreadService/RgvThreadService/RgvTaskThreadService.cs
index 2442caa..aa477b0 100644
--- a/CC/iWareCC_ASRS/DeviceThreadFactory/DeviceThreadService/RgvThreadService/RgvTaskThreadService.cs
+++ b/CC/iWareCC_ASRS/DeviceThreadFactory/DeviceThreadService/RgvThreadService/RgvTaskThreadService.cs
@@ -536,7 +536,7 @@
                 {
                     ConfirmFinishTaskHandle(i_deviceId, out errMsg);
                 }
-                SystemWarningMsg._lbl_Alert_RgvReleaseFinish = errMsg;
+                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange = errMsg;
                 Thread.Sleep(2000);
             }
 
diff --git a/CC/iWareCC_ASRS/FormCC.Designer.cs b/CC/iWareCC_ASRS/FormCC.Designer.cs
index b67fa92..47ff185 100644
--- a/CC/iWareCC_ASRS/FormCC.Designer.cs
+++ b/CC/iWareCC_ASRS/FormCC.Designer.cs
@@ -236,12 +236,12 @@
             this.checkBox_OutTaskRetryToMes = new System.Windows.Forms.CheckBox();
             this.lbl_Alert_DataProcess_RobotBuffer_FinishTaskForOutbound = new System.Windows.Forms.Label();
             this.checkBox_DataProcess_RobotBuffer_FinishTaskForOutbound = new System.Windows.Forms.CheckBox();
-            this.lbl_MainTaskDecompose_ZPRK = new System.Windows.Forms.Label();
-            this.ckMainTaskDecompose_ZPRK = new System.Windows.Forms.CheckBox();
-            this.lbl_Alert_Agv = new System.Windows.Forms.Label();
-            this.ckAgv = new System.Windows.Forms.CheckBox();
-            this.lbl_Alert_Place1014ClearStoreTask = new System.Windows.Forms.Label();
-            this.ckPlace1014ClearStoreTask = new System.Windows.Forms.CheckBox();
+            this.lbl_DataProcess_RobotBuffer_ModeChange = new System.Windows.Forms.Label();
+            this.ck_DataProcess_RobotBuffer_ModeChange = new System.Windows.Forms.CheckBox();
+            this.lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound = new System.Windows.Forms.Label();
+            this.ckDataProcess_RobotBuffer_AutoQiTaoOutbound = new System.Windows.Forms.CheckBox();
+            this.lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = new System.Windows.Forms.Label();
+            this.ck_DataProcess_RobotBuffer_IssueOutboundTask = new System.Windows.Forms.CheckBox();
             this.lbl_Alert_EmptySalverTransfer = new System.Windows.Forms.Label();
             this.ckEmptySalverTransfer = new System.Windows.Forms.CheckBox();
             this.lbl_MainTaskDecompose = new System.Windows.Forms.Label();
@@ -469,6 +469,11 @@
             this.dataGridViewTextBoxColumn62 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.dataGridViewTextBoxColumn63 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.btn_Find_OutTaskRetryToMes = new System.Windows.Forms.Button();
+            this.lbl_RobotMode = new System.Windows.Forms.Label();
+            this.tb_PackageCode = new System.Windows.Forms.TextBox();
+            this.label23 = new System.Windows.Forms.Label();
+            this.button24 = new System.Windows.Forms.Button();
+            this.lbl_currHandlerPackageCodeForIssueOutboundTask = new System.Windows.Forms.Label();
             this.tPTransAsrs.SuspendLayout();
             this.panel14.SuspendLayout();
             this.panel15.SuspendLayout();
@@ -2800,6 +2805,8 @@
             // 
             // panel_Model
             // 
+            this.panel_Model.Controls.Add(this.lbl_currHandlerPackageCodeForIssueOutboundTask);
+            this.panel_Model.Controls.Add(this.lbl_RobotMode);
             this.panel_Model.Controls.Add(this.rBOnlyIn);
             this.panel_Model.Controls.Add(this.lbl_IsSimulationPLC);
             this.panel_Model.Controls.Add(this.lbl_WCFMsg);
@@ -2983,12 +2990,12 @@
             this.groupBox1.Controls.Add(this.checkBox_OutTaskRetryToMes);
             this.groupBox1.Controls.Add(this.lbl_Alert_DataProcess_RobotBuffer_FinishTaskForOutbound);
             this.groupBox1.Controls.Add(this.checkBox_DataProcess_RobotBuffer_FinishTaskForOutbound);
-            this.groupBox1.Controls.Add(this.lbl_MainTaskDecompose_ZPRK);
-            this.groupBox1.Controls.Add(this.ckMainTaskDecompose_ZPRK);
-            this.groupBox1.Controls.Add(this.lbl_Alert_Agv);
-            this.groupBox1.Controls.Add(this.ckAgv);
-            this.groupBox1.Controls.Add(this.lbl_Alert_Place1014ClearStoreTask);
-            this.groupBox1.Controls.Add(this.ckPlace1014ClearStoreTask);
+            this.groupBox1.Controls.Add(this.lbl_DataProcess_RobotBuffer_ModeChange);
+            this.groupBox1.Controls.Add(this.ck_DataProcess_RobotBuffer_ModeChange);
+            this.groupBox1.Controls.Add(this.lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound);
+            this.groupBox1.Controls.Add(this.ckDataProcess_RobotBuffer_AutoQiTaoOutbound);
+            this.groupBox1.Controls.Add(this.lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask);
+            this.groupBox1.Controls.Add(this.ck_DataProcess_RobotBuffer_IssueOutboundTask);
             this.groupBox1.Controls.Add(this.lbl_Alert_EmptySalverTransfer);
             this.groupBox1.Controls.Add(this.ckEmptySalverTransfer);
             this.groupBox1.Controls.Add(this.lbl_MainTaskDecompose);
@@ -3189,74 +3196,75 @@
             this.checkBox_DataProcess_RobotBuffer_FinishTaskForOutbound.UseVisualStyleBackColor = true;
             this.checkBox_DataProcess_RobotBuffer_FinishTaskForOutbound.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged);
             // 
-            // lbl_MainTaskDecompose_ZPRK
+            // lbl_DataProcess_RobotBuffer_ModeChange
             // 
-            this.lbl_MainTaskDecompose_ZPRK.AutoSize = true;
-            this.lbl_MainTaskDecompose_ZPRK.BackColor = System.Drawing.Color.White;
-            this.lbl_MainTaskDecompose_ZPRK.ForeColor = System.Drawing.Color.Red;
-            this.lbl_MainTaskDecompose_ZPRK.Location = new System.Drawing.Point(213, 452);
-            this.lbl_MainTaskDecompose_ZPRK.Name = "lbl_MainTaskDecompose_ZPRK";
-            this.lbl_MainTaskDecompose_ZPRK.Size = new System.Drawing.Size(70, 15);
-            this.lbl_MainTaskDecompose_ZPRK.TabIndex = 43;
-            this.lbl_MainTaskDecompose_ZPRK.Text = "label11";
+            this.lbl_DataProcess_RobotBuffer_ModeChange.AutoSize = true;
+            this.lbl_DataProcess_RobotBuffer_ModeChange.BackColor = System.Drawing.Color.White;
+            this.lbl_DataProcess_RobotBuffer_ModeChange.ForeColor = System.Drawing.Color.Red;
+            this.lbl_DataProcess_RobotBuffer_ModeChange.Location = new System.Drawing.Point(213, 452);
+            this.lbl_DataProcess_RobotBuffer_ModeChange.Name = "lbl_DataProcess_RobotBuffer_ModeChange";
+            this.lbl_DataProcess_RobotBuffer_ModeChange.Size = new System.Drawing.Size(70, 15);
+            this.lbl_DataProcess_RobotBuffer_ModeChange.TabIndex = 43;
+            this.lbl_DataProcess_RobotBuffer_ModeChange.Text = "label11";
             // 
-            // ckMainTaskDecompose_ZPRK
+            // ck_DataProcess_RobotBuffer_ModeChange
             // 
-            this.ckMainTaskDecompose_ZPRK.AutoSize = true;
-            this.ckMainTaskDecompose_ZPRK.Location = new System.Drawing.Point(3, 452);
-            this.ckMainTaskDecompose_ZPRK.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.ckMainTaskDecompose_ZPRK.Name = "ckMainTaskDecompose_ZPRK";
-            this.ckMainTaskDecompose_ZPRK.Size = new System.Drawing.Size(207, 19);
-            this.ckMainTaskDecompose_ZPRK.TabIndex = 42;
-            this.ckMainTaskDecompose_ZPRK.Text = "任务分解线程(组盘入库)";
-            this.ckMainTaskDecompose_ZPRK.UseVisualStyleBackColor = true;
-            this.ckMainTaskDecompose_ZPRK.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged);
+            this.ck_DataProcess_RobotBuffer_ModeChange.AutoSize = true;
+            this.ck_DataProcess_RobotBuffer_ModeChange.Location = new System.Drawing.Point(3, 452);
+            this.ck_DataProcess_RobotBuffer_ModeChange.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.ck_DataProcess_RobotBuffer_ModeChange.Name = "ck_DataProcess_RobotBuffer_ModeChange";
+            this.ck_DataProcess_RobotBuffer_ModeChange.Size = new System.Drawing.Size(166, 19);
+            this.ck_DataProcess_RobotBuffer_ModeChange.TabIndex = 42;
+            this.ck_DataProcess_RobotBuffer_ModeChange.Text = "出库模式切换线程 ";
+            this.ck_DataProcess_RobotBuffer_ModeChange.UseVisualStyleBackColor = true;
+            this.ck_DataProcess_RobotBuffer_ModeChange.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged);
             // 
-            // lbl_Alert_Agv
+            // lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound
             // 
-            this.lbl_Alert_Agv.AutoSize = true;
-            this.lbl_Alert_Agv.BackColor = System.Drawing.Color.White;
-            this.lbl_Alert_Agv.ForeColor = System.Drawing.Color.Red;
-            this.lbl_Alert_Agv.Location = new System.Drawing.Point(216, 609);
-            this.lbl_Alert_Agv.Name = "lbl_Alert_Agv";
-            this.lbl_Alert_Agv.Size = new System.Drawing.Size(70, 15);
-            this.lbl_Alert_Agv.TabIndex = 41;
-            this.lbl_Alert_Agv.Text = "label11";
+            this.lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound.AutoSize = true;
+            this.lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound.BackColor = System.Drawing.Color.White;
+            this.lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound.ForeColor = System.Drawing.Color.Red;
+            this.lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound.Location = new System.Drawing.Point(289, 609);
+            this.lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound.Name = "lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound";
+            this.lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound.Size = new System.Drawing.Size(70, 15);
+            this.lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound.TabIndex = 41;
+            this.lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound.Text = "label11";
             // 
-            // ckAgv
+            // ckDataProcess_RobotBuffer_AutoQiTaoOutbound
             // 
-            this.ckAgv.AutoSize = true;
-            this.ckAgv.Location = new System.Drawing.Point(3, 609);
-            this.ckAgv.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.ckAgv.Name = "ckAgv";
-            this.ckAgv.Size = new System.Drawing.Size(88, 19);
-            this.ckAgv.TabIndex = 40;
-            this.ckAgv.Text = "AGV线程";
-            this.ckAgv.UseVisualStyleBackColor = true;
-            this.ckAgv.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged);
+            this.ckDataProcess_RobotBuffer_AutoQiTaoOutbound.AutoSize = true;
+            this.ckDataProcess_RobotBuffer_AutoQiTaoOutbound.Location = new System.Drawing.Point(3, 609);
+            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.TabIndex = 40;
+            this.ckDataProcess_RobotBuffer_AutoQiTaoOutbound.Text = "机器人缓存岛 自动齐套出库 线程";
+            this.ckDataProcess_RobotBuffer_AutoQiTaoOutbound.UseVisualStyleBackColor = true;
+            this.ckDataProcess_RobotBuffer_AutoQiTaoOutbound.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged);
             // 
-            // lbl_Alert_Place1014ClearStoreTask
+            // lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask
             // 
-            this.lbl_Alert_Place1014ClearStoreTask.AutoSize = true;
-            this.lbl_Alert_Place1014ClearStoreTask.BackColor = System.Drawing.Color.White;
-            this.lbl_Alert_Place1014ClearStoreTask.ForeColor = System.Drawing.Color.Red;
-            this.lbl_Alert_Place1014ClearStoreTask.Location = new System.Drawing.Point(215, 528);
-            this.lbl_Alert_Place1014ClearStoreTask.Name = "lbl_Alert_Place1014ClearStoreTask";
-            this.lbl_Alert_Place1014ClearStoreTask.Size = new System.Drawing.Size(70, 15);
-            this.lbl_Alert_Place1014ClearStoreTask.TabIndex = 39;
-            this.lbl_Alert_Place1014ClearStoreTask.Text = "label11";
+            this.lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask.AutoSize = true;
+            this.lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask.BackColor = System.Drawing.Color.White;
+            this.lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask.ForeColor = System.Drawing.Color.Red;
+            this.lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask.Location = new System.Drawing.Point(345, 529);
+            this.lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask.Name = "lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask";
+            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);
             // 
-            // ckPlace1014ClearStoreTask
+            // ck_DataProcess_RobotBuffer_IssueOutboundTask
             // 
-            this.ckPlace1014ClearStoreTask.AutoSize = true;
-            this.ckPlace1014ClearStoreTask.Location = new System.Drawing.Point(4, 528);
-            this.ckPlace1014ClearStoreTask.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.ckPlace1014ClearStoreTask.Name = "ckPlace1014ClearStoreTask";
-            this.ckPlace1014ClearStoreTask.Size = new System.Drawing.Size(165, 19);
-            this.ckPlace1014ClearStoreTask.TabIndex = 38;
-            this.ckPlace1014ClearStoreTask.Text = "1014转运1020线程";
-            this.ckPlace1014ClearStoreTask.UseVisualStyleBackColor = true;
-            this.ckPlace1014ClearStoreTask.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged);
+            this.ck_DataProcess_RobotBuffer_IssueOutboundTask.AutoSize = true;
+            this.ck_DataProcess_RobotBuffer_IssueOutboundTask.Location = new System.Drawing.Point(4, 528);
+            this.ck_DataProcess_RobotBuffer_IssueOutboundTask.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.ck_DataProcess_RobotBuffer_IssueOutboundTask.Name = "ck_DataProcess_RobotBuffer_IssueOutboundTask";
+            this.ck_DataProcess_RobotBuffer_IssueOutboundTask.Size = new System.Drawing.Size(335, 19);
+            this.ck_DataProcess_RobotBuffer_IssueOutboundTask.TabIndex = 38;
+            this.ck_DataProcess_RobotBuffer_IssueOutboundTask.Text = "机器人缓存岛 自动下发出库任务 处理线程";
+            this.ck_DataProcess_RobotBuffer_IssueOutboundTask.UseVisualStyleBackColor = true;
+            this.ck_DataProcess_RobotBuffer_IssueOutboundTask.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged);
             // 
             // lbl_Alert_EmptySalverTransfer
             // 
@@ -5471,6 +5479,9 @@
             // 
             // tabPage3
             // 
+            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);
@@ -5821,6 +5832,54 @@
             this.btn_Find_OutTaskRetryToMes.UseVisualStyleBackColor = true;
             this.btn_Find_OutTaskRetryToMes.Click += new System.EventHandler(this.btn_Find_OutTaskRetryToMes_Click);
             // 
+            // lbl_RobotMode
+            // 
+            this.lbl_RobotMode.AutoSize = true;
+            this.lbl_RobotMode.Location = new System.Drawing.Point(275, 659);
+            this.lbl_RobotMode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.lbl_RobotMode.Name = "lbl_RobotMode";
+            this.lbl_RobotMode.Size = new System.Drawing.Size(127, 15);
+            this.lbl_RobotMode.TabIndex = 12;
+            this.lbl_RobotMode.Text = "缓存岛机器人模式";
+            // 
+            // tb_PackageCode
+            // 
+            this.tb_PackageCode.Location = new System.Drawing.Point(856, 427);
+            this.tb_PackageCode.Name = "tb_PackageCode";
+            this.tb_PackageCode.Size = new System.Drawing.Size(339, 25);
+            this.tb_PackageCode.TabIndex = 154;
+            // 
+            // label23
+            // 
+            this.label23.AutoSize = true;
+            this.label23.Location = new System.Drawing.Point(794, 437);
+            this.label23.Name = "label23";
+            this.label23.Size = new System.Drawing.Size(45, 15);
+            this.label23.TabIndex = 153;
+            this.label23.Text = "包号:";
+            // 
+            // button24
+            // 
+            this.button24.BackColor = System.Drawing.Color.Aqua;
+            this.button24.Location = new System.Drawing.Point(817, 489);
+            this.button24.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.button24.Name = "button24";
+            this.button24.Size = new System.Drawing.Size(155, 48);
+            this.button24.TabIndex = 155;
+            this.button24.Text = "强制该包号出库";
+            this.button24.UseVisualStyleBackColor = false;
+            this.button24.Click += new System.EventHandler(this.button24_Click);
+            // 
+            // lbl_currHandlerPackageCodeForIssueOutboundTask
+            // 
+            this.lbl_currHandlerPackageCodeForIssueOutboundTask.AutoSize = true;
+            this.lbl_currHandlerPackageCodeForIssueOutboundTask.Location = new System.Drawing.Point(275, 693);
+            this.lbl_currHandlerPackageCodeForIssueOutboundTask.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.lbl_currHandlerPackageCodeForIssueOutboundTask.Name = "lbl_currHandlerPackageCodeForIssueOutboundTask";
+            this.lbl_currHandlerPackageCodeForIssueOutboundTask.Size = new System.Drawing.Size(172, 15);
+            this.lbl_currHandlerPackageCodeForIssueOutboundTask.TabIndex = 14;
+            this.lbl_currHandlerPackageCodeForIssueOutboundTask.Text = "当前下发出库任务的包号";
+            // 
             // FormCC
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
@@ -6095,8 +6154,8 @@
         private System.Windows.Forms.CheckBox ckMainTaskDecompose;
         private System.Windows.Forms.Label lbl_Alert_EmptySalverTransfer;
         private System.Windows.Forms.CheckBox ckEmptySalverTransfer;
-        private System.Windows.Forms.Label lbl_Alert_Place1014ClearStoreTask;
-        private System.Windows.Forms.CheckBox ckPlace1014ClearStoreTask;
+        private System.Windows.Forms.Label lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask;
+        private System.Windows.Forms.CheckBox ck_DataProcess_RobotBuffer_IssueOutboundTask;
         private System.Windows.Forms.Button btn_1007;
         private System.Windows.Forms.Button btn_1006;
         private System.Windows.Forms.Button btn_1005;
@@ -6206,10 +6265,10 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn11;
         private System.Windows.Forms.DataGridViewTextBoxColumn Qty;
         private System.Windows.Forms.DataGridViewTextBoxColumn InStoreTime;
-        private System.Windows.Forms.Label lbl_Alert_Agv;
-        private System.Windows.Forms.CheckBox ckAgv;
-        private System.Windows.Forms.Label lbl_MainTaskDecompose_ZPRK;
-        private System.Windows.Forms.CheckBox ckMainTaskDecompose_ZPRK;
+        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.TabPage tabPage4;
         private System.Windows.Forms.Panel panel_DeviceTaskList_dgvPartTask_Finished;
         private System.Windows.Forms.Button button17;
@@ -6333,6 +6392,11 @@
         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;
+        private System.Windows.Forms.Label label23;
+        private System.Windows.Forms.Label lbl_currHandlerPackageCodeForIssueOutboundTask;
     }
 }
 
diff --git a/CC/iWareCC_ASRS/FormCC.cs b/CC/iWareCC_ASRS/FormCC.cs
index 6d5a151..ee49651 100644
--- a/CC/iWareCC_ASRS/FormCC.cs
+++ b/CC/iWareCC_ASRS/FormCC.cs
@@ -39,6 +39,11 @@
         public static bool IsAllowRunOutMode = false;
 
         /// <summary>
+        /// 褰撳墠涓嬪彂鍑哄簱浠诲姟鐨勫寘鍙�
+        /// </summary>
+        public static string currHandlerPackageCodeForIssueOutboundTask = "";
+
+        /// <summary>
         /// 1鍙峰爢鍨涙満鍏ュ簱鍙f壂鐮佸己鍒堕獙璇侀�氳繃
         /// </summary>
         public static bool Srm1_IN_SMQZYZTG = false;
@@ -214,33 +219,32 @@
             // rgvService.StartService();
 
 
-            //澶勭悊銆愪笅鍙戜腑銆戠殑鍑哄簱璁″垝浠诲姟
-            // new Thread(OutPlanTaskDecompose.HandlerIssuingTask).Start();
 
-            //浠诲姟鍒嗚В绾跨▼-鍑哄簱
-            // new Thread(MainTaskDecompose.HandlerMainTaskDecompose).Start();
+            new Thread(DataProcess_RobotBuffer_ModeChange.Handler).Start();
 
-            //浠诲姟鍒嗚В绾跨▼-缁勭洏鍏ュ簱
-            // new Thread(MainTaskDecompose_ZPRK.HandlerMainTaskDecompose_ZPRK).Start();
+            new Thread(DataProcess_RobotBuffer_IssueOutboundTask.Handler).Start();
+
+
+            new Thread(DataProcess_RobotBuffer_AutoQiTaoOutbound.Handler).Start();
 
             new Thread(DataProcess_RobotBuffer_FinishTaskForOutbound.Handler).Start();
 
-            //鑷姩缁勭洏浠诲姟
+
             new Thread(DataProcess_RobotBuffer_FinishTask.Handler).Start();
 
             new Thread(DataProcess_BZ01.Handler).Start();
 
-            //閲嶆柊鑾峰彇鍙戝姩鏈轰俊鎭�
+
             new Thread(DataProcess_269.Handler).Start();
-            
-            //1014搴撲綅杞繍鍒�1020绾跨▼
+
+
             new Thread(DataProcess_BZ39.Handler).Start();
 
             new Thread(DataProcess_BZ12.Hander).Start();
 
             new Thread(DeleteData).Start();
 
-            new Thread(LineInSacnResult.HandlerLineInSacnResult).Start();
+            //new Thread(LineInSacnResult.HandlerLineInSacnResult).Start();
 
 
 
@@ -346,7 +350,7 @@
                     this.lbl_Alert_Srm4ReleaseFinish.Text = showNowTime + SystemWarningMsg._lbl_Alert_Srm4ReleaseFinish;
 
                     this.lbl_Alert_RgvRelease.Text = showNowTime + SystemWarningMsg._lbl_Alert_RgvRelease;
-                    this.lbl_Alert_RgvReleaseFinish.Text = showNowTime + SystemWarningMsg._lbl_Alert_RgvReleaseFinish;
+                    this.lbl_Alert_RgvReleaseFinish.Text = showNowTime + SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange;
                     this.lbl_Alert_RgvReleaseFinish_BuChang.Text = showNowTime + SystemWarningMsg._lbl_Alert_RgvReleaseFinish_BuChang;
 
                     this.lbl_Alert_HandlerIssuingTask.Text = showNowTime + SystemWarningMsg._lbl_Alert_HandlerIssuingTask;
@@ -355,13 +359,13 @@
 
                     this.lbl_MainTaskDecompose.Text = showNowTime + SystemWarningMsg._lbl_Alert_MainTaskDecompose;
 
-                    this.lbl_MainTaskDecompose_ZPRK.Text = showNowTime + SystemWarningMsg._lbl_Alert_MainTaskDecompose_ZPRK;
+                    this.lbl_DataProcess_RobotBuffer_ModeChange.Text = showNowTime + SystemWarningMsg._lbl_Alert_MainTaskDecompose_ZPRK;
 
                     this.lbl_Alert_DataProcess_RobotBuffer_FinishTaskForOutbound.Text = showNowTime + SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTaskForOutbound;
 
                     this.lbl_Alert_DeleteData.Text = showNowTime + SystemWarningMsg._lbl_Alert_DeleteData;
 
-                    this.lbl_Alert_EmptySalverTransfer.Text = showNowTime + SystemWarningMsg._lbl_Alert_EmptySalverTransfer;
+                    this.lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound.Text = showNowTime + SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound;
 
                     this.lbl_alert_DataProcess_BZ39.Text = showNowTime + SystemWarningMsg._lbl_alert_DataProcess_BZ39;
 
@@ -369,7 +373,7 @@
 
                     this.lbl_alert_DataProcess_269.Text = showNowTime + SystemWarningMsg._lbl_alert_DataProcess_269;
 
-                    this.lbl_Alert_Place1014ClearStoreTask.Text = showNowTime + SystemWarningMsg._lbl_Alert_Place1014To1020TaskTask;
+                    this.lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask.Text = showNowTime + SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask;
 
 
                     this.lbl_Alter_OutTaskRetryToMes.Text = showNowTime + SystemWarningMsg._lbl_Alert_OutTaskRetryToMes;
@@ -969,53 +973,6 @@
 
         #endregion
 
-        #region AGV
-
-
-        /// <summary>
-        /// 鑾峰彇AGV杞﹁締鍒楄〃
-        /// </summary>
-        public void GetAgvVehicles()
-        {
-            while (true)
-            {
-                try
-                {
-                    if (SystemValue.isAllowRuning_Agv && SystemValue.isStartedModel)
-                    {
-                        AGVRetModel list = AgvRequestHelper.GetVehicles();
-                        AgvHandler.SaveAgvData(list);
-
-                        List<String> warningAddressList = new List<string>();
-                        if (list.alarms != null && list.alarms.errors != null && list.alarms.errors.Count > 0)
-                        {
-                            var waringList = list.alarms.errors;
-                            if (waringList != null && waringList.Count > 0)
-                            {
-                                for (int i = 0; i < waringList.Count; i++)
-                                {
-                                    DeviceWarningHandler.SaveWarning(EDevice.AGV, iWareCommon.Utils.LogType.AGVTheadService,
-                                        waringList[i].code, waringList[i].code, waringList[i].desc);//鏂板鎶ヨ
-                                    warningAddressList.Add(waringList[i].code);
-                                }
-                            }
-                        }
-                        DeviceWarningHandler.AutoCloseWarning(EDevice.AGV, iWareCommon.Utils.LogType.AGVTheadService, warningAddressList);//鑷姩鍏抽棴鎶ヨ
-                        this.lbl_Alert_Agv.Text = "鑾峰彇AGV杞﹁締淇℃伅鎴愬姛";
-                    }
-                }
-                catch (Exception ex)
-                {
-                    Log4NetHelper.WriteErrorLog(iWareCommon.Utils.LogType.CCWCFService, "鑾峰彇AGV杞﹁締鍒楄〃 鍑虹幇寮傚父:" + ex.Message, ex);
-                    this.lbl_Alert_Agv.Text = "鑾峰彇AGV杞﹁締淇℃伅寮傚父锛�" + ex.Message;
-                }
-                finally
-                {
-                    Thread.Sleep(5000);//5绉掍竴娆� 
-                }
-            }
-        }
-        #endregion
 
         #region 鍏朵粬绾跨▼
 
@@ -1587,16 +1544,14 @@
 
             DoCommonCheckedChanged(ref SystemValue.isAllowRuning_MainTaskDecompose, ckMainTaskDecompose);
 
-            DoCommonCheckedChanged(ref SystemValue.isAllowRuning_MainTaskDecompose_ZPRK, ckMainTaskDecompose_ZPRK);
+            DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_RobotBuffer_ModeChange, ck_DataProcess_RobotBuffer_ModeChange);
 
             DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_RobotBuffer_FinishTaskForOutbound, checkBox_DataProcess_RobotBuffer_FinishTaskForOutbound);
 
 
             DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DeleteData, ckDeleteData);
 
-            DoCommonCheckedChanged(ref SystemValue.isAllowRuning_Agv, ckAgv);
-
-            DoCommonCheckedChanged(ref SystemValue.isAllowRuning_EmptySalverTransfer, ckEmptySalverTransfer);
+            DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_RobotBuffer_AutoQiTaoOutbound, ckDataProcess_RobotBuffer_AutoQiTaoOutbound);
 
             DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_BZ39, ck_DataProcess_BZ39);
 
@@ -1604,7 +1559,7 @@
 
             DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_269, ck_DataProcess_269);
 
-            DoCommonCheckedChanged(ref SystemValue.isAllowRuning_Place1014To1020Task, ckPlace1014ClearStoreTask);
+            DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_RobotBuffer_IssueOutboundTask, ck_DataProcess_RobotBuffer_IssueOutboundTask);
 
             DoCommonCheckedChanged(ref SystemValue.isAllowRuning_OutTaskRetryToMes, checkBox_OutTaskRetryToMes);
         }
@@ -1881,6 +1836,9 @@
                         this.btn_Start.BackColor = default_btn_Start_Color;//杩樺師棰滆壊
                     }
                 }
+
+                this.lbl_RobotMode.Text = "缂撳瓨宀涙満鍣ㄤ汉妯″紡:" + (IsAllowRunOutMode ? "鍑哄簱妯″紡" : "鍏ュ簱妯″紡");
+                this.lbl_currHandlerPackageCodeForIssueOutboundTask.Text = "褰撳墠涓嬪彂鍑哄簱浠诲姟鐨勫寘鍙�:" + currHandlerPackageCodeForIssueOutboundTask;
             }
         }
 
@@ -3580,5 +3538,27 @@
                 "杞崲鍚�:" + "\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 alertMsg = "";
+            DataProcess_RobotBuffer_ForceOutbound.Handler(packageCode, ref alertMsg);
+            if (!string.IsNullOrEmpty(alertMsg))
+            {
+                MessageBox.Show("閿欒:" + alertMsg);
+            }
+            else
+            {
+                MessageBox.Show("宸插鐞�");
+            }
+        }
     }
 }
diff --git a/CC/iWareCC_ASRS/Forms/SystemCheckForm.cs b/CC/iWareCC_ASRS/Forms/SystemCheckForm.cs
index cb83b9a..85fefe6 100644
--- a/CC/iWareCC_ASRS/Forms/SystemCheckForm.cs
+++ b/CC/iWareCC_ASRS/Forms/SystemCheckForm.cs
@@ -259,7 +259,7 @@
                     iWareCC.RgvService.SdaResEntity sdaResult = rgvService.IsRgvAuto((int)EDevice.RGV, Convert.ToInt32(EDevice.RGV).ToString());
                     if (sdaResult.result == false)
                     {
-                        Log4NetHelper.WriteErrorLog(iWareCommon.Utils.LogType.TrussThreadService, "楠岃瘉RGV鏄惁鍙互鎺ュ彈浠诲姟鍑虹幇閿欒,int_deviceId:" + (int)EDevice.RGV + ",sdaResultStr:" + JsonConvert.SerializeObject(sdaResult));
+                        Log4NetHelper.WriteErrorLog(iWareCommon.Utils.LogType.DataProcess_RobotBuffer_ModeChange, "楠岃瘉RGV鏄惁鍙互鎺ュ彈浠诲姟鍑虹幇閿欒,int_deviceId:" + (int)EDevice.RGV + ",sdaResultStr:" + JsonConvert.SerializeObject(sdaResult));
                         text_RGV.Invoke(new Action(() => { text_RGV.BackColor = Color.Salmon; }));
                         text_RGV.Invoke(new Action(() => { text_RGV.Text = msg + "妫�娴嬪け璐ワ紒" + sdaResult.resMsg; }));
                         return false;
diff --git "a/CC/iWareCC_ASRS/ThreadService/00_269\345\267\245\344\275\215/DataProcess_269.cs" "b/CC/iWareCC_ASRS/ThreadService/00_269\345\267\245\344\275\215/DataProcess_269.cs"
index bc41628..8a2e4c3 100644
--- "a/CC/iWareCC_ASRS/ThreadService/00_269\345\267\245\344\275\215/DataProcess_269.cs"
+++ "b/CC/iWareCC_ASRS/ThreadService/00_269\345\267\245\344\275\215/DataProcess_269.cs"
@@ -30,7 +30,7 @@
             LogType logType = LogType.DataProcess_269;
             while (true)
             {
-                Thread.Sleep(2000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
+                Thread.Sleep(1000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
                 SystemWarningMsg._lbl_alert_DataProcess_269 = string.Empty;
                 try
                 {
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 35bfcd7..e2c6727 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"
@@ -33,7 +33,7 @@
             LogType logType = LogType.DataProcess_BZ01;
             while (true)
             {
-                Thread.Sleep(2000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
+                Thread.Sleep(1000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
                 SystemWarningMsg._lbl_alert_DataProcess_BZ01 = string.Empty;
                 try
                 {
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 97019c4..57420bc 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"
@@ -27,45 +27,70 @@
         public static async void Handler()
         {
             var alertMsg = "";
-            LogType logType = LogType.DataProcess_BZ39;
+            LogType logType = LogType.DataProcess_RobotBuffer_ModeChange;
             while (true)
             {
                 Thread.Sleep(2000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
-                SystemWarningMsg._lbl_alert_DataProcess_BZ39 = string.Empty;
+                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange = string.Empty;
                 try
                 {
-                    if (SystemValue.isAllowRuning_DataProcess_BZ39 && SystemValue.isStartedModel)
+                    if (SystemValue.isAllowRuning_DataProcess_RobotBuffer_ModeChange && SystemValue.isStartedModel)
                     {
-
+                        var rgvLocation = StationLocationEnum.BZ39.ToString();
                         if (FormCC.IsAllowRunOutMode)
                         {
                             using (WmsDBModel wmsDB = new WmsDBModel())
                             {
                                 var rbRunMode = wmsDB.wms_rbline_runmode.FirstOrDefault();
-                                if (rbRunMode.LineRunMode == (int)RbRunModeEnum.鍑哄簱妯″紡)
-                                {
-                                    SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"宸茬粡鏄嚭搴撴ā寮忎簡,姝ゆ寰幆缁撴潫";
-                                    continue;
+
+                                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;
                                 }
-                                rbRunMode.LineRunMode = (int)RbRunModeEnum.鍑哄簱妯″紡;
-                                rbRunMode.LineRunModeName = RbRunModeEnum.鍑哄簱妯″紡.ToString();
-                                rbRunMode.UpdateTime = DateTime.Now;
+                                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.WriteOutStoreTaskInfoAsync((int)EDevice.Station, rgvLocation, doTask.PlaceCode, Convert.ToInt32(doTask.TaskNo));
-                                //    if (!res.result)
-                                //    {
-                                //        SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()}-涓嬪彂鍑哄簱浠诲姟 澶辫触,WriteOutStoreTaskInfoAsync 杩斿洖:{res.resMsg}";
-                                //        continue;
-                                //    }
-                                //    else
-                                //    {
-                                //        Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-涓嬪彂鍑哄簱浠诲姟 鎴愬姛,WriteOutStoreTaskInfoAsync锛屽弬鏁�: 绔欑偣{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();
                             }
@@ -74,7 +99,7 @@
                 }
                 catch (Exception ex)
                 {
-                    SystemWarningMsg._lbl_alert_DataProcess_BZ39 += " 鍑虹幇寮傚父:" + ex.Message + SysGloble.SPLIT_STR;
+                    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/Inbound/1\343\200\201DataProcess_BZ39.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/Inbound/1\343\200\201DataProcess_BZ39.cs"
index ae46d74..9aad677 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/Inbound/1\343\200\201DataProcess_BZ39.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/Inbound/1\343\200\201DataProcess_BZ39.cs"
@@ -30,7 +30,7 @@
             LogType logType = LogType.DataProcess_BZ39;
             while (true)
             {
-                Thread.Sleep(2000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
+                Thread.Sleep(1000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
                 SystemWarningMsg._lbl_alert_DataProcess_BZ39 = string.Empty;
                 try
                 {
@@ -54,6 +54,8 @@
                             var qitaoReault = false;
                             using (WmsDBModel wmsDB = new WmsDBModel())
                             {
+                                //涓嶅啀鎷︽埅 
+                                /*
                                 //瑕佹槸鏈夊凡涓嬪彂鐨勪换鍔★紝灏变笉瑕佹墽琛�
                                 var isValidate = TaskHandler.ValidateIssueTaskForRobotBuffer(wmsDB);
                                 if (!isValidate)
@@ -61,6 +63,7 @@
                                     SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()}-鏈夆�樺凡涓嬪彂鈥欑殑浠诲姟锛屼笉鑳藉鐞�,姝ゆ寰幆缁撴潫";
                                     continue;
                                 }
+                                //*/
                                 var upiObj = wmsDB.mes_batchOrderUPI_new.Where(x => x.UPI == upiCode).FirstOrDefault();
                                 if (upiObj == null)
                                 {
@@ -110,6 +113,8 @@
 
                                 using (StationServiceClient client = new StationServiceClient())
                                 {
+                                    //涓嶅啀鎷︽埅 
+                                    /*
                                     //棣栧厛鍏堟竻鐞�
                                     var res = await client.InboundFinishConfirmAsync((int)EDevice.Station, false, rgvLocation);
                                     if (!res.result)
@@ -121,8 +126,9 @@
                                     {
                                         Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-涓嬪彂鍏ュ簱浠诲姟 鎴愬姛,InboundFinishConfirmAsync锛屽弬鏁�: 绔欑偣{rgvLocation}");
                                     }
+                                    //*/
 
-                                    res = await client.WriteInStoreTaskInfoAsync((int)EDevice.Station, rgvLocation, place.PlaceCode,
+                                    var res = await client.WriteInStoreTaskInfoAsync((int)EDevice.Station, rgvLocation, place.PlaceCode,
                                        (short)upiObj.Length,
                                        (short)upiObj.Width, (short)upiObj.Thk, Convert.ToInt32(task.TaskNo));
                                     if (!res.result)
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/Inbound/2\343\200\201DataProcess_RobotBuffer_FinishTask.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/Inbound/2\343\200\201DataProcess_RobotBuffer_FinishTask.cs"
index 9424fc2..c61372e 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/Inbound/2\343\200\201DataProcess_RobotBuffer_FinishTask.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/Inbound/2\343\200\201DataProcess_RobotBuffer_FinishTask.cs"
@@ -30,7 +30,7 @@
             LogType logType = LogType.DataProcess_RobotBuffer_FinishTask;
             while (true)
             {
-                Thread.Sleep(2000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
+                Thread.Sleep(500);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
                 SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTask = string.Empty;
                 try
                 {
@@ -89,6 +89,7 @@
                                     InTime = DateTime.Now,
                                     OperReason = "鍏ュ簱",
                                     PackageCode = task.PackageCode,
+                                    Length = task.Length,
                                     Width = task.Width,
                                     Thk = task.Thk,
                                     PlaceCode = task.PlaceCode,
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 a63b897..d4a4924 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"
@@ -20,90 +20,85 @@
         public static async void Handler()
         {
             var alertMsg = "";
-            LogType logType = LogType.DataProcess_RobotBuffer_FinishTaskForOutbound;
+            LogType logType = LogType.DataProcess_RobotBuffer_AutoQiTaoOutbound;
             while (true)
             {
                 Thread.Sleep(2000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
-                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTaskForOutbound = string.Empty;
+                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound = string.Empty;
                 try
                 {
-                    if (SystemValue.isAllowRuning_DataProcess_RobotBuffer_FinishTaskForOutbound && SystemValue.isStartedModel)
+                    if (SystemValue.isAllowRuning_DataProcess_RobotBuffer_AutoQiTaoOutbound && SystemValue.isStartedModel)
                     {
-                        var rgvLocation = StationLocationEnum.BZ39.ToString();
-                        var obj = FormCC.stationView.R_StationForReadCommList.Where(x => x.StationCode == rgvLocation.ToString()).FirstOrDefault();
-                        if (obj.R_OutboundFinish)
+
+                        using (WmsDBModel wmsDB = new WmsDBModel())
                         {
-                            var result = obj.R_OutboundNumber;
-                            if (string.IsNullOrEmpty(result))
+                            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)
                             {
-                                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTaskForOutbound = $"{rgvLocation.ToString()}- 鍑哄簱搴撲綅鍙锋槸绌虹殑,姝ゆ寰幆缁撴潫";
-                                continue;
-                            }
-
-                            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 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)
                                     {
-                                        //婊¤冻榻愬锛屽嚭搴�
-                                        group.ToList().ForEach(x =>
+                                        var x = group.ToList().Find(b => b.Upi == item.UPI);
+                                        x.StockStatus = (int)StockStatusEnum.榻愬寘寰呭嚭搴�;
+
+                                        //鐢熸垚鍑哄簱浠诲姟
+                                        //璁板綍浠诲姟
+                                        var _id = Yitter.IdGenerator.YitIdHelper.NextId();
+                                        var plcTaskNo = BusinessHelper.CreatePlcTaskIdForSrmTask();
+                                        var new_task = new wms_rbline_task()
                                         {
-                                            x.StockStatus = (int)StockStatusEnum.榻愬寘寰呭嚭搴�;
+                                            Id = _id,
+                                            TaskNo = plcTaskNo,
 
-                                            //鐢熸垚鍑哄簱浠诲姟
-                                            //璁板綍浠诲姟
-                                            var _id = Yitter.IdGenerator.YitIdHelper.NextId();
-                                            var plcTaskNo = BusinessHelper.CreatePlcTaskIdForSrmTask();
-                                            var new_task = new wms_rbline_task()
-                                            {
-                                                Id = _id,
-                                                TaskNo = plcTaskNo,
-
-                                                UPI = x.Upi,
-                                                Length = x.Length,
-                                                Width = x.Width,
-                                                Thk = x.Thk,
-                                                IssueTime = DateTime.Now,
-                                                PlanNo = x.PlanNo,
-                                                OrderId = x.OrderId,
-                                                PackageCode = x.PackageCode,
-                                                PlaceCode = x.PlaceCode,
-                                                RbTaskType = (int)RbTaskTypeEnum.鍑哄簱浠诲姟,
-                                                RbTaskTypeEnumName = RbTaskTypeEnum.鍑哄簱浠诲姟.ToString(),
-                                                TaskStatus = (int)TaskStatusEnum.鏂板缓,
-                                                TaskStatusName = TaskStatusEnum.鏂板缓.ToString(),
-                                                TaskMsg = "鍏ュ簱",
+                                            UPI = x.Upi,
+                                            Length = x.Length,
+                                            Width = x.Width,
+                                            Thk = x.Thk,
+                                            IssueTime = DateTime.Now,
+                                            PlanNo = x.PlanNo,
+                                            OrderId = x.OrderId,
+                                            PackageCode = x.PackageCode,
+                                            PlaceCode = x.PlaceCode,
+                                            RbTaskType = (int)RbTaskTypeEnum.鍑哄簱浠诲姟,
+                                            RbTaskTypeEnumName = RbTaskTypeEnum.鍑哄簱浠诲姟.ToString(),
+                                            TaskStatus = (int)TaskStatusEnum.鏂板缓,
+                                            TaskStatusName = TaskStatusEnum.鏂板缓.ToString(),
+                                            TaskMsg = "鍑哄簱浠诲姟",
 
 
-                                                CreateTime = DateTime.Now,
-                                                CreateUserName = "CC",
-                                                UpdateTime = DateTime.Now,
-                                                UpdateUserName = "CC",
-                                            };
+                                            CreateTime = DateTime.Now,
+                                            CreateUserName = "CC",
+                                            UpdateTime = DateTime.Now,
+                                            UpdateUserName = "CC",
+                                        };
 
-                                            wmsDB.wms_rbline_task.Add(new_task);
+                                        wmsDB.wms_rbline_task.Add(new_task);
 
-                                            var place = StationHandler.GetPlaceByPlaceCode(x.PlaceCode, wmsDB);
-                                            place.PlaceStatus = (int)PlaceStatusEnum.閿佸畾;
-                                        });
+                                        var place = StationHandler.GetPlaceByPlaceCode(x.PlaceCode, wmsDB);
+                                        place.PlaceStatus = (int)PlaceStatusEnum.閿佸畾;
+
+                                        Thread.Sleep(100);
                                     }
                                 }
-
-                                wmsDB.SaveChanges();
                             }
+
+                            wmsDB.SaveChanges();
                         }
+
                     }
                 }
                 catch (Exception ex)
                 {
-                    SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTaskForOutbound += " 鍑虹幇寮傚父:" + ex.Message + SysGloble.SPLIT_STR;
+                    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/2\343\200\201DataProcess_RobotBuffer_IssueOutboundTask.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/2\343\200\201DataProcess_RobotBuffer_IssueOutboundTask.cs"
index 2a87ab0..72ebdb7 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/2\343\200\201DataProcess_RobotBuffer_IssueOutboundTask.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/2\343\200\201DataProcess_RobotBuffer_IssueOutboundTask.cs"
@@ -24,99 +24,114 @@
     /// </summary>
     public static class DataProcess_RobotBuffer_IssueOutboundTask
     {
+
         public static async void Handler()
         {
             var alertMsg = "";
-            LogType logType = LogType.DataProcess_BZ39;
+            LogType logType = LogType.DataProcess_RobotBuffer_IssueOutboundTask;
             while (true)
             {
-                Thread.Sleep(2000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
-                SystemWarningMsg._lbl_alert_DataProcess_BZ39 = string.Empty;
+                Thread.Sleep(1000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
+                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = string.Empty;
                 try
                 {
-                    if (SystemValue.isAllowRuning_DataProcess_BZ39 && SystemValue.isStartedModel)
+                    if (SystemValue.isAllowRuning_DataProcess_RobotBuffer_IssueOutboundTask && SystemValue.isStartedModel)
                     {
                         var rgvLocation = StationLocationEnum.BZ39.ToString();
                         /*
                          * 1銆佷粠鏁版嵁搴撲腑鍒ゆ柇鏄惁榻愬
                          * 2銆佹牴鎹綈濂楃粨鏋滐紝鎺ㄩ�佺粰PLC
                          */
-                        var obj = FormCC.stationView.R_StationForReadCommList.Where(x => x.StationCode == rgvLocation.ToString()).FirstOrDefault();
-                        if (obj.R_ReqParseData)
+
+                        using (WmsDBModel wmsDB = new WmsDBModel())
                         {
-                            var result = obj.R_ReadCodeResult;
-                            if (string.IsNullOrEmpty(result))
+                            //瑕佹槸鏈夊凡涓嬪彂鐨勪换鍔★紝灏变笉瑕佹墽琛�
+                            var isValidate = TaskHandler.ValidateIssueTaskForRobotBuffer(wmsDB);
+                            if (!isValidate)
                             {
-                                SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()}-璇锋眰浜嗚В鐮侊紝浣嗘槸缁撴灉鏄┖鐨�,姝ゆ寰幆缁撴潫";
+                                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = $"{rgvLocation.ToString()}-鏈夆�樺凡涓嬪彂鈥欑殑浠诲姟锛屼笉鑳藉鐞�,姝ゆ寰幆缁撴潫";
                                 continue;
                             }
-                            var upiCode = result;
-                            var qitaoReault = false;
-                            using (WmsDBModel wmsDB = new WmsDBModel())
+
+                            //鍙栧垱寤烘椂闂存渶鏃╃殑閭d釜瑕佸嚭搴撶殑鍖�
+                            if (string.IsNullOrEmpty(FormCC.currHandlerPackageCodeForIssueOutboundTask))
                             {
-                                //瑕佹槸鏈夊凡涓嬪彂鐨勪换鍔★紝灏变笉瑕佹墽琛�
-                                var isValidate = TaskHandler.ValidateIssueTaskForRobotBuffer(wmsDB);
-                                if (!isValidate)
+                                var firstTask = wmsDB.wms_rbline_task.Where(x =>
+                           x.RbTaskType == (int)RbTaskTypeEnum.鍑哄簱浠诲姟
+                          && x.TaskStatus == (int)TaskStatusEnum.鏂板缓).OrderBy(x => x.CreateTime).FirstOrDefault();
+                                if (firstTask == null)
                                 {
-                                    SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()}-鏈夆�樺凡涓嬪彂鈥欑殑浠诲姟锛屼笉鑳藉鐞�,姝ゆ寰幆缁撴潫";
+                                    SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = $"{rgvLocation.ToString()},鏍规嵁 娌℃湁鎵惧埌 鏂板缓 鐨勪换鍔� ";
+                                    FormCC.currHandlerPackageCodeForIssueOutboundTask = "";
                                     continue;
                                 }
-
-
-
-                                var taskList = wmsDB.wms_rbline_task.Where(x => x.PlaceCode == obj.R_OutboundNumber
-                              && x.RbTaskType == (int)RbTaskTypeEnum.鍑哄簱浠诲姟
-                              && x.TaskStatus == (int)TaskStatusEnum.鏂板缓).OrderBy(x => x.PackageCode).ToList();
-                                if (taskList == null)
-                                {
-                                    SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTaskForOutbound = $"{rgvLocation.ToString()},鏍规嵁 R_OutboundNumber:{obj.R_OutboundNumber}娌℃湁鎵惧埌宸蹭笅鍙戠殑浠诲姟 ";
-                                    continue;
-                                }
-
-                                var doTask = taskList.FirstOrDefault();
-
-                                var upiObj = wmsDB.mes_batchOrderUPI_new.Where(x => x.UPI == upiCode).FirstOrDefault();
-                                if (upiObj == null)
-                                {
-                                    SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()},鏍规嵁UPI:{upiCode}娌℃湁鎵惧埌瀵硅薄 ";
-                                    continue;
-                                }
-
-                                //杩欓噷鏀逛负 涓嬪彂 鍑哄簱浠诲姟
-                                using (StationServiceClient client = new StationServiceClient())
-                                {
-                                    //棣栧厛瑕佹竻鐞�
-                                    var res = await client.OutboundFinishConfirmAsync((int)EDevice.Station, true, rgvLocation);
-                                    if (!res.result)
-                                    {
-                                        SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTaskForOutbound = $"{rgvLocation.ToString()}-涓嬪彂鍑哄簱浠诲姟 澶辫触,OutboundFinishConfirmAsync 杩斿洖:{res.resMsg}";
-                                        continue;
-                                    }
-                                    else
-                                    {
-                                        Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-涓嬪彂鍑哄簱浠诲姟 鎴愬姛,OutboundFinishConfirmAsync锛屽弬鏁�: 绔欑偣{rgvLocation}");
-                                    }
-
-                                    res = await client.WriteOutStoreTaskInfoAsync((int)EDevice.Station, rgvLocation, doTask.PlaceCode, Convert.ToInt32(doTask.TaskNo));
-                                    if (!res.result)
-                                    {
-                                        SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()}-涓嬪彂鍑哄簱浠诲姟 澶辫触,WriteOutStoreTaskInfoAsync 杩斿洖:{res.resMsg}";
-                                        continue;
-                                    }
-                                    else
-                                    {
-                                        Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-涓嬪彂鍑哄簱浠诲姟 鎴愬姛,WriteOutStoreTaskInfoAsync锛屽弬鏁�: 绔欑偣{rgvLocation}");
-                                    }
-                                }
-
-                                wmsDB.SaveChanges();
+                                FormCC.currHandlerPackageCodeForIssueOutboundTask = firstTask.PackageCode;
                             }
+                            else
+                            {
+                                var firstTask = wmsDB.wms_rbline_task.Where(x =>
+                           x.RbTaskType == (int)RbTaskTypeEnum.鍑哄簱浠诲姟
+                          && x.TaskStatus == (int)TaskStatusEnum.鏂板缓
+                          && x.PackageCode == FormCC.currHandlerPackageCodeForIssueOutboundTask
+                          ).OrderBy(x => x.CreateTime).FirstOrDefault();
+                                if (firstTask == null)
+                                {
+                                    SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = $"{rgvLocation.ToString()},鏍规嵁 娌℃湁鎵惧埌 鏂板缓 鐨勪换鍔� ";
+                                    FormCC.currHandlerPackageCodeForIssueOutboundTask = "";
+                                    continue;
+                                }
+                            }
+
+                            var taskList = wmsDB.wms_rbline_task.Where(x =>
+                           x.RbTaskType == (int)RbTaskTypeEnum.鍑哄簱浠诲姟
+                          && x.TaskStatus == (int)TaskStatusEnum.鏂板缓).Where(x => x.PackageCode == FormCC.currHandlerPackageCodeForIssueOutboundTask).OrderBy(x => x.CreateTime).ToList();
+                            if (taskList == null)
+                            {
+                                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = $"{rgvLocation.ToString()},鏍规嵁 娌℃湁鎵惧埌 鏂板缓 鐨勪换鍔� ";
+                                continue;
+                            }
+
+                            var doTask = taskList.FirstOrDefault();
+
+
+                            //杩欓噷涓嬪彂 鍑哄簱浠诲姟
+                            using (StationServiceClient client = new StationServiceClient())
+                            {
+                                //棣栧厛瑕佹竻鐞�
+                                var res = await client.OutboundFinishConfirmAsync((int)EDevice.Station, false, rgvLocation);
+                                if (!res.result)
+                                {
+                                    SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTaskForOutbound = $"{rgvLocation.ToString()}-涓嬪彂鍑哄簱浠诲姟 澶辫触,OutboundFinishConfirmAsync 杩斿洖:{res.resMsg}";
+                                    continue;
+                                }
+                                else
+                                {
+                                    Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-涓嬪彂鍑哄簱浠诲姟 鎴愬姛,OutboundFinishConfirmAsync锛屽弬鏁�: 绔欑偣{rgvLocation}");
+                                }
+
+                                res = await client.WriteOutStoreTaskInfoAsync((int)EDevice.Station, rgvLocation, doTask.PlaceCode, Convert.ToInt32(doTask.TaskNo));
+                                if (!res.result)
+                                {
+                                    SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()}-涓嬪彂鍑哄簱浠诲姟 澶辫触,WriteOutStoreTaskInfoAsync 杩斿洖:{res.resMsg}";
+                                    continue;
+                                }
+                                else
+                                {
+                                    Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-涓嬪彂鍑哄簱浠诲姟 鎴愬姛,WriteOutStoreTaskInfoAsync锛屽弬鏁�: 绔欑偣{rgvLocation}");
+                                }
+                            }
+
+                            doTask.TaskStatus = (int)TaskStatusEnum.宸蹭笅鍙�;
+                            doTask.TaskStatusName = TaskStatusEnum.宸蹭笅鍙�.ToString();
+
+                            wmsDB.SaveChanges();
                         }
+
                     }
                 }
                 catch (Exception ex)
                 {
-                    SystemWarningMsg._lbl_alert_DataProcess_BZ39 += " 鍑虹幇寮傚父:" + ex.Message + SysGloble.SPLIT_STR;
+                    SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask += " 鍑虹幇寮傚父:" + 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/3\343\200\201DataProcess_RobotBuffer_FinishTaskForOutbound.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/3\343\200\201DataProcess_RobotBuffer_FinishTaskForOutbound.cs"
index 62d38cd..be10ec7 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/3\343\200\201DataProcess_RobotBuffer_FinishTaskForOutbound.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/3\343\200\201DataProcess_RobotBuffer_FinishTaskForOutbound.cs"
@@ -22,7 +22,7 @@
             LogType logType = LogType.DataProcess_RobotBuffer_FinishTaskForOutbound;
             while (true)
             {
-                Thread.Sleep(2000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
+                Thread.Sleep(500);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
                 SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTaskForOutbound = string.Empty;
                 try
                 {
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/4\343\200\201DataProcess_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/4\343\200\201DataProcess_RobotBuffer_ForceOutbound.cs"
new file mode 100644
index 0000000..c77916d
--- /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/4\343\200\201DataProcess_RobotBuffer_ForceOutbound.cs"
@@ -0,0 +1,102 @@
+锘縰sing Admin.NET.Application;
+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_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.CreatePlcTaskIdForSrmTask();
+                        var new_task = new wms_rbline_task()
+                        {
+                            Id = _id,
+                            TaskNo = plcTaskNo,
+
+                            UPI = x.Upi,
+                            Length = x.Length,
+                            Width = x.Width,
+                            Thk = x.Thk,
+                            IssueTime = DateTime.Now,
+                            PlanNo = x.PlanNo,
+                            OrderId = x.OrderId,
+                            PackageCode = x.PackageCode,
+                            PlaceCode = x.PlaceCode,
+                            RbTaskType = (int)RbTaskTypeEnum.鍑哄簱浠诲姟,
+                            RbTaskTypeEnumName = RbTaskTypeEnum.鍑哄簱浠诲姟.ToString(),
+                            TaskStatus = (int)TaskStatusEnum.鏂板缓,
+                            TaskStatusName = TaskStatusEnum.鏂板缓.ToString(),
+                            TaskMsg = "浜哄伐寮哄埗寰呭嚭搴�",
+
+
+                            CreateTime = DateTime.Now,
+                            CreateUserName = "CC",
+                            UpdateTime = DateTime.Now,
+                            UpdateUserName = "CC",
+                        };
+
+                        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/WmsTask/EmptySalverTransferTask.cs b/CC/iWareCC_ASRS/WmsTask/EmptySalverTransferTask.cs
index 70020fe..8ce36c5 100644
--- a/CC/iWareCC_ASRS/WmsTask/EmptySalverTransferTask.cs
+++ b/CC/iWareCC_ASRS/WmsTask/EmptySalverTransferTask.cs
@@ -29,11 +29,11 @@
             while (true)
             {
                 Thread.Sleep(2000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
-                SystemWarningMsg._lbl_Alert_EmptySalverTransfer = string.Empty;
+                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound = string.Empty;
                 bool isHasFinishedCurrentHanlder = false;//鏄惁宸茬粡澶勭悊瀹屼簡绌烘墭鐩樿浆杩愪换鍔�
                 try
                 {
-                    if (SystemValue.isAllowRuning_EmptySalverTransfer && SystemValue.isStartedModel)
+                    if (SystemValue.isAllowRuning_DataProcess_RobotBuffer_IssueOutboundTask && SystemValue.isStartedModel)
                     {
                         //姝ゅ鍒ゆ柇 1009 1010 1011鐨勭姸鎬�
                         bool isEmptyPlace_1011 = false, isEmptyPlace_1010 = false, isEmptyPlace_1009 = false;
@@ -77,7 +77,7 @@
                                     {
                                         if (FormCC.RGV_1011_HasCategory_COUNT < SysGloble.MAX_RGV_1011_HasCategory_COUNT)
                                         {
-                                            SystemWarningMsg._lbl_Alert_EmptySalverTransfer += "閿欒锛�1011澶勪笉鍏佽鍒涘缓浠诲姟锛�1011鏈夎揣鏃堕棿:" + FormCC.RGV_1011_HasCategory_COUNT
+                                            SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound += "閿欒锛�1011澶勪笉鍏佽鍒涘缓浠诲姟锛�1011鏈夎揣鏃堕棿:" + FormCC.RGV_1011_HasCategory_COUNT
                                                 + ",杩樻湭澶т簬璁惧畾鐨勬渶澶ц秴鏃舵椂闂�:" + SysGloble.MAX_RGV_1011_HasCategory_COUNT + SysGloble.SPLIT_STR;
                                         }
                                         else
@@ -93,11 +93,11 @@
                                     var fr = MyExtendHelper.DoHandler(context, store, rgvLocation);
                                     if (fr.result == false)
                                     {
-                                        SystemWarningMsg._lbl_Alert_EmptySalverTransfer += "閿欒锛�1011澶勬柊寤轰换鍔″け璐�:" + fr.resMsg + SysGloble.SPLIT_STR;
+                                        SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound += "閿欒锛�1011澶勬柊寤轰换鍔″け璐�:" + fr.resMsg + SysGloble.SPLIT_STR;
                                     }
                                     else
                                     {
-                                        SystemWarningMsg._lbl_Alert_EmptySalverTransfer += "鎴愬姛鍒涘缓1011浠诲姟" + SysGloble.SPLIT_STR;
+                                        SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound += "鎴愬姛鍒涘缓1011浠诲姟" + SysGloble.SPLIT_STR;
                                         continue;
                                     }
                                     isHasFinishedCurrentHanlder = true;
@@ -165,7 +165,7 @@
                                 if (salverStackCount == 0)
                                 {
                                     //鎶ラ敊
-                                    SystemWarningMsg._lbl_Alert_EmptySalverTransfer += ("[妫�娴媇鏍规嵁1009绔欑偣鐨勫厜鐢佃幏鍙栬繑鍥炵珛浣撳簱鐨勬墭鐩樻暟涓�0") + SysGloble.SPLIT_STR;
+                                    SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound += ("[妫�娴媇鏍规嵁1009绔欑偣鐨勫厜鐢佃幏鍙栬繑鍥炵珛浣撳簱鐨勬墭鐩樻暟涓�0") + SysGloble.SPLIT_STR;
                                     continue;
                                 }
                                 //浼戠湢5绉�
@@ -174,13 +174,13 @@
                                 if (salverStackCount2 == 0)
                                 {
                                     //鎶ラ敊
-                                    SystemWarningMsg._lbl_Alert_EmptySalverTransfer += ("[妫�娴媇鏍规嵁1009绔欑偣鐨勫厜鐢佃幏鍙栬繑鍥炵珛浣撳簱鐨勬墭鐩樻暟涓�0") + SysGloble.SPLIT_STR;
+                                    SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound += ("[妫�娴媇鏍规嵁1009绔欑偣鐨勫厜鐢佃幏鍙栬繑鍥炵珛浣撳簱鐨勬墭鐩樻暟涓�0") + SysGloble.SPLIT_STR;
                                     continue;
                                 }
                                 if (salverStackCount != salverStackCount2)
                                 {
                                     //鎶ラ敊
-                                    SystemWarningMsg._lbl_Alert_EmptySalverTransfer += ("鏍规嵁1009绔欑偣鐨勫厜鐢碉紝鐩稿樊5绉掕幏鍙栬繑鍥炵珛浣撳簱鐨勬墭鐩樻暟涓嶄竴鑷达紝绗竴娆℃槸" + salverStackCount + "锛岀浜屾鏄�" + salverStackCount2) + SysGloble.SPLIT_STR;
+                                    SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound += ("鏍规嵁1009绔欑偣鐨勫厜鐢碉紝鐩稿樊5绉掕幏鍙栬繑鍥炵珛浣撳簱鐨勬墭鐩樻暟涓嶄竴鑷达紝绗竴娆℃槸" + salverStackCount + "锛岀浜屾鏄�" + salverStackCount2) + SysGloble.SPLIT_STR;
                                     continue;
                                 }
 
@@ -190,11 +190,11 @@
                                 var fr = MyExtendHelper.DoHandler(context, null, rgvLocation);
                                 if (fr.result == false)
                                 {
-                                    SystemWarningMsg._lbl_Alert_EmptySalverTransfer += "閿欒锛�1009澶勬柊寤轰换鍔″け璐�:" + fr.resMsg + SysGloble.SPLIT_STR;
+                                    SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound += "閿欒锛�1009澶勬柊寤轰换鍔″け璐�:" + fr.resMsg + SysGloble.SPLIT_STR;
                                 }
                                 else
                                 {
-                                    SystemWarningMsg._lbl_Alert_EmptySalverTransfer += "鎴愬姛鍒涘缓1009浠诲姟" + SysGloble.SPLIT_STR;
+                                    SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound += "鎴愬姛鍒涘缓1009浠诲姟" + SysGloble.SPLIT_STR;
                                     continue;
                                 }
                                 isHasFinishedCurrentHanlder = true;
@@ -209,7 +209,7 @@
                             var errMsg = "";
                             if (!MyExtendHelper.IsAllowSendTaskTo1014ByTPHS(ref errMsg))
                             {
-                                SystemWarningMsg._lbl_Alert_EmptySalverTransfer += errMsg + SysGloble.SPLIT_STR;
+                                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound += errMsg + SysGloble.SPLIT_STR;
                                 continue;
                             }
 
@@ -223,7 +223,7 @@
                                 {
                                     if (!MyExtendHelper.IsAllowSendTaskTo1014ByTPHS(ref errMsg))
                                     {//鍐嶆鏍¢獙 銆怑ditBy shaocx,2022-05-18銆�
-                                        SystemWarningMsg._lbl_Alert_EmptySalverTransfer += errMsg + SysGloble.SPLIT_STR;
+                                        SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound += errMsg + SysGloble.SPLIT_STR;
                                         continue;
                                     }
                                     //鍒ゆ柇1011浣嶇疆鏄惁鏈夊簱瀛橈紝骞朵笖鏄湭閿佸畾鐘舵�侊紝濡傛灉鏄紝灏变笉瑕佸垱寤轰粠绔嬩綋搴撳埌1014鐨勪换鍔′簡銆怑ditBy shaocx,2022-05-18銆�
@@ -232,18 +232,18 @@
                                     if (store1011 != null && store1011.StationId > 0)
                                     //if (store1011 != null && store1011.StationIsLock == false && store1011.StationIsHasTaskDoing == false)
                                     {
-                                        SystemWarningMsg._lbl_Alert_EmptySalverTransfer += "1011浣嶇疆鏈夌郴缁熷簱瀛樺瓨鍦紝鍥犳涓嶉渶瑕佸垱寤轰粠绔嬩綋搴撳埌1014鐨勪换鍔°�傘��" + SysGloble.SPLIT_STR;
+                                        SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound += "1011浣嶇疆鏈夌郴缁熷簱瀛樺瓨鍦紝鍥犳涓嶉渶瑕佸垱寤轰粠绔嬩綋搴撳埌1014鐨勪换鍔°�傘��" + SysGloble.SPLIT_STR;
                                         continue;
                                     }
 
                                     var fr = MyExtendHelper.DoHandler(context, null, rgvLocation);
                                     if (fr.result == false)
                                     {
-                                        SystemWarningMsg._lbl_Alert_EmptySalverTransfer += "閿欒锛氭媶鐩樻満鍏ュ彛1014澶勬柊寤轰粠绔嬩綋搴撳彨鎵樼洏浠诲姟澶辫触:" + fr.resMsg + SysGloble.SPLIT_STR;
+                                        SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound += "閿欒锛氭媶鐩樻満鍏ュ彛1014澶勬柊寤轰粠绔嬩綋搴撳彨鎵樼洏浠诲姟澶辫触:" + fr.resMsg + SysGloble.SPLIT_STR;
                                     }
                                     else
                                     {
-                                        SystemWarningMsg._lbl_Alert_EmptySalverTransfer += "鎴愬姛鍒涘缓鎷嗙洏鏈哄叆鍙�1014澶勬柊寤轰粠绔嬩綋搴撳彨鎵樼洏浠诲姟" + SysGloble.SPLIT_STR;
+                                        SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound += "鎴愬姛鍒涘缓鎷嗙洏鏈哄叆鍙�1014澶勬柊寤轰粠绔嬩綋搴撳彨鎵樼洏浠诲姟" + SysGloble.SPLIT_STR;
                                         continue;
                                     }
                                 }
@@ -254,8 +254,8 @@
                 }
                 catch (Exception ex)
                 {
-                    SystemWarningMsg._lbl_Alert_EmptySalverTransfer += "鍒嗚В绾跨▼鍑虹幇寮傚父:" + ex.Message + SysGloble.SPLIT_STR;
-                    Log4NetHelper.WriteErrorLog(LogType.EmptySalverTransferTask, "HandlerIssuingTask鍑虹幇寮傚父锛�" + ex.Message, ex);
+                    SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound += "鍒嗚В绾跨▼鍑虹幇寮傚父:" + ex.Message + SysGloble.SPLIT_STR;
+                    Log4NetHelper.WriteErrorLog(LogType.DataProcess_RobotBuffer_IssueOutboundTask, "HandlerIssuingTask鍑虹幇寮傚父锛�" + ex.Message, ex);
                 }
 
             }
diff --git a/CC/iWareCC_ASRS/WmsTask/MainTaskDecompose_ZPRK.cs b/CC/iWareCC_ASRS/WmsTask/MainTaskDecompose_ZPRK.cs
index dbeb04a..ae426ad 100644
--- a/CC/iWareCC_ASRS/WmsTask/MainTaskDecompose_ZPRK.cs
+++ b/CC/iWareCC_ASRS/WmsTask/MainTaskDecompose_ZPRK.cs
@@ -31,7 +31,7 @@
                 try
                 {
                     SystemWarningMsg._lbl_Alert_MainTaskDecompose_ZPRK = "";
-                    if (SystemValue.isAllowRuning_MainTaskDecompose_ZPRK && SystemValue.isStartedModel)
+                    if (SystemValue.isAllowRuning_DataProcess_RobotBuffer_ModeChange && SystemValue.isStartedModel)
                     {
                         using (DbModel context = new DbModel())
                         {
diff --git a/CC/iWareCC_ASRS/WmsTask/Place1014To1020Task.cs b/CC/iWareCC_ASRS/WmsTask/Place1014To1020Task.cs
index f113740..04f1bd3 100644
--- a/CC/iWareCC_ASRS/WmsTask/Place1014To1020Task.cs
+++ b/CC/iWareCC_ASRS/WmsTask/Place1014To1020Task.cs
@@ -32,7 +32,7 @@
                     {
                         if (FormCC.RGV_1020_NoHasCategory_COUNT <= 25)
                         {
-                            SystemWarningMsg._lbl_Alert_Place1014To1020TaskTask = "1020绔欑偣锛�25绉掑唴鍏夌數鏄剧ず鏈夎揣锛屾棤椤诲鐞嗚浆杩愬埌1020浠诲姟";
+                            SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = "1020绔欑偣锛�25绉掑唴鍏夌數鏄剧ず鏈夎揣锛屾棤椤诲鐞嗚浆杩愬埌1020浠诲姟";
                             continue;
                         }
 
@@ -50,27 +50,27 @@
 
                             if (isGD_HasCatogryForRgvStattion == false)
                             {
-                                SystemWarningMsg._lbl_Alert_Place1014To1020TaskTask = "1014绔欑偣锛屽厜鐢垫樉绀烘棤璐э紝鏃犻』澶勭悊杞繍鍒�1020浠诲姟";
+                                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = "1014绔欑偣锛屽厜鐢垫樉绀烘棤璐э紝鏃犻』澶勭悊杞繍鍒�1020浠诲姟";
                                 continue;
                             }
                             else if (isSys_HasCatogryForRgvStattion == false)
                             {
-                                SystemWarningMsg._lbl_Alert_Place1014To1020TaskTask = "1014绔欑偣锛岀郴缁熸樉绀烘棤璐э紝鏃犻』澶勭悊杞繍鍒�1020浠诲姟";
+                                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = "1014绔欑偣锛岀郴缁熸樉绀烘棤璐э紝鏃犻』澶勭悊杞繍鍒�1020浠诲姟";
                                 continue;
                             }
                             else if (isExistOtherTaskDoing == true)
                             {
-                                SystemWarningMsg._lbl_Alert_Place1014To1020TaskTask = "1014绔欑偣锛岀郴缁熸樉绀烘湁鍏朵粬浠诲姟鍗犵敤锛屾棤椤诲鐞嗚浆杩愬埌1020浠诲姟";
+                                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = "1014绔欑偣锛岀郴缁熸樉绀烘湁鍏朵粬浠诲姟鍗犵敤锛屾棤椤诲鐞嗚浆杩愬埌1020浠诲姟";
                                 continue;
                             }
                             else if (isExistOtherTaskDoingForDeviceTaskTypeEnum_绔嬪簱绌烘墭鍒版媶鐩樻満鍏ュ彛 == true)
                             {
-                                SystemWarningMsg._lbl_Alert_Place1014To1020TaskTask = "1014绔欑偣锛岀郴缁熸樉绀烘湁绔嬪簱绌烘墭鍒版媶鐩樻満鍏ュ彛浠诲姟鍗犵敤锛屾棤椤诲鐞嗚浆杩愬埌1020浠诲姟";
+                                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = "1014绔欑偣锛岀郴缁熸樉绀烘湁绔嬪簱绌烘墭鍒版媶鐩樻満鍏ュ彛浠诲姟鍗犵敤锛屾棤椤诲鐞嗚浆杩愬埌1020浠诲姟";
                                 continue;
                             }
                             else if (isExistOtherTaskDoingForDeviceTaskTypeEnum_绌烘墭杞繍鍒版媶鐩樻満鍏ュ彛 == true)
                             {
-                                SystemWarningMsg._lbl_Alert_Place1014To1020TaskTask = "1014绔欑偣锛岀郴缁熸樉绀烘湁绌烘墭杞繍鍒版媶鐩樻満鍏ュ彛浠诲姟鍗犵敤锛屾棤椤诲鐞嗚浆杩愬埌1020浠诲姟";
+                                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = "1014绔欑偣锛岀郴缁熸樉绀烘湁绌烘墭杞繍鍒版媶鐩樻満鍏ュ彛浠诲姟鍗犵敤锛屾棤椤诲鐞嗚浆杩愬埌1020浠诲姟";
                                 continue;
                             }
 
@@ -79,7 +79,7 @@
                             isGD_HasCatogryForRgvStattion = MyExtendHelper.IsGD_HasCatogryForRgvStattion(((int)rgvLocation_1020).ToString());
                             if (isGD_HasCatogryForRgvStattion == true)
                             {
-                                SystemWarningMsg._lbl_Alert_Place1014To1020TaskTask = "1020绔欑偣锛屽厜鐢垫樉绀烘湁璐э紝鏃犻』澶勭悊杞繍鍒�1020浠诲姟";
+                                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = "1020绔欑偣锛屽厜鐢垫樉绀烘湁璐э紝鏃犻』澶勭悊杞繍鍒�1020浠诲姟";
                                 continue;
                             }
 
@@ -98,11 +98,11 @@
                             var fr = MyExtendHelper.DoHandler(context, store, EDevice.鎷嗙洏鏈�1020);
                             if (fr.result == false)
                             {
-                                SystemWarningMsg._lbl_Alert_Place1014To1020TaskTask = "閿欒锛氭媶鐩樻満鍏ュ彛1014澶勬柊寤轰粠 1014搴撲綅杞繍鍒�1020绾跨▼ 浠诲姟澶辫触:" + fr.resMsg;
+                                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = "閿欒锛氭媶鐩樻満鍏ュ彛1014澶勬柊寤轰粠 1014搴撲綅杞繍鍒�1020绾跨▼ 浠诲姟澶辫触:" + fr.resMsg;
                             }
                             else
                             {
-                                SystemWarningMsg._lbl_Alert_Place1014To1020TaskTask = "鎴愬姛鍒涘缓鎷嗙洏鏈哄叆鍙�1014澶勬柊寤� 1014搴撲綅杞繍鍒�1020 浠诲姟";
+                                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = "鎴愬姛鍒涘缓鎷嗙洏鏈哄叆鍙�1014澶勬柊寤� 1014搴撲綅杞繍鍒�1020 浠诲姟";
                             }
                             #endregion
 
@@ -113,7 +113,7 @@
                 }
                 catch (Exception ex)
                 {
-                    SystemWarningMsg._lbl_Alert_Place1014To1020TaskTask = "1014搴撲綅杞繍鍒�1020绾跨▼鍑虹幇寮傚父:" + ex.Message;
+                    SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = "1014搴撲綅杞繍鍒�1020绾跨▼鍑虹幇寮傚父:" + ex.Message;
                     Log4NetHelper.WriteErrorLog(LogType.CCWCFService, "Place1014To1020Task 鍑虹幇寮傚父锛�" + ex.Message, ex);
                 }
             }
diff --git a/CC/iWareCC_ASRS/iWareCC.csproj b/CC/iWareCC_ASRS/iWareCC.csproj
index 07fb8dd..9ec1815 100644
--- a/CC/iWareCC_ASRS/iWareCC.csproj
+++ b/CC/iWareCC_ASRS/iWareCC.csproj
@@ -156,6 +156,7 @@
     <Compile Include="ThreadService\00_269宸ヤ綅\DataProcess_269.cs" />
     <Compile Include="ThreadService\01_BZ01宸ヤ綅锛堟竻鐏帮紝娲楁澘鍚庡伐浣嶏級\DataProcess_BZ01.cs" />
     <Compile Include="ThreadService\02_BZ39宸ヤ綅锛堣ˉ鏉垮悗宸ヤ綅锛塡DataProcess_RobotBuffer_ModeChange.cs" />
+    <Compile Include="ThreadService\02_BZ39宸ヤ綅锛堣ˉ鏉垮悗宸ヤ綅锛塡Outbound\4銆丏ataProcess_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/CC/iWareCommon/BusinessHelper/BusinessHelper.cs b/CC/iWareCommon/BusinessHelper/BusinessHelper.cs
index 33b4856..6e7021c 100644
--- a/CC/iWareCommon/BusinessHelper/BusinessHelper.cs
+++ b/CC/iWareCommon/BusinessHelper/BusinessHelper.cs
@@ -135,7 +135,7 @@
         /// <returns></returns>
         public static string CreatePlcTaskIdForSrmTask()
         {
-            int iSeed = 65534;
+            int iSeed = 9999;
             //浠�101-9999锛屼负浠�涔堣浠�101寮�濮嬶紝鍥犱负1-100浣滀负鎵嬪姩浠诲姟涓嬪彂銆傘�怑ditBy shaocx,2022-05-10銆�
             return new Random(Guid.NewGuid().GetHashCode()).Next(101, iSeed).ToString();
         }
diff --git a/CC/iWareCommon/Utils/Log4Net/LogType.cs b/CC/iWareCommon/Utils/Log4Net/LogType.cs
index 18fb3b6..10be19d 100644
--- a/CC/iWareCommon/Utils/Log4Net/LogType.cs
+++ b/CC/iWareCommon/Utils/Log4Net/LogType.cs
@@ -30,7 +30,7 @@
         /// <summary>
         /// 妗佹灦浠诲姟绾跨▼鏃ュ織
         /// </summary>
-        TrussThreadService = 15,
+        DataProcess_RobotBuffer_ModeChange = 15,
 
 
         #region SDA鐩稿叧
@@ -73,7 +73,7 @@
         /// <summary>
         /// AGV绾跨▼鏃ュ織
         /// </summary>
-        AGVTheadService = 302,
+        DataProcess_RobotBuffer_AutoQiTaoOutbound = 302,
 
         /// <summary>
         /// 鍥涗釜鍏ュ簱鍙f壂鎻忔娴嬬嚎绋�
@@ -93,7 +93,7 @@
         /// <summary>
         /// 绌烘墭鐩樿浆杩愪换鍔�
         /// </summary>
-        EmptySalverTransferTask = 306,
+        DataProcess_RobotBuffer_IssueOutboundTask = 306,
 
         /// <summary>
         /// 鑷姩缁勭洏浠诲姟涓嬪彂
diff --git a/CC/iWareCommon/log4net_iWare.config b/CC/iWareCommon/log4net_iWare.config
index 4ddf3d7..a3215cb 100644
--- a/CC/iWareCommon/log4net_iWare.config
+++ b/CC/iWareCommon/log4net_iWare.config
@@ -70,8 +70,8 @@
       <filter type="log4net.Filter.DenyAllFilter" />
     </appender>
     <!--  绌烘墭鐩樿浆杩愪换鍔°�愪俊鎭�戞棩蹇�-->
-    <appender name="EmptySalverTransferTask_Info" type="log4net.Appender.RollingFileAppender">
-      <file value="d:\\Log\\LuLiMuYe\\iWareCC\\EmptySalverTransferTask_Info\\" />
+    <appender name="DataProcess_RobotBuffer_IssueOutboundTask_Info" type="log4net.Appender.RollingFileAppender">
+      <file value="d:\\Log\\LuLiMuYe\\iWareCC\\DataProcess_RobotBuffer_IssueOutboundTask_Info\\" />
       <appendToFile value="true" />
       <rollingStyle value="Date" />
       <staticLogFileName value="false" />
@@ -81,13 +81,13 @@
         <param name="ConversionPattern" value="%n娑堟伅鏃堕棿锛�%d [%t] %n娑堟伅绾у埆锛�%-5p %n娑� 鎭� 绫伙細%c [%x] %n%m %n "/>
       </layout>
       <filter type="log4net.Filter.LoggerMatchFilter">
-        <loggerToMatch value="EmptySalverTransferTask_Info" />
+        <loggerToMatch value="DataProcess_RobotBuffer_IssueOutboundTask_Info" />
       </filter>
       <filter type="log4net.Filter.DenyAllFilter" />
     </appender>
     <!--绌烘墭鐩樿浆杩愪换鍔°�愰敊璇�戞棩蹇�-->
-    <appender name="EmptySalverTransferTask_Error" type="log4net.Appender.RollingFileAppender">
-      <file value="d:\\Log\\LuLiMuYe\\iWareCC\\EmptySalverTransferTask_Error\\" />
+    <appender name="DataProcess_RobotBuffer_IssueOutboundTask_Error" type="log4net.Appender.RollingFileAppender">
+      <file value="d:\\Log\\LuLiMuYe\\iWareCC\\DataProcess_RobotBuffer_IssueOutboundTask_Error\\" />
       <appendToFile value="true" />
       <rollingStyle value="Date" />
       <staticLogFileName value="false" />
@@ -97,7 +97,7 @@
         <param name="ConversionPattern" value="%n寮傚父鏃堕棿锛�%d [%t] %n寮傚父绾у埆锛�%-5p %n寮� 甯� 绫伙細%c [%x] %n%m %n "/>
       </layout>
       <filter type="log4net.Filter.LoggerMatchFilter">
-        <loggerToMatch value="EmptySalverTransferTask_Error" />
+        <loggerToMatch value="DataProcess_RobotBuffer_IssueOutboundTask_Error" />
       </filter>
       <filter type="log4net.Filter.DenyAllFilter" />
     </appender>
@@ -198,8 +198,8 @@
       <filter type="log4net.Filter.DenyAllFilter" />
     </appender>
     <!--AGV銆愪俊鎭�戞棩蹇�-->
-    <appender name="AGVTheadService_Info" type="log4net.Appender.RollingFileAppender">
-      <file value="d:\\Log\\LuLiMuYe\\iWareCC\\AGVTheadService_Info\\" />
+    <appender name="DataProcess_RobotBuffer_AutoQiTaoOutbound_Info" type="log4net.Appender.RollingFileAppender">
+      <file value="d:\\Log\\LuLiMuYe\\iWareCC\\DataProcess_RobotBuffer_AutoQiTaoOutbound_Info\\" />
       <appendToFile value="true" />
       <rollingStyle value="Date" />
       <staticLogFileName value="false" />
@@ -209,13 +209,13 @@
         <param name="ConversionPattern" value="%n娑堟伅鏃堕棿锛�%d [%t] %n娑堟伅绾у埆锛�%-5p %n娑� 鎭� 绫伙細%c [%x] %n%m %n "/>
       </layout>
       <filter type="log4net.Filter.LoggerMatchFilter">
-        <loggerToMatch value="AGVTheadService_Info" />
+        <loggerToMatch value="DataProcess_RobotBuffer_AutoQiTaoOutbound_Info" />
       </filter>
       <filter type="log4net.Filter.DenyAllFilter" />
     </appender>
     <!--AGV銆愰敊璇�戞棩蹇�-->
-    <appender name="AGVTheadService_Error" type="log4net.Appender.RollingFileAppender">
-      <file value="d:\\Log\\LuLiMuYe\\iWareCC\\AGVTheadService_Error\\" />
+    <appender name="DataProcess_RobotBuffer_AutoQiTaoOutbound_Error" type="log4net.Appender.RollingFileAppender">
+      <file value="d:\\Log\\LuLiMuYe\\iWareCC\\DataProcess_RobotBuffer_AutoQiTaoOutbound_Error\\" />
       <appendToFile value="true" />
       <rollingStyle value="Date" />
       <staticLogFileName value="false" />
@@ -225,13 +225,13 @@
         <param name="ConversionPattern" value="%n寮傚父鏃堕棿锛�%d [%t] %n寮傚父绾у埆锛�%-5p %n寮� 甯� 绫伙細%c [%x] %n%m %n "/>
       </layout>
       <filter type="log4net.Filter.LoggerMatchFilter">
-        <loggerToMatch value="AGVTheadService_Error" />
+        <loggerToMatch value="DataProcess_RobotBuffer_AutoQiTaoOutbound_Error" />
       </filter>
       <filter type="log4net.Filter.DenyAllFilter" />
     </appender>
     <!--MES鎺ュ彛銆愪俊鎭�戞棩蹇�-->
-    <appender name="MesService_Info" type="log4net.Appender.RollingFileAppender">
-      <file value="d:\\Log\\LuLiMuYe\\iWareCC\\MesService_Info\\" />
+    <appender name="DataProcess_RobotBuffer_ModeChange_Info" type="log4net.Appender.RollingFileAppender">
+      <file value="d:\\Log\\LuLiMuYe\\iWareCC\\DataProcess_RobotBuffer_ModeChange_Info\\" />
       <appendToFile value="true" />
       <rollingStyle value="Date" />
       <staticLogFileName value="false" />
@@ -241,13 +241,13 @@
         <param name="ConversionPattern" value="%n娑堟伅鏃堕棿锛�%d [%t] %n娑堟伅绾у埆锛�%-5p %n娑� 鎭� 绫伙細%c [%x] %n%m %n "/>
       </layout>
       <filter type="log4net.Filter.LoggerMatchFilter">
-        <loggerToMatch value="MesService_Info" />
+        <loggerToMatch value="DataProcess_RobotBuffer_ModeChange_Info" />
       </filter>
       <filter type="log4net.Filter.DenyAllFilter" />
     </appender>
     <!--MES鎺ュ彛銆愰敊璇�戞棩蹇�-->
-    <appender name="MesService_Error" type="log4net.Appender.RollingFileAppender">
-      <file value="d:\\Log\\LuLiMuYe\\iWareCC\\MesService_Error\\" />
+    <appender name="DataProcess_RobotBuffer_ModeChange_Error" type="log4net.Appender.RollingFileAppender">
+      <file value="d:\\Log\\LuLiMuYe\\iWareCC\\DataProcess_RobotBuffer_ModeChange_Error\\" />
       <appendToFile value="true" />
       <rollingStyle value="Date" />
       <staticLogFileName value="false" />
@@ -257,7 +257,7 @@
         <param name="ConversionPattern" value="%n寮傚父鏃堕棿锛�%d [%t] %n寮傚父绾у埆锛�%-5p %n寮� 甯� 绫伙細%c [%x] %n%m %n "/>
       </layout>
       <filter type="log4net.Filter.LoggerMatchFilter">
-        <loggerToMatch value="MesService_Error" />
+        <loggerToMatch value="DataProcess_RobotBuffer_ModeChange_Error" />
       </filter>
       <filter type="log4net.Filter.DenyAllFilter" />
     </appender>
@@ -628,18 +628,18 @@
       <appender-ref ref="DataProcess_269_Error"/>
       <appender-ref ref="DataProcess_BZ01_Info"/>
       <appender-ref ref="DataProcess_BZ01_Error"/>
-      <appender-ref ref="EmptySalverTransferTask_Info"/>
-      <appender-ref ref="EmptySalverTransferTask_Error"/>
+      <appender-ref ref="DataProcess_RobotBuffer_IssueOutboundTask_Info"/>
+      <appender-ref ref="DataProcess_RobotBuffer_IssueOutboundTask_Error"/>
       <appender-ref ref="DataProcess_BZ39_Info"/>
       <appender-ref ref="DataProcess_BZ39_Error"/>
       <appender-ref ref="DataProcess_RobotBuffer_FinishTask_Info"/>
       <appender-ref ref="DataProcess_RobotBuffer_FinishTask_Error"/>
       <appender-ref ref="DataProcess_RobotBuffer_FinishTaskForOutbound_Info"/>
       <appender-ref ref="DataProcess_RobotBuffer_FinishTaskForOutbound_Error"/>
-      <appender-ref ref="AGVTheadService_Info"/>
-      <appender-ref ref="AGVTheadService_Error"/>
-      <appender-ref ref="MesService_Info"/>
-      <appender-ref ref="MesService_Error"/>
+      <appender-ref ref="DataProcess_RobotBuffer_AutoQiTaoOutbound_Info"/>
+      <appender-ref ref="DataProcess_RobotBuffer_AutoQiTaoOutbound_Error"/>
+      <appender-ref ref="DataProcess_RobotBuffer_ModeChange_Info"/>
+      <appender-ref ref="DataProcess_RobotBuffer_ModeChange_Error"/>
       <appender-ref ref="OutPlanTask_Info"/>
       <appender-ref ref="OutPlanTask_Error"/>
       <!--鍫嗗灈鏈轰换鍔$嚎绋嬫棩蹇�-->
diff --git a/CC/iWareSql/DataAccess/StationHandlerV2.cs b/CC/iWareSql/DataAccess/StationHandlerV2.cs
index 9c33aa9..717e298 100644
--- a/CC/iWareSql/DataAccess/StationHandlerV2.cs
+++ b/CC/iWareSql/DataAccess/StationHandlerV2.cs
@@ -181,18 +181,18 @@
                     var emptyStationList = edm.V_EmptyStation.ToList();
 
                     //涓嶉殢鏈烘帓搴�
-                    emptyStationList = emptyStationList.OrderByDescending(x => x.LaneNo).ThenByDescending(x => x.ColumnNo).ThenBy(x => x.LayerNo).ToList();
+                    emptyStationList = emptyStationList.OrderBy(x => x.LaneNo).ThenBy(x => x.LayerNo).ThenBy(x => x.ColumnNo).ToList();
 
 
                     //澧炲姞璇ュ簱浣嶆槸鍚﹁浠诲姟鍗犵敤鐨勭瓫閫� [EditBy shaocx,2022-06-02]
                     //emptyStationList = FilterStationForDoingTask(edm, emptyStationList);
                     List<int> usePlaceTypeList = new List<int>();
-                    int placeType = TCSCommon.GetPlaceTypeByWidthLength(upiObj, upiObj.Length, upiObj.Width,ref usePlaceTypeList);
+                    int placeType = TCSCommon.GetPlaceTypeByWidthLength(upiObj, upiObj.Length, upiObj.Width, ref usePlaceTypeList);
                     //浼樺厛鏌ヨ
-                    var my_emptyStationList = emptyStationList.Where(x => usePlaceTypeList.Contains( x.PlaceType)).OrderBy(x=>x.PlaceType).ToList();
+                    var my_emptyStationList = emptyStationList.Where(x => usePlaceTypeList.Contains(x.PlaceType)).OrderBy(x => x.PlaceType).ToList();
                     if (my_emptyStationList?.Count() > 0)
                     {
-                        wms_base_place toPlace = StationHandler.GetPlaceByPlaceId(emptyStationList.First().Id, edm);
+                        wms_base_place toPlace = StationHandler.GetPlaceByPlaceId(my_emptyStationList.First().Id, edm);
                         return toPlace;
                     }
                     else
diff --git a/CC/iWareSql/DataAccess/TaskHandler.cs b/CC/iWareSql/DataAccess/TaskHandler.cs
index 19a4fbf..97fd002 100644
--- a/CC/iWareSql/DataAccess/TaskHandler.cs
+++ b/CC/iWareSql/DataAccess/TaskHandler.cs
@@ -45,11 +45,27 @@
             var isExist = wmsDB.wms_rbline_task.Where(x => x.TaskStatus == (int)TaskStatusEnum.宸蹭笅鍙�
                 && x.RbTaskType == (int)RbTaskTypeEnum.鐮佹澘浠诲姟).ToList();
 
+        /// <summary>
+        /// 楠岃瘉 鏈哄櫒浜虹紦瀛樺矝鏄惁瀛樺湪 鏈粨鏉�  鐨勫嚭搴撲换鍔�
+        /// </summary>
+        /// <param name="wmsDB"></param>
+        /// <returns>true:涓嶅瓨鍦� false锛氬瓨鍦�</returns>
+        public static bool ValidateNoFinishOutTaskForRobotBuffer(WmsDBModel.WmsDBModel wmsDB)
+        {
+            var isExist = wmsDB.wms_rbline_task.Where(x => x.TaskStatus != (int)TaskStatusEnum.宸插畬鎴�
+                && x.TaskStatus != (int)TaskStatusEnum.宸插彇娑�
+                && (
+                   x.RbTaskType == (int)RbTaskTypeEnum.鍑哄簱浠诲姟
+                )
+              ).ToList();
+
             if (isExist?.Count() > 0)
             {
                 return false;
             }
             return true;
         }
+
+
     }
 }
\ No newline at end of file
diff --git a/CC/iWareUnitTest/App.config b/CC/iWareUnitTest/App.config
index 92abca4..0d0d06c 100644
--- a/CC/iWareUnitTest/App.config
+++ b/CC/iWareUnitTest/App.config
@@ -5,8 +5,7 @@
     <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
   </configSections>
   <connectionStrings>
-    <!--鏈満-->
-    <add name="DbModel" connectionString="data source=192.168.10.5;initial catalog=LA24030_LuLiPackageLine;persist security info=True;user id=sa;password=123abc.com;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient"/>
+    <add name="WmsDBModel" connectionString="data source=localhost;initial catalog=LA24030_LuLiPackageLine;persist security info=True;user id=sa;password=123abc.com;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient"/>
   </connectionStrings>
   <appSettings>
     <!-- 鏄惁妯℃嫙PLC锛屽彂甯冧竴瀹氭槸 FALSE -->
diff --git a/CC/iWareUnitTest/Task_UnitTest.cs b/CC/iWareUnitTest/Task_UnitTest.cs
index 6e90b46..6b589be 100644
--- a/CC/iWareUnitTest/Task_UnitTest.cs
+++ b/CC/iWareUnitTest/Task_UnitTest.cs
@@ -6,6 +6,8 @@
 using iWareModel;
 using iWareCC.Common.Helper;
 using iWareSql.DBModel;
+using iWareSql.WmsDBModel;
+using System.Linq;
 
 namespace iWareUnitTest
 {
@@ -17,9 +19,11 @@
         public void Test()
         {
             var errMsg = "";
-            using (DbModel context = new DbModel())
+            using (WmsDBModel context = new WmsDBModel())
             {
-                var srmStore = MyExtendHelper.FindStoreForEmptySalverTo1014(context, ref errMsg);
+                var obj = context.mes_batchOrderUPI_new.Where(x => x.UPI == "LS101000901100090000").FirstOrDefault();
+
+                var place = StationHandlerV2.FindBestEmptyPlace(context, obj);
             }
 
         }
@@ -27,7 +31,7 @@
         [TestMethod]
         public void TestAddInStoreTask()
         {
-            SysUser user = new SysUser();
+           
             AddMainTaskPostParam param = new AddMainTaskPostParam();
             param.CargoNo = "鎴戞槸璐х墿鍙峰晩2swfsaf";
             param.SalverCode = "鎴戞槸鎵樼洏鍙峰晩2swfsaf";
diff --git a/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/mes_BatchOrderUPI_New/index.vue b/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/mes_BatchOrderUPI_New/index.vue
index 29478a2..7889af6 100644
--- a/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/mes_BatchOrderUPI_New/index.vue
+++ b/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/mes_BatchOrderUPI_New/index.vue
@@ -199,7 +199,7 @@
           </el-table-column>
         <el-table-column prop="planNo" label="鎵规鍙�"  show-overflow-tooltip="" />
         <el-table-column prop="orderId" label="璁㈠崟鍙�"  show-overflow-tooltip="" />
-        <el-table-column prop="upi" label="閮ㄤ欢鏉$爜"  show-overflow-tooltip="" />
+        <el-table-column prop="upi" label="閮ㄤ欢鏉$爜"  width="200px" show-overflow-tooltip="" />
         <el-table-column prop="detailName" label="閮ㄤ欢鍚嶇О"  show-overflow-tooltip="" />
         <el-table-column prop="length" label="闀�"  show-overflow-tooltip="" />
         <el-table-column prop="width" label="瀹�"  show-overflow-tooltip="" />
diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Configuration/Database.json b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Configuration/Database.json
index 6121877..c34ca40 100644
--- a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Configuration/Database.json
+++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Configuration/Database.json
@@ -21,12 +21,12 @@
         //	}
         //],
         "DbSettings": {
-          "EnableInitDb": false, // 鍚敤搴撳垵濮嬪寲
-          "EnableDiffLog": false, // 鍚敤搴撹〃宸紓鏃ュ織
+          "EnableInitDb": true, // 鍚敤搴撳垵濮嬪寲
+          "EnableDiffLog": true, // 鍚敤搴撹〃宸紓鏃ュ織
           "EnableUnderLine": false // 鍚敤椹煎嘲杞笅鍒掔嚎
         },
         "TableSettings": {
-          "EnableInitTable": false, // 鍚敤琛ㄥ垵濮嬪寲
+          "EnableInitTable": true, // 鍚敤琛ㄥ垵濮嬪寲
           "EnableIncreTable": false // 鍚敤琛ㄥ閲忔洿鏂�-鐗规�IncreTable]
         },
         "SeedSettings": {
diff --git a/SDA/iWareSda/App.config b/SDA/iWareSda/App.config
index e4067c0..7f35a5c 100644
--- a/SDA/iWareSda/App.config
+++ b/SDA/iWareSda/App.config
@@ -4,8 +4,8 @@
     <!-- 璇█閰嶇疆 閰嶇疆  0 涓枃 1 鑻辨枃 -->
     <add key="LanguageFlg" value="0"/>
     <!-- 绔欑偣鐨凱LC 閰嶇疆 -->
-    <!-- <add key="Station_Address" value="172.17.51.202"/> -->
-    <add key="Station_Address" value="192.168.10.100"/>
+    <add key="Station_Address" value="172.17.51.202"/>
+    <!-- <add key="Station_Address" value="192.168.10.100"/> -->
     <add key="Station_Rack" value="0"/>
     <add key="Station_Slot" value="1"/>
     <add key="Station_Port" value="102"/>
diff --git a/SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvComm.cs b/SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvComm.cs
index 3aefa22..70f2da2 100644
--- a/SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvComm.cs
+++ b/SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvComm.cs
@@ -40,13 +40,13 @@
         /// 鍏ュ簱浠诲姟鍙�
         /// </summary>
         [Description("鍏ュ簱浠诲姟鍙�")]
-        public int W_Inbound_TaskID { get; set; }
+        public short W_Inbound_TaskID { get; set; }
 
         /// <summary>
         /// 鍑哄簱浠诲姟鍙�
         /// </summary>
         [Description("鍑哄簱浠诲姟鍙�")]
-        public int W_Outbound_TaskID { get; set; }
+        public short W_Outbound_TaskID { get; set; }
 
         /// <summary>
         /// 鏉ユ枡闀垮害
@@ -77,7 +77,7 @@
         /// 鍒嗛厤鍑哄簱搴撲綅鍙�
         /// </summary>
         [Description("鍒嗛厤鍑哄簱搴撲綅鍙�")]
-        public string W_Destination_Out { get; set; }
+        public int W_Destination_Out { get; set; }
 
         /// <summary>
         /// 鏄惁鏃嬭浆
@@ -173,6 +173,12 @@
         /// </summary>
         [Description("鐮佸灈浠诲姟瀹屾垚纭")]
         public bool W_PalletizingTaskFinish { get; set; }
+
+        /// <summary>
+        /// 妯″紡锛�1锛氬叆搴擄紝 2锛氬嚭搴�   3锛氬己鍒跺嚭搴擄級
+        /// </summary>
+        [Description("妯″紡锛�1锛氬叆搴擄紝 2锛氬嚭搴�   3锛氬己鍒跺嚭搴擄級")]
+        public short W_Mode { get; set; }
 
     }
 
@@ -474,27 +480,6 @@
         /// </summary>
         [Description("鍑哄簱浠诲姟鍙�")]
         public short R_Outbound_TaskID { get; set; }
-
-        /// <summary>
-        /// 鐮佸灈鏀捐揣瀹屾垚
-        /// </summary>
-        [Description("鐮佸灈鏀捐揣瀹屾垚")]
-        public bool R_PalletizingFinish { get; set; }
-        /// <summary>
-        /// 鐮佸灈璇诲彇浠诲姟鍙�
-        /// </summary>
-        [Description("鐮佸灈璇诲彇浠诲姟鍙�")]
-        public short R_PalletizingTaskNo { get; set; }
-        /// <summary>
-        /// 鐮佸灈浣嶇疆1鐘舵��
-        /// </summary>
-        [Description("鐮佸灈浣嶇疆1鐘舵��")]
-        public short R_PalletizingStation1 { get; set; }
-        /// <summary>
-        /// 鐮佸灈浣嶇疆2鐘舵��
-        /// </summary>
-        [Description("鐮佸灈浣嶇疆2鐘舵��")]
-        public short R_PalletizingStation2 { get; set; }
     }
 
     public class StationDBForReadComm
@@ -554,25 +539,6 @@
         /// </summary>
         [Description("鍑哄簱浠诲姟鍙�")]
         public string R_Outbound_TaskID { get; set; }
-        /// <summary>
-        /// 鐮佸灈鏀捐揣瀹屾垚
-        /// </summary>
-        [Description("鐮佸灈鏀捐揣瀹屾垚")]
-        public string R_PalletizingFinish { get; set; }
-        /// <summary>
-        /// 鐮佸灈璇诲彇浠诲姟鍙�
-        /// </summary>
-        [Description("鐮佸灈璇诲彇浠诲姟鍙�")]
-        public string R_PalletizingTaskNo { get; set; }
-        /// <summary>
-        /// 鐮佸灈浣嶇疆1鐘舵��
-        /// </summary>
-        [Description("鐮佸灈浣嶇疆1鐘舵��")]
-        public string R_PalletizingStation1 { get; set; }
-        /// <summary>
-        /// 鐮佸灈浣嶇疆2鐘舵��
-        /// </summary>
-        [Description("鐮佸灈浣嶇疆2鐘舵��")]
-        public string R_PalletizingStation2 { get; set; }
+
     }
 }
diff --git a/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs b/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs
index 3cf12bb..d9b96f1 100644
--- a/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs
+++ b/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs
@@ -278,12 +278,71 @@
                     return false;
                 }
 
+
+                b2 = this.plcService.WriteValuePoint(stationObj.W_ReqOut, false, view_stationObj.W_ReqOut);
+                if (!b2.result)
+                {
+                    msg = string.Format("鍚慡tation W_ReqOut 鍦板潃{0} 鍐�  " + false + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg,
+                        stationObj.W_ReqOut);
+                    return false;
+                }
+                b2 = this.plcService.WriteValuePoint(stationObj.W_Destination_Out, 0, view_stationObj.W_Destination_Out);
+                if (!b2.result)
+                {
+                    msg = string.Format("鍚慡tation W_Destination_Out 鍦板潃{0} 鍐�  " + 0 + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg,
+                        stationObj.W_Destination_Out);
+                    return false;
+                }
+                b2 = this.plcService.WriteValuePoint(stationObj.W_Outbound_TaskID, 0, view_stationObj.W_Outbound_TaskID);
+                if (!b2.result)
+                {
+                    msg = string.Format("鍚慡tation W_Outbound_TaskID 鍦板潃{0} 鍐�  " + 0 + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg,
+                        stationObj.W_Outbound_TaskID);
+                    return false;
+                }
+
+
                 return true;
             }
             catch (Exception ex)
             {
                 msg = ex.Message;
                 var logcontext = string.Format("鍚慡tatio 鍑哄簱浠诲姟瀹屾垚纭 鍑虹幇寮傚父:" + JsonConvert.SerializeObject(ex),
+                        "");
+                Log4NetHelper.WriteErrorLog(Station_CacheEntity.curLogType, logcontext, ex);
+                return false;
+            }
+        }
+
+        /// <summary>
+        /// 鍒囨崲妯″紡
+        /// </summary>
+        /// <param name="stationCode"></param>
+        /// <param name="value"></param>
+        /// <param name="msg"></param>
+        /// <returns></returns>
+        public bool ChangeMode(string stationCode, int value, out string msg)
+        {
+            try
+            {
+                msg = "";
+                var stationObj = this.DBBlockForWrite.W_StationForWriteCommList.Where(x => x.StationCode == stationCode).FirstOrDefault();
+
+                var view_stationObj = this.View.W_StationForWriteCommList.Where(x => x.StationCode == stationCode).FirstOrDefault();
+                MessageModel b2 = this.plcService.WriteValuePoint(stationObj.W_Mode, value, view_stationObj.W_Mode);
+                if (!b2.result)
+                {
+                    msg = string.Format("鍚慡tation 鍒囨崲妯″紡 鍦板潃{0} 鍐�  " + value + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg,
+                        stationObj.W_Mode);
+                    return false;
+                }
+
+                return true;
+            }
+            catch (Exception ex)
+            {
+                msg = ex.Message;
+                var logcontext = string.Format("鍚慡tatio 鍒囨崲妯″紡 鍑虹幇寮傚父:" + JsonConvert.SerializeObject(ex),
                         "");
                 Log4NetHelper.WriteErrorLog(Station_CacheEntity.curLogType, logcontext, ex);
                 return false;
@@ -514,20 +573,11 @@
                 var stationObj = this.DBBlockForWrite.W_StationForWriteCommList.Where(x => x.StationCode == stationCode).FirstOrDefault();
 
                 var view_stationObj = this.View.W_StationForWriteCommList.Where(x => x.StationCode == stationCode).FirstOrDefault();
-                MessageModel b2 = this.plcService.WriteValuePoint(stationObj.W_Outbound_TaskID, true, view_stationObj.W_Outbound_TaskID);
+                MessageModel b2 = this.plcService.WriteValuePoint(stationObj.W_Outbound_TaskID, outbound_TaskID, view_stationObj.W_Outbound_TaskID);
                 if (!b2.result)
                 {
-                    msg = string.Format("鍚慡tation鍦板潃{0} 鍐� 鍑哄簱浠诲姟鍙� " + true + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg,
+                    msg = string.Format("鍚慡tation鍦板潃{0} 鍐� 鍑哄簱浠诲姟鍙� " + outbound_TaskID + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg,
                        stationObj.W_Outbound_TaskID);
-                    return false;
-                }
-
-
-                b2 = this.plcService.WriteValuePoint(stationObj.W_ReqOut, true, view_stationObj.W_ReqOut);
-                if (!b2.result)
-                {
-                    msg = string.Format("鍚慡tation鍦板潃{0} 鍐� 璇锋眰鍑哄簱 " + true + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg,
-                      stationObj.W_ReqOut);
                     return false;
                 }
 
@@ -539,6 +589,13 @@
                     return false;
                 }
 
+                b2 = this.plcService.WriteValuePoint(stationObj.W_ReqOut, true, view_stationObj.W_ReqOut);
+                if (!b2.result)
+                {
+                    msg = string.Format("鍚慡tation鍦板潃{0} 鍐� 璇锋眰鍑哄簱 " + true + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg,
+                      stationObj.W_ReqOut);
+                    return false;
+                }
 
                 return true;
             }
diff --git a/SDA/iWareSda/Devices/4-Station/StationModel/Station_CacheEntity.cs b/SDA/iWareSda/Devices/4-Station/StationModel/Station_CacheEntity.cs
index 446480d..27dc1b7 100644
--- a/SDA/iWareSda/Devices/4-Station/StationModel/Station_CacheEntity.cs
+++ b/SDA/iWareSda/Devices/4-Station/StationModel/Station_CacheEntity.cs
@@ -177,7 +177,8 @@
                 W_ReqOut = W_DBHeaderWithSeparate_BZ39 + "12.0",
                 W_Destination_Out = W_DBHeaderWithSeparate_BZ39 + "14.0",
                 W_Mode = W_DBHeaderWithSeparate_BZ39 + "18.0",
-                W_OutboundFinishConfirm = W_DBHeaderWithSeparate_BZ39 + "0.2"
+                W_OutboundFinishConfirm = W_DBHeaderWithSeparate_BZ39 + "0.2",
+
 
             });
 
@@ -244,6 +245,8 @@
                 R_Inbound_TaskID = W_DBHeaderWithSeparate_BZ39 + "112.0",
                 R_Outbound_TaskID = W_DBHeaderWithSeparate_BZ39 + "114.0",
 
+                R_ForceOutboundMode = W_DBHeaderWithSeparate_BZ39 + "50.3",
+
             });
 
 
diff --git a/SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs b/SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs
index 14f0541..808f7e2 100644
--- a/SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs
+++ b/SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs
@@ -110,6 +110,17 @@
         [OperationContract]
         SdaResEntity OutboundFinishConfirm(int deviceId, bool value, string stationCode);
 
+
+        /// <summary>
+        /// 鍒囨崲妯″紡
+        /// </summary>
+        /// <param name="deviceId"></param>
+        /// <param name="value"></param>
+        /// <param name="stationCode"></param>
+        /// <returns></returns>
+        [OperationContract]
+        SdaResEntity ChangeMode(int deviceId, int value, string stationCode);
+
         /// <summary>
         /// 鍐欏叆鍏ュ簱浠诲姟淇℃伅
         /// </summary>
diff --git a/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs b/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs
index 31e2d98..e58342b 100644
--- a/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs
+++ b/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs
@@ -503,6 +503,39 @@
         }
 
         /// <summary>
+        /// 鍒囨崲妯″紡
+        /// </summary>
+        /// <param name="deviceId"></param>
+        /// <param name="value"></param>
+        /// <param name="stationCode"></param>
+        /// <returns></returns>
+        public SdaResEntity ChangeMode(int deviceId, int value, string stationCode)
+        {
+            SdaResEntity _SdaResEntity = new SdaResEntity();
+            try
+            {
+                var StationResult = Station_CacheEntity.GetDeviceObj(deviceId);
+                if (!StationResult.result)
+                {
+                    return StationResult;
+                }
+                var Station = StationResult.resData as StationEntity;
+
+                string msg = "";
+                var result = Station.ChangeMode(stationCode, value, out msg);
+                _SdaResEntity.result = result;
+                _SdaResEntity.resMsg = msg;
+                return _SdaResEntity;
+            }
+            catch (Exception ex)
+            {
+                _SdaResEntity.result = false;
+                _SdaResEntity.resMsg = ex.Message;
+                return _SdaResEntity;
+            }
+        }
+
+        /// <summary>
         /// 鍐欏叆鍏ュ簱浠诲姟淇℃伅
         /// </summary>
         /// <param name="deviceId"></param>

--
Gitblit v1.9.3