From bed4ab58ff88c866de95e9a5f29a7512ed43a7fa Mon Sep 17 00:00:00 2001 From: zongzhibin <zongzhibin@weben-smart.com> Date: 周三, 27 11月 2024 09:36:11 +0800 Subject: [PATCH] add --- CC/iWareCC_ASRS/ThreadService/04_BZ21(搬运整垛机器人)/DataProcess_BZ21_FinishTask.cs | 19 ++ CC/iWareSql/WmsDBModel/mes_batchOrderUPI_new.cs | 60 ++----- SDA/iWareSda/Devices/4-Station/StationService/StationService.cs | 29 +++ SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs | 11 + LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsOrder/Mes_BatchOrderUPI.cs | 5 SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvComm.cs | 21 ++ CC/iWareCC_ASRS/Connected Services/StationService/StationService.wsdl | 19 ++ CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd | 23 ++ SDA/iWareSda/Devices/4-Station/StationModel/Station_CacheEntity.cs | 5 CC/iWareModel/EnumType/WMS/UpiStatusEnum.cs | 10 CC/iWareCC_ASRS/ThreadService/03_BZ12(机器人码包工位)/DataProcess_BZ12_FinishTask.cs | 68 ++++++-- CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Inbound/1、DataProcess_BZ39.cs | 1 CC/iWareCC_ASRS/Connected Services/StationService/item3.xsd | 2 CC/iWareCC_ASRS/ThreadService/03_BZ12(机器人码包工位)/DataProcess_BZ12.cs | 46 ++++- CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs | 58 ++++++ SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs | 60 +++++-- CC/iWareSql/WmsDBModel/WmsDBModel.cs | 2 CC/iWareCC_ASRS/ThreadService/04_BZ21(搬运整垛机器人)/DataProcess_BZ21.cs | 19 ++ 18 files changed, 347 insertions(+), 111 deletions(-) diff --git a/CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs b/CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs index ba6bf67..6e4ecf8 100644 --- a/CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs +++ b/CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs @@ -218,6 +218,9 @@ private short R_Outbound_TaskIDField; [System.Runtime.Serialization.OptionalFieldAttribute()] + private bool R_PalletizingAckField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] private bool R_PalletizingFinishField; [System.Runtime.Serialization.OptionalFieldAttribute()] @@ -415,6 +418,19 @@ if ((this.R_Outbound_TaskIDField.Equals(value) != true)) { this.R_Outbound_TaskIDField = value; this.RaisePropertyChanged("R_Outbound_TaskID"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public bool R_PalletizingAck { + get { + return this.R_PalletizingAckField; + } + set { + if ((this.R_PalletizingAckField.Equals(value) != true)) { + this.R_PalletizingAckField = value; + this.RaisePropertyChanged("R_PalletizingAck"); } } } @@ -650,6 +666,9 @@ [System.Runtime.Serialization.OptionalFieldAttribute()] private string W_PackageWidthField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private short W_PalletizingBucketTypeField; [System.Runtime.Serialization.OptionalFieldAttribute()] private short W_PalletizingPlaceXField; @@ -943,6 +962,19 @@ if ((object.ReferenceEquals(this.W_PackageWidthField, value) != true)) { this.W_PackageWidthField = value; this.RaisePropertyChanged("W_PackageWidth"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public short W_PalletizingBucketType { + get { + return this.W_PalletizingBucketTypeField; + } + set { + if ((this.W_PalletizingBucketTypeField.Equals(value) != true)) { + this.W_PalletizingBucketTypeField = value; + this.RaisePropertyChanged("W_PalletizingBucketType"); } } } @@ -1834,10 +1866,10 @@ 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, bool isFirst, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ); + iWareCC.StationService.SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode, int taskID, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ, short lastnum); [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, bool isFirst, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ); + System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WritePalletizingTaskInfoAsync(int deviceId, string stationCode, int taskID, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ, short lastnum); [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); @@ -1862,6 +1894,12 @@ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/WriteStation_FinishACK", ReplyAction="http://tempuri.org/IStationService/WriteStation_FinishACKResponse")] System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WriteStation_FinishACKAsync(int deviceId, bool value, int plcTaskId); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/WriteStation_ACK", ReplyAction="http://tempuri.org/IStationService/WriteStation_ACKResponse")] + iWareCC.StationService.SdaResEntity WriteStation_ACK(int deviceId, bool value, string stationCode); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/WriteStation_ACK", ReplyAction="http://tempuri.org/IStationService/WriteStation_ACKResponse")] + System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WriteStation_ACKAsync(int deviceId, bool value, string stationCode); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/WriteScanValidateACK", ReplyAction="http://tempuri.org/IStationService/WriteScanValidateACKResponse")] iWareCC.StationService.SdaResEntity WriteScanValidateACK(bool isReset, int deviceId, string stationCode, bool value, int plcTaskId); @@ -2023,12 +2061,12 @@ return base.Channel.WriteOutStoreTaskInfoAsync(deviceId, stationCode, sourcePlaceNo, outbound_TaskID); } - 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 iWareCC.StationService.SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode, int taskID, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ, short lastnum) { + return base.Channel.WritePalletizingTaskInfo(deviceId, stationCode, taskID, length, width, height, rotate, toplace, placeX, placeY, placeZ, lastnum); } - 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 System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WritePalletizingTaskInfoAsync(int deviceId, string stationCode, int taskID, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ, short lastnum) { + return base.Channel.WritePalletizingTaskInfoAsync(deviceId, stationCode, taskID, length, width, height, rotate, toplace, placeX, placeY, placeZ, lastnum); } public iWareCC.StationService.SdaResEntity SetPalletizingTaskFinishAck(int deviceId, bool value, string stationCode) { @@ -2063,6 +2101,14 @@ return base.Channel.WriteStation_FinishACKAsync(deviceId, value, plcTaskId); } + public iWareCC.StationService.SdaResEntity WriteStation_ACK(int deviceId, bool value, string stationCode) { + return base.Channel.WriteStation_ACK(deviceId, value, stationCode); + } + + public System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WriteStation_ACKAsync(int deviceId, bool value, string stationCode) { + return base.Channel.WriteStation_ACKAsync(deviceId, value, stationCode); + } + public iWareCC.StationService.SdaResEntity WriteScanValidateACK(bool isReset, int deviceId, string stationCode, bool value, int plcTaskId) { return base.Channel.WriteScanValidateACK(isReset, deviceId, stationCode, value, plcTaskId); } diff --git a/CC/iWareCC_ASRS/Connected Services/StationService/StationService.wsdl b/CC/iWareCC_ASRS/Connected Services/StationService/StationService.wsdl index f48a7f4..88f9a0e 100644 --- a/CC/iWareCC_ASRS/Connected Services/StationService/StationService.wsdl +++ b/CC/iWareCC_ASRS/Connected Services/StationService/StationService.wsdl @@ -129,6 +129,12 @@ <wsdl:message name="IStationService_WriteStation_FinishACK_OutputMessage"> <wsdl:part name="parameters" element="tns:WriteStation_FinishACKResponse" /> </wsdl:message> + <wsdl:message name="IStationService_WriteStation_ACK_InputMessage"> + <wsdl:part name="parameters" element="tns:WriteStation_ACK" /> + </wsdl:message> + <wsdl:message name="IStationService_WriteStation_ACK_OutputMessage"> + <wsdl:part name="parameters" element="tns:WriteStation_ACKResponse" /> + </wsdl:message> <wsdl:message name="IStationService_WriteScanValidateACK_InputMessage"> <wsdl:part name="parameters" element="tns:WriteScanValidateACK" /> </wsdl:message> @@ -221,6 +227,10 @@ <wsdl:operation name="WriteStation_FinishACK"> <wsdl:input wsaw:Action="http://tempuri.org/IStationService/WriteStation_FinishACK" message="tns:IStationService_WriteStation_FinishACK_InputMessage" /> <wsdl:output wsaw:Action="http://tempuri.org/IStationService/WriteStation_FinishACKResponse" message="tns:IStationService_WriteStation_FinishACK_OutputMessage" /> + </wsdl:operation> + <wsdl:operation name="WriteStation_ACK"> + <wsdl:input wsaw:Action="http://tempuri.org/IStationService/WriteStation_ACK" message="tns:IStationService_WriteStation_ACK_InputMessage" /> + <wsdl:output wsaw:Action="http://tempuri.org/IStationService/WriteStation_ACKResponse" message="tns:IStationService_WriteStation_ACK_OutputMessage" /> </wsdl:operation> <wsdl:operation name="WriteScanValidateACK"> <wsdl:input wsaw:Action="http://tempuri.org/IStationService/WriteScanValidateACK" message="tns:IStationService_WriteScanValidateACK_InputMessage" /> @@ -413,6 +423,15 @@ <soap:body use="literal" /> </wsdl:output> </wsdl:operation> + <wsdl:operation name="WriteStation_ACK"> + <soap:operation soapAction="http://tempuri.org/IStationService/WriteStation_ACK" style="document" /> + <wsdl:input> + <soap:body use="literal" /> + </wsdl:input> + <wsdl:output> + <soap:body use="literal" /> + </wsdl:output> + </wsdl:operation> <wsdl:operation name="WriteScanValidateACK"> <soap:operation soapAction="http://tempuri.org/IStationService/WriteScanValidateACK" 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 d4a1fed..90381a3 100644 --- a/CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd +++ b/CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd @@ -246,8 +246,6 @@ <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="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" /> @@ -256,6 +254,7 @@ <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:element minOccurs="0" name="lastnum" type="xs:short" /> </xs:sequence> </xs:complexType> </xs:element> @@ -336,6 +335,22 @@ </xs:sequence> </xs:complexType> </xs:element> + <xs:element name="WriteStation_ACK"> + <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="WriteStation_ACKResponse"> + <xs:complexType> + <xs:sequence> + <xs:element xmlns:q21="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_ACKResult" nillable="true" type="q21:SdaResEntity" /> + </xs:sequence> + </xs:complexType> + </xs:element> <xs:element name="WriteScanValidateACK"> <xs:complexType> <xs:sequence> @@ -350,7 +365,7 @@ <xs:element name="WriteScanValidateACKResponse"> <xs:complexType> <xs:sequence> - <xs:element xmlns:q21="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteScanValidateACKResult" nillable="true" type="q21:SdaResEntity" /> + <xs:element xmlns:q22="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteScanValidateACKResult" nillable="true" type="q22:SdaResEntity" /> </xs:sequence> </xs:complexType> </xs:element> @@ -368,7 +383,7 @@ <xs:element name="WriteStation_XigangGetDataForOutResponse"> <xs:complexType> <xs:sequence> - <xs:element xmlns:q22="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_XigangGetDataForOutResult" nillable="true" type="q22:SdaResEntity" /> + <xs:element xmlns:q23="http://schemas.datacontract.org/2004/07/iWareSda" minOccurs="0" name="WriteStation_XigangGetDataForOutResult" nillable="true" type="q23:SdaResEntity" /> </xs:sequence> </xs:complexType> </xs:element> diff --git a/CC/iWareCC_ASRS/Connected Services/StationService/item3.xsd b/CC/iWareCC_ASRS/Connected Services/StationService/item3.xsd index 9020b6a..2dc1335 100644 --- a/CC/iWareCC_ASRS/Connected Services/StationService/item3.xsd +++ b/CC/iWareCC_ASRS/Connected Services/StationService/item3.xsd @@ -20,6 +20,7 @@ <xs:element minOccurs="0" name="R_OutboundFinish" type="xs:boolean" /> <xs:element minOccurs="0" name="R_OutboundNumber" nillable="true" type="xs:string" /> <xs:element minOccurs="0" name="R_Outbound_TaskID" type="xs:short" /> + <xs:element minOccurs="0" name="R_PalletizingAck" type="xs:boolean" /> <xs:element minOccurs="0" name="R_PalletizingFinish" type="xs:boolean" /> <xs:element minOccurs="0" name="R_PalletizingStation1" type="xs:short" /> <xs:element minOccurs="0" name="R_PalletizingStation2" type="xs:short" /> @@ -62,6 +63,7 @@ <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_PalletizingBucketType" type="xs:short" /> <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" /> diff --git "a/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Inbound/1\343\200\201DataProcess_BZ39.cs" "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Inbound/1\343\200\201DataProcess_BZ39.cs" index 9aad677..6c3ed53 100644 --- "a/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Inbound/1\343\200\201DataProcess_BZ39.cs" +++ "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Inbound/1\343\200\201DataProcess_BZ39.cs" @@ -86,7 +86,6 @@ { Id = _id, TaskNo = plcTaskNo, - UPI = upiObj.UPI, Length = upiObj.Length, Width = upiObj.Width, diff --git "a/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/DataProcess_BZ12.cs" "b/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/DataProcess_BZ12.cs" index 33c1b32..59c5add 100644 --- "a/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/DataProcess_BZ12.cs" +++ "b/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/DataProcess_BZ12.cs" @@ -26,7 +26,7 @@ SystemWarningMsg._lbl_alert_DataProcess_BZ12 = string.Empty; try { - if ( SystemValue.isStartedModel) + if (SystemValue.isStartedModel) { var rgvLocation = StationLocationEnum.BZ12.ToString(); /* @@ -34,6 +34,25 @@ * 2銆佹牴鎹綈濂楃粨鏋滐紝鎺ㄩ�佺粰PLC */ var obj = FormCC.stationView.R_StationForReadCommList.Where(x => x.StationCode == rgvLocation.ToString()).FirstOrDefault(); + if (obj.R_PalletizingAck) + { + //缁橮LC鎺ㄩ�佷换鍔″畬鎺ユ敹瀹屾垚澶嶄綅淇″彿 + using (StationServiceClient client = new StationServiceClient()) + { + var res = client.WriteStation_ACK((int)EDevice.Station, false, rgvLocation); + if (!res.result) + { + SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTask = $"{rgvLocation.ToString()}-涓嬪彂鐮佹澘浠诲姟 澶辫触,SetPalletizingTaskFinishAck 杩斿洖:{res.resMsg}"; + continue; + } + else + { + Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-涓嬪彂鍏ュ簱浠诲姟 鎴愬姛,SetPalletizingTaskFinishAck锛屽弬鏁�: 绔欑偣{rgvLocation}"); + } + } + + + } if (obj.R_ReqParseData) { var result = obj.R_ReadCodeResult; @@ -43,8 +62,7 @@ continue; } var upiCode = result.Replace("/r", ""); ; - bool islast = false;//鏄惁鏈澘 - bool isfirst = false;//鏄惁鏈澘 + short lastnum = 0;//鏄惁鏈澘 short isrotate = 0;//鏄惁鏃嬭浆 short placeX = 0; short placeY = 0; @@ -53,7 +71,7 @@ using (WmsDBModel wmsDB = new WmsDBModel()) { //瑕佹槸鏈夊凡涓嬪彂鐨勪换鍔★紝灏变笉瑕佹墽琛� - var isValidate = TaskHandler.ValidateIssueTaskForBZ12(wmsDB,result); + var isValidate = TaskHandler.ValidateIssueTaskForBZ12(wmsDB, result); if (!isValidate) { SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()}-鏈夆�樺凡涓嬪彂鈥欑殑浠诲姟锛屼笉鑳藉鐞�,姝ゆ寰幆缁撴潫"; @@ -65,11 +83,14 @@ SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},鏍规嵁UPI:{upiCode}娌℃湁鎵惧埌瀵硅薄 "; continue; } - isrotate = 1; + isrotate = 2; placeX = (short)upiObj.MachineXCenter; placeY = (short)upiObj.MachineYCenter; placeZ = (short)upiObj.MachineZCenter; - + if (upiObj.UpiStatus == 3) + { + continue; + } //鏌ュ杩欏寘鎵�鏈夌殑鏁伴噺 var upiList = wmsDB.mes_batchOrderUPI_new.Where(x => x.PackageCode == upiObj.PackageCode).ToList(); //鏌ヨ鏄惁鏈澘骞朵笖鍒ゆ柇鏈夋病鏈夋贩鎵� @@ -92,7 +113,7 @@ } else { - isfirst = true; + lastnum = 1; wms_rbline_runmode.PalletizingUPI = upiObj.PackageCode; if (obj.R_PalletizingStation1 == 1) { @@ -104,15 +125,16 @@ } else - { + { SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},UPI:{upiCode}鏃犲彲鐢ㄧ爜鍨涚洰鏍囦綅 "; continue; } + wms_rbline_runmode.PalletizingStation = int.Parse(place); } //濡傛灉娆″簭绛変簬褰撻挶鍖呮�绘暟閲忥紝鏄惁鏈澘缃负true if (upiObj.Shelf == upiList.Count()) { - islast = true; + lastnum = 2; wms_rbline_runmode.PalletizingUPI = null; wms_rbline_runmode.PalletizingStation = 0; } @@ -150,7 +172,7 @@ CreateUserName = "CC", UpdateTime = DateTime.Now, UpdateUserName = "CC", - PlaceCode=place + PlaceCode = place }; wmsDB.wms_rbline_task.Add(task); @@ -158,8 +180,8 @@ using (StationServiceClient client = new StationServiceClient()) { - 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); + var res = client.WritePalletizingTaskInfo((int)EDevice.Station, rgvLocation, Convert.ToInt32(task.TaskNo), + (short)upiObj.Length, (short)upiObj.Width, (short)upiObj.Thk, isrotate, short.Parse(task.PlaceCode), placeX, placeY, placeZ, lastnum); if (!res.result) { SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()}-涓嬪彂鍏ュ簱浠诲姟 澶辫触,WriteInStoreTaskInfoAsync 杩斿洖:{res.resMsg}"; diff --git "a/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/DataProcess_BZ12_FinishTask.cs" "b/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/DataProcess_BZ12_FinishTask.cs" index 103abe3..626bc20 100644 --- "a/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/DataProcess_BZ12_FinishTask.cs" +++ "b/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/DataProcess_BZ12_FinishTask.cs" @@ -16,13 +16,13 @@ { public class DataProcess_BZ12_FinishTask { - public static void Handler() + public static void Handler() { var alertMsg = ""; LogType logType = LogType.DataProcess_BZ12; while (true) { - Thread.Sleep(2000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆� + Thread.Sleep(1000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆� SystemWarningMsg._lbl_alert_DataProcess_BZ12 = string.Empty; try { @@ -54,11 +54,23 @@ var task = wmsDB.wms_rbline_task.Where(x => x.TaskNo == obj.R_PalletizingTaskNo.ToString() && x.RbTaskType == (int)RbTaskTypeEnum.鐮佹澘浠诲姟 - && x.TaskStatus == (int)TaskStatusEnum.宸蹭笅鍙�).FirstOrDefault(); + ).OrderByDescending(x=>x.Id).FirstOrDefault(); if (task == null) { SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTask = $"{rgvLocation.ToString()},鏍规嵁 R_InboundNumber:{obj.R_InboundNumber}娌℃湁鎵惧埌宸蹭笅鍙戠殑浠诲姟 "; continue; + } + else + { + if (task.TaskStatus == (int)TaskStatusEnum.宸插畬鎴�) + { + //缁橮LC鎺ㄩ�佷换鍔″畬鎴愮‘璁や俊鍙� + using (StationServiceClient client = new StationServiceClient()) + { + var res = client.SetPalletizingTaskFinishAck((int)EDevice.Station, true, rgvLocation); + } + continue; + } } var upiobj = wmsDB.mes_batchOrderUPI_new.Where(x => x.UPI == task.UPI).FirstOrDefault(); if (upiobj != null) @@ -69,23 +81,47 @@ task.TaskStatusName = TaskStatusEnum.宸插畬鎴�.ToString(); task.FinishedTime = DateTime.Now; - - //缁橮LC鎺ㄩ�佷换鍔″畬鎴愮‘璁や俊鍙� - using (StationServiceClient client = new StationServiceClient()) + if (wmsDB.SaveChanges() > 0) { - var res = client.SetPalletizingTaskFinishAck((int)EDevice.Station, true, rgvLocation); - if (!res.result) + var isRight = true; + while (isRight) { - SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTask = $"{rgvLocation.ToString()}-涓嬪彂鐮佹澘浠诲姟 澶辫触,SetPalletizingTaskFinishAck 杩斿洖:{res.resMsg}"; - continue; - } - else - { - Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-涓嬪彂鍏ュ簱浠诲姟 鎴愬姛,SetPalletizingTaskFinishAck锛屽弬鏁�: 绔欑偣{rgvLocation}"); + obj = FormCC.stationView.R_StationForReadCommList.Where(x => x.StationCode == rgvLocation.ToString()).FirstOrDefault(); + isRight = obj.R_PalletizingFinish; + //缁橮LC鎺ㄩ�佷换鍔″畬鎴愮‘璁や俊鍙� + using (StationServiceClient client = new StationServiceClient()) + { + var res = client.SetPalletizingTaskFinishAck((int)EDevice.Station, true, rgvLocation); + if (!res.result) + { + SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTask = $"{rgvLocation.ToString()}-涓嬪彂鐮佹澘浠诲姟 澶辫触,SetPalletizingTaskFinishAck 杩斿洖:{res.resMsg}"; + continue; + } + else + { + Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-涓嬪彂鍏ュ簱浠诲姟 鎴愬姛,SetPalletizingTaskFinishAck锛屽弬鏁�: 绔欑偣{rgvLocation}"); + } + } + Thread.Sleep(1000); } } - - wmsDB.SaveChanges(); + } + } + else + { + //缁橮LC鎺ㄩ�佷换鍔″畬鎴愮‘璁や俊鍙� + using (StationServiceClient client = new StationServiceClient()) + { + var res = client.SetPalletizingTaskFinishAck((int)EDevice.Station, false, rgvLocation); + //if (!res.result) + //{ + // SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTask = $"{rgvLocation.ToString()}-涓嬪彂鐮佹澘浠诲姟 澶辫触,SetPalletizingTaskFinishAck 杩斿洖:{res.resMsg}"; + // continue; + //} + //else + //{ + // Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-涓嬪彂鍏ュ簱浠诲姟 鎴愬姛,SetPalletizingTaskFinishAck锛屽弬鏁�: 绔欑偣{rgvLocation}"); + //} } } } diff --git "a/CC/iWareCC_ASRS/ThreadService/04_BZ21\357\274\210\346\220\254\350\277\220\346\225\264\345\236\233\346\234\272\345\231\250\344\272\272\357\274\211/DataProcess_BZ21.cs" "b/CC/iWareCC_ASRS/ThreadService/04_BZ21\357\274\210\346\220\254\350\277\220\346\225\264\345\236\233\346\234\272\345\231\250\344\272\272\357\274\211/DataProcess_BZ21.cs" index 3b873f0..dd8fd0e 100644 --- "a/CC/iWareCC_ASRS/ThreadService/04_BZ21\357\274\210\346\220\254\350\277\220\346\225\264\345\236\233\346\234\272\345\231\250\344\272\272\357\274\211/DataProcess_BZ21.cs" +++ "b/CC/iWareCC_ASRS/ThreadService/04_BZ21\357\274\210\346\220\254\350\277\220\346\225\264\345\236\233\346\234\272\345\231\250\344\272\272\357\274\211/DataProcess_BZ21.cs" @@ -34,6 +34,25 @@ * 2銆佹牴鎹綈濂楃粨鏋滐紝鎺ㄩ�佺粰PLC */ var obj = FormCC.stationView.R_StationForReadCommList.Where(x => x.StationCode == rgvLocation.ToString()).FirstOrDefault(); + if (obj.R_PalletizingAck) + { + //缁橮LC鎺ㄩ�佷换鍔″畬鎺ユ敹瀹屾垚澶嶄綅淇″彿 + using (StationServiceClient client = new StationServiceClient()) + { + var res = client.WriteStation_ACK((int)EDevice.Station, false, rgvLocation); + if (!res.result) + { + SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTask = $"{rgvLocation.ToString()}-涓嬪彂鐮佹澘浠诲姟 澶辫触,SetPalletizingTaskFinishAck 杩斿洖:{res.resMsg}"; + continue; + } + else + { + Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-涓嬪彂鍏ュ簱浠诲姟 鎴愬姛,SetPalletizingTaskFinishAck锛屽弬鏁�: 绔欑偣{rgvLocation}"); + } + } + + + } if (obj.R_ReqParseData) { var result = obj.R_ReadCodeResult; diff --git "a/CC/iWareCC_ASRS/ThreadService/04_BZ21\357\274\210\346\220\254\350\277\220\346\225\264\345\236\233\346\234\272\345\231\250\344\272\272\357\274\211/DataProcess_BZ21_FinishTask.cs" "b/CC/iWareCC_ASRS/ThreadService/04_BZ21\357\274\210\346\220\254\350\277\220\346\225\264\345\236\233\346\234\272\345\231\250\344\272\272\357\274\211/DataProcess_BZ21_FinishTask.cs" index c26f4c3..1fa1756 100644 --- "a/CC/iWareCC_ASRS/ThreadService/04_BZ21\357\274\210\346\220\254\350\277\220\346\225\264\345\236\233\346\234\272\345\231\250\344\272\272\357\274\211/DataProcess_BZ21_FinishTask.cs" +++ "b/CC/iWareCC_ASRS/ThreadService/04_BZ21\357\274\210\346\220\254\350\277\220\346\225\264\345\236\233\346\234\272\345\231\250\344\272\272\357\274\211/DataProcess_BZ21_FinishTask.cs" @@ -60,7 +60,7 @@ continue; } var upiobj = wmsDB.mes_batchOrderUPI_new.Where(x => x.PackageCode == task.PackageCode).ToList(); - if (upiobj .Count>0) + if (upiobj.Count > 0) { foreach (var item in upiobj) { @@ -90,6 +90,23 @@ wmsDB.SaveChanges(); } } + else + { + //缁橮LC鎺ㄩ�佷换鍔″畬鎴愮‘璁や俊鍙� + using (StationServiceClient client = new StationServiceClient()) + { + var res = client.SetSurroundTaskFinishAck((int)EDevice.Station, false, rgvLocation); + //if (!res.result) + //{ + // SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTask = $"{rgvLocation.ToString()}-涓嬪彂鐮佹澘浠诲姟 澶辫触,SetPalletizingTaskFinishAck 杩斿洖:{res.resMsg}"; + // continue; + //} + //else + //{ + // Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-涓嬪彂鍏ュ簱浠诲姟 鎴愬姛,SetPalletizingTaskFinishAck锛屽弬鏁�: 绔欑偣{rgvLocation}"); + //} + } + } } } catch (Exception ex) diff --git a/CC/iWareModel/EnumType/WMS/UpiStatusEnum.cs b/CC/iWareModel/EnumType/WMS/UpiStatusEnum.cs index 00e9d98..c1a71cd 100644 --- a/CC/iWareModel/EnumType/WMS/UpiStatusEnum.cs +++ b/CC/iWareModel/EnumType/WMS/UpiStatusEnum.cs @@ -38,7 +38,11 @@ /// 宸插悎鍖� /// </summary> [Description("宸插悎鍖�")] - 宸插悎鍖� = 4 - -} + 宸插悎鍖� = 4, + /// <summary> + /// 鐮佸灈涓� + /// </summary> + [Description("鐮佸灈涓�")] + 鐮佸灈涓� = 5, + } } \ No newline at end of file diff --git a/CC/iWareSql/WmsDBModel/WmsDBModel.cs b/CC/iWareSql/WmsDBModel/WmsDBModel.cs index 20c8836..2e8ef8b 100644 --- a/CC/iWareSql/WmsDBModel/WmsDBModel.cs +++ b/CC/iWareSql/WmsDBModel/WmsDBModel.cs @@ -11,12 +11,12 @@ : base("name=WmsDBModel") { } + public virtual DbSet<mes_batchOrderUPI_new> mes_batchOrderUPI_new { get; set; } public virtual DbSet<mes_PushPackageCode> mes_PushPackageCode { get; set; } public virtual DbSet<ApprovalFlow> ApprovalFlow { get; set; } public virtual DbSet<DingTalkUser> DingTalkUser { get; set; } public virtual DbSet<GoViewPro> GoViewPro { get; set; } public virtual DbSet<GoViewProData> GoViewProData { get; set; } - public virtual DbSet<mes_batchOrderUPI_new> mes_batchOrderUPI_new { get; set; } public virtual DbSet<SysCodeGen> SysCodeGen { get; set; } public virtual DbSet<SysCodeGenConfig> SysCodeGenConfig { get; set; } public virtual DbSet<SysConfig> SysConfig { get; set; } diff --git a/CC/iWareSql/WmsDBModel/mes_batchOrderUPI_new.cs b/CC/iWareSql/WmsDBModel/mes_batchOrderUPI_new.cs index ec32db4..91256a6 100644 --- a/CC/iWareSql/WmsDBModel/mes_batchOrderUPI_new.cs +++ b/CC/iWareSql/WmsDBModel/mes_batchOrderUPI_new.cs @@ -85,74 +85,46 @@ public string UpdateUserName { get; set; } public bool IsDelete { get; set; } - /// <summary> - /// 销售合同单号 - /// </summary> + + [StringLength(60)] public string Info4 { get; set; } - /// <summary> - /// 生产单号 - /// </summary> + [StringLength(60)] public string Info5 { get; set; } - /// <summary> - /// 第几包 - /// </summary> - + [StringLength(60)] public string Info6 { get; set; } - /// <summary> - /// 经销店名称 - /// </summary> + [StringLength(60)] public string Info7 { get; set; } - /// <summary> - /// 产品名称 - /// </summary> + [StringLength(60)] public string Info8 { get; set; } - /// <summary> - /// 客户名称 - /// </summary> + [StringLength(60)] public string Info10 { get; set; } - /// <summary> - /// 包装编码 - /// </summary> + [StringLength(60)] public string Info9 { get; set; } - /// <summary> - /// 自提or发货 - /// </summary> + [StringLength(60)] public string Info11 { get; set; } - /// <summary> - /// 包装部件总数量 - /// </summary> + [StringLength(60)] public string Info12 { get; set; } - /// <summary> - /// 包装面积 - /// </summary> + [StringLength(60)] public string Info13 { get; set; } - /// <summary> - /// 部件名称 - /// </summary> + [StringLength(60)] public string Info14 { get; set; } - /// <summary> - /// 部件数量 - /// </summary> - public int Info15 { get; set; } + public int? Info15 { get; set; } - /// <summary> - /// 部件尺寸 - /// </summary> + [StringLength(60)] public string Info16 { get; set; } - /// <summary> - /// 机械臂是否旋转 - /// </summary> + + [StringLength(60)] public string Info17 { get; set; } } } diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsOrder/Mes_BatchOrderUPI.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsOrder/Mes_BatchOrderUPI.cs index 07ec490..e354693 100644 --- a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsOrder/Mes_BatchOrderUPI.cs +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsOrder/Mes_BatchOrderUPI.cs @@ -212,5 +212,10 @@ /// </summary> [SugarColumn(ColumnName = "Info16", ColumnDescription = "閮ㄤ欢灏哄", Length = 60)] public string? Info16 { get; set; } + /// <summary> + /// 鏈烘鑷傛槸鍚︽棆杞� + /// </summary> + [SugarColumn(ColumnName = "Info17", ColumnDescription = "鏈烘鑷傛槸鍚︽棆杞�", Length = 60)] + public string? Info17 { get; set; } } } \ No newline at end of file diff --git a/SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvComm.cs b/SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvComm.cs index 5a8be1b..4fdab05 100644 --- a/SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvComm.cs +++ b/SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvComm.cs @@ -198,6 +198,11 @@ /// </summary> [Description("鍚堝寘浠诲姟鍙�")] public int W_SurroundTaskNo { get; set; } + /// <summary> + /// 鐮佸灈棣栨湯鏉� + /// </summary> + [Description("鐮佸灈棣栨湯鏉�")] + public short W_PalletizingBucketType { get; set; } } /// <summary> @@ -262,6 +267,11 @@ /// </summary> [Description("鐮佸灈浠诲姟瀹屾垚纭")] public string W_PalletizingTaskFinish { get; set; } + /// <summary> + /// 鐮佸灈棣栨湯鏉� + /// </summary> + [Description("鐮佸灈棣栨湯鏉�")] + public string W_PalletizingBucketType { get; set; } /// <summary> /// 榻愬淇℃伅锛�998榻愬锛�999寮傚父鍑哄簱锛� /// </summary> @@ -537,7 +547,11 @@ /// </summary> [Description("鐮佸灈浣嶇疆2鐘舵��")] public short R_PalletizingStation2 { get; set; } - + /// <summary> + /// 鐮佸灈浠诲姟鎺ユ敹瀹屾垚 + /// </summary> + [Description("鐮佸灈浠诲姟鎺ユ敹瀹屾垚")] + public bool R_PalletizingAck { get; set; } /// <summary> /// 寮哄埗鍑哄簱妯″紡 /// </summary> @@ -649,5 +663,10 @@ /// </summary> [Description("鍚堝寘浠诲姟鍙�")] public string R_SurrouondTaskNo { get; set; } + /// <summary> + /// 鐮佸灈浠诲姟鎺ユ敹瀹屾垚 + /// </summary> + [Description("鐮佸灈浠诲姟鎺ユ敹瀹屾垚")] + public string R_PalletizingAck { get; set; } } } diff --git a/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs b/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs index 33d24f3..0aaa888 100644 --- a/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs +++ b/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,bool isFirst, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ, out string msg) + public bool WritePalletizingTaskInfo(string stationCode, int taskID, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ,short lastnum, out string msg) { try { @@ -450,22 +450,7 @@ stationObj.W_Inbound_TaskID); return false; } - - b2 = this.plcService.WriteValuePoint(stationObj.W_EndMark, isLast, view_stationObj.W_EndMark); - if (!b2.result) - { - msg = string.Format("鍚慡tation鍦板潃{0} 鍐� 鏄惁鏈澘 " + isLast + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg, - stationObj.W_Destination_In); - return false; - } - - b2 = this.plcService.WriteValuePoint(stationObj.W_FirstMark, isFirst, view_stationObj.W_FirstMark); - if (!b2.result) - { - msg = string.Format("鍚慡tation鍦板潃{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) { @@ -519,6 +504,13 @@ if (!b2.result) { msg = string.Format("鍚慡tation鍦板潃{0} 鍐� Z鍧愭爣 " + placeZ + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg, + stationObj.W_Height); + return false; + } + b2 = this.plcService.WriteValuePoint(stationObj.W_PalletizingBucketType, lastnum, view_stationObj.W_PalletizingBucketType); + if (!b2.result) + { + msg = string.Format("鍚慡tation鍦板潃{0} 鍐� 棣栨湯鏉� " + lastnum + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg, stationObj.W_Height); return false; } @@ -672,6 +664,40 @@ return false; } } + /// <summary> + /// 鍐欏叆绔欑偣浠诲姟瀹屾垚纭 + /// </summary> + /// <param name="stationCode"></param> + /// <param name="value"></param> + /// <param name="msg"></param> + /// <returns></returns> + public bool WriteStation_ACK(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_DataFinish, value, view_stationObj.W_DataFinish); + if (!b2.result) + { + msg = string.Format("鍚慡tation" + stationCode + " 鍐欏叆浠诲姟瀹屾垚纭 鍦板潃{0} 鍐� " + value + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg, + stationObj.W_OutboundFinishConfirm); + 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 WriteSurround_FinishACK(string stationCode, bool value, out string msg) { try diff --git a/SDA/iWareSda/Devices/4-Station/StationModel/Station_CacheEntity.cs b/SDA/iWareSda/Devices/4-Station/StationModel/Station_CacheEntity.cs index f7acd63..437d385 100644 --- a/SDA/iWareSda/Devices/4-Station/StationModel/Station_CacheEntity.cs +++ b/SDA/iWareSda/Devices/4-Station/StationModel/Station_CacheEntity.cs @@ -200,7 +200,7 @@ W_Length = W_DBHeaderWithSeparate_BZ12 + "2.0", W_Width = W_DBHeaderWithSeparate_BZ12 + "4.0", W_Height = W_DBHeaderWithSeparate_BZ12 + "6.0", - + W_PalletizingBucketType= W_DBHeaderWithSeparate_BZ12 + "20.0", W_PalletizingStation = W_DBHeaderWithSeparate_BZ12 + "10.0", W_PalletizingTaskFinish = W_DBHeaderWithSeparate_BZ12 + "0.2", }); @@ -280,7 +280,7 @@ R_ReadCodeResult = W_DBHeaderWithSeparate_BZ12 + "52.0", R_PalletizingStation1 = W_DBHeaderWithSeparate_BZ12 + "104.0", R_PalletizingStation2 = W_DBHeaderWithSeparate_BZ12 + "106.0", - + R_PalletizingAck = W_DBHeaderWithSeparate_BZ12 + "50.2", //R_Inbound_TaskID = W_DBHeaderWithSeparate_BZ12 + "112.0", //R_Outbound_TaskID = W_DBHeaderWithSeparate_BZ12 + "114.0", @@ -288,6 +288,7 @@ _dbBlockForRead.R_StationForReadCommList.Add(new StationDBForReadComm() { StationCode = StationLocationEnum.BZ21.ToString(), + R_PalletizingAck = W_DBHeaderWithSeparate_BZ12 + "50.2", R_ReqParseData = W_DBHeaderWithSeparate_BZ21 + "50.0", R_SurrouondTaskFinish = W_DBHeaderWithSeparate_BZ21 + "50.1", diff --git a/SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs b/SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs index dcb8665..af267f7 100644 --- a/SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs +++ b/SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs @@ -148,7 +148,7 @@ /// <param name="value"></param> /// <returns></returns> [OperationContract] - 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 WritePalletizingTaskInfo(int deviceId, string stationCode, int taskID, short length, short width, short height, short rotate, short toplace, short placeX, short placeY, short placeZ,short lastnum); /// <summary> /// 鐮佸灈瀹屾垚宸茬‘璁� @@ -173,6 +173,15 @@ /// <returns></returns> [OperationContract] SdaResEntity WriteStation_FinishACK(int deviceId, bool value, int plcTaskId); + /// <summary> + /// 澶嶄綅瑙f瀽瀹屾垚 + /// </summary> + /// <param name="deviceId"></param> + /// <param name="value"></param> + /// <param name="stationCode"></param> + /// <returns></returns> + [OperationContract] + SdaResEntity WriteStation_ACK(int deviceId, bool value, string stationCode); /// <summary> /// 鍥涗釜鍏ュ簱鍙f壂鎻忛獙璇丄CK璧嬪�� diff --git a/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs b/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs index 9700a68..dc11237 100644 --- a/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs +++ b/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, bool isFirst, short length, short width, short height,short rotate,short toplace,short placeX,short placeY, short placeZ) + public SdaResEntity WritePalletizingTaskInfo(int deviceId, string stationCode,int taskID, short length, short width, short height,short rotate,short toplace,short placeX,short placeY, short placeZ,short lastnum) { SdaResEntity _SdaResEntity = new SdaResEntity(); try @@ -585,7 +585,7 @@ var Station = StationResult.resData as StationEntity; string msg = ""; - var result = Station.WritePalletizingTaskInfo(stationCode, taskID,isLast,isFirst, length, width, height,rotate,toplace,placeX,placeY,placeZ, out msg); + var result = Station.WritePalletizingTaskInfo(stationCode, taskID, length, width, height,rotate,toplace,placeX,placeY,placeZ,lastnum ,out msg); _SdaResEntity.result = result; _SdaResEntity.resMsg = msg; return _SdaResEntity; @@ -691,6 +691,31 @@ return _SdaResEntity; } } + public SdaResEntity WriteStation_ACK(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.WriteStation_ACK(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