Browse Source

抛异常提示

dev_DY_CC
赵新宇 7 months ago
parent
commit
ffb8bd04ee
  1. 16
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/TransferRequestEventHandler.cs

16
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/TransferRequestEventHandler.cs

@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using DocumentFormat.OpenXml.Bibliography;
using Volo.Abp;
using Volo.Abp.EventBus;
using Volo.Abp.EventBus.Local;
using Volo.Abp.SettingManagement;
@ -46,6 +47,11 @@ public class TransferRequestEventHandler
[UnitOfWork]
public async Task HandleEventAsync(SfsHandledEntityEventData<TransferRequest> eventData)
{
try
{
var entity = eventData.Entity;
var enumTransSubType = Enum.Parse<EnumTransSubType>(entity.Type);
@ -64,7 +70,6 @@ public class TransferRequestEventHandler
input.Details.ForEach(p => { p.OnTheWayLocationCode = locationDto.Code; });
await _transferNoteManager.CreateAsync(input).ConfigureAwait(false);
}
switch (enumTransSubType)
{
@ -78,6 +83,15 @@ public class TransferRequestEventHandler
entity.Complete();
break;
}
}
}
catch (Exception e)
{
throw new UserFriendlyException($"{e.Message}");
}
}
/// <summary>

Loading…
Cancel
Save