wxw
5 小时以前 88dd0bb81e2d4e6d560e7b62bbe0a9c141c84a41
Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs
@@ -791,7 +791,7 @@
                if (models.WareHouseNo == "W02")
                {
                    storageArea = await Db.Queryable<SysStorageArea>().Where(w => w.IsDel == "0" && w.Status == "0" && w.AreaNo != storageLocat.AreaNo && w.WareHouseNo == "W04" && (w.AreaNo == "B01" || w.AreaNo == "B02")).OrderBy(o => o.AreaNo).ToListAsync();
                    storageArea = await Db.Queryable<SysStorageArea>().Where(w => w.IsDel == "0" && w.Status == "0" && w.AreaNo != storageLocat.AreaNo && w.WareHouseNo == "W04" && (w.AreaNo == "B01" || w.AreaNo == "B02" || w.AreaNo == "B05")).OrderBy(o => o.AreaNo).ToListAsync();
                }
                else
                {
@@ -800,6 +800,29 @@
                
            }
            return storageArea;
        }
        /// <summary>
        /// 根据区域号获取储位地址集合
        /// </summary>
        /// <param name="areaNo"></param>
        /// <returns></returns>
        /// <exception cref="Exception"></exception>
        public List<string> GetLocatByArea(string areaNo)
        {
            try
            {
                if (string.IsNullOrEmpty(areaNo))
                {
                    throw new Exception("请选择区域");
                }
                var _list = Db.Queryable<SysStorageLocat>().Where(w => w.IsDel == "0" && w.AreaNo == areaNo && w.WareHouseNo == "W04").Select(s => s.LocatNo).ToList();
                return _list;
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
        /// <summary>
        /// 获取已分配的出库单据
@@ -1011,7 +1034,7 @@
            }
        }*/
        public async Task AgvTransport(string palletNo, string areaNo, string ruku, string url, int userId)
        public async Task AgvTransport(string palletNo, string areaNo,string locatNoEnd, string ruku, string url, int userId)
        {
            try
            {
@@ -1046,7 +1069,14 @@
                    {
                        throw Oops.Bah("所选区域信息不存在,请检查!");
                    }
                    EndLocat = await GetLocat(areaNo);
                    if (!string.IsNullOrEmpty(locatNoEnd))
                    {
                        EndLocat = locatNoEnd;//指定储位地址
                    }
                    else
                    {
                        EndLocat = await GetLocat(areaNo);//系统分配储位地址
                    }
                }
                else
                {
@@ -1061,9 +1091,9 @@
                {
                    throw Oops.Bah("托盘储位信息不存在,请检查!");
                }
                if (stockDetail.WareHouseNo != "W04")
                if (stockDetail.WareHouseNo != "W04" && stockDetail.WareHouseNo != "W02")
                {
                    throw Oops.Bah("该托盘未在平库内,请检查!");
                    throw Oops.Bah("该托盘未在平库或货架库内,请检查!");
                }
                //起始储位信息
@@ -1075,7 +1105,7 @@
                //目标储位信息
                //var storageLocatEnd = new SysStorageLocat();
                var storageLocatEnd = await Db.Queryable<SysStorageLocat>().FirstAsync(w => w.IsDel == "0" && w.LocatNo == EndLocat && w.Flag == "0");
                var storageLocatEnd = await Db.Queryable<SysStorageLocat>().FirstAsync(w => w.IsDel == "0" && w.LocatNo == EndLocat && w.Flag == "0" && w.WareHouseNo == "W04" && w.AreaNo == areaNo);
                if (storageLocatEnd == null)
                {
                    throw Oops.Bah("目标储位信息不存在,请检查!");