From 1b10882a0a46c8b25331ccd2628f7a2a6db8b13f Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周一, 16 12月 2024 17:35:10 +0800
Subject: [PATCH] 11

---
 LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOperationTask/WmsOperationTaskService.cs |   21 ++++
 SDA/iWareSda/Devices/4-Station/StationService/StationService.cs                                       |   34 ++++++
 SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs                                      |   10 ++
 LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Connected Services/CCWcfService/Reference.cs        |    8 +
 CC/iWareCC_ASRS/Connected Services/StationService/item4.xsd                                           |    1 
 CC/iWareCC_ASRS/Connected Services/StationService/StationService.wsdl                                 |   19 +++
 CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd                                           |   42 +++++--
 SDA/iWareSda/Devices/4-Station/StationModel/Station_CacheEntity.cs                                    |    1 
 CC/iWareCC_ASRS/WCF/CCWcfService.cs                                                                   |   27 +++++
 CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs                                        |   30 ++++++
 SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs                                          |   36 +++++++
 SDA/iWareSda/Devices/4-Station/StationModel/DB/Items/Write/StationDB2ObjForWriteComm.cs               |    6 +
 SDA/iWareSda/Devices/4-Station/StationModel/DB/Items/Write/StationDBForWriteComm.cs                   |    6 +
 CC/iWareCC_ASRS/WCF/ICCWcfService.cs                                                                  |    8 +
 14 files changed, 236 insertions(+), 13 deletions(-)

diff --git a/CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs b/CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs
index eda9d72..1e3de35 100644
--- a/CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs
+++ b/CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs
@@ -1488,6 +1488,9 @@
         private short W_PalletizingTaskIDField;
         
         [System.Runtime.Serialization.OptionalFieldAttribute()]
+        private bool W_PartClearField;
+        
+        [System.Runtime.Serialization.OptionalFieldAttribute()]
         private bool W_ReqOutField;
         
         [System.Runtime.Serialization.OptionalFieldAttribute()]
@@ -1883,6 +1886,19 @@
         }
         
         [System.Runtime.Serialization.DataMemberAttribute()]
