lss
2025-07-04 3865194441f1e1da34c0be9034d86c8d0d68706c
HH.WCS.Mobox3/HH.WCS.Mobox3.JiaTong/process/DeviceProcess.cs
@@ -48,7 +48,7 @@
        /// <summary>
        /// 叠盘机空托返回
        /// </summary>    
        internal static void Traystacker(string loc, int qty, int type)
        internal static void Traystacker(string loc, int qty, int type,string cntrcode="")
        {
            try
            {
@@ -145,12 +145,23 @@
                        //    var cntrcodes = cntr.Select(a => a.S_CNTR_CODE).ToArray();
                        //    cntrcode = string.Join(",", cntrcodes);
                        //}
                        LogHelper.Info($"货位{location}叠满6个开始回调接口");
                        string cntrcode = "";
                        var cntr = db.Queryable<LocCntrRel>().Where(a => a.S_LOC_CODE.Trim() == item.S_CODE).ToList();
                        if (cntr.Count > 0)
                        {
                            cntrcode = cntr.OrderBy(a => a.T_CREATE).First().S_CNTR_CODE;
                            // cntrcode = string.Join(",", cntrcodes);
                        }
                        LogHelper.Info($"货位{item.S_CODE}叠满6个开始回调接口");
                        //创建过未完成的任务不发起请求
                        var mst = WCSHelper.GetTaskByStartloc(item.S_CODE);
                        if (mst == null)
                        {
                            Traystacker(item.S_CODE, item.N_CURRENT_NUM, 1);
                            Traystacker(item.S_CODE, item.N_CURRENT_NUM, 2, cntrcode);
                        }
                        else
                        {
                            LogHelper.Info($"有执行中的叠盘回库任务{mst.S_CODE},不触发叠盘任务");
                        }
                    }
                }
@@ -252,8 +263,9 @@
        /// <summary>
        /// 原材料库接口访问
        /// </summary>    
        internal static void AgvEmptyBack(string loc, string cntrcode)
        internal static Resultmobox AgvEmptyBack(string loc, string cntrcode)
        {
            Resultmobox result = new Resultmobox();
            try
            {
                string partNumber = "";
@@ -263,7 +275,7 @@
                result1.data = traystacker;
                HttpHelper httpHelper = new HttpHelper();
                //调用接口
                Resultmobox result = new Resultmobox();
                string date = JsonConvert.SerializeObject(result1);
                string url = Settings.tableUrls.Find(a => a.id == 11).url;
                LogHelper.Info($"空托返回:地址:{url},内容:{date}");
@@ -278,11 +290,12 @@
                {
                    LogHelper.Info($"空托返回请求失败=>msg:{result.err_msg}");
                }
                return result;
            }
            catch (Exception ex)
            {
                LogHelper.Info($"空托返回  Error=>{ex.ToString()}");
                return result;
            }
        }