From 7e469b73ac4f022cb78689c6d2b0c4ddee26d18c Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周一, 02 12月 2024 15:37:34 +0800 Subject: [PATCH] 优化 --- LA24030_LuLiPackageLine_Web/public/config.js | 4 SDA/iWareSda/Devices/4-Station/StationService/StationService.cs | 4 LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Enum/WmsOrder/UpiStatusEnum.cs | 8 + SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs | 2 CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Outbound/4、DataProcess_RobotBuffer_ForceOutbound.cs | 2 CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd | 3 LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsStockQuan/WmsRecordUpiProcess.cs | 76 ++++++++++ CC/iWareModel/EnumType/WMS/UpiStatusEnum.cs | 23 ++- LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsStockQuan/WmsRecordPackageProcess.cs | 63 +++++++++ CC/iWareCC_ASRS/Connected Services/StationService/item3.xsd | 14 +- CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs | 60 ++++---- SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs | 20 ++ CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Outbound/3、DataProcess_RobotBuffer_FinishTaskForOutbound.cs | 15 + CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Outbound/1、DataProcess_RobotBuffer_AutoQiTaoOutbound.cs | 5 CC/iWareCC_ASRS/ThreadService/04_BZ21(搬运整垛机器人)/DataProcess_BZ21.cs | 116 +++++++++------- 15 files changed, 299 insertions(+), 116 deletions(-) diff --git a/CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs b/CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs index 6e4ecf8..16710eb 100644 --- a/CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs +++ b/CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs @@ -614,10 +614,10 @@ private string StationCodeField; [System.Runtime.Serialization.OptionalFieldAttribute()] - private string W_CartonHeightField; + private short W_CartonHeightField; [System.Runtime.Serialization.OptionalFieldAttribute()] - private string W_CartonWidthField; + private short W_CartonWidthField; [System.Runtime.Serialization.OptionalFieldAttribute()] private bool W_DataFinishField; @@ -662,10 +662,10 @@ private short W_Outbound_TaskIDField; [System.Runtime.Serialization.OptionalFieldAttribute()] - private string W_PackageLengthField; + private short W_PackageLengthField; [System.Runtime.Serialization.OptionalFieldAttribute()] - private string W_PackageWidthField; + private short W_PackageWidthField; [System.Runtime.Serialization.OptionalFieldAttribute()] private short W_PalletizingBucketTypeField; @@ -698,16 +698,16 @@ private bool W_SurroundTaskFinishField; [System.Runtime.Serialization.OptionalFieldAttribute()] - private int W_SurroundTaskNoField; + private short W_SurroundTaskNoField; [System.Runtime.Serialization.OptionalFieldAttribute()] private short W_WidthField; [System.Runtime.Serialization.OptionalFieldAttribute()] - private string W_X_OffsetField; + private short W_X_OffsetField; [System.Runtime.Serialization.OptionalFieldAttribute()] - private string W_Y_OffsetField; + private short W_Y_OffsetField; [global::System.ComponentModel.BrowsableAttribute(false)] public System.Runtime.Serialization.ExtensionDataObject ExtensionData { @@ -733,12 +733,12 @@ } [System.Runtime.Serialization.DataMemberAttribute()] - public string W_CartonHeight { + public short W_CartonHeight { get { return this.W_CartonHeightField; } set { - if ((object.ReferenceEquals(this.W_CartonHeightField, value) != true)) { + if ((this.W_CartonHeightField.Equals(value) != true)) { this.W_CartonHeightField = value; this.RaisePropertyChanged("W_CartonHeight"); } @@ -746,12 +746,12 @@ } [System.Runtime.Serialization.DataMemberAttribute()] - public string W_CartonWidth { + public short W_CartonWidth { get { return this.W_CartonWidthField; } set { - if ((object.ReferenceEquals(this.W_CartonWidthField, value) != true)) { + if ((this.W_CartonWidthField.Equals(value) != true)) { this.W_CartonWidthField = value; this.RaisePropertyChanged("W_CartonWidth"); } @@ -941,12 +941,12 @@ } [System.Runtime.Serialization.DataMemberAttribute()] - public string W_PackageLength { + public short W_PackageLength { get { return this.W_PackageLengthField; } set { - if ((object.ReferenceEquals(this.W_PackageLengthField, value) != true)) { + if ((this.W_PackageLengthField.Equals(value) != true)) { this.W_PackageLengthField = value; this.RaisePropertyChanged("W_PackageLength"); } @@ -954,12 +954,12 @@ } [System.Runtime.Serialization.DataMemberAttribute()] - public string W_PackageWidth { + public short W_PackageWidth { get { return this.W_PackageWidthField; } set { - if ((object.ReferenceEquals(this.W_PackageWidthField, value) != true)) { + if ((this.W_PackageWidthField.Equals(value) != true)) { this.W_PackageWidthField = value; this.RaisePropertyChanged("W_PackageWidth"); } @@ -1097,7 +1097,7 @@ } [System.Runtime.Serialization.DataMemberAttribute()] - public int W_SurroundTaskNo { + public short W_SurroundTaskNo { get { return this.W_SurroundTaskNoField; } @@ -1123,12 +1123,12 @@ } [System.Runtime.Serialization.DataMemberAttribute()] - public string W_X_Offset { + public short W_X_Offset { get { return this.W_X_OffsetField; } set { - if ((object.ReferenceEquals(this.W_X_OffsetField, value) != true)) { + if ((this.W_X_OffsetField.Equals(value) != true)) { this.W_X_OffsetField = value; this.RaisePropertyChanged("W_X_Offset"); } @@ -1136,12 +1136,12 @@ } [System.Runtime.Serialization.DataMemberAttribute()] - public string W_Y_Offset { + public short W_Y_Offset { get { return this.W_Y_OffsetField; } set { - if ((object.ReferenceEquals(this.W_Y_OffsetField, value) != true)) { + if ((this.W_Y_OffsetField.Equals(value) != true)) { this.W_Y_OffsetField = value; this.RaisePropertyChanged("W_Y_Offset"); } @@ -1842,10 +1842,10 @@ System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> InboundFinishConfirmAsync(int deviceId, bool value, string stationCode); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/OutboundFinishConfirm", ReplyAction="http://tempuri.org/IStationService/OutboundFinishConfirmResponse")] - iWareCC.StationService.SdaResEntity OutboundFinishConfirm(int deviceId, bool value, string stationCode); + iWareCC.StationService.SdaResEntity OutboundFinishConfirm(int deviceId, bool value, string stationCode, bool isClearData); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/OutboundFinishConfirm", ReplyAction="http://tempuri.org/IStationService/OutboundFinishConfirmResponse")] - System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> OutboundFinishConfirmAsync(int deviceId, bool value, string stationCode); + System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> OutboundFinishConfirmAsync(int deviceId, bool value, string stationCode, bool isClearData); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStationService/ChangeMode", ReplyAction="http://tempuri.org/IStationService/ChangeModeResponse")] iWareCC.StationService.SdaResEntity ChangeMode(int deviceId, int value, string stationCode); @@ -1878,10 +1878,10 @@ 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); + iWareCC.StationService.SdaResEntity WriteSurroundTaskInfo(int deviceId, string stationCode, short 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.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WriteSurroundTaskInfoAsync(int deviceId, string stationCode, short 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); @@ -2029,12 +2029,12 @@ return base.Channel.InboundFinishConfirmAsync(deviceId, value, stationCode); } - public iWareCC.StationService.SdaResEntity OutboundFinishConfirm(int deviceId, bool value, string stationCode) { - return base.Channel.OutboundFinishConfirm(deviceId, value, stationCode); + public iWareCC.StationService.SdaResEntity OutboundFinishConfirm(int deviceId, bool value, string stationCode, bool isClearData) { + return base.Channel.OutboundFinishConfirm(deviceId, value, stationCode, isClearData); } - public System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> OutboundFinishConfirmAsync(int deviceId, bool value, string stationCode) { - return base.Channel.OutboundFinishConfirmAsync(deviceId, value, stationCode); + public System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> OutboundFinishConfirmAsync(int deviceId, bool value, string stationCode, bool isClearData) { + return base.Channel.OutboundFinishConfirmAsync(deviceId, value, stationCode, isClearData); } public iWareCC.StationService.SdaResEntity ChangeMode(int deviceId, int value, string stationCode) { @@ -2077,11 +2077,11 @@ 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) { + public iWareCC.StationService.SdaResEntity WriteSurroundTaskInfo(int deviceId, string stationCode, short 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) { + public System.Threading.Tasks.Task<iWareCC.StationService.SdaResEntity> WriteSurroundTaskInfoAsync(int deviceId, string stationCode, short 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); } diff --git a/CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd b/CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd index 90381a3..4bf1e04 100644 --- a/CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd +++ b/CC/iWareCC_ASRS/Connected Services/StationService/item2.xsd @@ -177,6 +177,7 @@ <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:element minOccurs="0" name="isClearData" type="xs:boolean" /> </xs:sequence> </xs:complexType> </xs:element> @@ -286,7 +287,7 @@ <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="taskID" type="xs:short" /> <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" /> diff --git a/CC/iWareCC_ASRS/Connected Services/StationService/item3.xsd b/CC/iWareCC_ASRS/Connected Services/StationService/item3.xsd index 2dc1335..bc12c8a 100644 --- a/CC/iWareCC_ASRS/Connected Services/StationService/item3.xsd +++ b/CC/iWareCC_ASRS/Connected Services/StationService/item3.xsd @@ -45,8 +45,8 @@ <xs:complexType name="StationDB2ObjForWriteComm"> <xs:sequence> <xs:element minOccurs="0" name="StationCode" nillable="true" type="xs:string" /> - <xs:element minOccurs="0" name="W_CartonHeight" nillable="true" type="xs:string" /> - <xs:element minOccurs="0" name="W_CartonWidth" nillable="true" type="xs:string" /> + <xs:element minOccurs="0" name="W_CartonHeight" type="xs:short" /> + <xs:element minOccurs="0" name="W_CartonWidth" type="xs:short" /> <xs:element minOccurs="0" name="W_DataFinish" type="xs:boolean" /> <xs:element minOccurs="0" name="W_Destination_In" type="xs:int" /> <xs:element minOccurs="0" name="W_Destination_Out" type="xs:int" /> @@ -61,8 +61,8 @@ <xs:element minOccurs="0" name="W_Mode" type="xs:short" /> <xs:element minOccurs="0" name="W_OutboundFinishConfirm" type="xs:boolean" /> <xs:element minOccurs="0" name="W_Outbound_TaskID" type="xs: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_PackageLength" type="xs:short" /> + <xs:element minOccurs="0" name="W_PackageWidth" type="xs:short" /> <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" /> @@ -73,10 +73,10 @@ <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_SurroundTaskNo" type="xs:short" /> <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" /> + <xs:element minOccurs="0" name="W_X_Offset" type="xs:short" /> + <xs:element minOccurs="0" name="W_Y_Offset" type="xs:short" /> </xs:sequence> </xs:complexType> <xs:element name="StationDB2ObjForWriteComm" nillable="true" type="tns:StationDB2ObjForWriteComm" /> diff --git "a/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/1\343\200\201DataProcess_RobotBuffer_AutoQiTaoOutbound.cs" "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/1\343\200\201DataProcess_RobotBuffer_AutoQiTaoOutbound.cs" index c879823..4540825 100644 --- "a/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/1\343\200\201DataProcess_RobotBuffer_AutoQiTaoOutbound.cs" +++ "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/1\343\200\201DataProcess_RobotBuffer_AutoQiTaoOutbound.cs" @@ -47,6 +47,9 @@ var doList = upiList.Where(x => x.PackageCode == packageCode).OrderBy(x => x.Shelf).ToList(); foreach (var item in doList) { + item.UpiStatus = (int)UpiStatusEnum.宸查綈鍖�; + item.UpdateTime = DateTime.Now; + var x = group.ToList().Find(b => b.Upi == item.UPI); x.StockStatus = (int)StockStatusEnum.榻愬寘寰呭嚭搴�; @@ -63,7 +66,7 @@ Length = x.Length, Width = x.Width, Thk = x.Thk, - IssueTime = DateTime.Now, + PlanNo = x.PlanNo, OrderId = x.OrderId, PackageCode = x.PackageCode, diff --git "a/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/3\343\200\201DataProcess_RobotBuffer_FinishTaskForOutbound.cs" "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/3\343\200\201DataProcess_RobotBuffer_FinishTaskForOutbound.cs" index a6fe956..9121899 100644 --- "a/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/3\343\200\201DataProcess_RobotBuffer_FinishTaskForOutbound.cs" +++ "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/3\343\200\201DataProcess_RobotBuffer_FinishTaskForOutbound.cs" @@ -63,10 +63,10 @@ { if (task.TaskStatus == (int)TaskStatusEnum.宸插畬鎴�) { - //using (StationServiceClient client = new StationServiceClient()) - //{ - // var res = await client.OutboundFinishConfirmAsync((int)EDevice.Station, true, rgvLocation); - //} + using (StationServiceClient client = new StationServiceClient()) + { + var res = await client.OutboundFinishConfirmAsync((int)EDevice.Station, true, rgvLocation, false); + } continue; } @@ -93,7 +93,7 @@ //缁橮LC鎺ㄩ�佷换鍔″畬鎴愮‘璁や俊鍙� using (StationServiceClient client = new StationServiceClient()) { - var res = await client.OutboundFinishConfirmAsync((int)EDevice.Station, true, rgvLocation); + var res = await client.OutboundFinishConfirmAsync((int)EDevice.Station, true, rgvLocation, true); if (!res.result) { SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTaskForOutbound = $"{rgvLocation.ToString()}-涓嬪彂鍑哄簱浠诲姟 澶辫触,OutboundFinishConfirmAsync 杩斿洖:{res.resMsg}"; @@ -110,7 +110,10 @@ } else { - + using (StationServiceClient client = new StationServiceClient()) + { + var res = await client.OutboundFinishConfirmAsync((int)EDevice.Station, false, rgvLocation, false); + } } } } diff --git "a/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/4\343\200\201DataProcess_RobotBuffer_ForceOutbound.cs" "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/4\343\200\201DataProcess_RobotBuffer_ForceOutbound.cs" index c77916d..0fc6213 100644 --- "a/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/4\343\200\201DataProcess_RobotBuffer_ForceOutbound.cs" +++ "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/4\343\200\201DataProcess_RobotBuffer_ForceOutbound.cs" @@ -55,7 +55,7 @@ Length = x.Length, Width = x.Width, Thk = x.Thk, - IssueTime = DateTime.Now, + PlanNo = x.PlanNo, OrderId = x.OrderId, PackageCode = x.PackageCode, 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 5627637..77a06ef 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" @@ -31,7 +31,7 @@ { if (SystemValue.isStartedModel) { - + var rgvLocation = StationLocationEnum.BZ21.ToString(); /* * 1銆佷粠鏁版嵁搴撲腑鍒ゆ柇鏄惁榻愬 @@ -84,47 +84,63 @@ continue; } //string upi = "LS070700101B0001GS"; - ////璋冪敤鍑虹焊鏈烘帴鍙� - //var res =new HTTPService("http://172.17.1.22:44374/api/LuLi/").getContent<Respone>("cartons-machine?PackageCode="+upi, Guid.NewGuid(),10000); - //if (res.iState == 0) - //{ - // var papertable = wmsDB.mes_push_papercut.Where(x => x.PackageCode == upiObj.PackageCode).OrderByDescending(x => x.Id).FirstOrDefault(); - // if (papertable != null) - // { - // papertable.PushStatus = (int)PushStatusEnum.PushSuccess; - // papertable.ApiMessage = res.message; - // papertable.PushNum++; - // } - // else - // { - // var papercut = ClassHelper.RotationMapping<mes_push_papercut, mes_batchOrderUPI_new>(upiObj); - // papercut.Id = Yitter.IdGenerator.YitIdHelper.NextId(); - // papercut.ApiMessage = res.message; - // papercut.PushNum = 0; - // papercut.PushStatus = (int)PushStatusEnum.PushSuccess; - // wmsDB.mes_push_papercut.Add(papercut); - // } - //} - //else - //{ - // var papertable = wmsDB.mes_push_papercut.Where(x => x.PackageCode == upiObj.PackageCode).OrderByDescending(x => x.Id).FirstOrDefault(); - // if (papertable != null) - // { - // papertable.PushStatus = (int)PushStatusEnum.PushFail; - // papertable.ApiMessage = res.message; - // papertable.PushNum++; - // } - // else - // { - // var papercut = ClassHelper.RotationMapping<mes_push_papercut, mes_batchOrderUPI_new>(upiObj); - // papercut.Id = Yitter.IdGenerator.YitIdHelper.NextId(); - // papercut.ApiMessage = res.message; - // papercut.PushNum = 0; - // papercut.PushStatus = (int)PushStatusEnum.PushFail; - // wmsDB.mes_push_papercut.Add(papercut); - // } - // continue; - //} + //璋冪敤鍑虹焊鏈烘帴鍙� + var res = new HTTPService("http://172.17.1.22:44374/api/LuLi/").getContent<Respone>("cartons-machine?PackageCode=" + upiObj.PackageCode, Guid.NewGuid(), 10000); + if (res.iState == 0) + { + /* + var papertable = wmsDB.mes_push_papercut.Where(x => x.PackageCode == upiObj.PackageCode).OrderByDescending(x => x.Id).FirstOrDefault(); + if (papertable != null) + { + papertable.PushStatus = (int)PushStatusEnum.PushSuccess; + papertable.ApiMessage = res.message; + papertable.PushNum++; + } + else + { + var papercut = ClassHelper.RotationMapping<mes_push_papercut, mes_batchOrderUPI_new>(upiObj); + papercut.Id = Yitter.IdGenerator.YitIdHelper.NextId(); + papercut.ApiMessage = res.message; + papercut.PushNum = 1; + papercut.PushStatus = (int)PushStatusEnum.PushSuccess; + wmsDB.mes_push_papercut.Add(papercut); + } + //*/ + var papercut = ClassHelper.RotationMapping<mes_push_papercut, mes_batchOrderUPI_new>(upiObj); + papercut.Id = Yitter.IdGenerator.YitIdHelper.NextId(); + papercut.ApiMessage = res.message; + papercut.PushNum = 1; + papercut.PushStatus = (int)PushStatusEnum.PushSuccess; + wmsDB.mes_push_papercut.Add(papercut); + } + else + { + /* + var papertable = wmsDB.mes_push_papercut.Where(x => x.PackageCode == upiObj.PackageCode).OrderByDescending(x => x.Id).FirstOrDefault(); + if (papertable != null) + { + papertable.PushStatus = (int)PushStatusEnum.PushFail; + papertable.ApiMessage = res.message; + papertable.PushNum++; + } + else + { + var papercut = ClassHelper.RotationMapping<mes_push_papercut, mes_batchOrderUPI_new>(upiObj); + papercut.Id = Yitter.IdGenerator.YitIdHelper.NextId(); + papercut.ApiMessage = res.message; + papercut.PushNum = 1; + papercut.PushStatus = (int)PushStatusEnum.PushFail; + wmsDB.mes_push_papercut.Add(papercut); + } + //*/ + var papercut = ClassHelper.RotationMapping<mes_push_papercut, mes_batchOrderUPI_new>(upiObj); + papercut.Id = Yitter.IdGenerator.YitIdHelper.NextId(); + papercut.ApiMessage = res.message; + papercut.PushNum = 1; + papercut.PushStatus = (int)PushStatusEnum.PushFail; + wmsDB.mes_push_papercut.Add(papercut); + continue; + } //鏇存柊琛� var mesgather = wmsDB.mes_package_gather.Where(x => x.PackageCode == upiObj.PackageCode).FirstOrDefault(); if (mesgather != null) @@ -132,9 +148,9 @@ mesgather.AreaCode = (int)AreaCodeEnum.鍚堝寘瑁佸垏鍖�; mesgather.UpiStatus = (int)UpiStatusEnum.宸插悎鍖�; } - var upilist=wmsDB.mes_batchOrderUPI_new.Where(x=>x.PackageCode==upiObj.PackageCode).ToList(); + var upilist = wmsDB.mes_batchOrderUPI_new.Where(x => x.PackageCode == upiObj.PackageCode).ToList(); var upilength = upilist.Max(x => x.Length); - var upiwidth= upilist.Max(x => x.Width); + var upiwidth = upilist.Max(x => x.Width); cartonhigh = (short)upiObj.Info3; cartonwidth = (short)upiObj.Info2; upiObj.UpiStatus = (int)UpiStatusEnum.宸插悎鍖�; @@ -185,15 +201,15 @@ PlaceCode = place }; //鏂板鎵撳嵃琛� - var printid= Yitter.IdGenerator.YitIdHelper.NextId(); + var printid = Yitter.IdGenerator.YitIdHelper.NextId(); var print = ClassHelper.RotationMapping<wms_record_print, mes_batchOrderUPI_new>(upiObj); print.Id = printid; print.PrintType = (int)PrintTypeEnum.鍖呰鏉$爜; print.PrintSource = (int)PrintSourceEnum.鍖呰鏉$爜鎵撳嵃; print.PrintSheetNum = 1; - print.PrintNum= 0; + print.PrintNum = 0; print.PrintStatus = (int)PrintStatuEnum.鏈墦鍗�; - print.IsAllowPrint= true; + print.IsAllowPrint = true; print.CreateTime = print.UpdateTime = DateTime.Now; wmsDB.wms_record_print.Add(print); var printtwo = ClassHelper.RotationMapping<wms_record_print, mes_batchOrderUPI_new>(upiObj); @@ -204,11 +220,11 @@ printtwo.PrintStatus = (int)PrintStatuEnum.鏈墦鍗�; printtwo.IsAllowPrint = true; printtwo.CreateTime = print.UpdateTime = DateTime.Now; - printtwo.Id= Yitter.IdGenerator.YitIdHelper.NextId(); + printtwo.Id = Yitter.IdGenerator.YitIdHelper.NextId(); wmsDB.wms_record_print.Add(printtwo); wmsDB.mes_package_linequeue.Add(mesinequeue); - wmsDB.wms_rbline_task.Add(task); + wmsDB.wms_rbline_task.Add(task); wmsDB.mes_push_packagecode.Add(putpakegecode); //澶勭悊琛� mes_order_gather @@ -274,7 +290,7 @@ { value.PushStatus = (int)PushStatusEnum.Pushing; value.PushNum++; - value.ApiMessage+= res.message; + value.ApiMessage += res.message; if (value.PushNum == 3) { value.PushStatus = (int)PushStatusEnum.PushFail; diff --git a/CC/iWareModel/EnumType/WMS/UpiStatusEnum.cs b/CC/iWareModel/EnumType/WMS/UpiStatusEnum.cs index 85cd12a..7818d04 100644 --- a/CC/iWareModel/EnumType/WMS/UpiStatusEnum.cs +++ b/CC/iWareModel/EnumType/WMS/UpiStatusEnum.cs @@ -2,14 +2,15 @@ using System.ComponentModel; -namespace Admin.NET.Application { - -/// <summary> -/// 鏉挎枡鐘舵�佹灇涓� -/// </summary> -[Description("鏉挎枡鐘舵�佹灇涓�")] -public enum UpiStatusEnum +namespace Admin.NET.Application { + + /// <summary> + /// 鏉挎枡鐘舵�佹灇涓� + /// </summary> + [Description("鏉挎枡鐘舵�佹灇涓�")] + public enum UpiStatusEnum + { /// <summary> /// 鍒濆 /// </summary> @@ -48,9 +49,15 @@ 宸插悎鍖� = 5, /// <summary> + /// 宸叉牳楠� + /// </summary> + [Description("宸叉牳楠�")] + 宸叉牳楠� = 6, + + /// <summary> /// 宸蹭笅绾� /// </summary> [Description("宸蹭笅绾�")] - 宸蹭笅绾� = 6 + 宸蹭笅绾� = 7 } } \ No newline at end of file diff --git a/LA24030_LuLiPackageLine_Web/public/config.js b/LA24030_LuLiPackageLine_Web/public/config.js index e888e9b..086194f 100644 --- a/LA24030_LuLiPackageLine_Web/public/config.js +++ b/LA24030_LuLiPackageLine_Web/public/config.js @@ -4,6 +4,6 @@ "VITE_OPEN_CDN": "false", "VITE_PUBLIC_PATH": "", "VITE_SM_PUBLIC_KEY": "0484C7466D950E120E5ECE5DD85D0C90EAA85081A3A2BD7C57AE6DC822EFCCBD66620C67B0103FC8DD280E36C3B282977B722AAEC3C56518EDCEBAFB72C5A05312", - "VITE_API_URL": "http://localhost:5005" - //"VITE_API_URL": "http://172.17.1.111:5005" //姝e紡鍦板潃 + //"VITE_API_URL": "http://localhost:5005" + "VITE_API_URL": "http://172.17.1.111:5005" //姝e紡鍦板潃 } \ No newline at end of file diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsStockQuan/WmsRecordPackageProcess.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsStockQuan/WmsRecordPackageProcess.cs new file mode 100644 index 0000000..7041a09 --- /dev/null +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsStockQuan/WmsRecordPackageProcess.cs @@ -0,0 +1,63 @@ +锘縰sing Admin.NET.Core; + +/* + * @author : 鍒樻枃濂� + * @date : 2024/5/29涓婂崍10:26:39 + * @desc : 璋冨害浠诲姟 + */ +namespace Admin.NET.Application.Entity +{ + /// <summary> + /// 鍖呰繃绋嬪饱鍘嗘暟鎹� + /// </summary> + [SugarTable("wms_record_package_process", "鍖呰繃绋嬪饱鍘嗘暟鎹�")] + public class WmsRecordPackageProcess : EntityBaseForRecord + { + + [Required] + [SugarColumn(ColumnName = "PackageCode", ColumnDescription = "鍖呰鍙�", Length = 50)] + public string PackageCode { get; set; } + + /// <summary> + /// 鐢熶骇鍗曞彿 + /// </summary> + [SugarColumn(ColumnName = "Info5", ColumnDescription = "鐢熶骇鍗曞彿", Length = 60)] + public string? Info5 { get; set; } + + + [Required] + [SugarColumn(ColumnName = "PlanNo", ColumnDescription = "鎵规鍙�", Length = 50)] + public string PlanNo { get; set; } + + [Required] + [SugarColumn(ColumnName = "OrderId", ColumnDescription = "璁㈠崟鍙�", Length = 50)] + public string OrderId { get; set; } + + + + /// <summary> + /// 鍖呯姸鎬� + /// </summary> + [Required] + [SugarColumn(ColumnName = "UpiStatus", ColumnDescription = "鍖呯姸鎬�")] + public UpiStatusEnum UpiStatus { get; set; } = UpiStatusEnum.鍒濆; + + /// <summary> + /// 鏍囪 + /// </summary> + [SugarColumn(ColumnName = "UpiFlag", ColumnDescription = "鏍囪")] + public UpiFlagEnum? UpiFlag { get; set; } = UpiFlagEnum.姝e父; + + /// <summary> + /// 浣嶇疆 + /// </summary> + [SugarColumn(ColumnName = "Location", ColumnDescription = "浣嶇疆")] + public string? Location { get; set; } + + /// <summary> + /// 澶囨敞 + /// </summary> + [SugarColumn(ColumnName = "OperRemark", ColumnDescription = "澶囨敞", Length = 100)] + public string? OperRemark { get; set; } + } +} \ No newline at end of file diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsStockQuan/WmsRecordUpiProcess.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsStockQuan/WmsRecordUpiProcess.cs new file mode 100644 index 0000000..563b567 --- /dev/null +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsStockQuan/WmsRecordUpiProcess.cs @@ -0,0 +1,76 @@ +锘縰sing Admin.NET.Core; + +/* + * @author : 鍒樻枃濂� + * @date : 2024/5/29涓婂崍10:26:39 + * @desc : 璋冨害浠诲姟 + */ +namespace Admin.NET.Application.Entity +{ + /// <summary> + /// 鏉夸欢杩囩▼灞ュ巻鏁版嵁 + /// </summary> + [SugarTable("wms_record_upi_process", "鏉夸欢杩囩▼灞ュ巻鏁版嵁")] + public class WmsRecordUpiProcess : EntityBaseForRecord + { + + [Required] + [SugarColumn(ColumnName = "Upi", ColumnDescription = "閮ㄤ欢鏉$爜", Length = 50)] + public string Upi { get; set; } + + [Required] + [SugarColumn(ColumnName = "PackageCode", ColumnDescription = "鍖呰鍙�", Length = 50)] + public string PackageCode { get; set; } + + /// <summary> + /// 鐢熶骇鍗曞彿 + /// </summary> + [SugarColumn(ColumnName = "Info5", ColumnDescription = "鐢熶骇鍗曞彿", Length = 60)] + public string? Info5 { get; set; } + + [Required] + [SugarColumn(ColumnName = "PlanNo", ColumnDescription = "鎵规鍙�", Length = 50)] + public string PlanNo { get; set; } + + [Required] + [SugarColumn(ColumnName = "OrderId", ColumnDescription = "璁㈠崟鍙�", Length = 50)] + public string OrderId { get; set; } + + + /// <summary> + /// 鏉挎枡鐘舵�� + /// </summary> + [Required] + [SugarColumn(ColumnName = "UpiStatus", ColumnDescription = "鏉挎枡鐘舵��")] + public UpiStatusEnum UpiStatus { get; set; } = UpiStatusEnum.鍒濆; + + /// <summary> + /// 鏍囪 + /// </summary> + [SugarColumn(ColumnName = "UpiFlag", ColumnDescription = "鏍囪")] + public UpiFlagEnum? UpiFlag { get; set; } = UpiFlagEnum.姝e父; + + /// <summary> + /// 浣嶇疆 + /// </summary> + [SugarColumn(ColumnName = "Location", ColumnDescription = "浣嶇疆")] + public string? Location { get; set; } + + [Required] + [SugarColumn(ColumnName = "DetailName", ColumnDescription = "閮ㄤ欢鍚嶇О", Length = 50)] + public string DetailName { get; set; } + + /// <summary> + /// 鏉愭枡 + /// </summary> + [SugarColumn(ColumnName = "Info18", ColumnDescription = "鏉愭枡", Length = 60)] + public string? Info18 { get; set; } + + + /// <summary> + /// 澶囨敞 + /// </summary> + [SugarColumn(ColumnName = "OperRemark", ColumnDescription = "澶囨敞", Length = 100)] + public string? OperRemark { get; set; } + } +} \ No newline at end of file diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Enum/WmsOrder/UpiStatusEnum.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Enum/WmsOrder/UpiStatusEnum.cs index 1a813f3..a5c7b52 100644 --- a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Enum/WmsOrder/UpiStatusEnum.cs +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Enum/WmsOrder/UpiStatusEnum.cs @@ -48,9 +48,15 @@ 宸插悎鍖� = 5, /// <summary> + /// 宸叉牳楠� + /// </summary> + [Description("宸叉牳楠�")] + 宸叉牳楠� = 6, + + /// <summary> /// 宸蹭笅绾� /// </summary> [Description("宸蹭笅绾�")] - 宸蹭笅绾� = 6 + 宸蹭笅绾� = 7 } diff --git a/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs b/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs index 90dac1a..ebd3081 100644 --- a/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs +++ b/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs @@ -262,7 +262,15 @@ } } - public bool OutboundFinishConfirm(string stationCode, bool value, out string msg) + /// <summary> + /// + /// </summary> + /// <param name="stationCode"></param> + /// <param name="value"></param> + /// <param name="msg"></param> + /// <param name="isClearData">鏄惁闇�瑕佹竻鐞嗘暟鎹�</param> + /// <returns></returns> + public bool OutboundFinishConfirm(string stationCode, bool value, out string msg, bool isClearData) { try { @@ -278,7 +286,7 @@ return false; } - if (value) + if (value && isClearData) { b2 = this.plcService.WriteValuePoint(stationObj.W_ReqOut, false, view_stationObj.W_ReqOut); if (!b2.result) @@ -438,7 +446,7 @@ /// <param name=""></param> /// <param name=""></param> /// <returns></returns> - 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) + 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 { @@ -454,7 +462,7 @@ stationObj.W_Inbound_TaskID); return false; } - + b2 = this.plcService.WriteValuePoint(stationObj.W_Length, length, view_stationObj.W_Length); if (!b2.result) { @@ -611,7 +619,7 @@ stationObj.W_Height); return false; } - + b2 = this.plcService.WriteValuePoint(stationObj.W_DataFinish, true, view_stationObj.W_DataFinish); if (!b2.result) { @@ -652,7 +660,7 @@ MessageModel b2 = this.plcService.WriteValuePoint(stationObj.W_PalletizingTaskFinish, value, view_stationObj.W_PalletizingTaskFinish); if (!b2.result) { - msg = string.Format("鍚慡tation"+stationCode+" 鍐欏叆浠诲姟瀹屾垚纭 鍦板潃{0} 鍐� " + value + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg, + msg = string.Format("鍚慡tation" + stationCode + " 鍐欏叆浠诲姟瀹屾垚纭 鍦板潃{0} 鍐� " + value + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg, stationObj.W_OutboundFinishConfirm); return false; } diff --git a/SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs b/SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs index 864796b..7ad32a0 100644 --- a/SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs +++ b/SDA/iWareSda/Devices/4-Station/StationService/IStationService.cs @@ -108,7 +108,7 @@ /// <param name="value"></param> /// <returns></returns> [OperationContract] - SdaResEntity OutboundFinishConfirm(int deviceId, bool value, string stationCode); + SdaResEntity OutboundFinishConfirm(int deviceId, bool value, string stationCode, bool isClearData); /// <summary> diff --git a/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs b/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs index ccbba8c..3ada592 100644 --- a/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs +++ b/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs @@ -476,7 +476,7 @@ /// <param name="deviceId"></param> /// <param name="value"></param> /// <returns></returns> - public SdaResEntity OutboundFinishConfirm(int deviceId, bool value, string stationCode) + public SdaResEntity OutboundFinishConfirm(int deviceId, bool value, string stationCode, bool isClearData) { SdaResEntity _SdaResEntity = new SdaResEntity(); try @@ -489,7 +489,7 @@ var Station = StationResult.resData as StationEntity; string msg = ""; - var result = Station.OutboundFinishConfirm(stationCode, value, out msg); + var result = Station.OutboundFinishConfirm(stationCode, value, out msg,isClearData); _SdaResEntity.result = result; _SdaResEntity.resMsg = msg; return _SdaResEntity; -- Gitblit v1.9.3