From 7ca9651f81d7b84f054194d3d46fdbd1d9c8b922 Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期三, 09 七月 2025 22:55:27 +0800 Subject: [PATCH] 增加质检出入库逻辑 --- 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs | 33 ++++++++++++++++++++++++++++----- 1 files changed, 28 insertions(+), 5 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs" index b63394a..3cc1998 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/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> -- Gitblit v1.9.3