From 885bd60ed54a0642c48c57a3d685cba24e4c763b Mon Sep 17 00:00:00 2001
From: huanghongfeng <huanghongfeng@hnkhzn.com>
Date: 星期日, 08 十二月 2024 11:33:07 +0800
Subject: [PATCH] 1

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Service/StockInfoService.cs |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Service/StockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Service/StockInfoService.cs"
index e2c63ee..c1920c5 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Service/StockInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Service/StockInfoService.cs"
@@ -243,18 +243,18 @@
 
                     Dt_StockInfodt dt_ = new Dt_StockInfodt()
                     {
-                        PalletCode= entities[i].PalletCode,
+                        PalletCode = entities[i].PalletCode,
                         MaterialType = MaterialTypet,
                         LocationCode = entities[i].LocationCode,
                         Wlstatus = Wlstatust,
-                        MaterielCode=dt_StockIndet.MaterielCode,
-                        MaterielName = dt_StockIndet.MaterielName,
-                        OrderNo = dt_StockIndet.OrderNo,
-                        BatchNo = dt_StockIndet.BatchNo,
-                        SerialNumber = dt_StockIndet.SerialNumber,
-                        StockQuantity = dt_StockIndet.StockQuantity,
-                        BatchNoName = dt_StockIndet.BatchNoName,
-                        CreateDate = dt_StockIndet.CreateDate,
+                        MaterielCode = dt_StockIndet?.MaterielCode ?? "", // 濡傛灉 dt_StockIndet 涓� null锛屼娇鐢ㄧ┖瀛楃涓蹭綔涓洪粯璁ゅ��
+                        MaterielName = dt_StockIndet?.MaterielName ?? "",
+                        OrderNo = dt_StockIndet?.OrderNo ?? "",
+                        BatchNo = dt_StockIndet?.BatchNo ?? "",
+                        SerialNumber = dt_StockIndet?.SerialNumber ?? "",
+                        StockQuantity = dt_StockIndet?.StockQuantity ?? 0, // 鍋囪 StockQuantity 鏄暟鍊肩被鍨嬶紝浣跨敤 0 浣滀负榛樿鍊�
+                        BatchNoName = dt_StockIndet?.BatchNoName ?? "",
+                        CreateDate = dt_StockIndet?.CreateDate ?? DateTime.MinValue, // 鍋囪 CreateDate 鏄棩鏈熺被鍨嬶紝浣跨敤榛樿鏃堕棿
                         Remark = entities[i].Remark,
                     };
                     stolist.Add(dt_);

--
Gitblit v1.9.3