From 85f6fe8f419a7dc04ae2e2e8d2314162bd0cfb6e Mon Sep 17 00:00:00 2001
From: bklLiudl <673013083@qq.com>
Date: 星期六, 09 三月 2024 16:38:02 +0800
Subject: [PATCH] 修复bug

---
 Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs b/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
index adb86a9..a9b7c7a 100644
--- a/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
+++ b/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
@@ -114,8 +114,19 @@
         {
             try
             {
+                Expression<Func<BllBoxInfo, bool>> item1 = Expressionable.Create<BllBoxInfo>()
+                  .AndIF(!string.IsNullOrWhiteSpace(model.ASNNo), it => it.ASNNo.Contains(model.ASNNo.Trim()))
+                  .AndIF(!string.IsNullOrWhiteSpace(model.PalletNo), it => it.PalletNo.Contains(model.PalletNo.Trim()))
+                  .AndIF(!string.IsNullOrWhiteSpace(model.LotNo), it => it.LotNo.Contains(model.LotNo.Trim()))
+                  .AndIF(!string.IsNullOrWhiteSpace(model.SkuNo), it => it.SkuNo.Contains(model.SkuNo.Trim()))
+                  .AndIF(!string.IsNullOrWhiteSpace(model.SkuName), it => it.SkuName.Contains(model.SkuName.Trim()))
+                  .AndIF((model.BindNo != 0 && !string.IsNullOrWhiteSpace(model.BindNo.ToString())),it=>it.BindNo == model.BindNo)
+                  .And(m => m.IsDel == "0")
+                  .ToExpression();
+
                 var total = 0;
-                var data = Db.Queryable<BllBoxInfo>().Where(m => m.IsDel == "0" && m.BindNo == model.BindNo)
+                DbHelper<BllBoxInfo> helper = new DbHelper<BllBoxInfo>(Db);
+                var data = helper.GetAllWhereAsync(item1).Where(m => m.IsDel == "0")
                     .LeftJoin<BllPalletBind>((a, b) => a.BindNo == b.Id)
                     .GroupBy((a, b) => new
                     {
@@ -380,7 +391,8 @@
                 Db.Updateable(boxInfos).ExecuteCommand();
 
                 //淇敼鎵樼洏缁戝畾淇℃伅
-                bind.Qty -= qty;
+                bind.Qty -= qty;                    // 鏁伴噺鍙樻洿
+                bind.BitPalletMark = "1";           // 闆舵墭鏍囪鍙樻洿
 
                 if (bind.Qty == 0)
                 {

--
Gitblit v1.8.0