add
zongzhibin
2024-11-24 272ea6040258a7adfc807123036378915860fb90
add
已添加1个文件
已修改37个文件
1264 ■■■■■ 文件已修改
CC/iWareCC_ASRS/Common/SystemValue.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/Common/SystemWarningMsg.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/Connected Services/StationService/StationService.wsdl 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/Connected Services/StationService/item3.xsd 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/DeviceThreadFactory/DeviceThreadService/RgvThreadService/RgvTaskThreadService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/FormCC.Designer.cs 214 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/FormCC.cs 114 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/Forms/SystemCheckForm.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/ThreadService/00_269工位/DataProcess_269.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/ThreadService/01_BZ01工位(清灰,洗板后工位)/DataProcess_BZ01.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/DataProcess_RobotBuffer_ModeChange.cs 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Inbound/1、DataProcess_BZ39.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Inbound/2、DataProcess_RobotBuffer_FinishTask.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Outbound/1、DataProcess_RobotBuffer_AutoQiTaoOutbound.cs 115 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Outbound/2、DataProcess_RobotBuffer_IssueOutboundTask.cs 147 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Outbound/3、DataProcess_RobotBuffer_FinishTaskForOutbound.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Outbound/4、DataProcess_RobotBuffer_ForceOutbound.cs 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/WmsTask/EmptySalverTransferTask.cs 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/WmsTask/MainTaskDecompose_ZPRK.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/WmsTask/Place1014To1020Task.cs 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/iWareCC.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCommon/BusinessHelper/BusinessHelper.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCommon/Utils/Log4Net/LogType.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCommon/log4net_iWare.config 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareSql/DataAccess/StationHandlerV2.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareSql/DataAccess/TaskHandler.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareUnitTest/App.config 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareUnitTest/Task_UnitTest.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/mes_BatchOrderUPI_New/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Configuration/Database.json 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SDA/iWareSda/App.config 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvComm.cs 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs 79 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SDA/iWareSda/Devices/4-Station/StationModel/Station_CacheEntity.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SDA/iWareSda/Devices/4-Station/StationService/StationService.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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>
        /// æ˜¯å¦å…è®¸æ‰§è¡Œ å †åž›æœºå…¥å£æ‰«ç æ£€æµ‹çº¿ç¨‹
@@ -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>
        /// æ˜¯å¦å…è®¸æ‰§è¡Œ è‡ªåŠ¨ç»„ç›˜ä»»åŠ¡
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 çš„警告消息
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);
        }
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>
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>
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" />
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);
            }
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;
    }
}
CC/iWareCC_ASRS/FormCC.cs
@@ -39,6 +39,11 @@
        public static bool IsAllowRunOutMode = false;
        /// <summary>
        /// å½“前下发出库任务的包号
        /// </summary>
        public static string currHandlerPackageCodeForIssueOutboundTask = "";
        /// <summary>
        /// 1号堆垛机入库口扫码强制验证通过
        /// </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("已处理");
            }
        }
    }
}
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;
CC/iWareCC_ASRS/ThreadService/00_269¹¤Î»/DataProcess_269.cs
@@ -30,7 +30,7 @@
            LogType logType = LogType.DataProcess_269;
            while (true)
            {
                Thread.Sleep(2000);//休眠2秒,将休眠写到前面,是为了下面的continue方法执行后不显示错误信息的提示!!!【EditBy shaocx,2022-05-24】
                Thread.Sleep(1000);//休眠2秒,将休眠写到前面,是为了下面的continue方法执行后不显示错误信息的提示!!!【EditBy shaocx,2022-05-24】
                SystemWarningMsg._lbl_alert_DataProcess_269 = string.Empty;
                try
                {
CC/iWareCC_ASRS/ThreadService/01_BZ01¹¤Î»£¨Çå»Ò£¬Ï´°åºó¹¤Î»£©/DataProcess_BZ01.cs
@@ -33,7 +33,7 @@
            LogType logType = LogType.DataProcess_BZ01;
            while (true)
            {
                Thread.Sleep(2000);//休眠2秒,将休眠写到前面,是为了下面的continue方法执行后不显示错误信息的提示!!!【EditBy shaocx,2022-05-24】
                Thread.Sleep(1000);//休眠2秒,将休眠写到前面,是为了下面的continue方法执行后不显示错误信息的提示!!!【EditBy shaocx,2022-05-24】
                SystemWarningMsg._lbl_alert_DataProcess_BZ01 = string.Empty;
                try
                {
CC/iWareCC_ASRS/ThreadService/02_BZ39¹¤Î»£¨²¹°åºó¹¤Î»£©/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方法执行后不显示错误信息的提示!!!【EditBy 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);
                }
            }
CC/iWareCC_ASRS/ThreadService/02_BZ39¹¤Î»£¨²¹°åºó¹¤Î»£©/Inbound/1¡¢DataProcess_BZ39.cs
@@ -30,7 +30,7 @@
            LogType logType = LogType.DataProcess_BZ39;
            while (true)
            {
                Thread.Sleep(2000);//休眠2秒,将休眠写到前面,是为了下面的continue方法执行后不显示错误信息的提示!!!【EditBy shaocx,2022-05-24】
                Thread.Sleep(1000);//休眠2秒,将休眠写到前面,是为了下面的continue方法执行后不显示错误信息的提示!!!【EditBy 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)
CC/iWareCC_ASRS/ThreadService/02_BZ39¹¤Î»£¨²¹°åºó¹¤Î»£©/Inbound/2¡¢DataProcess_RobotBuffer_FinishTask.cs
@@ -30,7 +30,7 @@
            LogType logType = LogType.DataProcess_RobotBuffer_FinishTask;
            while (true)
            {
                Thread.Sleep(2000);//休眠2秒,将休眠写到前面,是为了下面的continue方法执行后不显示错误信息的提示!!!【EditBy shaocx,2022-05-24】
                Thread.Sleep(500);//休眠2秒,将休眠写到前面,是为了下面的continue方法执行后不显示错误信息的提示!!!【EditBy 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,
CC/iWareCC_ASRS/ThreadService/02_BZ39¹¤Î»£¨²¹°åºó¹¤Î»£©/Outbound/1¡¢DataProcess_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方法执行后不显示错误信息的提示!!!【EditBy 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);
                }
            }
