From 2a1985c7cfcd8a7c1ce807284e338c1df75ac600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=B0=20=E6=9C=B1?= <501697962@qq.com> Date: Wed, 12 May 2021 17:01:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E6=96=99=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NX.ERP.Model/Request/Inventoryall.cs | 2 ++ NX.ERP.U8/Pmc/PmcQuery.cs | 19 +++++++++++++++++++ .../Controllers/Pmc/PmcController.cs | 9 +++++++++ 3 files changed, 30 insertions(+) diff --git a/NX.ERP.Model/Request/Inventoryall.cs b/NX.ERP.Model/Request/Inventoryall.cs index cf7ec6c..ba6a76f 100644 --- a/NX.ERP.Model/Request/Inventoryall.cs +++ b/NX.ERP.Model/Request/Inventoryall.cs @@ -13,5 +13,7 @@ namespace NX.ERP.Model.Request public string SoCode { get; set; } + public List inumsc { get; set; } + } } diff --git a/NX.ERP.U8/Pmc/PmcQuery.cs b/NX.ERP.U8/Pmc/PmcQuery.cs index c200145..200c8c5 100644 --- a/NX.ERP.U8/Pmc/PmcQuery.cs +++ b/NX.ERP.U8/Pmc/PmcQuery.cs @@ -419,6 +419,25 @@ namespace NX.ERP.U8.Pmc } } + public IEnumerable Inventorybu(NX.ERP.Model.Request.Inventoryall info1) + { + + + using (var conn = NX.ERP.U8.U8LoginContext.Instance.Connection) + { + DynamicParameters sp = new DynamicParameters(info1); + var sql = $@"Usp_BO_ExpandByParent_BU_20210208 "; + foreach (var item in info1.inumsc) + { + + sql = sql +"'"+ item + "'" + ","; } + sql = sql.Substring(0, sql.Length - 1); + + + return conn.Query(sql, new { inumsc = info1.inumsc }); + } + } + } } diff --git a/NX.ERP.WebAPi/Controllers/Pmc/PmcController.cs b/NX.ERP.WebAPi/Controllers/Pmc/PmcController.cs index 3a1e752..c6b26db 100644 --- a/NX.ERP.WebAPi/Controllers/Pmc/PmcController.cs +++ b/NX.ERP.WebAPi/Controllers/Pmc/PmcController.cs @@ -44,6 +44,15 @@ namespace NX.ERP.WebAPi.Controllers } + [HttpPost] + [Route("api/Pmc/Inventorybu")] + public IEnumerable Inventorybu(NX.ERP.Model.Request.Inventoryall info) + { + var PmcQuery = new NX.ERP.U8.Pmc.PmcQuery(); + return PmcQuery.Inventorybu(info); + } + + } } \ No newline at end of file