dengjunjie
2025-07-09 7ca9651f81d7b84f054194d3d46fdbd1d9c8b922
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs
@@ -180,14 +180,17 @@
            }
            if (stockInfos1.Count > 0)
            {
                Dt_LocationInfo? locationInfo2 = _basicService.LocationInfoService.AssignLocation();
                if (locationInfo2 == null) throw new Exception("无可移库货位");
                locationInfo2.LocationStatus = LocationStatusEnum.Relocationing.ObjToInt();
                locationInfos.Add(locationInfo2);
                List<string> strings = new List<string>();
                foreach (var item in stockInfos1.GroupBy(x => x.LocationCode))
                {
                    Dt_LocationInfo? locationInfo2 = _basicService.LocationInfoService.AssignLocation(strings);
                    if (locationInfo2 == null) throw new Exception("无可移库货位");
                    locationInfo2.LocationStatus = LocationStatusEnum.Relocationing.ObjToInt();
                    strings.Add(locationInfo2.LocationCode);
                    locationInfos.Add(locationInfo2);
                    foreach (var item1 in item.OrderByDescending(x => x.SerialNumber))
                    {
                        locationInfo2.CurrentQty++;
                        Dt_Task task = new()
                        {
                            CurrentAddress = item1.LocationCode,
@@ -204,8 +207,8 @@
                            TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum))
                        };
                        dt_Tasks.Add(task);
                        item1.SerialNumber = locationInfo2.CurrentQty;
                        item1.StockStatus = StockStatusEmun.移库中.ObjToInt();
                        locationInfo2.CurrentQty++;
                    }
                }
            }
@@ -247,6 +250,7 @@
                stockInfos.AddRange(result.Item1);
                outboundOrderDetail.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt();
                outboundOrderDetail.LockQuantity = result.Item1.Count;
                outStockLockInfos = result.Item2;
                locationInfos = result.Item3;
                outboundOrder.OrderStatus = OutboundStatusEnum.出库中.ObjToInt();
@@ -258,7 +262,26 @@
            return (tasks, stockInfos, new List<Dt_OutboundOrderDetail> { outboundOrderDetail }, outStockLockInfos, locationInfos, locationInfos1, outboundOrder);
        }
        public WebResponseContent NewGenerateOutboundTask(int orderDetailId, List<Dt_Inventory_Batch> inventory_Batches)
        {
            try
            {
                List<Dt_Task> tasks = new List<Dt_Task>();
                List<Dt_InventoryInfo> stockInfos = new List<Dt_InventoryInfo>();
                List<Dt_OutboundOrderDetail> outboundOrderDetails = new List<Dt_OutboundOrderDetail>();
                List<Dt_OutStockLockInfo> outStockLockInfos = new List<Dt_OutStockLockInfo>();
                List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>();
                Dt_OutboundOrder order = new Dt_OutboundOrder();
                return WebResponseContent.Instance.OK();
            }
            catch (Exception ex)
            {
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
        /// <summary>
        /// ç”Ÿæˆå‡ºåº“任务
        /// </summary>