From 7bcc81a87f6341771f869627c332a7dd7e4dd1cd Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Fri, 17 Nov 2023 11:46:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=89=93=E5=8D=B0=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E4=BF=AE=E6=94=B9=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Interfaces/IWaitPrintAppService.cs | 2 ++ .../PrintTable/WaitPrintAppService.cs | 31 ++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Interfaces/IWaitPrintAppService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Interfaces/IWaitPrintAppService.cs index e37aed1..16158a9 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Interfaces/IWaitPrintAppService.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Interfaces/IWaitPrintAppService.cs @@ -5,6 +5,7 @@ using System.Text; using System.Threading.Tasks; using Volo.Abp.Application.Dtos; using Volo.Abp.Uow; +using WY.NewJit.PrintTable; using WY.NewJit.PrintTable.Dtos; namespace WY.NewJit.PrintTable @@ -12,5 +13,6 @@ namespace WY.NewJit.PrintTable public interface IWaitPrintAppService { Task> GetReplenishPrintListAsync(QueryReplenishPrintDto input); + Task UpdatePrintDataStatus(List ids, PrintTypeEnum printTypeEnum); } } diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs index 8ac3b6e..882c20c 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs @@ -35,7 +35,7 @@ namespace WY.NewJit.PrintTable { get { - return System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "."; + return System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "."; } } @@ -1192,5 +1192,34 @@ namespace WY.NewJit.PrintTable return new PagedResultDto(0, new List()); } } + + /// + /// 修改未打印列表状态 + /// + /// + /// + /// + [HttpGet] + [UnitOfWork] + [Route("update-print-data-status")] + public virtual async Task UpdatePrintDataStatus(List ids, PrintTypeEnum printTypeEnum) + { + _logger.LogDebug(_errorMessagePrefix + "UpdatePrintDataStatus 进入"); + bool result = true; + try + { + var updatelist = await _waitPrintRepository.GetListAsync(r => ids.Contains(r.Id)); + updatelist.ForEach(r => r.PrintType = printTypeEnum); + await _waitPrintRepository.UpdateManyAsync(updatelist); + } + catch (Exception ex) + { + string errMsg = _errorMessagePrefix + "UpdatePrintDataStatus 执行出错:" + ex.Message; + _logger.LogError(errMsg); + result = false; + return result; + } + return result; + } } }