|
|
@ -29,6 +29,7 @@ public class BalanceManager : DomainService, IBalanceManager |
|
|
|
private readonly IItemBasicAclService _itemBasicAclService; |
|
|
|
private readonly ILocationAclService _locationAclService; |
|
|
|
private readonly IItemStoreRelationAclService _itemStoreRelationAclService; |
|
|
|
private readonly IErpLocationItemAppService _erpLocationItemAppService; |
|
|
|
private readonly ISettingManager _settingManager; |
|
|
|
private readonly IExpectInRepository _expectInRepository; |
|
|
|
private readonly IExpectOutRepository _expectOutRepository; |
|
|
@ -41,6 +42,7 @@ public class BalanceManager : DomainService, IBalanceManager |
|
|
|
, IExpectOutRepository expectOutRepository |
|
|
|
, IItemStoreRelationAclService itemStoreRelationAclService |
|
|
|
, ISettingManager settingManager |
|
|
|
,IErpLocationItemAppService erpLocationItemAppService |
|
|
|
) |
|
|
|
{ |
|
|
|
_objectMapper = objectMapper; |
|
|
@ -51,6 +53,7 @@ public class BalanceManager : DomainService, IBalanceManager |
|
|
|
_itemStoreRelationAclService = itemStoreRelationAclService; |
|
|
|
_settingManager = settingManager; |
|
|
|
_expectOutRepository = expectOutRepository; |
|
|
|
_erpLocationItemAppService= erpLocationItemAppService; |
|
|
|
} |
|
|
|
|
|
|
|
#region Modify
|
|
|
@ -159,7 +162,9 @@ public class BalanceManager : DomainService, IBalanceManager |
|
|
|
/// <exception cref="UserFriendlyException"></exception>
|
|
|
|
private async Task CheckErpLocationItemAsync(Transaction transaction) |
|
|
|
{ |
|
|
|
if (transaction == null) |
|
|
|
var erpLocationItem =await _erpLocationItemAppService.GetFirstAsync(transaction.LocationErpCode, transaction.ItemCode).ConfigureAwait(false); |
|
|
|
|
|
|
|
if (erpLocationItem == null) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"未找到零件【{transaction.ItemCode}】与ERP储位【{transaction.LocationErpCode}】的开账信息"); |
|
|
|
} |
|
|
|