From 1cadd5b24fd0f0e57be5c1b27a455b2007eed560 Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期二, 02 十二月 2025 13:43:09 +0800
Subject: [PATCH] 提交

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs |   45 +++++++++++++++++++++++----------------------
 1 files changed, 23 insertions(+), 22 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs"
index 562f9ad..95d3e89 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs"
@@ -1676,7 +1676,7 @@
 
             // 鍒犻櫎鍘熷鍑哄簱浠诲姟
             _taskRepository.DeleteAndMoveIntoHty(originalTask, OperateTypeEnum.鑷姩瀹屾垚);
-            // await _taskRepository.Db.Deleteable(originalTask).ExecuteCommandAsync();
+            await _taskRepository.Db.Deleteable(originalTask).ExecuteCommandAsync();
 
 
 
@@ -1939,7 +1939,7 @@
                 {
                     ReqCode = Guid.NewGuid().ToString(),
                     ReqTime = DateTime.Now.ToString(),
-                    BusinessType = "3",
+                    BusinessType = "2",
 
                     FactoryArea = outboundOrder.FactoryArea,
                     OperationType = 1,
@@ -2021,7 +2021,7 @@
                         .Where(x => x.OrderNo == orderNo && x.Status == (int)OutLockStockStatusEnum.鎷i�夊畬鎴�)
                         .ToListAsync();
 
-                    var groupedData = lists.GroupBy(item => new { item.MaterielCode, item.lineNo, item.Unit, item.WarehouseCode })
+                    var groupedData = lists.GroupBy(item => new { item.MaterielCode, item.lineNo, item.BarcodeUnit, item.WarehouseCode })
                        .Select(group => new FeedbackOutboundDetailsModel
                        {
                            materialCode = group.Key.MaterielCode,
@@ -2029,7 +2029,7 @@
                            warehouseCode = group.Key.WarehouseCode,
                            qty = group.Sum(x => x.BarcodeQty),
                            currentDeliveryQty = group.Sum(x => x.BarcodeQty),
-                           unit = group.Key.Unit,
+                           unit = group.Key.BarcodeUnit,
                            barcodes = group.Select(row => new WIDESEA_DTO.Outbound.BarcodesModel
                            {
                                barcode = row.CurrentBarcode,
@@ -2828,25 +2828,26 @@
                                        x.Status == (int)OutLockStockStatusEnum.鎷i�夊畬鎴�)
                             .ToListAsync();
 
-                        var detailModel = new FeedbackOutboundDetailsModel
-                        {
-                            materialCode = detail.MaterielCode,
-                            lineNo = detail.lineNo,
-                            warehouseCode = detail.WarehouseCode,
-                            qty = detail.OverOutQuantity, // 浣跨敤璁㈠崟鏄庣粏鐨勫凡鍑哄簱鏁伴噺
-                            currentDeliveryQty = detail.OverOutQuantity,
-                            unit = detail.Unit,
-                            barcodes = detailLocks.Select(lockInfo => new WIDESEA_DTO.Outbound.BarcodesModel
-                            {
-                                barcode = lockInfo.CurrentBarcode,
-                                supplyCode = lockInfo.SupplyCode,
-                                batchNo = lockInfo.BatchNo,
-                                unit = lockInfo.BarcodeUnit,
-                                qty = lockInfo.BarcodeQty //  
-                            }).ToList()
-                        };
+                        var groupdata = detailLocks.GroupBy(item => new { item.MaterielCode, item.lineNo, item.BarcodeUnit, item.WarehouseCode })
+                              .Select(group => new FeedbackOutboundDetailsModel
+                              {
 
-                        feedmodel.details.Add(detailModel);
+                                  materialCode = group.Key.MaterielCode,
+                                  lineNo = group.Key.lineNo,  
+                                  warehouseCode = group.Key.WarehouseCode,
+                                  qty = group.Sum(x => x.BarcodeQty),
+                                  currentDeliveryQty = group.Sum(x => x.BarcodeQty),
+                                  unit = group.Key.BarcodeUnit,
+                                  barcodes = group.Select(lockInfo => new WIDESEA_DTO.Outbound.BarcodesModel
+                                  {
+                                      barcode = lockInfo.CurrentBarcode,
+                                      supplyCode = lockInfo.SupplyCode,
+                                      batchNo = lockInfo.BatchNo,
+                                      unit = lockInfo.BarcodeUnit,
+                                      qty = lockInfo.BarcodeQty  
+                                  }).ToList()
+                              }).ToList();
+                        feedmodel.details.AddRange(groupdata);
                     }
                     var result = await _invokeMESService.FeedbackOutbound(feedmodel);
                     if (result != null && result.code == 200)

--
Gitblit v1.9.3