|
|
@ -1,6 +1,9 @@ |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Microsoft.AspNetCore.Authorization; |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
using Microsoft.EntityFrameworkCore; |
|
|
|
using Volo.Abp; |
|
|
|
using Volo.Abp.Caching; |
|
|
|
using Volo.Abp.Uow; |
|
|
@ -69,4 +72,24 @@ public class PositionCodeAppService |
|
|
|
|
|
|
|
return await base.CreateAsync(input).ConfigureAwait(false); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 用来重写 导入数据时可以加工数据
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="dictionary"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
protected override async Task<Dictionary<PositionCode, EntityState>> ImportProcessingEntityAsync( |
|
|
|
Dictionary<PositionCode, EntityState> dictionary) |
|
|
|
{ |
|
|
|
var addList = dictionary.Where(p => p.Value == EntityState.Added).Select(p => p.Key); |
|
|
|
|
|
|
|
foreach (var positionCode in addList) |
|
|
|
{ |
|
|
|
positionCode.Code = positionCode.Type + positionCode.Code; |
|
|
|
positionCode.CreatorId= CurrentUser.Id; |
|
|
|
} |
|
|
|
|
|
|
|
return dictionary; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|