示例#1
0
        /// <summary>
        /// 清除指定库房货位
        /// </summary>
        /// <param name="houseName"></param>
        private void ClearInvalidGS(string houseName, int totalRow, int totalCol, int totalLayer)
        {
            // string houseName = EnumStoreHouse.A库房.ToString();
            XmlNode house = xmlOper.GetNodeByName("StoreHouse", houseName);

            if (house == null)
            {
                return;
            }
            XmlNode gSInvalidNode = house.SelectSingleNode("GSInvalidList");

            if (gSInvalidNode == null)
            {
                return;
            }

            XmlNodeList gsInvalidList = gSInvalidNode.SelectNodes("GSItem");

            if (null == gsInvalidList)//如果都为可用货位就无需操作
            {
                return;
            }
            for (int j = 0; j < gsInvalidList.Count; j++)
            {
                string   gsName = gsInvalidList[j].InnerText;
                string[] rclStr = gsName.Split('-');
                int      row    = int.Parse(rclStr[0]);
                int      col    = int.Parse(rclStr[1]);
                int      layer  = int.Parse(rclStr[2]);
                bllGoodsSite.DeleteModelByRCL(houseName, row, col, layer);
            }

            bllGoodsSite.DeleteUnnecessaryGs(houseName, totalRow, totalCol, totalLayer);//删除排、列、层以外的
        }