add
zongzhibin
2024-11-26 327dbcbe3e6ee5fea207422c7792fc35a1027638
add
已添加1个文件
已修改18个文件
786 ■■■■■ 文件已修改
CC/iWareCC_ASRS/Common/SystemWarningMsg.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/Connected Services/StationService/StationService.wsdl 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/Connected Services/StationService/item3.xsd 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/FormCC.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/ThreadService/03_BZ12(机器人码包工位)/DataProcess_BZ12.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/ThreadService/03_BZ12(机器人码包工位)/DataProcess_BZ12_FinishTask.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/ThreadService/04_BZ21(搬运整垛机器人)/DataProcess_BZ21.cs 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/ThreadService/04_BZ21(搬运整垛机器人)/DataProcess_BZ21_FinishTask.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/iWareCC.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCommon/Utils/Log4Net/LogType.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareSql/DataAccess/TaskHandler.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareSql/WmsDBModel/mes_batchOrderUPI_new.cs 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvComm.cs 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SDA/iWareSda/Devices/4-Station/StationModel/Station_CacheEntity.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SDA/iWareSda/Devices/4-Station/StationService/StationService.cs 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/Common/SystemWarningMsg.cs
@@ -122,7 +122,10 @@
        /// è‡ªåŠ¨ç æ¿ä»»åŠ¡ çš„警告消息
        /// </summary>
        public static string _lbl_alert_DataProcess_BZ12 = string.Empty;
        /// <summary>
        /// è‡ªåŠ¨ç æ¿ä»»åŠ¡ çš„警告消息
        /// </summary>
        public static string _lbl_alert_DataProcess_BZ21 = string.Empty;
        /// <summary>
        /// è‡ªåŠ¨ç»„ç›˜ä»»åŠ¡ä¸‹å‘ çš„警告消息
        /// </summary>
CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs
@@ -242,6 +242,12 @@
        private short R_StateField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private bool R_SurrouondTaskFinishField;
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private short R_SurrouondTaskNoField;
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private int R_TaskIDField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
@@ -518,6 +524,32 @@
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public bool R_SurrouondTaskFinish {
            get {
                return this.R_SurrouondTaskFinishField;
            }
            set {
                if ((this.R_SurrouondTaskFinishField.Equals(value) != true)) {
                    this.R_SurrouondTaskFinishField = value;
                    this.RaisePropertyChanged("R_SurrouondTaskFinish");
                }
            }
        }
        [System.Runtime.Serialization.DataMemberAttribute()]
        public short R_SurrouondTaskNo {
            get {
                return this.R_SurrouondTaskNoField;
            }
            set {
                if ((this.R_SurrouondTaskNoField.Equals(value) != true)) {
                    this.R_SurrouondTaskNoField = value;
                    this.RaisePropertyChanged("R_SurrouondTaskNo");
                }
            }
        }
        [System.Runtime.Serialization.DataMemberAttribute()]
        public int R_TaskID {
            get {
                return this.R_TaskIDField;
@@ -584,6 +616,9 @@
        private bool W_EndMarkField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private bool W_FirstMarkField;
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private short W_HeightField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
@@ -623,6 +658,9 @@
        private short W_PalletizingPlaceYField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private short W_PalletizingPlaceZField;
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private short W_PalletizingStationField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
@@ -636,6 +674,12 @@
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private short W_RotateField;
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private bool W_SurroundTaskFinishField;
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private int W_SurroundTaskNoField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private short W_WidthField;
@@ -743,6 +787,19 @@
                if ((this.W_EndMarkField.Equals(value) != true)) {
                    this.W_EndMarkField = value;
                    this.RaisePropertyChanged("W_EndMark");
                }
            }
        }
        [System.Runtime.Serialization.DataMemberAttribute()]
        public bool W_FirstMark {
            get {
                return this.W_FirstMarkField;
            }
            set {
                if ((this.W_FirstMarkField.Equals(value) != true)) {
                    this.W_FirstMarkField = value;
                    this.RaisePropertyChanged("W_FirstMark");
                }
            }
        }
@@ -917,6 +974,19 @@
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public short W_PalletizingPlaceZ {
            get {
                return this.W_PalletizingPlaceZField;
            }
            set {
                if ((this.W_PalletizingPlaceZField.Equals(value) != true)) {
                    this.W_PalletizingPlaceZField = value;
                    this.RaisePropertyChanged("W_PalletizingPlaceZ");
                }
            }
        }
        [System.Runtime.Serialization.DataMemberAttribute()]
        public short W_PalletizingStation {
            get {
                return this.W_PalletizingStationField;
@@ -977,6 +1047,32 @@
                if ((this.W_RotateField.Equals(value) != true)) {
                    this.W_RotateField = value;
                    this.RaisePropertyChanged("W_Rotate");
                }
            }
        }
        [System.Runtime.Serialization.DataMemberAttribute()]
        public bool W_SurroundTaskFinish {
            get {
                return this.W_SurroundTaskFinishField;
            }
            set {
                if ((this.W_SurroundTaskFinishField.Equals(value) != true)) {
                    this.W_SurroundTaskFinishField = value;
                    this.RaisePropertyChanged("W_SurroundTaskFinish");
                }
            }
        }
        [System.Runtime.Serialization.DataMemberAttribute()]
        public int W_SurroundTaskNo {
            get {
                return this.W_SurroundTaskNoField;
            }
            set {
                if ((this.W_SurroundTaskNoField.Equals(value) != true)) {
                    this.W_SurroundTaskNoField = value;
                    this.RaisePropertyChanged("W_SurroundTaskNo");
                }
            }
        }
