From 4a7b1537787f262cc8833c0d40a88ab5c9f41caf Mon Sep 17 00:00:00 2001 From: Yiru Date: Tue, 22 Aug 2023 15:47:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E8=B2=A8=E5=BA=8F=E8=99=9F=E9=87=8D?= =?UTF-8?q?=E5=8F=96=20=E4=BF=AE=E6=94=B9=E8=A8=88=E7=AE=97=E5=8F=96?= =?UTF-8?q?=E8=99=9F=E6=95=B8=E9=87=8F=E9=8C=AF=E8=AA=A4=E5=95=8F=E9=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AMESCoreStudio.Web/Controllers/PCSController.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/AMESCoreStudio.Web/Controllers/PCSController.cs b/AMESCoreStudio.Web/Controllers/PCSController.cs index 128611cb..36edea12 100644 --- a/AMESCoreStudio.Web/Controllers/PCSController.cs +++ b/AMESCoreStudio.Web/Controllers/PCSController.cs @@ -9105,10 +9105,13 @@ namespace AMESCoreStudio.Web.Controllers int TotalQTY = 0; foreach (var item1 in WipBarcodeOhter) { - int StrNoQty = int.Parse(item1.StartNO.Substring(SNStart, SNLen)); - // 結束流水碼 - int EndNoQty = int.Parse(item1.EndNO.Substring(SNStart, SNLen)); - TotalQTY += EndNoQty - StrNoQty + 1; + if (!string.IsNullOrWhiteSpace(item1.StartNO.Trim())) + { + int StrNoQty = int.Parse(item1.StartNO.Substring(SNStart, SNLen)); + // 結束流水碼 + int EndNoQty = int.Parse(item1.EndNO.Substring(SNStart, SNLen)); + TotalQTY += EndNoQty - StrNoQty + 1; + } } item.WipBarcodeOhterQTY = TotalQTY;