From 2c889b38311883ceb703c4e0034c798fdaa2e21c Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期二, 12 八月 2025 23:11:57 +0800
Subject: [PATCH] 更新代码,货位分配优化等

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ProInStatisticsService.cs |   22 +++++++++-------------
 1 files changed, 9 insertions(+), 13 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ProInStatisticsService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ProInStatisticsService.cs"
index cd459fa..a7dfded 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ProInStatisticsService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ProInStatisticsService.cs"
@@ -30,33 +30,29 @@
             _invokeERPService = invokeERPService;
             _basicRepository = basicRepository;
         }
-        
+        /// <summary>
+        /// 淇濆瓨鏁版嵁
+        /// </summary>
         public void SaveStatic(MesBagInfoModel mesBagInfoModel)
         {
-            List<ProInStaticDTO> mESBagDetails = mesBagInfoModel.BagDetails.GroupBy(x=>new { x.ProductCode, x.ProductVersion }).Select(x=>new ProInStaticDTO
+            List<ProInStaticDTO> mESBagDetails = mesBagInfoModel.BagDetails.GroupBy(x => new { x.ProductCode, x.ProductVersion }).Select(x => new ProInStaticDTO
             {
-                ProductCode= x.Key.ProductCode,
-                ProductVersion= x.Key.ProductVersion,
-                SumPcs=x.Sum(x => x.OKPCSQTY)
+                ProductCode = x.Key.ProductCode,
+                ProductVersion = x.Key.ProductVersion,
+                SumPcs = x.Sum(x => x.OKPCSQTY),
+                SumPcsArea = x.Sum(x=>x.OKPCSArea)
             }).ToList();
             List<Dt_ProInStatistics> proInStatistics= new List<Dt_ProInStatistics>();
             Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x=>x.WarehouseCode==mesBagInfoModel.WarehouseCode);
             foreach (var m in mESBagDetails)
             {
-                string response = _invokeERPService.InvokeProInErpStatic(m.ProductCode, m.ProductCode + m.ProductVersion);
-                ErpProInErpStaticResponseContent erpProInErpStatic = response.DeserializeObject<ErpProInErpStaticResponseContent>();
-                if (erpProInErpStatic.Code != 200)
-                {
-                    return;
-                }
-                float adjusted = (float)Math.Round(erpProInErpStatic.Data[0].UnitArea, 3);
                 Dt_ProInStatistics inStatistics = new Dt_ProInStatistics()
                 {
                     WarehouseId = warehouse.WarehouseId,
                     ProductCode = m.ProductCode,
                     ProductRev = m.ProductVersion,
                     PcsQty = m.SumPcs,
-                    SquareMeter = (float)Math.Round((adjusted * m.SumPcs), 3),
+                    SquareMeter = (float)Math.Round(m.SumPcsArea, 3),
                     Remark = mesBagInfoModel.BatchNo
                 };
                 proInStatistics.Add(inStatistics);

--
Gitblit v1.9.3