@@ -1738,16 +1834,28 @@
        System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WriteOutStoreTaskInfoAsync(int deviceId, string stationCode, string sourcePlaceNo, int outbound_TaskID);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/WritePalletizingTaskInfo", ReplyAction="http://tempuri.org/IStationService/WritePalletizingTaskInfoResponse")]
        iWareCC.StationService.SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode, int taskID, bool isLast, short length, short width, short height, short rotate, short toplace, short placeX, short placeY);
        iWareCC.StationService.SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode, int taskID, bool isLast, bool isFirst, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/WritePalletizingTaskInfo", ReplyAction="http://tempuri.org/IStationService/WritePalletizingTaskInfoResponse")]
        System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WritePalletizingTaskInfoAsync(int deviceId, string stationCode, int taskID, bool isLast, short length, short width, short height, short rotate, short toplace, short placeX, short placeY);
        System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WritePalletizingTaskInfoAsync(int deviceId, string stationCode, int taskID, bool isLast, bool isFirst, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/SetPalletizingTaskFinishAck", ReplyAction="http://tempuri.org/IStationService/SetPalletizingTaskFinishAckResponse")]
        iWareCC.StationService.SdaResEntity SetPalletizingTaskFinishAck(int deviceId, bool value, string stationCode);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/SetPalletizingTaskFinishAck", ReplyAction="http://tempuri.org/IStationService/SetPalletizingTaskFinishAckResponse")]
        System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> SetPalletizingTaskFinishAckAsync(int deviceId, bool value, string stationCode);
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/WriteSurroundTaskInfo", ReplyAction="http://tempuri.org/IStationService/WriteSurroundTaskInfoResponse")]
        iWareCC.StationService.SdaResEntity WriteSurroundTaskInfo(int deviceId, string stationCode, int taskID, short length, short width, short cartonhigh, short cartonwidth, short placex, short placey);
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/WriteSurroundTaskInfo", ReplyAction="http://tempuri.org/IStationService/WriteSurroundTaskInfoResponse")]
        System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WriteSurroundTaskInfoAsync(int deviceId, string stationCode, int taskID, short length, short width, short cartonhigh, short cartonwidth, short placex, short placey);
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/SetSurroundTaskFinishAck", ReplyAction="http://tempuri.org/IStationService/SetSurroundTaskFinishAckResponse")]
        iWareCC.StationService.SdaResEntity SetSurroundTaskFinishAck(int deviceId, bool value, string stationCode);
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/SetSurroundTaskFinishAck", ReplyAction="http://tempuri.org/IStationService/SetSurroundTaskFinishAckResponse")]
        System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> SetSurroundTaskFinishAckAsync(int deviceId, bool value, string stationCode);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/WriteStation_FinishACK", ReplyAction="http://tempuri.org/IStationService/WriteStation_FinishACKResponse")]
        iWareCC.StationService.SdaResEntity WriteStation_FinishACK(int deviceId, bool value, int plcTaskId);
@@ -1915,12 +2023,12 @@
            return base.Channel.WriteOutStoreTaskInfoAsync(deviceId, stationCode, sourcePlaceNo, outbound_TaskID);
        }
        
        public iWareCC.StationService.SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode, int taskID, bool isLast, short length, short width, short height, short rotate, short toplace, short placeX, short placeY) {
            return base.Channel.WritePalletizingTaskInfo(deviceId, stationCode, taskID, isLast, length, width, height, rotate, toplace, placeX, placeY);
        public iWareCC.StationService.SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode, int taskID, bool isLast, bool isFirst, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ) {
            return base.Channel.WritePalletizingTaskInfo(deviceId, stationCode, taskID, isLast, isFirst, length, width, height, rotate, toplace, placeX, placeY, placeZ);
        }
        
        public System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WritePalletizingTaskInfoAsync(int deviceId, string stationCode, int taskID, bool isLast, short length, short width, short height, short rotate, short toplace, short placeX, short placeY) {
            return base.Channel.WritePalletizingTaskInfoAsync(deviceId, stationCode, taskID, isLast, length, width, height, rotate, toplace, placeX, placeY);
        public System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WritePalletizingTaskInfoAsync(int deviceId, string stationCode, int taskID, bool isLast, bool isFirst, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ) {
            return base.Channel.WritePalletizingTaskInfoAsync(deviceId, stationCode, taskID, isLast, isFirst, length, width, height, rotate, toplace, placeX, placeY, placeZ);
        }
        
        public iWareCC.StationService.SdaResEntity SetPalletizingTaskFinishAck(int deviceId, bool value, string stationCode) {
@@ -1931,6 +2039,22 @@
            return base.Channel.SetPalletizingTaskFinishAckAsync(deviceId, value, stationCode);
        }
        
        public iWareCC.StationService.SdaResEntity WriteSurroundTaskInfo(int deviceId, string stationCode, int taskID, short length, short width, short cartonhigh, short cartonwidth, short placex, short placey) {
            return base.Channel.WriteSurroundTaskInfo(deviceId, stationCode, taskID, length, width, cartonhigh, cartonwidth, placex, placey);
        }
        public System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WriteSurroundTaskInfoAsync(int deviceId, string stationCode, int taskID, short length, short width, short cartonhigh, short cartonwidth, short placex, short placey) {
            return base.Channel.WriteSurroundTaskInfoAsync(deviceId, stationCode, taskID, length, width, cartonhigh, cartonwidth, placex, placey);
        }
        public iWareCC.StationService.SdaResEntity SetSurroundTaskFinishAck(int deviceId, bool value, string stationCode) {
            return base.Channel.SetSurroundTaskFinishAck(deviceId, value, stationCode);
        }
        public System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> SetSurroundTaskFinishAckAsync(int deviceId, bool value, string stationCode) {
            return base.Channel.SetSurroundTaskFinishAckAsync(deviceId, value, stationCode);
        }
        public iWareCC.StationService.SdaResEntity WriteStation_FinishACK(int deviceId, bool value, int plcTaskId) {
            return base.Channel.WriteStation_FinishACK(deviceId, value, plcTaskId);
        }
CC/iWareCC_ASRS/Connected Services/StationService/StationService.wsdl
@@ -111,6 +111,18 @@
  <wsdl:message name="IStationService_SetPalletizingTaskFinishAck_OutputMessage">
    <wsdl:part name="parameters" element="tns:SetPalletizingTaskFinishAckResponse" />
  </wsdl:message>
  <wsdl:message name="IStationService_WriteSurroundTaskInfo_InputMessage">
    <wsdl:part name="parameters" element="tns:WriteSurroundTaskInfo" />
  </wsdl:message>
  <wsdl:message name="IStationService_WriteSurroundTaskInfo_OutputMessage">
    <wsdl:part name="parameters" element="tns:WriteSurroundTaskInfoResponse" />
  </wsdl:message>
  <wsdl:message name="IStationService_SetSurroundTaskFinishAck_InputMessage">
    <wsdl:part name="parameters" element="tns:SetSurroundTaskFinishAck" />
  </wsdl:message>
  <wsdl:message name="IStationService_SetSurroundTaskFinishAck_OutputMessage">
    <wsdl:part name="parameters" element="tns:SetSurroundTaskFinishAckResponse" />
  </wsdl:message>
  <wsdl:message name="IStationService_WriteStation_FinishACK_InputMessage">
    <wsdl:part name="parameters" element="tns:WriteStation_FinishACK" />
  </wsdl:message>
@@ -197,6 +209,14 @@
    <wsdl:operation name="SetPalletizingTaskFinishAck">
      <wsdl:input wsaw:Action="http://tempuri.org/IStationService/SetPalletizingTaskFinishAck" message="tns:IStationService_SetPalletizingTaskFinishAck_InputMessage" />
      <wsdl:output wsaw:Action="http://tempuri.org/IStationService/SetPalletizingTaskFinishAckResponse" message="tns:IStationService_SetPalletizingTaskFinishAck_OutputMessage" />
    </wsdl:operation>
    <wsdl:operation name="WriteSurroundTaskInfo">
      <wsdl:input wsaw:Action="http://tempuri.org/IStationService/WriteSurroundTaskInfo" message="tns:IStationService_WriteSurroundTaskInfo_InputMessage" />
      <wsdl:output wsaw:Action="http://tempuri.org/IStationService/WriteSurroundTaskInfoResponse" message="tns:IStationService_WriteSurroundTaskInfo_OutputMessage" />
    </wsdl:operation>
    <wsdl:operation name="SetSurroundTaskFinishAck">
      <wsdl:input wsaw:Action="http://tempuri.org/IStationService/SetSurroundTaskFinishAck" message="tns:IStationService_SetSurroundTaskFinishAck_InputMessage" />
      <wsdl:output wsaw:Action="http://tempuri.org/IStationService/SetSurroundTaskFinishAckResponse" message="tns:IStationService_SetSurroundTaskFinishAck_OutputMessage" />
    </wsdl:operation>
    <wsdl:operation name="WriteStation_FinishACK">
      <wsdl:input wsaw:Action="http://tempuri.org/IStationService/WriteStation_FinishACK" message="tns:IStationService_WriteStation_FinishACK_InputMessage" />
@@ -366,6 +386,24 @@
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="WriteSurroundTaskInfo">
      <soap:operation soapAction="http://tempuri.org/IStationService/WriteSurroundTaskInfo" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="SetSurroundTaskFinishAck">
      <soap:operation soapAction="http://tempuri.org/IStationService/SetSurroundTaskFinishAck" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="WriteStation_FinishACK">
      <soap:operation soapAction="http://tempuri.org/IStationService/WriteStation_FinishACK" style="document" />
      <wsdl:input>
CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd
@@ -247,6 +247,7 @@
        <xs:element minOccurs="0" name="stationCode" nillable="true" type="xs:string" />
        <xs:element minOccurs="0" name="taskID" type="xs:int" />
        <xs:element minOccurs="0" name="isLast" type="xs:boolean" />
        <xs:element minOccurs="0" name="isFirst" type="xs:boolean" />
        <xs:element minOccurs="0" name="length" type="xs:short" />
        <xs:element minOccurs="0" name="width" type="xs:short" />
        <xs:element minOccurs="0" name="height" type="xs:short" />
@@ -254,6 +255,7 @@
        <xs:element minOccurs="0" name="toplace" type="xs:short" />
        <xs:element minOccurs="0" name="placeX" type="xs:short" />
        <xs:element minOccurs="0" name="placeY" type="xs:short" />
        <xs:element minOccurs="0" name="placeZ" type="xs:short" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
@@ -280,6 +282,44 @@
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="WriteSurroundTaskInfo">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" name="deviceId" type="xs:int" />
        <xs:element minOccurs="0" name="stationCode" nillable="true" type="xs:string" />
        <xs:element minOccurs="0" name="taskID" type="xs:int" />
        <xs:element minOccurs="0" name="length" type="xs:short" />
        <xs:element minOccurs="0" name="width" type="xs:short" />
        <xs:element minOccurs="0" name="cartonhigh" type="xs:short" />
        <xs:element minOccurs="0" name="cartonwidth" type="xs:short" />
        <xs:element minOccurs="0" name="placex" type="xs:short" />
        <xs:element minOccurs="0" name="placey" type="xs:short" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="WriteSurroundTaskInfoResponse">
    <xs:complexType>
      <xs:sequence>
        <xs:element xmlns:q18="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteSurroundTaskInfoResult" nillable="true" type="q18:SdaResEntity" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="SetSurroundTaskFinishAck">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" name="deviceId" type="xs:int" />
        <xs:element minOccurs="0" name="value" type="xs:boolean" />
        <xs:element minOccurs="0" name="stationCode" nillable="true" type="xs:string" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="SetSurroundTaskFinishAckResponse">
    <xs:complexType>
      <xs:sequence>
        <xs:element xmlns:q19="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="SetSurroundTaskFinishAckResult" nillable="true" type="q19:SdaResEntity" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="WriteStation_FinishACK">
    <xs:complexType>
      <xs:sequence>
@@ -292,7 +332,7 @@
  <xs:element name="WriteStation_FinishACKResponse">
    <xs:complexType>
      <xs:sequence>
        <xs:element xmlns:q18="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_FinishACKResult" nillable="true" type="q18:SdaResEntity" />
        <xs:element xmlns:q20="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_FinishACKResult" nillable="true" type="q20:SdaResEntity" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
@@ -310,7 +350,7 @@
  <xs:element name="WriteScanValidateACKResponse">
    <xs:complexType>
      <xs:sequence>
        <xs:element xmlns:q19="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteScanValidateACKResult" nillable="true" type="q19:SdaResEntity" />
        <xs:element xmlns:q21="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteScanValidateACKResult" nillable="true" type="q21:SdaResEntity" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
@@ -328,7 +368,7 @@
  <xs:element name="WriteStation_XigangGetDataForOutResponse">
    <xs:complexType>
      <xs:sequence>
        <xs:element xmlns:q20="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_XigangGetDataForOutResult" nillable="true" type="q20:SdaResEntity" />
        <xs:element xmlns:q22="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_XigangGetDataForOutResult" nillable="true" type="q22:SdaResEntity" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
CC/iWareCC_ASRS/Connected Services/StationService/item3.xsd
@@ -28,6 +28,8 @@
      <xs:element minOccurs="0" name="R_ReqParseData" type="xs:boolean" />
      <xs:element minOccurs="0" name="R_Shape" type="xs:short" />
      <xs:element minOccurs="0" name="R_State" type="xs:short" />
      <xs:element minOccurs="0" name="R_SurrouondTaskFinish" type="xs:boolean" />
      <xs:element minOccurs="0" name="R_SurrouondTaskNo" type="xs:short" />
      <xs:element minOccurs="0" name="R_TaskID" type="xs:int" />
      <xs:element minOccurs="0" name="StationCode" nillable="true" type="xs:string" />
    </xs:sequence>
@@ -48,6 +50,7 @@
      <xs:element minOccurs="0" name="W_Destination_In" type="xs:int" />
      <xs:element minOccurs="0" name="W_Destination_Out" type="xs:int" />
      <xs:element minOccurs="0" name="W_EndMark" type="xs:boolean" />
      <xs:element minOccurs="0" name="W_FirstMark" type="xs:boolean" />
      <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:short" />
@@ -61,11 +64,14 @@
      <xs:element minOccurs="0" name="W_PackageWidth" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="W_PalletizingPlaceX" type="xs:short" />
      <xs:element minOccurs="0" name="W_PalletizingPlaceY" type="xs:short" />
      <xs:element minOccurs="0" name="W_PalletizingPlaceZ" type="xs:short" />
      <xs:element minOccurs="0" name="W_PalletizingStation" type="xs:short" />
      <xs:element minOccurs="0" name="W_PalletizingTaskFinish" type="xs:boolean" />
      <xs:element minOccurs="0" name="W_PalletizingTaskID" type="xs:short" />
      <xs:element minOccurs="0" name="W_ReqOut" type="xs:boolean" />
      <xs:element minOccurs="0" name="W_Rotate" type="xs:short" />
      <xs:element minOccurs="0" name="W_SurroundTaskFinish" type="xs:boolean" />
      <xs:element minOccurs="0" name="W_SurroundTaskNo" type="xs:int" />
      <xs:element minOccurs="0" name="W_Width" type="xs:short" />
      <xs:element minOccurs="0" name="W_X_Offset" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="W_Y_Offset" nillable="true" type="xs:string" />
CC/iWareCC_ASRS/FormCC.cs
@@ -6,6 +6,7 @@
using iWareCC.StationService;
using iWareCC.ThreadService;
using iWareCC.ThreadService._03_BZ12_机器人码包工位_;
using iWareCC.ThreadService._04_BZ21_搬运整垛机器人_;
using iWareCC.WCF;
using iWareCommon.Common.Globle;
using iWareCommon.Utils;
@@ -242,6 +243,8 @@
            new Thread(DataProcess_BZ12.Hander).Start();
            new Thread(DataProcess_BZ12_FinishTask.Handler).Start();
            new Thread(DataProcess_BZ21.Hander).Start();
            new Thread(DataProcess_BZ21_FinishTask.Handler).Start();
            new Thread(DeleteData).Start();
            new Thread(PrintHandler.Handler).Start();
CC/iWareCC_ASRS/ThreadService/03_BZ12(»úÆ÷ÈËÂë°ü¹¤Î»)/DataProcess_BZ12.cs
@@ -44,14 +44,16 @@
                            }
                            var upiCode = result.Replace("/r", ""); ;
                            bool islast = false;//是否末板
                            bool isfirst = false;//是否末板
                            short isrotate = 0;//是否旋转
                            short placeX = 0;
                            short placeY = 0;
                            short placeZ = 0;
                            string place = "";
                            using (WmsDBModel wmsDB = new WmsDBModel())
                            {
                                //要是有已下发的任务,就不要执行
                                var isValidate = TaskHandler.ValidateIssueTaskForBZ12(wmsDB);
                                var isValidate = TaskHandler.ValidateIssueTaskForBZ12(wmsDB,result);
                                if (!isValidate)
                                {
                                    SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()}-有‘已下发’的任务,不能处理,此次循环结束";
@@ -66,6 +68,8 @@
                                isrotate = 1;
                                placeX = (short)upiObj.MachineXCenter;
                                placeY = (short)upiObj.MachineYCenter;
                                placeZ = (short)upiObj.MachineZCenter;
                                //查处这包所有的数量
                                var upiList = wmsDB.mes_batchOrderUPI_new.Where(x => x.PackageCode == upiObj.PackageCode).ToList();
                                //查询是否末板并且判断有没有混批
@@ -88,6 +92,7 @@
                                    }
                                    else
                                    {
                                        isfirst = true;
                                        wms_rbline_runmode.PalletizingUPI = upiObj.PackageCode;
                                        if (obj.R_PalletizingStation1 == 1)
                                        {
@@ -153,8 +158,8 @@
                                using (StationServiceClient client = new StationServiceClient())
                                {
                                    var res = client.WritePalletizingTaskInfo((int)EDevice.Station, rgvLocation, Convert.ToInt32(task.TaskNo), islast,
                                          (short)upiObj.Length, (short)upiObj.Width, (short)upiObj.Thk, isrotate, short.Parse(task.PlaceCode), placeX, placeY);
                                    var res = client.WritePalletizingTaskInfo((int)EDevice.Station, rgvLocation, Convert.ToInt32(task.TaskNo), islast,isfirst,
                                          (short)upiObj.Length, (short)upiObj.Width, (short)upiObj.Thk, isrotate, short.Parse(task.PlaceCode), placeX, placeY,placeZ);
                                    if (!res.result)
                                    {
                                        SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()}-下发入库任务 å¤±è´¥,WriteInStoreTaskInfoAsync è¿”回:{res.resMsg}";
CC/iWareCC_ASRS/ThreadService/03_BZ12(»úÆ÷ÈËÂë°ü¹¤Î»)/DataProcess_BZ12_FinishTask.cs
@@ -52,7 +52,7 @@
                            using (WmsDBModel wmsDB = new WmsDBModel())
                            {
                                var task = wmsDB.wms_rbline_task.Where(x =>
                                 x.TaskNo == obj.R_Inbound_TaskID.ToString()
                                 x.TaskNo == obj.R_PalletizingTaskNo.ToString()
                                && x.RbTaskType == (int)RbTaskTypeEnum.码板任务
                                && x.TaskStatus == (int)TaskStatusEnum.已下发).FirstOrDefault();
                                if (task == null)
@@ -60,7 +60,11 @@
                                    SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTask = $"{rgvLocation.ToString()},根据 R_InboundNumber:{obj.R_InboundNumber}没有找到已下发的任务 ";
                                    continue;
                                }
                                var upiobj = wmsDB.mes_batchOrderUPI_new.Where(x => x.UPI == task.UPI).FirstOrDefault();
                                if (upiobj != null)
                                {
                                    upiobj.UpiStatus = 3;
                                }
                                task.TaskStatus = (int)TaskStatusEnum.已完成;
                                task.TaskStatusName = TaskStatusEnum.已完成.ToString();
                                task.FinishedTime = DateTime.Now;
CC/iWareCC_ASRS/ThreadService/04_BZ21£¨°áÔËÕû¶â»úÆ÷ÈË£©/DataProcess_BZ21.cs
@@ -1,4 +1,9 @@
using iWareCommon.Utils;
using Admin.NET.Application;
using iWareCC.StationService;
using iWareCommon.Common.Globle;
using iWareCommon.Utils;
using iWareModel;
using iWareSql.DataAccess;
using iWareSql.WmsDBModel;
using System;
using System.Collections.Generic;
@@ -11,7 +16,128 @@
{
    public class DataProcess_BZ21
    {
        public static void Hander()
        {
            var alertMsg = "";
            LogType logType = LogType.DataProcess_BZ21;
            while (true)
            {
                Thread.Sleep(2000);//休眠2秒,将休眠写到前面,是为了下面的continue方法执行后不显示错误信息的提示!!!【EditBy shaocx,2022-05-24】
                SystemWarningMsg._lbl_alert_DataProcess_BZ21 = string.Empty;
                try
                {
                    if (SystemValue.isStartedModel)
                    {
                        var rgvLocation = StationLocationEnum.BZ21.ToString();
                        /*
                         * 1、从数据库中判断是否齐套
                         * 2、根据齐套结果,推送给PLC
                         */
                        var obj = FormCC.stationView.R_StationForReadCommList.Where(x => x.StationCode == rgvLocation.ToString()).FirstOrDefault();
                        if (obj.R_ReqParseData)
                        {
                            var result = obj.R_ReadCodeResult;
                            if (string.IsNullOrEmpty(result))
                            {
                                SystemWarningMsg._lbl_alert_DataProcess_BZ21 = $"{rgvLocation.ToString()}-请求了解码,但是结果是空的,此次循环结束";
                                continue;
                            }
                            var upiCode = result.Replace("/r", ""); ;
                            short cartonwidth = 0;//是否末板
                            short cartonhigh = 0;//是否旋转
                            short placeX = 0;
                            short placeY = 0;
                            short placeZ = 0;
                            string place = "";
                            using (WmsDBModel wmsDB = new WmsDBModel())
                            {
                                //要是有已下发的任务,就不要执行
                                var isValidate = TaskHandler.ValidateIssueTaskForBZ21(wmsDB,result);
                                if (!isValidate)
                                {
                                    SystemWarningMsg._lbl_alert_DataProcess_BZ21 = $"{rgvLocation.ToString()}-有‘已下发’的任务,不能处理,此次循环结束";
                                    continue;
                                }
                                var upiObj = wmsDB.mes_batchOrderUPI_new.Where(x => x.UPI == upiCode).FirstOrDefault();
                                if (upiObj == null)
                                {
                                    SystemWarningMsg._lbl_alert_DataProcess_BZ21 = $"{rgvLocation.ToString()},根据UPI:{upiCode}没有找到对象 ";
                                    continue;
                                }
                                placeX = (short)upiObj.MachineXCenter;
                                placeY = (short)upiObj.MachineYCenter;
                                placeZ = (short)upiObj.MachineZCenter;
                                cartonhigh = (short)upiObj.Info1;
                                cartonwidth = (short)upiObj.Info2;
                                //记录任务
                                var _id = Yitter.IdGenerator.YitIdHelper.NextId();
                                var plcTaskNo = BusinessHelper.CreatePlcTaskIdForSrmTask();
                                var putpakegecode = new mes_PushPackageCode()
                                {
                                    Id = _id,
                                    PackageCode=upiObj.PackageCode,
                                    PushStatus=0,
                                    PushNum=0,
                                    CreateTime = DateTime.Now,
                                    CreateUserName = "CC",
                                    UpdateTime = DateTime.Now,
                                    UpdateUserName = "CC",
                                };
                                var task = new wms_rbline_task()
                                {
                                    Id = _id,
                                    TaskNo = plcTaskNo,
                                    UPI = upiObj.UPI,
                                    Length = upiObj.Length,
                                    Width = upiObj.Width,
                                    Thk = upiObj.Thk,
                                    IssueTime = DateTime.Now,
                                    PlanNo = upiObj.PlanNo,
                                    OrderId = upiObj.OrderId,
                                    PackageCode = upiObj.PackageCode,
                                    RbTaskType = (int)RbTaskTypeEnum.夹板任务,
                                    RbTaskTypeEnumName = RbTaskTypeEnum.码板任务.ToString(),
                                    TaskStatus = (int)TaskStatusEnum.已下发,
                                    TaskStatusName = TaskStatusEnum.已下发.ToString(),
                                    TaskMsg = "码板",
                                    CreateTime = DateTime.Now,
                                    CreateUserName = "CC",
                                    UpdateTime = DateTime.Now,
                                    UpdateUserName = "CC",
                                    PlaceCode = place
                                };
                                wmsDB.wms_rbline_task.Add(task);
                                wmsDB.mes_PushPackageCode.Add(putpakegecode);
                                using (StationServiceClient client = new StationServiceClient())
                                {
                                    var res = client.WriteSurroundTaskInfo((int)EDevice.Station, rgvLocation, Convert.ToInt32(task.TaskNo),
                                          (short)upiObj.Info1, (short)upiObj.Info2,cartonhigh,cartonwidth,placeX,placeY);
                                    if (!res.result)
                                    {
                                        SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()}-下发入库任务 å¤±è´¥,WriteInStoreTaskInfoAsync è¿”回:{res.resMsg}";
                                        continue;
                                    }
                                    else
                                    {
                                        Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-下发入库任务 æˆåŠŸ,WriteInStoreTaskInfoAsync,参数: ç«™ç‚¹{rgvLocation}");
                                    }
                                }
                                wmsDB.SaveChanges();
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    SystemWarningMsg._lbl_alert_DataProcess_BZ39 += " å‡ºçް异叏:" + ex.Message + SysGloble.SPLIT_STR;
                    Log4NetHelper.WriteErrorLog(logType, " å‡ºçŽ°å¼‚å¸¸ï¼š" + ex.Message, ex);
                }
            }
        }
        public static void PushPackageCode()
        {
            while (true)
CC/iWareCC_ASRS/ThreadService/04_BZ21£¨°áÔËÕû¶â»úÆ÷ÈË£©/DataProcess_BZ21_FinishTask.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace iWareCC.ThreadService._04_BZ21_搬运整垛机器人_
{
    internal class DataProcess_BZ21_FinishTask
    {
    }
}
CC/iWareCC_ASRS/iWareCC.csproj
@@ -170,6 +170,7 @@
    <Compile Include="ThreadService\03_BZ12%28机器人码包工位%29\DataProcess_BZ12.cs" />
    <Compile Include="ThreadService\03_BZ12%28机器人码包工位%29\DataProcess_BZ12_FinishTask.cs" />
    <Compile Include="ThreadService\04_BZ21(搬运整垛机器人)\DataProcess_BZ21.cs" />
    <Compile Include="ThreadService\04_BZ21(搬运整垛机器人)\DataProcess_BZ21_FinishTask.cs" />
    <Compile Include="WCF\CCWcfService.cs" />
    <Compile Include="WCF\ICCWcfService.cs" />
    <Compile Include="WmsTask\AutoUpdateEngineInfoTask.cs" />
CC/iWareCommon/Utils/Log4Net/LogType.cs
@@ -108,5 +108,7 @@
        /// ç æ¿ä»»åŠ¡ä¸‹å‘
        /// </summary>
        DataProcess_BZ12 = 309,
        DataProcess_BZ21 = 310,
    }
}
CC/iWareSql/DataAccess/TaskHandler.cs
@@ -40,7 +40,7 @@
        /// </summary>
        /// <param name="wmsDB"></param>
        /// <returns></returns>
        public static bool ValidateIssueTaskForBZ12(WmsDBModel.WmsDBModel wmsDB)
        public static bool ValidateIssueTaskForBZ12(WmsDBModel.WmsDBModel wmsDB,string str)
        {
            var isExist = wmsDB.wms_rbline_task.Where(x => x.TaskStatus == (int)TaskStatusEnum.已下发
                && x.RbTaskType == (int)RbTaskTypeEnum.码板任务).ToList();
@@ -50,6 +50,16 @@
            }
            return true;
        }
        public static bool ValidateIssueTaskForBZ21(WmsDBModel.WmsDBModel wmsDB,string str)
        {
            var isExist = wmsDB.wms_rbline_task.Where(x => x.TaskStatus == (int)TaskStatusEnum.已下发
                && x.RbTaskType == (int)RbTaskTypeEnum.夹板任务).ToList();
            if (isExist?.Count() > 0)
            {
                return false;
            }
            return true;
        }
        /// <summary>
        /// éªŒè¯ æœºå™¨äººç¼“存岛是否存在 æœªç»“束  çš„出库任务
        /// </summary>
CC/iWareSql/WmsDBModel/mes_batchOrderUPI_new.cs
@@ -85,5 +85,74 @@
        public string UpdateUserName { get; set; }
        public bool IsDelete { get; set; }
        /// <summary>
        /// é”€å”®åˆåŒå•号
        /// </summary>
        public string Info4 { get; set; }
        /// <summary>
        /// ç”Ÿäº§å•号
        /// </summary>
        public string Info5 { get; set; }
        /// <summary>
        /// ç¬¬å‡ åŒ…
        /// </summary>
        public string Info6 { get; set; }
        /// <summary>
        /// ç»é”€åº—名称
        /// </summary>
        public string Info7 { get; set; }
        /// <summary>
        /// äº§å“åç§°
        /// </summary>
        public string Info8 { get; set; }
        /// <summary>
        /// å®¢æˆ·åç§°
        /// </summary>
        public string Info10 { get; set; }
        /// <summary>
        /// åŒ…装编码
        /// </summary>
        public string Info9 { get; set; }
        /// <summary>
        /// è‡ªæor发货
        /// </summary>
        public string Info11 { get; set; }
        /// <summary>
        /// åŒ…装部件总数量
        /// </summary>
        public string Info12 { get; set; }
        /// <summary>
        /// åŒ…装面积
        /// </summary>
        public string Info13 { get; set; }
        /// <summary>
        /// éƒ¨ä»¶åç§°
        /// </summary>
        public string Info14 { get; set; }
        /// <summary>
        /// éƒ¨ä»¶æ•°é‡
        /// </summary>
        public int Info15 { get; set; }
        /// <summary>
        /// éƒ¨ä»¶å°ºå¯¸
        /// </summary>
        public string Info16 { get; set; }
        /// <summary>
        /// æœºæ¢°è‡‚是否旋转
        /// </summary>
        public string Info17 { get; set; }
    }
}
SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvComm.cs
@@ -142,7 +142,11 @@
        /// </summary>
        [Description("码垛末板标志")]
        public bool W_EndMark { get; set; }
        /// <summary>
        /// ç åž›é¦–板标志
        /// </summary>
        [Description("码垛首板标志")]
        public bool W_FirstMark { get; set; }
        /// <summary>
        /// ç åž›ä»»åŠ¡å·
        /// </summary>
@@ -169,6 +173,11 @@
        [Description("码垛位置坐标Y")]
        public short W_PalletizingPlaceY { get; set; }
        /// <summary>
        /// ç åž›ä½ç½®åæ ‡Z
        /// </summary>
        [Description("码垛位置坐标Z")]
        public short W_PalletizingPlaceZ { get; set; }
        /// <summary>
        /// ç åž›ä»»åŠ¡å®Œæˆç¡®è®¤
        /// </summary>
        [Description("码垛任务完成确认")]
@@ -179,7 +188,16 @@
        /// </summary>
        [Description("模式(1:入库, 2:出库   3:强制出库)")]
        public short W_Mode { get; set; }
        /// <summary>
        /// åˆåŒ…任务完成确认
        /// </summary>
        [Description("合包任务完成确认")]
        public bool W_SurroundTaskFinish { get; set; }
        /// <summary>
        /// åˆåŒ…任务号
        /// </summary>
        [Description("合包任务号")]
        public int W_SurroundTaskNo { get; set; }
    }
    /// <summary>
@@ -204,7 +222,11 @@
        /// </summary>
        [Description("码垛末板标志")]
        public string W_EndMark { get; set; }
        /// <summary>
        /// ç åž›é¦–板标志
        /// </summary>
        [Description("码垛首板标志")]
        public string W_FirstMark { get; set; }
        /// <summary>
        /// ç åž›ä»»åŠ¡å·
        /// </summary>
@@ -230,6 +252,11 @@
        /// </summary>
        [Description("码垛位置坐标Y")]
        public string W_PalletizingPlaceY { get; set; }
        /// <summary>
        /// ç åž›ä½ç½®åæ ‡Z
        /// </summary>
        [Description("码垛位置坐标Z")]
        public string W_PalletizingPlaceZ { get; set; }
        /// <summary>
        /// ç åž›ä»»åŠ¡å®Œæˆç¡®è®¤
        /// </summary>
@@ -336,7 +363,16 @@
        [Description("入库完成已确认")]
        public string W_InboundFinishConfirm { get; set; }
        /// <summary>
        /// åˆåŒ…任务完成确认
        /// </summary>
        [Description("合包任务完成确认")]
        public string W_SurroundTaskFinish { get; set; }
        /// <summary>
        /// åˆåŒ…任务号
        /// </summary>
        [Description("合包任务号")]
        public string W_SurroundTaskNo { get; set; }
        #region å‡ºåº“相关
        /// <summary>
@@ -507,7 +543,16 @@
        /// </summary>
        [Description("强制出库模式")]
        public bool R_ForceOutboundMode { get; set; }
        /// <summary>
        /// åˆåŒ…任务完成
        /// </summary>
        [Description("合包任务完成")]
        public bool R_SurrouondTaskFinish { get; set; }
        /// <summary>
        /// åˆåŒ…任务号
        /// </summary>
        [Description("合包任务号")]
        public short R_SurrouondTaskNo { get; set; }
    }
    public class StationDBForReadComm
@@ -594,5 +639,15 @@
        [Description("强制出库模式")]
        public string R_ForceOutboundMode { get; set; }
        /// <summary>
        /// åˆåŒ…任务完成
        /// </summary>
        [Description("合包任务完成")]
        public string R_SurrouondTaskFinish { get; set; }
        /// <summary>
        /// åˆåŒ…任务号
        /// </summary>
        [Description("合包任务号")]
        public string R_SurrouondTaskNo { get; set; }
    }
}
SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs
@@ -434,7 +434,7 @@
        /// <param name=""></param>
        /// <param name=""></param>
        /// <returns></returns>
        public bool WritePalletizingTaskInfo(string stationCode, int taskID, bool isLast, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, out string msg)
        public bool WritePalletizingTaskInfo(string stationCode, int taskID, bool isLast,bool isFirst, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ, out string msg)
        {
            try
            {
@@ -459,6 +459,13 @@
                    return false;
                }
                b2 = this.plcService.WriteValuePoint(stationObj.W_FirstMark, isFirst, view_stationObj.W_FirstMark);
                if (!b2.result)
                {
                    msg = string.Format("向Station地址{0} å†™ æ˜¯å¦é¦–板 " + isFirst + "失败,返回结果:" + b2.resMsg,
                      stationObj.W_Destination_In);
                    return false;
                }
                b2 = this.plcService.WriteValuePoint(stationObj.W_Length, length, view_stationObj.W_Length);
                if (!b2.result)
                {
@@ -508,6 +515,106 @@
                     stationObj.W_Height);
                    return false;
                }
                b2 = this.plcService.WriteValuePoint(stationObj.W_PalletizingPlaceZ, placeZ, view_stationObj.W_PalletizingPlaceZ);
                if (!b2.result)
                {
                    msg = string.Format("向Station地址{0} å†™ Z坐标 " + placeZ + "失败,返回结果:" + b2.resMsg,
                     stationObj.W_Height);
                    return false;
                }
                b2 = this.plcService.WriteValuePoint(stationObj.W_DataFinish, true, view_stationObj.W_DataFinish);
                if (!b2.result)
                {
                    msg = string.Format("向Station地址{0} å†™ è¯»ç è§£æžå®Œæˆ " + true + "失败,返回结果:" + b2.resMsg,
                       stationObj.W_DataFinish);
                    return false;
                }
                return true;
            }
            catch (Exception ex)
            {
                msg = ex.Message;
                var logcontext = string.Format("WriteInStoreTaskInfo出现异常:" + JsonConvert.SerializeObject(ex),
                        "");
                Log4NetHelper.WriteErrorLog(Station_CacheEntity.curLogType, logcontext, ex);
                return false;
            }
        }
        /// <summary>
        /// åˆåŒ…下发任务
        /// </summary>
        /// <param name="stationCode"></param>
        /// <param name="taskID"></param>
        /// <param name="length"></param>
        /// <param name="width"></param>
        /// <param name="cartonhigh"></param>
        /// <param name="cartonwidth"></param>
        /// <param name="placex"></param>
        /// <param name="placey"></param>
        /// <param name="msg"></param>
        /// <returns></returns>
        public bool WriteSurroundTaskInfo(string stationCode, int taskID, short length, short width, short cartonhigh, short cartonwidth, short placex, short placey, 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_SurroundTaskNo, taskID, view_stationObj.W_SurroundTaskNo);
                if (!b2.result)
                {
                    msg = string.Format("向Station地址{0} å†™ åˆåŒ…任务号 " + taskID + "失败,返回结果:" + b2.resMsg,
                      stationObj.W_Inbound_TaskID);
                    return false;
                }
                b2 = this.plcService.WriteValuePoint(stationObj.W_PackageLength, length, view_stationObj.W_PackageLength);
                if (!b2.result)
                {
                    msg = string.Format("向Station地址{0} å†™ åˆåŒ…é•¿ " + length + "失败,返回结果:" + b2.resMsg,
                      stationObj.W_Destination_In);
                    return false;
                }
                b2 = this.plcService.WriteValuePoint(stationObj.W_PackageWidth, width, view_stationObj.W_PackageWidth);
                if (!b2.result)
                {
                    msg = string.Format("向Station地址{0} å†™ åˆåŒ…宽 " + width + "失败,返回结果:" + b2.resMsg,
                      stationObj.W_Destination_In);
                    return false;
                }
                b2 = this.plcService.WriteValuePoint(stationObj.W_CartonHeight, cartonhigh, view_stationObj.W_CartonHeight);
                if (!b2.result)
                {
                    msg = string.Format("向Station地址{0} å†™ çº¸ç®±é•¿ " + cartonhigh + "失败,返回结果:" + b2.resMsg,
                      stationObj.W_Length);
                    return false;
                }
                b2 = this.plcService.WriteValuePoint(stationObj.W_CartonWidth, cartonwidth, view_stationObj.W_CartonWidth);
                if (!b2.result)
                {
                    msg = string.Format("向Station地址{0} å†™ çº¸ç®±å®½ " + width + "失败,返回结果:" + b2.resMsg,
                      stationObj.W_Width);
                    return false;
                }
                b2 = this.plcService.WriteValuePoint(stationObj.W_X_Offset, placex, view_stationObj.W_X_Offset);
                if (!b2.result)
                {
                    msg = string.Format("向Station地址{0} å†™ æ”¾æ–™x " + placex + "失败,返回结果:" + b2.resMsg,
                     stationObj.W_Height);
                    return false;
                }
                b2 = this.plcService.WriteValuePoint(stationObj.W_Y_Offset, placey, view_stationObj.W_Y_Offset);
                if (!b2.result)
                {
                    msg = string.Format("向Station地址{0} å†™ æ”¾æ–™y " + placey + "失败,返回结果:" + b2.resMsg,
                     stationObj.W_Height);
                    return false;
                }
                b2 = this.plcService.WriteValuePoint(stationObj.W_DataFinish, true, view_stationObj.W_DataFinish);
                if (!b2.result)
