From 461524a7a1def4532b9af4ab40733f899f360db7 Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期四, 09 四月 2026 14:39:45 +0800
Subject: [PATCH] Merge branch 'htq20251215' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu into htq20251215

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs |   23 ++++++++++++++++++++---
 1 files changed, 20 insertions(+), 3 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_InboundService/InboundService.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_InboundService/InboundService.cs"
index c08f145..84eba5c 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_InboundService/InboundService.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_InboundService/InboundService.cs"
@@ -1,6 +1,8 @@
 锘縰sing LogLibrary.Log;
 using MailKit;
+using MailKit.Net.Smtp;
 using MailKit.Search;
+using Microsoft.AspNetCore.Http;
 using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
 using Org.BouncyCastle.Asn1.X509;
 using Org.BouncyCastle.Bcpg;
@@ -80,7 +82,8 @@
             _allocateOrderRepository = allocateOrderRepository;
         }
 
-        public async Task<WebResponseContent> GroupPallet(GroupPalletDto palletDto)
+        public async Task<WebResponseContent> 
+            GroupPallet(GroupPalletDto palletDto)
         {
             WebResponseContent content = new WebResponseContent();
             try
@@ -180,6 +183,20 @@
                     stockInfo = new Dt_StockInfo() { PalletType = (int)PalletTypeEnum.None, LocationType = Convert.ToInt32(palletDto.locationType) };
                     stockInfo.Details = new List<Dt_StockInfoDetail>();
                 }
+                //else
+                //{
+                //      var allowStatus = new[]
+                //  {
+                //      (int)StockStatusEmun.缁勭洏鏆傚瓨,
+                //      (int)StockStatusEmun.鏅轰粨鍏ユ櫤浠撶粍鐩樻殏瀛�,
+                //      (int)StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨
+                //  };
+
+                //    if (!allowStatus.Contains(stockInfo.StockStatus))
+                //    {
+                //        return content.Error($"璇ユ墭鐩榹stockInfo.PalletCode}鐘舵�佷笉鍏佽缁勭洏");
+                //    }
+                //}
 
                 if (inboundOrder.BusinessType != MESDocumentType.PurchaseInbound.ToString() && stockInfo != null && stockInfo.Details.Count > 0 && stockInfo.Details.FirstOrDefault()?.WarehouseCode != palletDto.WarehouseType)
                 {
@@ -599,7 +616,7 @@
 
                     var response = responseModel(inboundOrder, 3, null, allocatefeedmodel);
 
-                    if (response != null && response.IsSuccess)
+                    if (response != null && response.IsSuccess && response.Data.Code == "200")
                     {
                         _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 1 })
                         .Where(it => it.OrderId == inboundOrder.Id && inbounddetailID.Contains(it.Id)).ExecuteCommand();
@@ -693,7 +710,7 @@
                     }
                     var response = responseModel(inboundOrder, 3, feedmodel);
 
-                    if (response != null && response.IsSuccess)
+                    if (response != null && response.IsSuccess && response.Data.Code == "200")
                     {
                         _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 1 })
                         .Where(it => inbounddetailID.Contains(it.Id)).ExecuteCommand();

--
Gitblit v1.9.3