From e50ed2781c0bf730f48e2782b587eddad8c86214 Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期一, 01 十二月 2025 16:39:02 +0800
Subject: [PATCH] 提交

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs |   36 +++++++++++++++++++++++++-----------
 1 files changed, 25 insertions(+), 11 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 08aaba5..0b032a3 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"
@@ -27,11 +27,13 @@
 using WIDESEA_DTO.Outbound;
 using WIDESEA_IAllocateService;
 using WIDESEA_IBasicService;
+using WIDESEA_ICheckService;
 using WIDESEA_IInboundService;
 using WIDESEA_IOutboundService;
 using WIDESEA_IStockService;
 using WIDESEA_Model.Models;
 using WIDESEA_Model.Models.Basic;
+using WIDESEA_Model.Models.Check;
 
 namespace WIDESEA_OutboundService
 {
@@ -59,7 +61,7 @@
         private readonly IRepository<Dt_InboundOrder> _inboundOrderRepository;
         private readonly IInboundOrderDetailService _inboundOrderDetailService;
         private readonly IRepository<Dt_WarehouseArea> _warehouseAreaRepository;
-
+        private readonly IReCheckOrderService _reCheckOrderService;
         private readonly ILogger<OutboundPickingService> _logger;
 
         private Dictionary<string, string> stations = new Dictionary<string, string>
@@ -79,7 +81,7 @@
         public OutboundPickingService(IRepository<Dt_PickingRecord> BaseDal, IUnitOfWorkManage unitOfWorkManage, IStockInfoService stockInfoService, IStockService stockService,
             IOutStockLockInfoService outStockLockInfoService, IStockInfoDetailService stockInfoDetailService, ILocationInfoService locationInfoService,
             IOutboundOrderDetailService outboundOrderDetailService, ISplitPackageService splitPackageService, IOutboundOrderService outboundOrderService,
-            IRepository<Dt_Task> taskRepository, IESSApiService eSSApiService, ILogger<OutboundPickingService> logger, IInvokeMESService invokeMESService, IDailySequenceService dailySequenceService, IAllocateService allocateService, IRepository<Dt_InboundOrder> inboundOrderRepository, IInboundOrderDetailService inboundOrderDetailService, IRepository<Dt_WarehouseArea> warehouseAreaRepository) : base(BaseDal)
+            IRepository<Dt_Task> taskRepository, IESSApiService eSSApiService, ILogger<OutboundPickingService> logger, IInvokeMESService invokeMESService, IDailySequenceService dailySequenceService, IAllocateService allocateService, IRepository<Dt_InboundOrder> inboundOrderRepository, IInboundOrderDetailService inboundOrderDetailService, IRepository<Dt_WarehouseArea> warehouseAreaRepository, IReCheckOrderService reCheckOrderService) : base(BaseDal)
         {
             _unitOfWorkManage = unitOfWorkManage;
             _stockInfoService = stockInfoService;
@@ -99,6 +101,7 @@
             _inboundOrderRepository = inboundOrderRepository;
             _inboundOrderDetailService = inboundOrderDetailService;
             _warehouseAreaRepository = warehouseAreaRepository;
+            _reCheckOrderService = reCheckOrderService;
         }
 
 
@@ -1673,7 +1676,7 @@
 
             // 鍒犻櫎鍘熷鍑哄簱浠诲姟
             _taskRepository.DeleteAndMoveIntoHty(originalTask, OperateTypeEnum.鑷姩瀹屾垚);
-            // await _taskRepository.Db.Deleteable(originalTask).ExecuteCommandAsync();
+            await _taskRepository.Db.Deleteable(originalTask).ExecuteCommandAsync();
 
 
 
@@ -2018,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,
@@ -2026,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,11 +2831,11 @@
                         var detailModel = new FeedbackOutboundDetailsModel
                         {
                             materialCode = detail.MaterielCode,
-                            lineNo = detail.lineNo,  
+                            lineNo = detail.lineNo,
                             warehouseCode = detail.WarehouseCode,
-                            qty = detail.OverOutQuantity, // 浣跨敤璁㈠崟鏄庣粏鐨勫凡鍑哄簱鏁伴噺
-                            currentDeliveryQty = detail.OverOutQuantity,
-                            unit = detail.Unit,
+                            qty = detail.BarcodeQty, // 浣跨敤璁㈠崟鏄庣粏鐨勫凡鍑哄簱鏁伴噺
+                            currentDeliveryQty = detail.BarcodeQty,
+                            unit = detail.BarcodeUnit,
                             barcodes = detailLocks.Select(lockInfo => new WIDESEA_DTO.Outbound.BarcodesModel
                             {
                                 barcode = lockInfo.CurrentBarcode,
@@ -2934,7 +2937,18 @@
                     return content = WebResponseContent.Instance.Error($"浠撳簱涓病鏈夎{materielGroupDTO.WarehouseType}缂栧彿銆�");
                 }
 
-
+                if (materielGroupDTO.orderTypes == InOrderTypeEnum.ReCheck.ObjToInt())
+                {
+                    var dborder = _reCheckOrderService.Db.Queryable<Dt_ReCheckOrder>().First(x => x.OrderNo == materielGroupDTO.OrderNo);
+                    if (dborder != null && dborder.SignSeq == 0)
+                    {
+                        return content.Error("鍙湁鎷垮埌閲嶆缁撴灉鎵嶈兘鍏ュ簱锛�");
+                    }
+                    else
+                    {
+                        return content.Error("娌℃湁鎵惧埌閲嶆鍗曟嵁鏁版嵁銆�");
+                    }
+                }
                 //  Dt_InboundOrder inboundOrder = GetInboundOrder(materielGroupDTO.OrderNo);
 
                 var dbinboundOrderDetails = Db.Queryable<Dt_PickingRecord>().Where(x => x.OrderNo == materielGroupDTO.OrderNo && !x.IsCancelled && x.Barcode == materielGroupDTO.Barcodes).ToList();
@@ -2980,7 +2994,7 @@
                 }
                 else
                 {
-                    dt_InboundOrder = new Dt_InboundOrder { Details = new List<Dt_InboundOrderDetail>() };        
+                    dt_InboundOrder = new Dt_InboundOrder { Details = new List<Dt_InboundOrderDetail>() };
                     inboindId = dbinbound.Id;
                 }
 

--
Gitblit v1.9.3