@@ -529,6 +636,7 @@
                return false;
            }
        }
        /// <summary>
        /// å†™å…¥ç«™ç‚¹ä»»åŠ¡å®Œæˆç¡®è®¤
@@ -564,7 +672,33 @@
                return false;
            }
        }
        public bool WriteSurround_FinishACK(string stationCode, bool 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_SurroundTaskFinish, value, view_stationObj.W_SurroundTaskFinish);
                if (!b2.result)
                {
                    msg = string.Format("向Station" + stationCode + " å†™å…¥ä»»åŠ¡å®Œæˆç¡®è®¤ åœ°å€{0} å†™  " + value + "失败,返回结果:" + b2.resMsg,
                        stationObj.W_OutboundFinishConfirm);
                    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;
            }
        }
        public bool WriteOutStoreTaskInfo(string stationCode, string sourcePlaceNo, out string msg, int outbound_TaskID)
        {
            try
SDA/iWareSda/Devices/4-Station/StationModel/Station_CacheEntity.cs
@@ -22,6 +22,7 @@
        public static string W_DBHeaderWithSeparate_BZ39 = "3002" + WareSdaStruct.PLCDBADDRESS_SEPARATE;
        public static string W_DBHeaderWithSeparate_BZ12 = "3003" + WareSdaStruct.PLCDBADDRESS_SEPARATE;
        public static string W_DBHeaderWithSeparate_BZ01 = "3001" + WareSdaStruct.PLCDBADDRESS_SEPARATE;
        public static string W_DBHeaderWithSeparate_BZ21 = "3004" + WareSdaStruct.PLCDBADDRESS_SEPARATE;
        /// <summary>
        /// è¯»å–DB
@@ -188,10 +189,12 @@
                W_DataFinish = W_DBHeaderWithSeparate_BZ12 + "0.0",
                W_EndMark = W_DBHeaderWithSeparate_BZ12 + "0.1",
                W_FirstMark= W_DBHeaderWithSeparate_BZ12 + "0.3",
                W_PalletizingPlaceX = W_DBHeaderWithSeparate_BZ12 + "12.0",
                W_PalletizingPlaceY = W_DBHeaderWithSeparate_BZ12 + "14.0",
                W_PalletizingPlaceZ = W_DBHeaderWithSeparate_BZ12 + "16.0",
                W_PalletizingTaskID = W_DBHeaderWithSeparate_BZ12 + "16.0",
                W_PalletizingTaskID = W_DBHeaderWithSeparate_BZ12 + "18.0",
                W_Rotate = W_DBHeaderWithSeparate_BZ12 + "8.0",
                W_Length = W_DBHeaderWithSeparate_BZ12 + "2.0",
@@ -202,6 +205,23 @@
                W_PalletizingTaskFinish = W_DBHeaderWithSeparate_BZ12 + "0.2",
            });
            _dbBlockForWrite.W_StationForWriteCommList.Add(new StationDBForWriteComm()
            {
                StationCode = StationLocationEnum.BZ21.ToString(),
                W_DataFinish = W_DBHeaderWithSeparate_BZ21 + "0.0",
                W_SurroundTaskFinish = W_DBHeaderWithSeparate_BZ21 + "0.1",
                W_X_Offset = W_DBHeaderWithSeparate_BZ21 + "10.0",
                W_Y_Offset = W_DBHeaderWithSeparate_BZ21 + "12.0",
                W_SurroundTaskNo = W_DBHeaderWithSeparate_BZ21 + "14.0",
                W_CartonHeight = W_DBHeaderWithSeparate_BZ21 + "6.0",
                W_CartonWidth = W_DBHeaderWithSeparate_BZ21 + "8.0",
                W_PackageLength = W_DBHeaderWithSeparate_BZ21 + "2.0",
                W_PackageWidth = W_DBHeaderWithSeparate_BZ21 + "4.0",
            });
            return _dbBlockForWrite;
        }
