From 09d0a68dcc8a48a79e472b87c4aa3c90e9770154 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周日, 08 12月 2024 10:43:35 +0800 Subject: [PATCH] 2 --- SDA/iWareSda/Devices/4-Station/StationService/StationService.cs | 93 ++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 80 insertions(+), 13 deletions(-) diff --git a/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs b/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs index dc11237..0d878af 100644 --- a/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs +++ b/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs @@ -407,7 +407,7 @@ /// <summary> - /// 鍐欏叆榻愬缁撴灉 + /// 鍐欏叆榻愬缁撴灉銆佽В鏋愮粨鏋� /// </summary> /// <param name="deviceId"></param> /// <param name="value"></param> @@ -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; @@ -572,7 +572,7 @@ /// <param name="deviceId"></param> /// <param name="value"></param> /// <returns></returns> - 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) + 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, length, width, height,rotate,toplace,placeX,placeY,placeZ,lastnum ,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; @@ -628,14 +628,14 @@ return _SdaResEntity; } } - + /// <summary> /// 鍐欏叆鍚堝寘浠诲姟淇℃伅 /// </summary> /// <param name="deviceId"></param> /// <param name="value"></param> /// <returns></returns> - public SdaResEntity WriteSurroundTaskInfo(int deviceId, string stationCode, int taskID, short length, short width, short cartonhigh, short cartonwidth, short placex, short placey) + public SdaResEntity WriteSurroundTaskInfo(int deviceId, string stationCode, short taskID, short length, short width, short cartonhigh, short cartonwidth, short placex, short placey) { SdaResEntity _SdaResEntity = new SdaResEntity(); try @@ -648,7 +648,7 @@ var Station = StationResult.resData as StationEntity; string msg = ""; - var result = Station.WriteSurroundTaskInfo(stationCode, taskID, length, width, cartonhigh, cartonwidth, placex, placey, out msg); + var result = Station.WriteSurroundTaskInfo(stationCode, taskID, length, width, cartonhigh, cartonwidth, placex, placey, out msg); _SdaResEntity.result = result; _SdaResEntity.resMsg = msg; return _SdaResEntity; @@ -716,15 +716,15 @@ return _SdaResEntity; } } + /// <summary> - /// 鍐欏叆鍑哄簱浠诲姟淇℃伅 + /// 鍐欏叆 琛ユ澘宸ヤ綅鍏佽杩涙澘 /// </summary> /// <param name="deviceId"></param> + /// <param name="value"></param> /// <param name="stationCode"></param> - /// <param name="sourcePlaceNo"></param> - /// <param name="outbound_TaskID"></param> /// <returns></returns> - public SdaResEntity WriteOutStoreTaskInfo(int deviceId, string stationCode, string sourcePlaceNo, int outbound_TaskID) + public SdaResEntity WriteStation_AllowIn(int deviceId, bool value, string stationCode) { SdaResEntity _SdaResEntity = new SdaResEntity(); try @@ -737,7 +737,74 @@ var Station = StationResult.resData as StationEntity; string msg = ""; - var result = Station.WriteOutStoreTaskInfo(stationCode, sourcePlaceNo, out msg, outbound_TaskID); + 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> + /// <param name="deviceId"></param> + /// <param name="stationCode"></param> + /// <param name="sourcePlaceNo"></param> + /// <param name="outbound_TaskID"></param> + /// <returns></returns> + public SdaResEntity WriteOutStoreTaskInfo(bool isResetData, int deviceId, string stationCode, string sourcePlaceNo, int outbound_TaskID) + { + 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.WriteOutStoreTaskInfo(isResetData, stationCode, sourcePlaceNo, out msg, outbound_TaskID); _SdaResEntity.result = result; _SdaResEntity.resMsg = msg; return _SdaResEntity; -- Gitblit v1.9.3