wxw
8 小时以前 fef4a39d606932ebb2f7ae7d58c8ddcdd3e3b9db
Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs
@@ -802,6 +802,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>
        /// 获取已分配的出库单据
        /// </summary>
        /// <returns></returns>
@@ -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
                {
@@ -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("目标储位信息不存在,请检查!");