调整出库单查询

This commit is contained in:
18942506660
2023-11-09 10:25:59 +08:00
parent 0bd21a0329
commit 87f914dcdb
9 changed files with 263 additions and 21 deletions

View File

@@ -7,6 +7,7 @@ using System.Linq;
using System.Threading.Tasks;
using WMS.Web.Core;
using WMS.Web.Core.Dto;
using WMS.Web.Core.Dto.Erp;
using WMS.Web.Core.Dto.SingleData;
using WMS.Web.Core.Internal.Results;
using WMS.Web.Domain.Infrastructure;
@@ -148,6 +149,42 @@ namespace WMS.Web.Api.Controllers
return Result<List<UcStockResponse>>.ReSuccess(list);
}
/// <summary>
/// 获取出库单客户下拉列表
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetCustomers")]
public async Task<Result<List<PullDownStrResponse>>> GetCustomers()
{
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
if (loginInfo == null || loginInfo.UserInfo == null)
return Result<List<PullDownStrResponse>>.ReFailure(ResultCodes.Token_Invalid_Error);
var customers = await _erpService.BillQueryForCustomer();
var orgs = await _erpService.BillQueryForOrg();
List<PullDownStrResponse> pullList = new List<PullDownStrResponse>();
foreach (var c in customers.Data)
{
pullList.Add(new PullDownStrResponse()
{
Id = "c_" + c.Id,
Name = c.Name,
Code = c.Number
});
}
foreach (var o in orgs.Data)
{
pullList.Add(new PullDownStrResponse()
{
Id = "o_" + o.Id,
Name = o.Name,
Code = o.Number
});
}
return Result<List<PullDownStrResponse>>.ReSuccess(pullList);
}
/// <summary>
/// 获取仓位:模糊名称
/// </summary>