From 422e2d17e0495c1506ace669ac47f99d28479f72 Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期四, 27 十一月 2025 16:07:27 +0800
Subject: [PATCH] 提交

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs |    9 ++++++---
 1 files changed, 6 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/InboundOrderService.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/InboundOrderService.cs"
index e117602..15294a8 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/InboundOrderService.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/InboundOrderService.cs"
@@ -96,8 +96,11 @@
                         item.Unit = purchaseToStockResult.Unit;
                         item.OrderQuantity = purchaseToStockResult.Quantity;
                     }
-
-                    model.InboundOrderNo = CreateCodeByRule(nameof(RuleCodeEnum.InboundOrderRule));
+                    if (model .OrderType != InOrderTypeEnum.Allocat.ObjToInt())
+                    {
+                        model.InboundOrderNo = CreateCodeByRule(nameof(RuleCodeEnum.InboundOrderRule));
+                    }
+                  
                     Db.InsertNav(model).Include(x => x.Details).ExecuteCommand();
                 }
                 return WebResponseContent.Instance.OK();
@@ -647,7 +650,7 @@
             {
                 return WebResponseContent.Instance.Error("鎵樼洏鍙蜂笉鑳戒负绌�");
             }
-           var stock= _stockRepository.Db.Queryable<Dt_StockInfo>().Includes(o=>o.Details).First(x => x.PalletCode == palletCode );
+           var stock= _stockRepository.Db.Queryable<Dt_StockInfo>().Includes(o=>o.Details).First(x => x.PalletCode == palletCode &&  x.StockStatus ==(int)StockStatusEmun.缁勭洏鏆傚瓨);
             if (stock == null)
             {
                 return WebResponseContent.Instance.Error($"鏈壘鍒版墭鐩樺彿{palletCode}瀵瑰簲鐨勫簱瀛樿褰�");

--
Gitblit v1.9.3