+        public bool W_PartClear {
+            get {
+                return this.W_PartClearField;
+            }
+            set {
+                if ((this.W_PartClearField.Equals(value) != true)) {
+                    this.W_PartClearField = value;
+                    this.RaisePropertyChanged("W_PartClear");
+                }
+            }
+        }
+        
+        [System.Runtime.Serialization.DataMemberAttribute()]
         public bool W_ReqOut {
             get {
                 return this.W_ReqOutField;
@@ -2122,6 +2138,12 @@
         [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/PartClear", ReplyAction="http://tempuri.org/IStationService/PartClearResponse")]
+        iWareCC.StationService.SdaResEntity PartClear(int deviceId, bool value, string stationCode);
+        
+        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/PartClear", ReplyAction="http://tempuri.org/IStationService/PartClearResponse")]
+        System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> PartClearAsync(int deviceId, bool 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);
         
@@ -2348,6 +2370,14 @@
             return base.Channel.ChangeModeAsync(deviceId, value, stationCode);
         }
         
+        public iWareCC.StationService.SdaResEntity PartClear(int deviceId, bool value, string stationCode) {
+            return base.Channel.PartClear(deviceId, value, stationCode);
+        }
+        
+        public System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> PartClearAsync(int deviceId, bool value, string stationCode) {
+            return base.Channel.PartClearAsync(deviceId, value, stationCode);
+        }
+        
         public iWareCC.StationService.SdaResEntity WriteInStoreTaskInfo(int deviceId, string stationCode, string toPlaceNo, short length, short width, short height, int inbound_TaskID) {
             return base.Channel.WriteInStoreTaskInfo(deviceId, stationCode, toPlaceNo, length, width, height, inbound_TaskID);
         }
diff --git a/CC/iWareCC_ASRS/Connected Services/StationService/StationService.wsdl b/CC/iWareCC_ASRS/Connected Services/StationService/StationService.wsdl
index 0780d4b..11983a7 100644
--- a/CC/iWareCC_ASRS/Connected Services/StationService/StationService.wsdl
+++ b/CC/iWareCC_ASRS/Connected Services/StationService/StationService.wsdl
@@ -98,6 +98,12 @@
   <wsdl:message name="IStationService_ChangeMode_OutputMessage">
     <wsdl:part name="parameters" element="tns:ChangeModeResponse" />
   </wsdl:message>
+  <wsdl:message name="IStationService_PartClear_InputMessage">
+    <wsdl:part name="parameters" element="tns:PartClear" />
+  </wsdl:message>
+  <wsdl:message name="IStationService_PartClear_OutputMessage">
+    <wsdl:part name="parameters" element="tns:PartClearResponse" />
+  </wsdl:message>
   <wsdl:message name="IStationService_WriteInStoreTaskInfo_InputMessage">
     <wsdl:part name="parameters" element="tns:WriteInStoreTaskInfo" />
   </wsdl:message>
@@ -236,6 +242,10 @@
     <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="PartClear">
+      <wsdl:input wsaw:Action="http://tempuri.org/IStationService/PartClear" message="tns:IStationService_PartClear_InputMessage" />
+      <wsdl:output wsaw:Action="http://tempuri.org/IStationService/PartClearResponse" message="tns:IStationService_PartClear_OutputMessage" />
     </wsdl:operation>
     <wsdl:operation name="WriteInStoreTaskInfo">
       <wsdl:input wsaw:Action="http://tempuri.org/IStationService/WriteInStoreTaskInfo" message="tns:IStationService_WriteInStoreTaskInfo_InputMessage" />
@@ -427,6 +437,15 @@
         <soap:body use="literal" />
       </wsdl:output>
     </wsdl:operation>
+    <wsdl:operation name="PartClear">
+      <soap:operation soapAction="http://tempuri.org/IStationService/PartClear" style="document" />
+      <wsdl:input>
+        <soap:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
     <wsdl:operation name="WriteInStoreTaskInfo">
       <soap:operation soapAction="http://tempuri.org/IStationService/WriteInStoreTaskInfo" style="document" />
       <wsdl:input>
diff --git a/CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd b/CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd
index 5711c65..7491d73 100644
--- a/CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd
+++ b/CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd
@@ -236,6 +236,22 @@
       </xs:sequence>
     </xs:complexType>
   </xs:element>
+  <xs:element name="PartClear">
+    <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="PartClearResponse">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element xmlns:q17="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="PartClearResult" nillable="true" type="q17:SdaResEntity" />
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
   <xs:element name="WriteInStoreTaskInfo">
     <xs:complexType>
       <xs:sequence>
@@ -252,7 +268,7 @@
   <xs:element name="WriteInStoreTaskInfoResponse">
     <xs:complexType>
       <xs:sequence>
-        <xs:element xmlns:q17="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteInStoreTaskInfoResult" nillable="true" type="q17:SdaResEntity" />
+        <xs:element xmlns:q18="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteInStoreTaskInfoResult" nillable="true" type="q18:SdaResEntity" />
       </xs:sequence>
     </xs:complexType>
   </xs:element>
@@ -270,7 +286,7 @@
   <xs:element name="WriteOutStoreTaskInfoResponse">
     <xs:complexType>
       <xs:sequence>
-        <xs:element xmlns:q18="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteOutStoreTaskInfoResult" nillable="true" type="q18:SdaResEntity" />
+        <xs:element xmlns:q19="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteOutStoreTaskInfoResult" nillable="true" type="q19:SdaResEntity" />
       </xs:sequence>
     </xs:complexType>
   </xs:element>
@@ -295,7 +311,7 @@
   <xs:element name="WritePalletizingTaskInfoResponse">
     <xs:complexType>
       <xs:sequence>
-        <xs:element xmlns:q19="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WritePalletizingTaskInfoResult" nillable="true" type="q19:SdaResEntity" />
+        <xs:element xmlns:q20="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WritePalletizingTaskInfoResult" nillable="true" type="q20:SdaResEntity" />
       </xs:sequence>
     </xs:complexType>
   </xs:element>
@@ -311,7 +327,7 @@
   <xs:element name="SetPalletizingTaskFinishAckResponse">
     <xs:complexType>
       <xs:sequence>
-        <xs:element xmlns:q20="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="SetPalletizingTaskFinishAckResult" nillable="true" type="q20:SdaResEntity" />
+        <xs:element xmlns:q21="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="SetPalletizingTaskFinishAckResult" nillable="true" type="q21:SdaResEntity" />
       </xs:sequence>
     </xs:complexType>
   </xs:element>
@@ -334,7 +350,7 @@
   <xs:element name="WriteSurroundTaskInfoResponse">
     <xs:complexType>
       <xs:sequence>
-        <xs:element xmlns:q21="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteSurroundTaskInfoResult" nillable="true" type="q21:SdaResEntity" />
+        <xs:element xmlns:q22="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteSurroundTaskInfoResult" nillable="true" type="q22:SdaResEntity" />
       </xs:sequence>
     </xs:complexType>
   </xs:element>
@@ -350,7 +366,7 @@
   <xs:element name="SetSurroundTaskFinishAckResponse">
     <xs:complexType>
       <xs:sequence>
-        <xs:element xmlns:q22="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="SetSurroundTaskFinishAckResult" nillable="true" type="q22:SdaResEntity" />
+        <xs:element xmlns:q23="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="SetSurroundTaskFinishAckResult" nillable="true" type="q23:SdaResEntity" />
       </xs:sequence>
     </xs:complexType>
   </xs:element>
@@ -366,7 +382,7 @@
   <xs:element name="WriteStation_FinishACKResponse">
     <xs:complexType>
       <xs:sequence>
-        <xs:element xmlns:q23="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_FinishACKResult" nillable="true" type="q23:SdaResEntity" />
+        <xs:element xmlns:q24="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_FinishACKResult" nillable="true" type="q24:SdaResEntity" />
       </xs:sequence>
     </xs:complexType>
   </xs:element>
@@ -382,7 +398,7 @@
   <xs:element name="WriteStation_ACKResponse">
     <xs:complexType>
       <xs:sequence>
-        <xs:element xmlns:q24="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_ACKResult" nillable="true" type="q24:SdaResEntity" />
+        <xs:element xmlns:q25="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_ACKResult" nillable="true" type="q25:SdaResEntity" />
       </xs:sequence>
     </xs:complexType>
   </xs:element>
@@ -400,7 +416,7 @@
   <xs:element name="WriteScanValidateACKResponse">
     <xs:complexType>
       <xs:sequence>
-        <xs:element xmlns:q25="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteScanValidateACKResult" nillable="true" type="q25:SdaResEntity" />
+        <xs:element xmlns:q26="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteScanValidateACKResult" nillable="true" type="q26:SdaResEntity" />
       </xs:sequence>
     </xs:complexType>
   </xs:element>
@@ -418,7 +434,7 @@
   <xs:element name="WriteStation_XigangGetDataForOutResponse">
     <xs:complexType>
       <xs:sequence>
-        <xs:element xmlns:q26="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_XigangGetDataForOutResult" nillable="true" type="q26:SdaResEntity" />
+        <xs:element xmlns:q27="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_XigangGetDataForOutResult" nillable="true" type="q27:SdaResEntity" />
       </xs:sequence>
     </xs:complexType>
   </xs:element>
@@ -434,7 +450,7 @@
   <xs:element name="WriteStation_AllowInResponse">
     <xs:complexType>
       <xs:sequence>
-        <xs:element xmlns:q27="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_AllowInResult" nillable="true" type="q27:SdaResEntity" />
+        <xs:element xmlns:q28="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_AllowInResult" nillable="true" type="q28:SdaResEntity" />
       </xs:sequence>
     </xs:complexType>
   </xs:element>
@@ -450,7 +466,7 @@
   <xs:element name="WriteStation_NgFlagResponse">
     <xs:complexType>
       <xs:sequence>
-        <xs:element xmlns:q28="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_NgFlagResult" nillable="true" type="q28:SdaResEntity" />
+        <xs:element xmlns:q29="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_NgFlagResult" nillable="true" type="q29:SdaResEntity" />
       </xs:sequence>
     </xs:complexType>
   </xs:element>
@@ -466,7 +482,7 @@
   <xs:element name="WriteStation_PersonAllowResponse">
     <xs:complexType>
       <xs:sequence>
-        <xs:element xmlns:q29="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_PersonAllowResult" nillable="true" type="q29:SdaResEntity" />
+        <xs:element xmlns:q30="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_PersonAllowResult" nillable="true" type="q30:SdaResEntity" />
       </xs:sequence>
     </xs:complexType>
   </xs:element>
diff --git a/CC/iWareCC_ASRS/Connected Services/StationService/item4.xsd b/CC/iWareCC_ASRS/Connected Services/StationService/item4.xsd
index d1140b2..b896f8a 100644
--- a/CC/iWareCC_ASRS/Connected Services/StationService/item4.xsd
+++ b/CC/iWareCC_ASRS/Connected Services/StationService/item4.xsd
@@ -144,6 +144,7 @@
       <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_PartClear" type="xs:boolean" />
       <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" />
diff --git a/CC/iWareCC_ASRS/WCF/CCWcfService.cs b/CC/iWareCC_ASRS/WCF/CCWcfService.cs
index 3bbca78..a0221ba 100644
--- a/CC/iWareCC_ASRS/WCF/CCWcfService.cs
+++ b/CC/iWareCC_ASRS/WCF/CCWcfService.cs
@@ -93,5 +93,32 @@
                 return FunRetEntity.Fail("寮傚父:" + ex.Message);
             }
         }
