From f0bc6eeb8c93f7ce71155123db45beae46ea735c Mon Sep 17 00:00:00 2001
From: yuyou_x <2336760928@qq.com>
Date: 星期二, 20 二月 2024 10:26:38 +0800
Subject: [PATCH] Merge branch 'yyk'

---
 Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs |   28 +++++++++++++++++++++++++++-
 1 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
index 116e879..51103b6 100644
--- a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
+++ b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
@@ -1281,6 +1281,30 @@
             }
         }
 
+        /// <summary>
+        /// 楠岃瘉鍌ㄤ綅鍦板潃(鍦扮爜)鏄惁鍙敤
+        /// </summary>
+        /// <param name="locatNo">鍌ㄤ綅缂栫爜</param>
+        /// <returns></returns>
+        public string CheckLocatNo(string locatNo) 
+        {
+            try
+            {
+                string strMsg = "";
+                var storageLocat = Db.Queryable<SysStorageLocat>().First(w => w.IsDel == "0" && w.LocatNo == locatNo && w.Status == "0" && w.WareHouseNo == "W02");
+                if (storageLocat == null)
+                {
+                    throw new Exception("-1:鍦扮爜(鍌ㄤ綅淇℃伅)涓嶅瓨鍦ㄦ垨闈炵┖闂茬姸鎬侊紝璇锋牳鏌�!");
+                }
+
+                return strMsg;
+            }
+            catch (Exception ex)
+            {
+                throw new Exception(ex.Message);
+            }
+        }
+
         //鏍规嵁绠辩爜鑾峰彇鐗╂枡銆佹壒娆°�佹暟閲忕瓑淇℃伅
         public PdaPalletNoCheckDto GetBoxInfoByBoxNo(string boxNo)
         {
@@ -1892,6 +1916,7 @@
                         throw new Exception("-1:褰撳墠鎵樼洏姝e湪鎵ц涓紝缁戝畾澶辫触锛岃鏍稿疄!");
                     }
                     bindId = bind.Id;
+                    bind.Qty += model.SkuQty;
                 }
 
                 #region 绠辩爜淇℃伅
@@ -1926,6 +1951,7 @@
 
                 // 鏇存敼绠辨敮鍏崇郴琛�
                 decimal factQty = 0.00m;//鎵樼洏鎬绘暟閲�
+                //鎴愬搧缁勬墭
                 if (model.SkuQty == 0)
                 {
                     var boxGroup = boxInfoList.GroupBy(m => m.BoxNo).ToList();
@@ -1985,7 +2011,7 @@
                 var sqlString = string.Empty;
                 if (factQty == 0)
                 {
-                    sqlString += $"update BllArrivalNoticeDetail set FactQty = FactQty + '{bind.Qty}' where id = '{model.AsnDetailId}';";
+                    sqlString += $"update BllArrivalNoticeDetail set FactQty = FactQty + '{model.SkuQty}' where id = '{model.AsnDetailId}';";
                 }
                 else
                 {

--
Gitblit v1.8.0