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

using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Domain.Services;
namespace Win_in.Sfs.Basedata.Domain;
public class ErpLocationItemManager : DomainService, IErpLocationItemManager
{
private readonly IErpLocationItemRepository _repository;
private readonly IItemBasicRepository _itemBasicRepository;
public ErpLocationItemManager(IErpLocationItemRepository repository, IItemBasicRepository itemBasicRepository)
{
_repository = repository;
_itemBasicRepository = itemBasicRepository;
}
/// <summary>
/// 执行导入
/// </summary>
public virtual async Task ImportDataAsync(List<ErpLocationItem> mergeEntities, List<ErpLocationItem> deleteEntities = null)
{
if (deleteEntities != null && deleteEntities.Count > 0)
{
await _repository.BulkDeleteAsync(deleteEntities).ConfigureAwait(false);
}
await _repository.BulkMergeAsync(mergeEntities).ConfigureAwait(false);
}
}