22
schangxiang@126.com
2024-12-19 0aec07c9110afb5c02976f90e2319886c8a14f54
SDA/iWareSda/Devices/4-Station/StationService/StationService.cs
@@ -584,6 +584,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 +718,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 +732,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 +835,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>