杨前锦
2025-06-19 d42ad8b01195def2a9309930e14f90ff13ad47b1
HH.WCS.Mobox3/HH.WCS.Mobox3.YNJT_BZP/util/Settings.cs
@@ -20,8 +20,7 @@
        public static string WHCode { get; set; }
        public static string FacCode { get; set; }
        public static string NDCApiUrl { get; set; }
        public static string baseTrayOutBufferLoc { get; set; }
        public static string baseTrayInBufferLoc { get; set; }
        public static List<BaseTrayBufferLoc> baseTrayBufferLocList { get; set; }
        public static string errorBufferArea { get; set; }
        public static string storeAreaCode { get; set; }
        public static List<AgvWaitLoc> agvWaitLocList { get; set; }
@@ -65,13 +64,9 @@
                            {
                                agvJBLocList = JsonConvert.DeserializeObject<List<AgvJBLoc>>(keyValue.Value.ToString());
                            }
                            if (keyValue.Name == "baseTrayOutBufferLoc")
                            if (keyValue.Name == "baseTrayBufferLoc")
                            {
                                baseTrayOutBufferLoc = keyValue.Value.ToString();
                            }
                            if (keyValue.Name == "baseTrayInBufferLoc")
                            {
                                baseTrayInBufferLoc = keyValue.Value.ToString();
                                baseTrayBufferLocList = JsonConvert.DeserializeObject<List<BaseTrayBufferLoc>>(keyValue.Value.ToString());
                            }
                            if (keyValue.Name == "NDCApiUrl")
                            {
@@ -117,14 +112,13 @@
        /// <summary>
        /// 获取AGV接驳位
        /// </summary>
        /// <param name="type"> 1.agv接驳位  2.人工接驳位 </param>
        /// <param name="roadway"></param>
        /// <param name="action"> 0.通用 1.入库 2.出库</param>
        /// <returns></returns>
        public static List<string> getAgvJBLocList(int type, int roadway ,int action)
        public static List<string> getAgvJBLocList( int roadway ,int action)
        {
            List<string> locCodes = new List<string>();
            var agvJbLocList = agvJBLocList.Where(a => a.type == type && a.roadway.Contains(roadway) && a.action == action).Select(a => a.locCode).ToList();
            var agvJbLocList = agvJBLocList.Where(a =>  a.roadway.Contains(roadway) && a.action == action).Select(a => a.locCode).ToList();
            if (agvJBLocList.Count > 0)
            {
                Dictionary<string, int> keyValuePairs = new Dictionary<string, int>();
@@ -150,13 +144,18 @@
            return agvJBLocList.Where(a => a.locCode == locCode).FirstOrDefault();
        }
        public class BaseTrayBufferLoc
        {
            public string bufferOutLoc { get; set; }
            public string bufferInLoc { get; set; }
        }
        public class AgvJBLoc 
        {
            public string locCode { get; set; }
            public string name { get; set; }
            public int type { get; set; } // 1.agv接驳位  2.人工接驳位
            public List<int> roadway { get; set; }
            public int action { get; set; } // 0.通用 1.入库 2.出库
            public int action { get; set; } // 1.入库 2.出库
        }
        public class AgvWaitLoc