@@ -265,7 +285,17 @@
                //R_Outbound_TaskID = W_DBHeaderWithSeparate_BZ12 + "114.0",
            });
            _dbBlockForRead.R_StationForReadCommList.Add(new StationDBForReadComm()
            {
                StationCode = StationLocationEnum.BZ21.ToString(),
                R_ReqParseData = W_DBHeaderWithSeparate_BZ21 + "50.0",
                R_SurrouondTaskFinish = W_DBHeaderWithSeparate_BZ21 + "50.1",
                R_SurrouondTaskNo = W_DBHeaderWithSeparate_BZ21 + "104.0",
                R_ReadCodeResult = W_DBHeaderWithSeparate_BZ21 + "52.0",
            });
            return _dbBlockForRead;
SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs
@@ -148,8 +148,7 @@
        /// <param name="value"></param>
        /// <returns></returns>
        [OperationContract]
        SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode, int taskID, bool isLast, short length, short width, short height, short rotate, short toplace, short placeX, short placeY);
        SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode, int taskID, bool isLast, bool isFirst, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ);
        
            /// <summary>
            /// ç åž›å®Œæˆå·²ç¡®è®¤
@@ -160,6 +159,12 @@
            [OperationContract]
        SdaResEntity SetPalletizingTaskFinishAck(int deviceId, bool value, string stationCode);
        [OperationContract]
        SdaResEntity WriteSurroundTaskInfo(int deviceId, string stationCode, int taskID, short length, short width, short cartonhigh, short cartonwidth, short placex, short placey);
        [OperationContract]
        SdaResEntity SetSurroundTaskFinishAck(int deviceId, bool value, string stationCode);
        /// <summary>
        /// Station的任务完成ACK赋值
        /// </summary>
