From c0e49798942411b5dc57169d50f707c0bb247d25 Mon Sep 17 00:00:00 2001
From: yangpeixing <yangpeixing@hnkhzn.com>
Date: 星期一, 02 三月 2026 15:02:39 +0800
Subject: [PATCH] 1

---
 WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Service/InboundOrderDetailService.cs |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Service/InboundOrderDetailService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Service/InboundOrderDetailService.cs
index 483cfce..8d5a384 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Service/InboundOrderDetailService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Service/InboundOrderDetailService.cs
@@ -57,7 +57,10 @@
             {
                 string orderNo = saveModel.MainData["orderNo"].ToString();
                 Dt_InboundOrder inboundOrder = Db.Queryable<Dt_InboundOrder>().Where(x => x.OrderNo == orderNo).Includes(x => x.Details).First();
-                content.OK(data: inboundOrder.Details);
+                if (inboundOrder != null)
+                {
+                    content.OK(data: inboundOrder.Details);
+                }
             }
             catch (Exception ex)
             {

--
Gitblit v1.9.3