From 2f0120d0c10ac24603936911ee5812d4e71d2740 Mon Sep 17 00:00:00 2001 From: IPC-610 <IPC-610@DESKTOP-6LEOOS3> Date: 星期二, 03 十二月 2024 15:07:39 +0800 Subject: [PATCH] 叠托机组空托盘跺 --- Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs | 33 ++++++++++++++++++++------------- 1 files changed, 20 insertions(+), 13 deletions(-) diff --git a/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs index 1583573..62822c6 100644 --- a/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs +++ b/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs @@ -1373,6 +1373,7 @@ { throw new Exception("璇ユ墭鐩樻湭鍦ㄥ钩搴撳唴,璇锋鏌�!"); } + //璧峰鍌ㄤ綅淇℃伅 var storageLocat = Db.Queryable<SysStorageLocat>().First(w => w.IsDel == "0" && w.LocatNo == locatNo); if (storageLocat == null) @@ -1416,20 +1417,26 @@ { throw new Exception("褰撳墠鎵樼洏涓嶆槸鎷兼墭鍑哄簱鎵樼洏"); } - //璁板綍鎵樼洏涓婁俊鎭粰MES - - data.Add(new RequertBeiliaoInfoModel() - { - materiel_no = item.SkuNo, - materiel_name = item.SkuName, - qty = item.Qty, - batch = item.LotNo, - producttime = item.ProductionTime, - expiry = item.ExpirationTime - - }); - //搴撳瓨绠辩爜鏄庣粏鍒犻櫎 var boxInfo = Db.Queryable<DataBoxInfo>().Where(m => m.IsDel == "0" && m.StockDetailId == item.Id).ToList(); + if (boxInfo.Count == 0) + { + throw new Exception("鎵樼洏涓婄墿鏂欑鐮佷俊鎭笉瀛樺湪,璇锋鏌�!"); + } + //璁板綍鎵樼洏涓婁俊鎭粰MES + foreach (var item2 in boxInfo) { + data.Add(new RequertBeiliaoInfoModel() + { + no = item2.BoxNo, + materiel_no = item.SkuNo, + materiel_name = item.SkuName, + qty = item.Qty, + batch = item.LotNo, + producttime = item.ProductionTime, + expiry = item.ExpirationTime + + }); + } + //搴撳瓨绠辩爜鏄庣粏鍒犻櫎 Db.Deleteable(boxInfo).ExecuteCommand(); //鍒犻櫎搴撳瓨鎵樼洏淇℃伅 Db.Deleteable(item).ExecuteCommand(); -- Gitblit v1.8.0