From 7e893db7692dfcb242ddc369e0b398bc7be463f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=B0=20=E6=9C=B1?= <501697962@qq.com> Date: Thu, 4 Nov 2021 09:29:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BE=9B=E5=AD=98=E8=B4=A7=E5=87=BA?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E9=A2=91=E6=AC=A1=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NX.ERP.Model/Response/Store/Stock.cs | 25 +++++++++++++++++++ NX.ERP.U8/Store/StockDAL.cs | 14 +++++++++++ .../Controllers/Store/StockController.cs | 8 ++++++ 3 files changed, 47 insertions(+) diff --git a/NX.ERP.Model/Response/Store/Stock.cs b/NX.ERP.Model/Response/Store/Stock.cs index 71c9244..05242c4 100644 --- a/NX.ERP.Model/Response/Store/Stock.cs +++ b/NX.ERP.Model/Response/Store/Stock.cs @@ -24,4 +24,29 @@ namespace NX.ERP.Model.Response.Store public decimal ArrivalQty { get => arrivalQty; set => arrivalQty = value; } public decimal PoQty { get => poQty; set => poQty = value; } } + + + + public class Stockinouttimes + { + + + + public string cInvCode { get; set; } + + + public string cInvName { get; set; } + + public string cInvStd { get; set; } + + public string stockout { get; set; } + + public string stockin { get; set; } + + + public decimal iQuantity { get; set; } + + + + } } diff --git a/NX.ERP.U8/Store/StockDAL.cs b/NX.ERP.U8/Store/StockDAL.cs index af6017d..fd9cfb3 100644 --- a/NX.ERP.U8/Store/StockDAL.cs +++ b/NX.ERP.U8/Store/StockDAL.cs @@ -142,5 +142,19 @@ left join } + + + public IEnumerable GetStockinouttimes(string starttime = "19991231" , string endtime="20991231", string invcode = null ) + { + using (var conn = U8LoginContext.Instance.Connection) + { + string sql = " SP_CurrentStock_crpd20211011 @starttime,@endtime ,@invcode "; + + return conn.Query(sql,new { starttime, endtime, invcode }); + } + + } + + } } diff --git a/NX.ERP.WebAPi/Controllers/Store/StockController.cs b/NX.ERP.WebAPi/Controllers/Store/StockController.cs index 2bcdbae..98b5d92 100644 --- a/NX.ERP.WebAPi/Controllers/Store/StockController.cs +++ b/NX.ERP.WebAPi/Controllers/Store/StockController.cs @@ -48,5 +48,13 @@ namespace NX.ERP.WebAPi.Controllers.Store } + [HttpPost] + [Route("api/Stock/GetStockinouttimes")] + public IEnumerable GetStockinouttimes(string starttime = "19991231", string endtime = "20991231", string invcode = null) + { + return new U8.Store.StockDAL().GetStockinouttimes(starttime, endtime, invcode); + } + + } } \ No newline at end of file