Esempio n. 1
0
        //public List<string> GetCellPositionType(string houseName, int rowth)
        //{
        //    return dal.GetCellPositionType(houseName, rowth);
        //}
        public View_CellModel ApplyCell(string houseID)
        {
            string wereStr = "WareHouse_ID='" + houseID + "' and Cell_Child_Status ='空闲' and Cell_Child_Run_Status ='完成' and Cell_Child_Flag ='1' and Cell_Type ='货位' order by Cell_Column asc,"
                             + "Cell_Row asc,Cell_Layer asc,Cell_Child_Order desc";

            List <View_CellModel> cellList  = GetModelList(wereStr);
            View_CellModel        applyCell = null;

            if (cellList != null && cellList.Count > 0)
            {
                foreach (View_CellModel cell in cellList)
                {
                    if (cell.Shelf_Type == "双深")
                    {
                        View_CellModel backCell = GetCell(cell.WareHouse_ID, cell.Cell_Name, "后");
                        if (backCell != null && backCell.Cell_Child_Status == "空闲" && backCell.Cell_Child_Run_Status == "完成")
                        {
                            applyCell = backCell;
                            break;
                        }
                        else if (backCell != null && backCell.Cell_Child_Run_Status == "锁定") //双深工位后面的工位处于锁定状态,不允许操作前面的工位
                        {
                            continue;
                        }
                        else
                        {
                            applyCell = cell;
                            break;
                        }
                    }
                    else
                    {
                        applyCell = cell;
                        break;
                    }
                }

                return(applyCell);
            }
            else
            {
                return(null);
            }
        }
Esempio n. 2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(WMS_Database.View_CellModel model)
 {
     return(dal.Update(model));
 }
Esempio n. 3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool Add(WMS_Database.View_CellModel model)
 {
     return(dal.Add(model));
 }