+
+
+        /// <summary>
+        /// 鎵爜璁板綍娓呴櫎
+        /// </summary>
+        /// <returns></returns>
+        public FunRetEntity WriteStation_PartClear()
+        {
+            try
+            {
+                using (StationServiceClient client = new StationServiceClient())
+                {
+                    var res = client.PartClear((int)EDevice.Station, true, StationLocationEnum.棣栨鎵爜宸ヤ綅.ToString());
+                    if (!res.result)
+                    {
+                        return FunRetEntity.Fail(res.resMsg);
+                    }
+                }
+
+                return FunRetEntity.Success("鎴愬姛", "");
+            }
+            catch (Exception ex)
+            {
+                return FunRetEntity.Fail("寮傚父:" + ex.Message);
+            }
+        }
+
     }
 }
diff --git a/CC/iWareCC_ASRS/WCF/ICCWcfService.cs b/CC/iWareCC_ASRS/WCF/ICCWcfService.cs
index 9078cba..66cdebe 100644
--- a/CC/iWareCC_ASRS/WCF/ICCWcfService.cs
+++ b/CC/iWareCC_ASRS/WCF/ICCWcfService.cs
@@ -39,5 +39,13 @@
         [OperationContract]
         FunRetEntity ValidateMode(int flag);
 
