|
|
@ -30,7 +30,7 @@ public class EquipmentLocAppService |
|
|
|
: SfsBaseDataWithCodeAppServiceBase<EquipmentLoc, EquipmentLocDTO, SfsBaseDataRequestInputBase, EquipmentLocEditInput, EquipmentLocImportInput> |
|
|
|
, IEquipmentLocAppService |
|
|
|
{ |
|
|
|
//private readonly ItemValidator _itemValidator;
|
|
|
|
|
|
|
|
private readonly IEquipmentLocManager _manager; |
|
|
|
private new readonly IEquipmentLocRepository _repository; |
|
|
|
private readonly IExportImportService _importService; |
|
|
@ -39,13 +39,11 @@ public class EquipmentLocAppService |
|
|
|
IEquipmentLocRepository repository, |
|
|
|
IDistributedCache<EquipmentLocDTO> cache, |
|
|
|
IExportImportService importService, |
|
|
|
// ItemValidator itemValidator,
|
|
|
|
IEquipmentLocManager manager) |
|
|
|
: base(repository, cache) |
|
|
|
{ |
|
|
|
_importService=importService; |
|
|
|
_repository = repository; |
|
|
|
//_itemValidator = itemValidator;
|
|
|
|
_manager = manager; |
|
|
|
base.CreatePolicyName = EquipmentPermissions.Create; |
|
|
|
base.UpdatePolicyName = EquipmentPermissions.Update; |
|
|
@ -92,4 +90,17 @@ public class EquipmentLocAppService |
|
|
|
var list =query.Where(p => p_ls.Contains(p.Code)); |
|
|
|
return ObjectMapper.Map< List<EquipmentLoc> ,List<EquipmentLocDTO>>(list.ToList()); |
|
|
|
} |
|
|
|
[HttpGet] |
|
|
|
[Route("GetLocs")] |
|
|
|
public async Task<List<string>> GetLocsAsync() |
|
|
|
{ |
|
|
|
var query = await _repository.GetQueryableAsync().ConfigureAwait(false); |
|
|
|
var list = query.Select(p => p.LocCode).Distinct().ToList(); |
|
|
|
return list; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|