From 5a0388ce093e5b3286f95449dbf251432b54f7d7 Mon Sep 17 00:00:00 2001 From: 18942506660 <18942506660@A18942506660> Date: Thu, 9 Nov 2023 11:24:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AD=90=E4=BB=93=E5=BA=93?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/WMS.Web.Api/Controllers/SysConfigController.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/WMS.Web.Api/Controllers/SysConfigController.cs b/src/WMS.Web.Api/Controllers/SysConfigController.cs index ea665c6a..54996575 100644 --- a/src/WMS.Web.Api/Controllers/SysConfigController.cs +++ b/src/WMS.Web.Api/Controllers/SysConfigController.cs @@ -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 /// 根据仓库获取金蝶子仓库 /// /// 仓库id + /// 模糊匹配 /// [HttpGet] [Route("GetErp_SubUcStock/{id}")] - public async Task>> GetErp_SubUcStock([FromRoute] int id) + public async Task>> 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() {