From 569b9900086f06fbd986f69534c8d5af54c4d55b Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期一, 16 三月 2026 10:51:43 +0800
Subject: [PATCH] 1

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 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_TaskInfoService/TaskService.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_TaskInfoService/TaskService.cs"
index 9a74826..9b4439a 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_TaskInfoService/TaskService.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_TaskInfoService/TaskService.cs"
@@ -622,6 +622,12 @@
                             }
                         }
 
+                        if (outboundOrder.Details.All(x => x.OrderDetailStatus == (int)OrderDetailStatusEnum.Over) && !allocatInfo.Any())
+                        {
+                            outboundOrder.OrderStatus = (int)InOrderStatusEnum.鍏ュ簱瀹屾垚;
+                            _outboundOrderService.UpdateData(outboundOrder);
+                        }
+
                         // 7. 鍥炶皟MES
                         string Operator = outboundOrder.Modifier;
                         HttpResponseResult<MesResponseDTO> httpResponseResult = new HttpResponseResult<MesResponseDTO>();
@@ -1016,8 +1022,9 @@
                     await Db.Deleteable(task).ExecuteCommandAsync();
                 }
                 Dt_OutboundOrder outboundOrder = _outboundOrderService.Db.Queryable<Dt_OutboundOrder>().Where(x => x.OrderNo == stockInfo.Details.FirstOrDefault().OrderNo).Includes(x=>x.Details).First();
+                
 
-                if(outboundOrder != null)
+                if (outboundOrder != null)
                 {
                     foreach (var item in stockInfo.Details.Where(x => x.OrderNo == outboundOrder.OrderNo).ToList())
                     {
@@ -1030,6 +1037,12 @@
                                 await Db.Deleteable(task).ExecuteCommandAsync();
                             }
                         }
+                    }
+                    var allocateMaterialInfos = _allocateMaterialInfo.QueryData(x => x.OrderNo == outboundOrder.OrderNo);
+                    if (outboundOrder.Details.All(x => x.OrderDetailStatus == (int)OrderDetailStatusEnum.Over) && !allocateMaterialInfos.Any())
+                    {
+                        outboundOrder.OrderStatus = (int)InOrderStatusEnum.鍏ュ簱瀹屾垚;
+                        _outboundOrderService.UpdateData(outboundOrder);
                     }
                 }
                 string Operator = outboundOrder.Modifier;
@@ -1052,7 +1065,7 @@
                     {
                         return WebResponseContent.Instance.Error($"鏋勫缓鍥炶皟瀵硅薄澶辫触");
                     }
-                    string apiUrl = AppSettings.GetValue("AllocationFeedbackUrl"); ;
+                    string apiUrl = AppSettings.GetValue("AllocationFeedbackUrl");
                     returnDTO.ReqCode = reqCode;
                     returnDTO.ReqTime = reqTime;
                     JsonSerializerSettings settings = new JsonSerializerSettings

--
Gitblit v1.9.3