From fef4a39d606932ebb2f7ae7d58c8ddcdd3e3b9db Mon Sep 17 00:00:00 2001 From: wxw <Administrator@DESKTOP-5BIMHQ3> Date: 星期六, 20 九月 2025 14:43:07 +0800 Subject: [PATCH] PDA-AGV转运功能增加指定目标储位功能 --- Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs | 40 +++++++++++++++++++++++++++++++++++----- 1 files changed, 35 insertions(+), 5 deletions(-) diff --git a/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs index c9007ce..95d16c8 100644 --- a/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs +++ b/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("鐩爣鍌ㄤ綅淇℃伅涓嶅瓨鍦�,璇锋鏌�!"); @@ -1633,9 +1663,9 @@ } //寮�鍚簨鍔� Db.BeginTran(); - + //搴撳瓨绠辨敮鏄庣粏淇℃伅 - var boxList = Db.Queryable<DataBoxInfo>().Where(w => w.IsDel == "0" && w.BoxNo == boxNo).ToList(); + var boxList = Db.Queryable<DataBoxInfo>().Where(w => w.IsDel == "0" && w.BoxNo == boxNo && w.Status == "2").ToList(); if (boxList.Count != 1) { throw new Exception("璇ョ鐮佷俊鎭敊璇紝瀛樺湪澶氫釜姝ょ鐮佷俊鎭�"); -- Gitblit v1.8.0