From 011ca316e6ec2ed93e31c45a9ebd9d3c66664871 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期五, 17 四月 2026 11:47:03 +0800
Subject: [PATCH] 代码更新

---
 项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs |   73 +++++++++++++++++++++++++++++++++++-
 1 files changed, 71 insertions(+), 2 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
index f97e01a..353bdab 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
@@ -61,7 +61,7 @@
                 }
                 tasks.ForEach(x =>
                 {
-                    x.Grade = 99;
+                    x.Grade = 1;
                 });
                 stockInfos.ForEach(x =>
                 {
@@ -907,7 +907,6 @@
                         item.StockLength = 0;
                         item.MaterielWeight = 0;
                         item.MaterielThickness = 0;
-                        item.MaterielWide = 0;
                         item.StockOutLength = 0;
                         item.IsFull = WhetherEnum.True.ObjToInt();
                         item.IsPick = WhetherEnum.True.ObjToInt();
@@ -960,6 +959,76 @@
             }
             return content;
         }
+        /// <summary>
+        /// 鍒涘缓閿�鍞嚭搴�
+        /// </summary>
+        /// <param name="ids"></param>
+        /// <returns></returns>
+        public WebResponseContent CreateProDeliveryTasks(List<int> ids)
+        {
+            WebResponseContent content=new WebResponseContent();
+            try
+            {
+                ////鑾峰彇閿�鍞嚭搴撳崟鎹�
+                //List<Dt_ProDeliveryOrder> deliveryOrders = BaseDal.Db.Queryable<Dt_ProDeliveryOrder>().Where(x=> ids.Contains(x.Id)).Includes(x=>x.Details).ToList();
+                //Dt_ProDeliveryOrder? proDeliveryOrder = deliveryOrders.FirstOrDefault(x => x.ProDeliveryStatus != OutOrderStatusEnum.鏈紑濮�.ObjToInt());
+                //if (proDeliveryOrder != null)
+                //{
+                //    return content.Error($"鍗曞彿{proDeliveryOrder.DeliveryCode},璁㈠崟鐘舵�亄(OutOrderStatusEnum)proDeliveryOrder.ProDeliveryStatus}");
+                //}
+                //List<Dt_ProDeliveryOrderDetail> proDeliveryOrderDetails = deliveryOrders.SelectMany(x=>x.Details).ToList();
+                //if (!proDeliveryOrderDetails.Any())
+                //{
+                //    throw new Exception($"鏈壘鍒伴渶鍑哄簱鐨勬槑缁嗕俊鎭�");
+                //}
+                //_unitOfWorkManage.BeginTran();
+                //List<Dt_Task> tasks = new List<Dt_Task>();
+                //List<Dt_ProStockInfo>? stockInfos = null;
+                //List<Dt_ProDeliveryOrder>? Orders = null;
+                //List<Dt_ProDeliveryOrderDetail>? OrderDetails = null;
+                //List<Dt_OutStockLockInfo>? outStockLockInfos = null;
+                //List<Dt_LocationInfo>? locationInfos = null;
+                //{
+                //    //鍒嗛厤搴撳瓨
+                //    (List<Dt_ProStockInfo>, List<Dt_ProDeliveryOrder>, List<Dt_ProDeliveryOrderDetail>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.ProDeliveryOrderService.AssignProStockOutbound(deliveryOrders, proDeliveryOrderDetails);
+                //    if (result.Item1 != null && result.Item1.Count > 0)
+                //    {
+                //        //鍒涘缓浠诲姟
+                //        tasks = GetTasks(result.Item1, result.Item3);
+                //        result.Item3.ForEach(x =>
+                //        {
+                //            x.Status = OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt();
+                //        });
+                //        stockInfos = result.Item1;
+                //        Orders = result.Item2;
+                //        outStockLockInfos = result.Item3;
+                //        locationInfos = result.Item4;
+                //    }
+                //}
+                //if (stockInfos != null && stockInfos.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0 && tasks.Count > 0)
+                //{
+                //    BaseDal.AddData(tasks);
+                //    stockInfos.ForEach(x =>
+                //    {
+                //        x.StockStatus = StockStatusEmun.鍑哄簱閿佸畾.ObjToInt();
+                //    });
+                //    WebResponseContent contentResponse = _outboundService.OutMESOrderService.LockOutboundStockDataUpdate(stockInfos, Orders, outStockLockInfos, locationInfos, tasks: tasks);
+
+                //    if (!contentResponse.Status)
+                //    {
+                //        _unitOfWorkManage.RollbackTran();
+                //        return content.Error(contentResponse.Message);
+                //    }
+                //}
+                //_unitOfWorkManage.CommitTran();
+            }
+            catch (Exception ex)
+            {
+                _unitOfWorkManage.RollbackTran();
+                content.Error(ex.Message);
+            }
+            return content;
+        }
         List<string> GradeCodes = new List<string>
         {
             "001"

--
Gitblit v1.9.3