You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1005 B
32 lines
1005 B
1 year ago
|
using System.Collections.Generic;
|
||
|
using System.Threading.Tasks;
|
||
|
using Volo.Abp.Domain.Services;
|
||
|
|
||
|
namespace Win_in.Sfs.Basedata.Domain;
|
||
|
|
||
1 year ago
|
public class ErpLocationItemManager : DomainService, IErpLocationItemManager
|
||
1 year ago
|
{
|
||
1 year ago
|
private readonly IErpLocationItemRepository _repository;
|
||
1 year ago
|
|
||
1 year ago
|
private readonly IItemBasicRepository _itemBasicRepository;
|
||
|
|
||
|
public ErpLocationItemManager(IErpLocationItemRepository repository, IItemBasicRepository itemBasicRepository)
|
||
1 year ago
|
{
|
||
|
_repository = repository;
|
||
1 year ago
|
_itemBasicRepository = itemBasicRepository;
|
||
1 year ago
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 执行导入
|
||
|
/// </summary>
|
||
1 year ago
|
public virtual async Task ImportDataAsync(List<ErpLocationItem> mergeEntities, List<ErpLocationItem> deleteEntities = null)
|
||
1 year ago
|
{
|
||
|
if (deleteEntities != null && deleteEntities.Count > 0)
|
||
|
{
|
||
|
await _repository.BulkDeleteAsync(deleteEntities).ConfigureAwait(false);
|
||
|
}
|
||
|
|
||
|
await _repository.BulkMergeAsync(mergeEntities).ConfigureAwait(false);
|
||
|
}
|
||
|
}
|