From 5eeed44ad21748ed7560a8c688d4e2d2f03555c8 Mon Sep 17 00:00:00 2001
From: 刘磊 <1161824510@qq.com>
Date: 星期二, 05 八月 2025 12:47:13 +0800
Subject: [PATCH] 同步

---
 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Boxing/BoxingInfoService.cs |   28 ++++++++++++++++++----------
 1 files changed, 18 insertions(+), 10 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Boxing/BoxingInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Boxing/BoxingInfoService.cs"
index 87ca967..853da98 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Boxing/BoxingInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Boxing/BoxingInfoService.cs"
@@ -8,12 +8,12 @@
 
 public class BoxingInfoService : ServiceBase<DtBoxingInfo, IBoxingInfoRepository>, IBoxingInfoService
 {
-    private readonly IStockInfoRepository stockInfoRepository;
+    private readonly IDt_PalletStockInfoRepository _stockInfoRepository;
     private readonly IBoxingInfoDetailRepository boxingInfoDetailRepository;
-    public BoxingInfoService(IBoxingInfoRepository BaseDal, IStockInfoRepository stockInfoRepository, IBoxingInfoDetailRepository boxingInfoDetailRepository) : base(BaseDal)
+    public BoxingInfoService(IBoxingInfoRepository BaseDal, IDt_PalletStockInfoRepository stockInfoRepository, IBoxingInfoDetailRepository boxingInfoDetailRepository) : base(BaseDal)
     {
-        this.stockInfoRepository = stockInfoRepository;
         this.boxingInfoDetailRepository = boxingInfoDetailRepository;
+        _stockInfoRepository = stockInfoRepository;
     }
 
     // 楠岃瘉妯″瀷
@@ -31,6 +31,13 @@
         return validationResults;
     }
 
+    public override PageGridData<DtBoxingInfo> GetPageData(PageDataOptions options)
+    {
+
+
+        return base.GetPageData(options);
+    }
+
     public WebResponseContent AddBoxingInfo(SaveModel saveModel)
     {
         WebResponseContent content = new WebResponseContent();
@@ -41,15 +48,15 @@
             if (obj == null || obj.Count == 0) throw new Exception("鐗╂枡淇℃伅涓虹┖,璇疯緭鍏�");
 
             var info = BaseDal.QueryFirst(x => x.PalletCode == palletcode);
-            if (info != null) throw new Exception("璇ユ墭鐩樺凡瀛樺湪缁勭洏");
+            if (info != null) throw new Exception($"姝ゆ墭鐩榹palletcode}宸插瓨鍦ㄧ粍鐩�");
 
-            var stockinfo = stockInfoRepository.QueryFirst(x => x.PalletCode == palletcode);
-            if (stockinfo != null) throw new Exception("璇ユ墭鐩樺凡瀛樺湪搴撳瓨鏁版嵁");
+            var stockinfo = _stockInfoRepository.QueryFirst(x => x.PalletCode == palletcode);
+            if (stockinfo != null) throw new Exception($"姝ゆ墭鐩榹palletcode}宸插瓨鍦ㄥ簱瀛樻暟鎹�");
 
-            foreach (var item in obj)
-            {
-                if (boxingInfoDetailRepository.QueryFirst(x => x.MaterielName == item.MaterilName) != null) throw new Exception($"{item.MaterilName}宸插瓨鍦ㄧ粍鐩樻暟鎹�");
-            }
+            //foreach (var item in obj)
+            //{
+            //    if (boxingInfoDetailRepository.QueryFirst(x => x.MaterielName == item.MaterilName) != null) throw new Exception($"{item.MaterilName}宸插瓨鍦ㄧ粍鐩樻暟鎹�");
+            //}
 
             DtBoxingInfo dtBoxingInfo = new DtBoxingInfo()
             {
@@ -81,4 +88,5 @@
         }
 
     }
+
 }
\ No newline at end of file

--
Gitblit v1.9.3