From 64840e4e6d97d177b8a765ba8c53888abcf86d16 Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期二, 13 一月 2026 18:48:20 +0800
Subject: [PATCH] Merge branch 'htq20251215' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu into htq20251215

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_BasicService/MESOperation/FeedbackMesService.cs |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 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_BasicService/MESOperation/FeedbackMesService.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_BasicService/MESOperation/FeedbackMesService.cs"
index fc049c4..f5217a3 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_BasicService/MESOperation/FeedbackMesService.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_BasicService/MESOperation/FeedbackMesService.cs"
@@ -98,7 +98,23 @@
 
                     if (returnDTO.Details.Count <= 0)
                     {
+                        if (returnRecords.Count() == returnRecords.Count(x => x.ReturnStatus == 1))
+                        {
+                            outboundOrder.ReturnToMESStatus = 1;
+                        }
+                        else if (returnRecords.Count(x => x.ReturnStatus == 2) > 0)
+                        {
+                            outboundOrder.ReturnToMESStatus = 4;
+                        }
+                        else if (returnRecords.Count() == returnRecords.Count(x => x.ReturnStatus == 2))
+                        {
+                            outboundOrder.ReturnToMESStatus = 2;
+                        }
+                        _outboundOrderRepository.UpdateData(outboundOrder);
+
+
                         return webResponse = WebResponseContent.Instance.OK($"璇ュ崟鎹病鏈夐渶瑕佸洖浼犳槑缁嗭紝澶辫触鏁版嵁鍥炰紶{returnRecords.Count()}鏉★紝鍥炰紶鎴愬姛{returnRecords.Count(x=>x.ReturnStatus == 1)}鏉★紝鍥炰紶澶辫触{returnRecords.Count(x => x.ReturnStatus == 2)}鏉�");
+
                     }
 
                     string apiUrl = AppSettings.GetValue("MaterialOutboundFeedbackUrl");
@@ -129,6 +145,21 @@
 
                     if (returnDTO.Details.Count <= 0)
                     {
+                        if(returnRecords.Count() == returnRecords.Count(x => x.ReturnStatus == 1))
+                        {
+                            outboundOrder.ReturnToMESStatus = 1;
+                        }
+                        else if(returnRecords.Count(x => x.ReturnStatus == 2)>0)
+                        {
+                            outboundOrder.ReturnToMESStatus = 4;
+                        }
+                        else if (returnRecords.Count() == returnRecords.Count(x => x.ReturnStatus == 2))
+                        {
+                            outboundOrder.ReturnToMESStatus = 2;
+                        }
+                        _outboundOrderRepository.UpdateData(outboundOrder);
+                        
+                        
                         return webResponse = WebResponseContent.Instance.OK($"璇ュ崟鎹病鏈夐渶瑕佸洖浼犳槑缁嗭紝澶辫触鏁版嵁鍥炰紶{returnRecords.Count()}鏉★紝鍥炰紶鎴愬姛{returnRecords.Count(x => x.ReturnStatus == 1)}鏉★紝鍥炰紶澶辫触{returnRecords.Count(x => x.ReturnStatus == 2)}鏉�");
                     }
 

--
Gitblit v1.9.3