From 5d3b517c4378c9e47f0963df14b2d195048f93f3 Mon Sep 17 00:00:00 2001 From: liuyunfeng Date: Thu, 18 Apr 2024 13:03:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8C=E8=BD=AE=E6=B5=8B=E8=AF=95=E4=BF=AE?= =?UTF-8?q?=E6=94=B9bug=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MsgCheck/BillM100s/MenBanPackingRecService.cs | 2 +- .../MsgCheck/BillM100s/ZhuHuBanPackingRecService.cs | 2 +- .../EdiReceive/Services/EdiParseDomainService.cs | 5 ++++- .../EdiReceive/Services/HQ_M100DomainService.cs | 12 ++++++++++++ 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/MenBanPackingRecService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/MenBanPackingRecService.cs index a733982..7a58b0b 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/MenBanPackingRecService.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/MenBanPackingRecService.cs @@ -360,7 +360,7 @@ namespace Win.Sfs.SettleAccount.FISes { if (alreadyPrintItem.BillStatus == BillStatusEnum.BreakNum && waitPrintLst[0].BillStatus == BillStatusEnum.BreakNum) { - throw new BusinessException("1001", "未打印列表和已打印列表出现都是断号的情况号码未【" + alreadyPrintItem.HostSN2 + "】,不能报废!"); + throw new BusinessException("1001", "未打印列表和已打印列表出现都是断号状态【" + alreadyPrintItem.HostSN2 + "】,不能报废!"); } //未打印有一条补打的记录,忽略已打印的对应记录,将未打印记录的补打状态改成顺序打印状态 if (waitPrintLst[0].PrintType == WY.NewJit.PrintTable.PrintTypeEnum.ReplenishPrint) diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/ZhuHuBanPackingRecService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/ZhuHuBanPackingRecService.cs index 54f364c..272a18e 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/ZhuHuBanPackingRecService.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/ZhuHuBanPackingRecService.cs @@ -396,7 +396,7 @@ namespace Win.Sfs.SettleAccount.FISes { if (alreadyPrintItem.BillStatus == BillStatusEnum.BreakNum && waitPrintLst[0].BillStatus == BillStatusEnum.BreakNum) { - throw new BusinessException("1001", "未打印列表和已打印列表出现都是断号的情况号码未【" + alreadyPrintItem.HostSN2 + "】,不能报废!"); + throw new BusinessException("1001", "未打印列表和已打印列表出现都是柱护板断号状态【" + alreadyPrintItem.HostSN2 + "】,不能报废!"); } //未打印有一条补打的记录,忽略已打印的对应记录,将未打印记录的补打状态改成顺序打印状态 if (waitPrintLst[0].PrintType == WY.NewJit.PrintTable.PrintTypeEnum.ReplenishPrint) diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Services/EdiParseDomainService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Services/EdiParseDomainService.cs index fc99fdc..8748c7a 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Services/EdiParseDomainService.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Services/EdiParseDomainService.cs @@ -311,8 +311,11 @@ namespace WY.NewJit.EdiReceive.Services { throw new Exception($"{_errorMessagePrefix}更新M100失败:{m100Obj.HostSN2}"); } + + bool hasBeforeNotPrint = await _hqM100DomainServie.BeforeNotPrint((int)(m100Obj.HostSN2)); + bool isReplenishPrint = hasBeforeNotPrint ? false : true; //未打印表包含重新解析之前的记录,设置成正常打印,否则设置成补打 //判断未打印表是否有数据,有则更新,没有则插入 - ObjectResultDto wpRet = await _hqM100DomainServie.InsertOrUpdateWaitPrintByM100(m100Ret, false, true); + ObjectResultDto wpRet = await _hqM100DomainServie.InsertOrUpdateWaitPrintByM100(m100Ret, false, isReplenishPrint); if (wpRet.Status == false) { throw new Exception(wpRet.Message); diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Services/HQ_M100DomainService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Services/HQ_M100DomainService.cs index 68e7220..892bc07 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Services/HQ_M100DomainService.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Services/HQ_M100DomainService.cs @@ -195,5 +195,17 @@ namespace WY.NewJit.MsgCheck } return ret; } + + /// + /// 根据传入参数hostSN2,判断存在小于hostSN2的未打印记录 + /// + /// + /// + public async Task BeforeNotPrint(int hostSN2) + { + var qry = await _waitPrintRepository.GetQueryableAsync(); + bool hasBeforeNotPrint = qry.Any(itm => itm.HostSN2 < hostSN2 && itm.PrintType == PrintTypeEnum.OrderPrint && itm.BillStatus == BillStatusEnum.Match); + return hasBeforeNotPrint; + } } }