From 0e0ff265a99bae19dbf6194483704cfdb7223375 Mon Sep 17 00:00:00 2001
From: liuying <1427574514@qq.com>
Date: 周日, 08 12月 2024 17:15:12 +0800
Subject: [PATCH] 库位视图
---
SDA/iWareSda/Devices/4-Station/StationService/StationService.cs | 99 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 99 insertions(+), 0 deletions(-)
diff --git a/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs b/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs
index 3414dc5..34f3225 100644
--- a/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs
+++ b/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs
@@ -405,6 +405,38 @@
}
}
+ /// <summary>
+ /// 鍐橮LC bool
+ /// </summary>
+ /// <param name="deviceId"></param>
+ /// <param name="dbAddress"></param>
+ /// <param name="value"></param>
+ /// <returns></returns>
+ public SdaResEntity WriteBoolPlcData(int deviceId, string dbAddress, bool value)
+ {
+ 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.WriteBoolPlcData(dbAddress, value, out msg);
+ _SdaResEntity.result = result;
+ _SdaResEntity.resMsg = msg;
+ return _SdaResEntity;
+ }
+ catch (Exception ex)
+ {
+ _SdaResEntity.result = false;
+ _SdaResEntity.resMsg = ex.Message;
+ return _SdaResEntity;
+ }
+ }
/// <summary>
/// 鍐欏叆榻愬缁撴灉銆佽В鏋愮粨鏋�
@@ -716,6 +748,73 @@
return _SdaResEntity;
}
}
+
+ /// <summary>
+ /// 鍐欏叆 琛ユ澘宸ヤ綅鍏佽杩涙澘
+ /// </summary>
+ /// <param name="deviceId"></param>
+ /// <param name="value"></param>
+ /// <param name="stationCode"></param>
+ /// <returns></returns>
+ public SdaResEntity WriteStation_AllowIn(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_AllowIn(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>
+ /// <param name="deviceId"></param>
+ /// <param name="value"></param>
+ /// <param name="stationCode"></param>
+ /// <returns></returns>
+ public SdaResEntity WriteStation_PersonAllow(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_PersonAllow(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