schangxiang@126.com
2025-08-13 a97a624c1fb269a059f97629076433c46b4e8b4c
SDA/iWareSda/Devices/4-Station/StationService/StationService.cs
@@ -13,6 +13,7 @@
namespace iWareSda
{
    // 注意: 使用“重构”菜单上的“重命名”命令,可以同时更改代码和配置文件中的类名“StationService”。
    [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple)]
    public class StationService : IStationService
    {
        public SdaResEntity ClearAlarm(int deviceId)
@@ -584,6 +585,40 @@
            }
        }
        /// <summary>
        /// 扫码记录清除
        /// </summary>
        /// <param name="deviceId"></param>
        /// <param name="value"></param>
        /// <param name="stationCode"></param>
        /// <returns></returns>
        public SdaResEntity PartClear(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.PartClear(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>
@@ -684,7 +719,8 @@
        /// <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)
        public SdaResEntity WriteSurroundTaskInfo(int deviceId, string stationCode, short taskID, short length, short width,
            short cartonhigh, short cartonwidth, short placex, short placey, bool isNgFlag)
        {
            SdaResEntity _SdaResEntity = new SdaResEntity();
            try
@@ -697,7 +733,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, isNgFlag);
                _SdaResEntity.result = result;
                _SdaResEntity.resMsg = msg;
                return _SdaResEntity;
@@ -800,6 +836,39 @@
        }
        /// <summary>
        /// 写入NG包标记
        /// </summary>
        /// <param name="deviceId"></param>
        /// <param name="value"></param>
        /// <param name="stationCode"></param>
        /// <returns></returns>
        public SdaResEntity WriteStation_NgFlag(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_NgFlag(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>