Browse Source

添加打印状态修改服务

master
lvzb 1 year ago
parent
commit
7bcc81a87f
  1. 2
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Interfaces/IWaitPrintAppService.cs
  2. 29
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs

2
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<PagedResultDto<WaitPrintDto>> GetReplenishPrintListAsync(QueryReplenishPrintDto input);
Task<bool> UpdatePrintDataStatus(List<Guid> ids, PrintTypeEnum printTypeEnum);
}
}

29
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs

@ -1192,5 +1192,34 @@ namespace WY.NewJit.PrintTable
return new PagedResultDto<WaitPrintDto>(0, new List<WaitPrintDto>());
}
}
/// <summary>
/// 修改未打印列表状态
/// </summary>
/// <param name="ids"></param>
/// <param name="printTypeEnum"></param>
/// <returns></returns>
[HttpGet]
[UnitOfWork]
[Route("update-print-data-status")]
public virtual async Task<bool> UpdatePrintDataStatus(List<Guid> 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;
}
}
}

Loading…
Cancel
Save