+
+        /// <summary>
+        /// 鎵爜璁板綍娓呴櫎
+        /// </summary>
+        /// <returns></returns>
+        [OperationContract]
+        FunRetEntity WriteStation_PartClear();
+
     }
 }
diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Connected Services/CCWcfService/Reference.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Connected Services/CCWcfService/Reference.cs
index 26a3cc8..41bdf04 100644
--- a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Connected Services/CCWcfService/Reference.cs
+++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Connected Services/CCWcfService/Reference.cs
@@ -77,6 +77,9 @@
         
         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ICCWcfService/ValidateMode", ReplyAction="http://tempuri.org/ICCWcfService/ValidateModeResponse")]
         System.Threading.Tasks.Task<CCWcfService.FunRetEntity> ValidateModeAsync(int flag);
+        
+        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ICCWcfService/WriteStation_PartClear", ReplyAction="http://tempuri.org/ICCWcfService/WriteStation_PartClearResponse")]
+        System.Threading.Tasks.Task<CCWcfService.FunRetEntity> WriteStation_PartClearAsync();
     }
     
     [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
@@ -144,6 +147,11 @@
             return base.Channel.ValidateModeAsync(flag);
         }
         
+        public System.Threading.Tasks.Task<CCWcfService.FunRetEntity> WriteStation_PartClearAsync()
+        {
+            return base.Channel.WriteStation_PartClearAsync();
+        }
+        
         public virtual System.Threading.Tasks.Task OpenAsync()
         {
             return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndOpen));
diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOperationTask/WmsOperationTaskService.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOperationTask/WmsOperationTaskService.cs
index a3a26bf..0b0d55e 100644
--- a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOperationTask/WmsOperationTaskService.cs
+++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOperationTask/WmsOperationTaskService.cs
@@ -724,5 +724,26 @@
 
     }
 
+
+    /// <summary>
+    /// 鎵爜璁板綍娓呴櫎
+    /// </summary>
+    /// <param name="input"></param>
+    /// <returns></returns>
+    [HttpPost]
+    [ApiDescriptionSettings(Name = "PartClear")]
+    [Description("WmsOperationTask/PartClear")]
+    [UnitOfWork]
+    public async Task PartClear()
+    {
+        //妯″紡鍒ゆ柇
+        var client = await WCFServiceHelper.GetWCFService_SAPCC_Client(_sysConfigRep);
+        var res = await client.WriteStation_PartClearAsync();
+        if (res.result == false)
+        {
+            throw Oops.Oh(res.resMsg);
+        }
+    }
+
 }
 
diff --git a/SDA/iWareSda/Devices/4-Station/StationModel/DB/Items/Write/StationDB2ObjForWriteComm.cs b/SDA/iWareSda/Devices/4-Station/StationModel/DB/Items/Write/StationDB2ObjForWriteComm.cs
index 108372e..cd5f8f4 100644
--- a/SDA/iWareSda/Devices/4-Station/StationModel/DB/Items/Write/StationDB2ObjForWriteComm.cs
+++ b/SDA/iWareSda/Devices/4-Station/StationModel/DB/Items/Write/StationDB2ObjForWriteComm.cs
@@ -23,6 +23,12 @@
 
 
         /// <summary>
+        /// 鎵爜璁板綍娓呴櫎
+        /// </summary>
+        [Description("鎵爜璁板綍娓呴櫎")]
+        public bool W_PartClear { get; set; }
+
+        /// <summary>
         /// NG鍖呮爣璁�
         /// </summary>
         [Description("NG鍖呮爣璁�")]
diff --git a/SDA/iWareSda/Devices/4-Station/StationModel/DB/Items/Write/StationDBForWriteComm.cs b/SDA/iWareSda/Devices/4-Station/StationModel/DB/Items/Write/StationDBForWriteComm.cs
index a979e8f..83a956e 100644
--- a/SDA/iWareSda/Devices/4-Station/StationModel/DB/Items/Write/StationDBForWriteComm.cs
+++ b/SDA/iWareSda/Devices/4-Station/StationModel/DB/Items/Write/StationDBForWriteComm.cs
@@ -25,6 +25,12 @@
         //public string W_PersonAllow { get; set; }
 
         /// <summary>
