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.
 
 
 
 
 
 

50 lines
1.4 KiB

using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Shared.Domain.Shared;
namespace Win_in.Sfs.Wms.Pda.Controllers.BaseDatas;
/// <summary>
///
/// </summary>
[ApiController]
[Route($"{PdaHostConst.ROOT_ROUTE}location")]
public class LocationController : AbpController
{
private readonly ILocationAppService _locationAppService;
/// <summary>
///
/// </summary>
/// <param name="locationAppService"></param>
public LocationController(ILocationAppService locationAppService)
{
_locationAppService = locationAppService;
}
/// <summary>
/// 根据code获取库位信息
/// </summary>
/// <param name="code"></param>
/// <returns></returns>
[HttpGet("{code}")]
public virtual async Task<LocationDTO> GetAsync(string code)
{
var result = await _locationAppService.GetByCodeAsync(code).ConfigureAwait(false);
return result;
}
/// <summary>
/// 根据type获取库位信息
/// </summary>
/// <returns></returns>
[HttpGet("by-type/{type}")]
public virtual async Task<List<LocationDTO>> GetListByTypeAsync(EnumLocationType type)
{
var result = await _locationAppService.GetListByTypesAsync(new List<EnumLocationType>() { type }).ConfigureAwait(false);
return result;
}
}