|
|
@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Authorization; |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
using Volo.Abp; |
|
|
|
using Volo.Abp.Application.Services; |
|
|
|
using Volo.Abp.Uow; |
|
|
|
using Volo.Abp.Users; |
|
|
|
using Win_in.Sfs.Basedata.Application.Contracts; |
|
|
|
using Win_in.Sfs.Basedata.Domain; |
|
|
@ -32,6 +33,7 @@ public class GaoTongAppService : ApplicationService, IGaoTongAppService |
|
|
|
private readonly IItemBasicAppService _itemBasicAppService; |
|
|
|
private readonly ILocationAppService _locationAppService; |
|
|
|
private readonly IPositionCodeAppService _positionCodeAppService; |
|
|
|
private readonly UnitOfWorkManager _unitOfWorkManager; |
|
|
|
|
|
|
|
public GaoTongAppService( |
|
|
|
IBalanceAppService balanceAppService |
|
|
@ -39,7 +41,7 @@ public class GaoTongAppService : ApplicationService, IGaoTongAppService |
|
|
|
, CurrentUser currentUser |
|
|
|
, IItemBasicAppService itemBasicAppService |
|
|
|
, ILocationAppService locationAppService |
|
|
|
, IPositionCodeAppService positionCodeAppService) |
|
|
|
, IPositionCodeAppService positionCodeAppService, UnitOfWorkManager unitOfWorkManager) |
|
|
|
{ |
|
|
|
_balanceAppService = balanceAppService; |
|
|
|
_transferNoteAppService = transferNoteAppService; |
|
|
@ -47,6 +49,7 @@ public class GaoTongAppService : ApplicationService, IGaoTongAppService |
|
|
|
_itemBasicAppService = itemBasicAppService; |
|
|
|
_locationAppService = locationAppService; |
|
|
|
_positionCodeAppService = positionCodeAppService; |
|
|
|
_unitOfWorkManager = unitOfWorkManager; |
|
|
|
} |
|
|
|
/// <summary>
|
|
|
|
/// 组盘信息反馈到东阳WMS
|
|
|
@ -57,6 +60,7 @@ public class GaoTongAppService : ApplicationService, IGaoTongAppService |
|
|
|
public async Task<GaoTongResultDTO> FeedbackZuPanAsync(ZuPanEditInput input) |
|
|
|
{ |
|
|
|
GaoTongResultDTO ret = new GaoTongResultDTO(); |
|
|
|
using var unitOfWork = _unitOfWorkManager.Begin(); |
|
|
|
try |
|
|
|
{ |
|
|
|
ItemBasicDTO itemBasicObj = await _itemBasicAppService.GetByCodeAsync(input.ItemCode).ConfigureAwait(false); |
|
|
@ -139,6 +143,7 @@ public class GaoTongAppService : ApplicationService, IGaoTongAppService |
|
|
|
ret.Code = GaoTongResultStatus.Failure; |
|
|
|
ret.Message = "FeedbackZuPanAsync执行失败:" + ex.Message; |
|
|
|
ret.OperateTime = CommonHelper.CurTimeStr; |
|
|
|
await unitOfWork.RollbackAsync().ConfigureAwait(false); |
|
|
|
return ret; |
|
|
|
} |
|
|
|
} |
|
|
@ -173,6 +178,7 @@ public class GaoTongAppService : ApplicationService, IGaoTongAppService |
|
|
|
public async Task<GaoTongResultDTO> ManualSelection(ZuPanEditInput input) |
|
|
|
{ |
|
|
|
GaoTongResultDTO ret = new GaoTongResultDTO(); |
|
|
|
using var unitOfWork = _unitOfWorkManager.Begin(); |
|
|
|
try |
|
|
|
{ |
|
|
|
ItemBasicDTO itemBasicObj = await _itemBasicAppService.GetByCodeAsync(input.ItemCode).ConfigureAwait(false); |
|
|
@ -268,6 +274,7 @@ public class GaoTongAppService : ApplicationService, IGaoTongAppService |
|
|
|
ret.Code = GaoTongResultStatus.Failure; |
|
|
|
ret.Message = "ManualSelection执行失败:" + ex.Message; |
|
|
|
ret.OperateTime = CommonHelper.CurTimeStr; |
|
|
|
await unitOfWork.RollbackAsync(); |
|
|
|
return ret; |
|
|
|
} |
|
|
|
} |
|
|
|