From 1c7d84d153f22148c7c8dbf80aa646edb0c53648 Mon Sep 17 00:00:00 2001
From: 刘磊 <1161824510@qq.com>
Date: 星期四, 18 十二月 2025 09:24:57 +0800
Subject: [PATCH] 同步

---
 项目代码/WMS/WMSServer/WIDESEA_StorageBasicServices/BasicInfo/Dt_BDCConfigurationService.cs |   40 ++++++++++++++++++++++++++++++++--------
 1 files changed, 32 insertions(+), 8 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StorageBasicServices/BasicInfo/Dt_BDCConfigurationService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StorageBasicServices/BasicInfo/Dt_BDCConfigurationService.cs"
index 210c6e1..dd3f952 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StorageBasicServices/BasicInfo/Dt_BDCConfigurationService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StorageBasicServices/BasicInfo/Dt_BDCConfigurationService.cs"
@@ -30,12 +30,17 @@
             return currentConfig;
         }
 
+        public override WebResponseContent UpdateData(SaveModel saveModel)
+        {
+
+            return base.UpdateData(saveModel);
+        }
+
         public async Task<Dt_BDCConfiguration> UpdateConfiguration(int maxWhiteBody, int maxPaintedBody,
-           int maxBatteryCase, int maxEmptySled, string updatedBy)
+       int maxBatteryCase, int maxEmptySled)
         {
             // 绂佺敤褰撳墠閰嶇疆
             var currentConfigs = await BaseDal.QueryDataAsync(c => c.IsActive == 1);
-
             currentConfigs.ForEach(c => c.IsActive = 2);
 
             // 鍒涘缓鏂伴厤缃�
@@ -46,7 +51,7 @@
                 MaxBatteryCaseCache = maxBatteryCase,
                 MaxEmptySledCache = maxEmptySled,
                 LastUpdatedTime = DateTime.Now,
-                UpdatedBy = updatedBy,
+                UpdatedBy = App.User.UserName,
                 IsActive = 1
             };
 
@@ -55,10 +60,14 @@
             return newConfig;
         }
 
+        /// <summary>
+        /// 鐧借溅韬槸鍚﹀彲鍏ュ簱
+        /// </summary>
+        /// <returns></returns>
         public async Task<bool> CanAddWhiteBody()
         {
             var config = await GetCurrentConfiguration();
-            var currentCount =  GetWhiteBodyCount();
+            var currentCount = GetWhiteBodyCount();
 
             // 棰勭暀5%鐨勭紦鍐茬┖闂�
             var threshold = (int)(config.MaxWhiteBodyCache * 0.95);
@@ -68,39 +77,54 @@
         public async Task<bool> CanAddPaintedBody()
         {
             var config = await GetCurrentConfiguration();
-            var currentCount =  GetPaintedBodyCount();
+            var currentCount = GetPaintedBodyCount();
 
             // 棰勭暀5%鐨勭紦鍐茬┖闂�
             var threshold = (int)(config.MaxPaintedBodyCache * 0.95);
             return currentCount < threshold;
         }
 
-
         public async Task<bool> CanAddEmptySled()
         {
             var config = await GetCurrentConfiguration();
-            var currentCount =  GetEmptySledCount();
+            var currentCount = GetEmptySledCount();
 
             // 棰勭暀5%鐨勭紦鍐茬┖闂�
             var threshold = (int)(config.MaxEmptySledCache * 0.95);
             return currentCount < threshold;
         }
 
+        /// <summary>
+        /// 鐧借溅韬簱瀛樻暟閲�
+        /// </summary>
+        /// <returns></returns>
         public int GetWhiteBodyCount()
         {
             return _palletStockInfoRepository.QueryData(b => b.CarType == (int)BodyType.WhiteBody && b.StockStatus == (int)BodyStatus.InBDC).Count;
         }
 
+        /// <summary>
+        /// 褰╄溅韬簱瀛樻暟閲�
+        /// </summary>
+        /// <returns></returns>
         public int GetPaintedBodyCount()
         {
-            return  _palletStockInfoRepository.QueryData(b => b.CarType == (int)BodyType.PaintedBody && b.StockStatus == (int)BodyStatus.InBDC).Count;
+            return _palletStockInfoRepository.QueryData(b => b.CarType == (int)BodyType.PaintedBody && b.StockStatus == (int)BodyStatus.InBDC).Count;
         }
 
+        /// <summary>
+        /// 鐢垫睜澹冲簱瀛樻暟閲�
+        /// </summary>
+        /// <returns></returns>
         public int GetBatteryCaseCount()
         {
             return _palletStockInfoRepository.QueryData(b => b.StockStatus == (int)BodyStatus.InBDC).Count;
         }
 
+        /// <summary>
+        /// 绌烘粦姗囧簱瀛樻暟閲�
+        /// </summary>
+        /// <returns></returns>
         public int GetEmptySledCount()
         {
             return _palletStockInfoRepository.QueryData(s => s.StockStatus == (int)BodyStatus.InBDC).Count;

--
Gitblit v1.9.3