SDA/iWareSda/Devices/4-Station/StationService/StationService.cs
@@ -572,7 +572,7 @@
        /// <param name="deviceId"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode,int taskID, bool isLast, short length, short width, short height,short rotate,short toplace,short placeX,short placeY)
        public SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode,int taskID, bool isLast, bool isFirst, short length, short width, short height,short rotate,short toplace,short placeX,short placeY, short placeZ)
        {
            SdaResEntity _SdaResEntity = new SdaResEntity();
            try
@@ -585,7 +585,7 @@
                var Station = StationResult.resData as StationEntity;
                string msg = "";
                var result = Station.WritePalletizingTaskInfo(stationCode, taskID,isLast, length, width, height,rotate,toplace,placeX,placeY,out msg);
                var result = Station.WritePalletizingTaskInfo(stationCode, taskID,isLast,isFirst, length, width, height,rotate,toplace,placeX,placeY,placeZ, out msg);
                _SdaResEntity.result = result;
                _SdaResEntity.resMsg = msg;
                return _SdaResEntity;
@@ -628,6 +628,69 @@
                return _SdaResEntity;
            }
        }
        /// <summary>
        /// å†™å…¥åˆåŒ…任务信息
        /// </summary>
        /// <param name="deviceId"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public SdaResEntity WriteSurroundTaskInfo(int deviceId, string stationCode, int taskID, short length, short width, short cartonhigh, short cartonwidth, short placex, short placey)
        {
            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.WriteSurroundTaskInfo(stationCode, taskID, length, width,  cartonhigh, cartonwidth, placex, placey, 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>
        /// <param name="value"></param>
        /// <returns></returns>
        public SdaResEntity SetSurroundTaskFinishAck(int deviceId, bool 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.WriteSurround_FinishACK(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>