From 286fbdb25c889bc18ff6c8a1bef8b0696e40a653 Mon Sep 17 00:00:00 2001 From: 18942506660 <18942506660@A18942506660> Date: Wed, 30 Oct 2024 11:24:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/WMS.Web.Domain/Services/Public/ErpInventoryService.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/WMS.Web.Domain/Services/Public/ErpInventoryService.cs b/src/WMS.Web.Domain/Services/Public/ErpInventoryService.cs index 4cf1ed93..7d52610f 100644 --- a/src/WMS.Web.Domain/Services/Public/ErpInventoryService.cs +++ b/src/WMS.Web.Domain/Services/Public/ErpInventoryService.cs @@ -76,7 +76,8 @@ namespace WMS.Web.Domain.Services.Public string json = resData["data"].ToString(); var datas = JsonConvert.DeserializeObject>(json); - list.AddRange(datas); + if (datas != null && datas.Count() > 0) + list.AddRange(datas); int num = Convert.ToInt32(resData["rowcount"]) / 10000; for (int i = 1; i <= num; i++) @@ -94,7 +95,8 @@ namespace WMS.Web.Domain.Services.Public json = resData["data"].ToString(); datas = JsonConvert.DeserializeObject>(json); - list.AddRange(datas); + if (datas != null && datas.Count() > 0) + list.AddRange(datas); } }