1
schangxiang@126.com
2024-12-02 607fa9a9dec5ff4fe780231d635bbd62e1740f37
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, bool isLast, short length, short width, short height,short rotate,short toplace,short placeX,short placeY)
        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,isLast, length, width, height,rotate,toplace,placeX,placeY,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,6 +628,94 @@
                return _SdaResEntity;
            }
        }
        /// <summary>
        /// 写入合包任务信息
        /// </summary>
        /// <param name="deviceId"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        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
            {
                var StationResult = Station_CacheEntity.GetDeviceObj(deviceId);
                if (!StationResult.result)
                {
                    return StationResult;
                }
                var Station = StationResult.resData as StationEntity;
                string msg = "";
                var result = Station.WriteSurroundTaskInfo(stationCode, taskID, length, width,  cartonhigh, cartonwidth, placex, placey, 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 SetSurroundTaskFinishAck(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.WriteSurround_FinishACK(stationCode, value, out msg);
                _SdaResEntity.result = result;
                _SdaResEntity.resMsg = msg;
                return _SdaResEntity;
            }
            catch (Exception ex)
            {
                _SdaResEntity.result = false;
                _SdaResEntity.resMsg = ex.Message;
                return _SdaResEntity;
            }
        }
        public SdaResEntity WriteStation_ACK(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_ACK(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>