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