From 2045b7d31aa63e97d820c72c21cf145adb58960c Mon Sep 17 00:00:00 2001
From: zhaowc <526854230@qq.com>
Date: 星期四, 16 一月 2025 13:11:29 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/liudongl/jc24-wms
---
Wms/WMS.BLL/BllCheckServer/StockCheckServer.cs | 31 +++++++++++++++++++------------
1 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/Wms/WMS.BLL/BllCheckServer/StockCheckServer.cs b/Wms/WMS.BLL/BllCheckServer/StockCheckServer.cs
index 53cd28b..acf4038 100644
--- a/Wms/WMS.BLL/BllCheckServer/StockCheckServer.cs
+++ b/Wms/WMS.BLL/BllCheckServer/StockCheckServer.cs
@@ -1383,19 +1383,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("鎵樼洏涓婄墿鏂欑鐮佷俊鎭笉瀛樺湪,璇锋鏌�!");
+ }
+ 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.ToString().Substring(1, 8),
+ expiry = item.ExpirationTime.ToString().Substring(1, 8)
+
+ });
+ }
+ //搴撳瓨绠辩爜鏄庣粏鍒犻櫎
Db.Deleteable(boxInfo).ExecuteCommand();
//鍒犻櫎搴撳瓨鎵樼洏淇℃伅
Db.Deleteable(item).ExecuteCommand();
--
Gitblit v1.8.0