From 52ea328589f08585046bd519e4c57e5dce24e1dd Mon Sep 17 00:00:00 2001 From: zongzhibin <zongzhibin@weben-smart.com> Date: 周六, 23 11月 2024 09:49:36 +0800 Subject: [PATCH] Merge branch 'master' of http://222.71.245.114:9086/r/LA24030-LuLI_PackageLine --- SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs | 32 +++++++++++++++++--------------- 1 files changed, 17 insertions(+), 15 deletions(-) diff --git a/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs b/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs index 7cd2b86..368ac29 100644 --- a/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs +++ b/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs @@ -234,7 +234,7 @@ } - public bool InboundFinishConfirm(string stationCode, out string msg) + public bool InboundFinishConfirm(string stationCode, bool value, out string msg) { try { @@ -242,10 +242,10 @@ 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_InboundFinishConfirm, true, view_stationObj.W_DataFinish); + MessageModel b2 = this.plcService.WriteValuePoint(stationObj.W_InboundFinishConfirm, value, view_stationObj.W_DataFinish); if (!b2.result) { - msg = string.Format("鍚慡tation鍦板潃{0} 鍏ュ簱瀹屾垚纭 鍐� " + true + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg, + msg = string.Format("鍚慡tation鍦板潃{0} 鍏ュ簱瀹屾垚纭 鍐� " + value + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg, stationObj.W_InboundFinishConfirm); return false; } @@ -262,7 +262,7 @@ } } - public bool OutboundFinishConfirm(string stationCode, out string msg) + public bool OutboundFinishConfirm(string stationCode, bool value, out string msg) { try { @@ -270,10 +270,10 @@ 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_OutboundFinishConfirm, true, view_stationObj.W_OutboundFinishConfirm); + MessageModel b2 = this.plcService.WriteValuePoint(stationObj.W_OutboundFinishConfirm, value, view_stationObj.W_OutboundFinishConfirm); if (!b2.result) { - msg = string.Format("鍚慡tation 鍑哄簱浠诲姟瀹屾垚纭 鍦板潃{0} 鍐� " + true + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg, + msg = string.Format("鍚慡tation 鍑哄簱浠诲姟瀹屾垚纭 鍦板潃{0} 鍐� " + value + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg, stationObj.W_OutboundFinishConfirm); return false; } @@ -298,16 +298,8 @@ 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, true, view_stationObj.W_DataFinish); - if (!b2.result) - { - msg = string.Format("鍚慡tation鍦板潃{0} 鍐� 璇荤爜瑙f瀽瀹屾垚 " + true + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg, - stationObj.W_DataFinish); - return false; - } - - b2 = this.plcService.WriteValuePoint(stationObj.W_Inbound_TaskID, inbound_TaskID, view_stationObj.W_Inbound_TaskID); + MessageModel b2 = this.plcService.WriteValuePoint(stationObj.W_Inbound_TaskID, inbound_TaskID, view_stationObj.W_Inbound_TaskID); if (!b2.result) { msg = string.Format("鍚慡tation鍦板潃{0} 鍐� 鍏ュ簱浠诲姟鍙� " + inbound_TaskID + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg, @@ -345,6 +337,16 @@ return false; } + + b2 = this.plcService.WriteValuePoint(stationObj.W_DataFinish, true, view_stationObj.W_DataFinish); + if (!b2.result) + { + msg = string.Format("鍚慡tation鍦板潃{0} 鍐� 璇荤爜瑙f瀽瀹屾垚 " + true + "澶辫触,杩斿洖缁撴灉:" + b2.resMsg, + stationObj.W_DataFinish); + return false; + } + + return true; } catch (Exception ex) -- Gitblit v1.9.3