CC/iWareCC_ASRS/ThreadService/02_BZ39¹¤Î»£¨²¹°åºó¹¤Î»£©/Outbound/2¡¢DataProcess_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方法执行后不显示错误信息的提示!!!【EditBy shaocx,2022-05-24】
                SystemWarningMsg._lbl_alert_DataProcess_BZ39 = string.Empty;
                Thread.Sleep(1000);//休眠2秒,将休眠写到前面,是为了下面的continue方法执行后不显示错误信息的提示!!!【EditBy 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())
                            //取创建时间最早的那个要出库的包
                            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);
                }
            }
CC/iWareCC_ASRS/ThreadService/02_BZ39¹¤Î»£¨²¹°åºó¹¤Î»£©/Outbound/3¡¢DataProcess_RobotBuffer_FinishTaskForOutbound.cs
@@ -22,7 +22,7 @@
            LogType logType = LogType.DataProcess_RobotBuffer_FinishTaskForOutbound;
            while (true)
            {
                Thread.Sleep(2000);//休眠2秒,将休眠写到前面,是为了下面的continue方法执行后不显示错误信息的提示!!!【EditBy shaocx,2022-05-24】
                Thread.Sleep(500);//休眠2秒,将休眠写到前面,是为了下面的continue方法执行后不显示错误信息的提示!!!【EditBy shaocx,2022-05-24】
                SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTaskForOutbound = string.Empty;
                try
                {
CC/iWareCC_ASRS/ThreadService/02_BZ39¹¤Î»£¨²¹°åºó¹¤Î»£©/Outbound/4¡¢DataProcess_RobotBuffer_ForceOutbound.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,102 @@
using 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;
            }
        }
    }
}
CC/iWareCC_ASRS/WmsTask/EmptySalverTransferTask.cs
@@ -29,11 +29,11 @@
            while (true)
            {
                Thread.Sleep(2000);//休眠2秒,将休眠写到前面,是为了下面的continue方法执行后不显示错误信息的提示!!!【EditBy 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))
                                    {//再次校验 ã€EditBy 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的任务了【EditBy 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);
                }
            }
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())
                        {
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);
                }
            }
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、DataProcess_RobotBuffer_ForceOutbound.cs" />
    <Compile Include="ThreadService\02_BZ39工位(补板后工位)\Outbound\2、DataProcess_RobotBuffer_IssueOutboundTask.cs" />
    <Compile Include="ThreadService\02_BZ39工位(补板后工位)\Outbound\1、DataProcess_RobotBuffer_AutoQiTaoOutbound.cs" />
    <Compile Include="ThreadService\02_BZ39工位(补板后工位)\Outbound\3、DataProcess_RobotBuffer_FinishTaskForOutbound.cs" />
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作为手动任务下发。【EditBy shaocx,2022-05-10】
            return new Random(Guid.NewGuid().GetHashCode()).Next(101, iSeed).ToString();
        }
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>
        /// å››ä¸ªå…¥åº“口扫描检测线程
@@ -93,7 +93,7 @@
        /// <summary>
        /// ç©ºæ‰˜ç›˜è½¬è¿ä»»åŠ¡
        /// </summary>
        EmptySalverTransferTask = 306,
        DataProcess_RobotBuffer_IssueOutboundTask = 306,
        /// <summary>
        /// è‡ªåŠ¨ç»„ç›˜ä»»åŠ¡ä¸‹å‘
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"/>
      <!--堆垛机任务线程日志-->
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
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;
        }
    }
}
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 -->
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";
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="" />
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": {
SDA/iWareSda/App.config
@@ -4,8 +4,8 @@
    <!-- è¯­è¨€é…ç½® é…ç½®  0 ä¸­æ–‡ 1 è‹±æ–‡ -->
    <add key="LanguageFlg" value="0"/>
    <!-- ç«™ç‚¹çš„PLC é…ç½® -->
    <!-- <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"/>
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; }
    }
}
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("向Station 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("向Station 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("向Station 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("向Statio å‡ºåº“任务完成确认 å‡ºçް异叏:" + 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("向Station åˆ‡æ¢æ¨¡å¼ åœ°å€{0} å†™  " + value + "失败,返回结果:" + b2.resMsg,
                        stationObj.W_Mode);
                    return false;
                }
                return true;
            }
            catch (Exception ex)
            {
                msg = ex.Message;
                var logcontext = string.Format("向Statio åˆ‡æ¢æ¨¡å¼ å‡ºçް异叏:" + 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("向Station地址{0} å†™ å‡ºåº“任务号 " + true + "失败,返回结果:" + b2.resMsg,
                    msg = string.Format("向Station地址{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("向Station地址{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("向Station地址{0} å†™ è¯·æ±‚出库 " + true + "失败,返回结果:" + b2.resMsg,
                      stationObj.W_ReqOut);
                    return false;
                }
                return true;
            }
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",
            });
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>
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>