From 7e514494e595531a0517d6266823bc7f6d673831 Mon Sep 17 00:00:00 2001 From: bklLiudl <673013083@qq.com> Date: 星期四, 14 三月 2024 13:41:29 +0800 Subject: [PATCH] 呼叫小车 --- Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs | 19 +++++++++++++++---- 1 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs index 8c8c157..13d05b0 100644 --- a/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs +++ b/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs @@ -890,6 +890,11 @@ { string EndLocat = string.Empty;//鐩爣浣嶇疆 + var log = Db.Queryable<LogTask>().First(w => w.IsDel == "0" && w.PalletNo == palletNo && (w.Status == "0" || w.Status == "1")); + if (log != null) + { + throw new Exception("璇ユ墭鐩樺凡鏈夊皬杞︾瓑寰呮墽琛屾垨姝e湪鎵ц鐨勪换鍔�!"); + } var stockDetail = Db.Queryable<DataStockDetail>().First(w => w.IsDel == "0" && w.PalletNo == palletNo); if (stockDetail == null) { @@ -902,7 +907,7 @@ { throw new Exception("鎵�閫夊尯鍩熶俊鎭笉瀛樺湪,璇锋鏌�!"); } - EndLocat = GetLocat(areaNo, stockDetail.SkuNo, stockDetail.LotNo); + EndLocat = GetLocat(areaNo, stockDetail.SkuNo, stockDetail.LotNo,palletNo); } else { @@ -1002,6 +1007,12 @@ } try { + var log = Db.Queryable<LogTask>().First(w => w.IsDel == "0" && w.PalletNo == palletNo && (w.Status == "0" || w.Status == "1")); + if (log != null) + { + throw new Exception("璇ユ墭鐩樺凡鏈夊皬杞︾瓑寰呮墽琛屾垨姝e湪鎵ц鐨勪换鍔�!"); + } + var notice = Db.Queryable<BllExportNotice>().First(w => w.IsDel == "0" && w.SONo == soNo); if (notice == null) { @@ -1041,7 +1052,7 @@ throw new Exception("鎵�閫夊尯鍩熶俊鎭笉瀛樺湪,璇锋鏌�!"); } string EndLocat = string.Empty;//鐩爣浣嶇疆 - EndLocat= GetLocat(areaNo, stockDetail.SkuNo, stockDetail.LotNo); + EndLocat= GetLocat(areaNo, stockDetail.SkuNo, stockDetail.LotNo,palletNo); //寮�鍚簨鍔� Db.BeginTran(); @@ -1102,7 +1113,7 @@ /// <param name="skuNo"></param> /// <param name="lotNo"></param> /// <returns></returns> - private string GetLocat(string areaNo,string skuNo,string lotNo) + private string GetLocat(string areaNo,string skuNo,string lotNo,string palletNo) { try { @@ -1110,7 +1121,7 @@ //褰撶劧鍖哄煙鎵�鏈夊偍浣嶄俊鎭� var storageLocatList = Db.Queryable<SysStorageLocat>().Where(w => w.WareHouseNo == "W02" && w.AreaNo == areaNo).ToList(); //鍚屽尯鍩熷悓鎵规鐗╂枡鐨勫偍浣嶄俊鎭� - List<string> locatList = Db.Queryable<DataStockDetail>().Where(w => w.IsDel == "0" && w.SkuNo == skuNo && w.LotNo == lotNo && w.WareHouseNo == "W02" && w.AreaNo == areaNo) + List<string> locatList = Db.Queryable<DataStockDetail>().Where(w => w.IsDel == "0" && w.SkuNo == skuNo && w.LotNo == lotNo && w.WareHouseNo == "W02" && w.AreaNo == areaNo && w.PalletNo != palletNo) .OrderByDescending(o=>o.LocatNo).Select(s=>s.LocatNo).Distinct().ToList(); foreach (var item in locatList) { -- Gitblit v1.8.0