11
schangxiang@126.com
2024-12-16 1b10882a0a46c8b25331ccd2628f7a2a6db8b13f
SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs
@@ -394,6 +394,42 @@
            }
        }
        /// <summary>
        /// 扫码记录清除
        /// </summary>
        /// <param name="stationCode"></param>
        /// <param name="value"></param>
        /// <param name="msg"></param>
        /// <returns></returns>
        public bool PartClear(string stationCode, bool value, out string msg)
        {
            try
            {
                msg = "";
                var stationObj = this.DBBlockForWrite.W_StationForWriteCommList.Where(x => x.StationCode == stationCode).FirstOrDefault();
                var view_stationObj = this.View.W_StationForWriteCommList.Where(x => x.StationCode == stationCode).FirstOrDefault();
                MessageModel b2 = this.plcService.WriteValuePoint(stationObj.W_PartClear, value, view_stationObj.W_PartClear);
                if (!b2.result)
                {
                    msg = string.Format("向Station 扫码记录清除 地址{0} 写  " + value + "失败,返回结果:" + b2.resMsg,
                        stationObj.W_PartClear);
                    return false;
                }
                return true;
            }
            catch (Exception ex)
            {
                msg = ex.Message;
                var logcontext = string.Format("向Statio 扫码记录清除 出现异常:" + JsonConvert.SerializeObject(ex),
                        "");
                Log4NetHelper.WriteErrorLog(Station_CacheEntity.curLogType, logcontext, ex);
                return false;
            }
        }
        public bool WriteInStoreTaskInfo(string stationCode, string toPlaceNo, short length, short width, short height, out string msg, int inbound_TaskID)
        {
            try