From 9f9858b1b48747422e5bbe68b8c62602c5f7e4df Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Tue, 7 Nov 2023 14:40:41 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E6=88=90=E8=A7=A3=E6=9E=90=E5=8F=B7?= =?UTF-8?q?=E7=A0=81=E6=96=B9=E6=B3=95=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MsgCheck/Services/BillNumberRecordDomainService.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/BillNumberRecordDomainService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/BillNumberRecordDomainService.cs index d2ce9cb..54b1b02 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/BillNumberRecordDomainService.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/BillNumberRecordDomainService.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using Volo.Abp; using Volo.Abp.Domain.Repositories; using Volo.Abp.Domain.Services; using WY.NewJit.MsgBaseData; @@ -75,6 +76,11 @@ namespace WY.NewJit.MsgCheck { List datas = new List(); var recordcache= _billNumberRecordCaches.FirstOrDefault(r=>r.ProductLine==productLine); + if (recordcache == null) + { + _logger.LogDebug("缓存记录为空无法解析!"); + throw new BusinessException("1001", "缓存记录为空无法解析!"); + } int recordNumber = recordcache.RecordNumber;//记录号 int roundNumber = recordcache.RoundNumber; //记录轮数 int x = number - recordNumber;