From 76fc40d4f1e0dbd15383c0f3e29fd8bcb6dcff2a Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周五, 22 11月 2024 19:01:50 +0800 Subject: [PATCH] 2 --- SDA/iWareSda/Devices/4-Station/StationService/StationService.cs | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 105 insertions(+), 6 deletions(-) diff --git a/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs b/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs index 403d284..90b9047 100644 --- a/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs +++ b/SDA/iWareSda/Devices/4-Station/StationService/StationService.cs @@ -407,12 +407,12 @@ /// <summary> - /// 1015閲嶆柊鎵爜 + /// 鍐欏叆榻愬缁撴灉 /// </summary> /// <param name="deviceId"></param> /// <param name="value"></param> /// <returns></returns> - public SdaResEntity Write1015ReScan(int deviceId, bool value) + public SdaResEntity WriteQiTaoInfo(int deviceId, string stationCode, bool value) { SdaResEntity _SdaResEntity = new SdaResEntity(); try @@ -425,7 +425,7 @@ var Station = StationResult.resData as StationEntity; string msg = ""; - var result = Station.Write1015ReScan(deviceId, value, out msg); + var result = Station.WriteQiTaoInfo(stationCode, value, out msg); _SdaResEntity.result = result; _SdaResEntity.resMsg = msg; return _SdaResEntity; @@ -439,12 +439,12 @@ } /// <summary> - /// 1019閲嶆柊鎵爜 + /// 鍏ュ簱瀹屾垚宸茬‘璁� /// </summary> /// <param name="deviceId"></param> /// <param name="value"></param> /// <returns></returns> - public SdaResEntity Write1019ReScan(int deviceId, bool value) + public SdaResEntity InboundFinishConfirm(int deviceId, bool value, string stationCode) { SdaResEntity _SdaResEntity = new SdaResEntity(); try @@ -457,7 +457,106 @@ var Station = StationResult.resData as StationEntity; string msg = ""; - var result = Station.Write1019ReScan(deviceId, value, out msg); + var result = Station.InboundFinishConfirm(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> + /// <returns></returns> + public SdaResEntity OutboundFinishConfirm(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.OutboundFinishConfirm(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> + /// <returns></returns> + public SdaResEntity WriteInStoreTaskInfo(int deviceId, string stationCode, string toPlaceNo, short length, short width, short height, int inbound_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.WriteInStoreTaskInfo(stationCode, toPlaceNo, length, width, height, out msg, inbound_TaskID); + _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(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(stationCode, sourcePlaceNo, out msg, outbound_TaskID); _SdaResEntity.result = result; _SdaResEntity.resMsg = msg; return _SdaResEntity; -- Gitblit v1.9.3