From 4a68e02a9dbffe0b215ceb1d9758ccb17329e523 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周三, 18 12月 2024 10:49:30 +0800
Subject: [PATCH] 222
---
SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs | 37 +++++++++++++++++++++++++++++++++++++
1 files changed, 37 insertions(+), 0 deletions(-)
diff --git a/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs b/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs
index 8b0141d..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
@@ -1274,6 +1310,7 @@
//Context = item.WarningContent.Trim(),
});
}
+ //Thread.Sleep(1000);
}
}
catch (Exception ex)
--
Gitblit v1.9.3