调整子仓库接口
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -121,10 +122,11 @@ namespace WMS.Web.Api.Controllers
|
||||
/// 根据仓库获取金蝶子仓库
|
||||
/// </summary>
|
||||
/// <param name="id">仓库id</param>
|
||||
/// <param name="name">模糊匹配</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[Route("GetErp_SubUcStock/{id}")]
|
||||
public async Task<Result<List<UcStockResponse>>> GetErp_SubUcStock([FromRoute] int id)
|
||||
public async Task<Result<List<UcStockResponse>>> GetErp_SubUcStock([FromRoute] int id, [FromQuery] string name)
|
||||
{
|
||||
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
|
||||
if (loginInfo == null || loginInfo.UserInfo == null)
|
||||
@@ -135,7 +137,7 @@ namespace WMS.Web.Api.Controllers
|
||||
if (code.Substring(0, 2).Equals("HD") || code.Substring(0, 2).Equals("GD"))
|
||||
{
|
||||
var subs = await _erpService.BillQueryForSubStock(code);
|
||||
foreach (var s in subs.Data)
|
||||
foreach (var s in subs.Data.Where(w=> EF.Functions.Like(w.Name, "%" + name + "%")))
|
||||
{
|
||||
list.Add(new UcStockResponse()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user