+        /// 鎵爜璁板綍娓呴櫎
+        /// </summary>
+        [Description("鎵爜璁板綍娓呴櫎")]
+        public string W_PartClear { get; set; }
+
+        /// <summary>
         /// NG鍖呮爣璁�
         /// </summary>
         [Description("NG鍖呮爣璁�")]
diff --git a/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs b/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs
index 116a389..3579fcf 100644
--- a/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs
+++ b/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs
@@ -394,6 +394,42 @@
             }
         }
 
+
+        /// <summary>
+        /// 鎵爜璁板綍娓呴櫎
+        /// </summary>
+        /// <param name="stationCode"></param>
+        /// <param name="value"></param>
+        /// <param name="msg"></param>
+        /// <returns></returns>
+        public bool PartClear(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_PartClear, value, view_stationObj.W_PartClear);
+                if (!b2.result)
+                {
+                    msg = string.Format("鍚慡tation 鎵爜璁板綍娓呴櫎 鍦板潃{0} 鍐�  " + value + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg,
+                        stationObj.W_PartClear);
+                    return false;
+                }
+
+                return true;
+            }
+            catch (Exception ex)
+            {
+                msg = ex.Message;
+                var logcontext = string.Format("鍚慡tatio 鎵爜璁板綍娓呴櫎 鍑虹幇寮傚父:" + JsonConvert.SerializeObject(ex),
+                        "");
+                Log4NetHelper.WriteErrorLog(Station_CacheEntity.curLogType, logcontext, ex);
+                return false;
+            }
+        }
+
         public bool WriteInStoreTaskInfo(string stationCode, string toPlaceNo, short length, short width, short height, out string msg, int inbound_TaskID)
         {
             try
diff --git a/SDA/iWareSda/Devices/4-Station/StationModel/Station_CacheEntity.cs b/SDA/iWareSda/Devices/4-Station/StationModel/Station_CacheEntity.cs
index 7449b15..95631ca 100644
--- a/SDA/iWareSda/Devices/4-Station/StationModel/Station_CacheEntity.cs
+++ b/SDA/iWareSda/Devices/4-Station/StationModel/Station_CacheEntity.cs
@@ -157,6 +157,7 @@
                 StationCode = StationLocationEnum.棣栨鎵爜宸ヤ綅.ToString(),
 
                 W_DataFinish = W_DBHeaderWithSeparate_269 + "0.0",
+                W_PartClear = W_DBHeaderWithSeparate_269 + "0.1"
             });
             _dbBlockForWrite.W_StationForWriteCommList.Add(new StationDBForWriteComm()
             {
diff --git a/SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs b/SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs
index 9b129d9..863f532 100644
--- a/SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs
+++ b/SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs
@@ -141,6 +141,16 @@
         SdaResEntity ChangeMode(int deviceId, int value, string stationCode);
 
         /// <summary>
+        /// 鎵爜璁板綍娓呴櫎
+        /// </summary>
+        /// <param name="deviceId"></param>
+        /// <param name="value"></param>
+        /// <param name="stationCode"></param>
+        /// <returns></returns>
+        [OperationContract]
+        SdaResEntity PartClear(int deviceId, bool value, string stationCode);
+
+        /// <summary>
         /// 鍐欏叆鍏ュ簱浠诲姟淇℃伅
         /// </summary>
         /// <param name="deviceId"></param>
diff --git a/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs b/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs
index 8803522..8161a8c 100644
--- a/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs
+++ b/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs
@@ -584,6 +584,40 @@
             }
         }
 
+
+        /// <summary>
+        /// 鎵爜璁板綍娓呴櫎
+        /// </summary>
+        /// <param name="deviceId"></param>
+        /// <param name="value"></param>
+        /// <param name="stationCode"></param>
+        /// <returns></returns>
+        public SdaResEntity PartClear(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.PartClear(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>

--
Gitblit v1.9.3