diff --git a/NX.ERP.Model/NX.ERP.Model.csproj b/NX.ERP.Model/NX.ERP.Model.csproj index 66faa1b..015a8e3 100644 --- a/NX.ERP.Model/NX.ERP.Model.csproj +++ b/NX.ERP.Model/NX.ERP.Model.csproj @@ -87,8 +87,9 @@ - + + diff --git a/NX.ERP.Model/Response/Pmc/PmcInventoryallsaleRes.cs b/NX.ERP.Model/Response/Pmc/PmcInventoryallsaleRes.cs new file mode 100644 index 0000000..6c3b457 --- /dev/null +++ b/NX.ERP.Model/Response/Pmc/PmcInventoryallsaleRes.cs @@ -0,0 +1,161 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Newtonsoft.Json; +namespace NX.ERP.Model +{ + public class PmcInventoryallsaleRes : BaseModel + { + private string cCusAbbName; + private string dDate; + private string cSoCode; + private string cInvCode; + private string cInvName; + private string cInvStd; + private string wfiQuantity; + private string cCloser; + private string xcl; + private string cVerifier; + private string kcyl; + private string dPreDate; + private string cMemo; + private string datewaring; + private int jandate; + + /// + /// + /// + public string CCusAbbName + { + get { return this.cCusAbbName; } + set { this.cCusAbbName = value; } + } + + /// + /// + /// + public string DDate + { + get { return this.dDate; } + set { this.dDate = value; } + } + + /// + /// + /// + public string CSoCode + { + get { return this.cSoCode; } + set { this.cSoCode = value; } + } + + /// + /// + /// + public string CInvCode + { + get { return this.cInvCode; } + set { this.cInvCode = value; } + } + + /// + /// + /// + public string CInvName + { + get { return this.cInvName; } + set { this.cInvName = value; } + } + + /// + /// + /// + public string CInvStd + { + get { return this.cInvStd; } + set { this.cInvStd = value; } + } + + /// + /// + /// + public string WfiQuantity + { + get { return this.wfiQuantity; } + set { this.wfiQuantity = value; } + } + + /// + /// + /// + public string CCloser + { + get { return this.cCloser; } + set { this.cCloser = value; } + } + + /// + /// + /// + public string Xcl + { + get { return this.xcl; } + set { this.xcl = value; } + } + + /// + /// + /// + public string CVerifier + { + get { return this.cVerifier; } + set { this.cVerifier = value; } + } + + /// + /// + /// + public string Kcyl + { + get { return this.kcyl; } + set { this.kcyl = value; } + } + + /// + /// + /// + public string DPreDate + { + get { return this.dPreDate; } + set { this.dPreDate = value; } + } + + /// + /// + /// + public string CMemo + { + get { return this.cMemo; } + set { this.cMemo = value; } + } + + /// + /// + /// + public string Datewaring + { + get { return this.datewaring; } + set { this.datewaring = value; } + } + + /// + /// + /// + public int Jandate + { + get { return this.jandate; } + set { this.jandate = value; } + } + } +} diff --git a/NX.ERP.U8/Pmc/PmcQuery.cs b/NX.ERP.U8/Pmc/PmcQuery.cs index d9c4ac6..704127d 100644 --- a/NX.ERP.U8/Pmc/PmcQuery.cs +++ b/NX.ERP.U8/Pmc/PmcQuery.cs @@ -852,7 +852,7 @@ select *from tempdb..tablepzck20210526 } - public IEnumerable InventorySale(NX.ERP.Model.Request.SaleinvRequest info1) + public IEnumerable InventorySale(NX.ERP.Model.Request.SaleinvRequest info1) { string sql = $@" select *from ( @@ -1080,7 +1080,7 @@ select *from tempdb..tablepzck20210526 using (var conn = NX.ERP.U8.U8LoginContext.Instance.Connection) { - try { return conn.Query(sql, new { cCusAbbName = $"%{info1.cCusAbbName}%", dDate = info1.dDate, dPreDate = info1.dPreDate, cSOCode = $"%{info1.cSOCode}%" , cInvCode = $"%{info1.cInvCode}%", cInvName = $"%{info1.cInvName}%", cInvStd = $"%{info1.cInvStd}%", cMemo = $"%{info1.cMemo}%", SoCodes = info1.SoCodes, info1.jandate, info1.wfiQuantity, info1.kcyl, }); } + try { return conn.Query(sql, new { cCusAbbName = $"%{info1.cCusAbbName}%", dDate = info1.dDate, dPreDate = info1.dPreDate, cSOCode = $"%{info1.cSOCode}%" , cInvCode = $"%{info1.cInvCode}%", cInvName = $"%{info1.cInvName}%", cInvStd = $"%{info1.cInvStd}%", cMemo = $"%{info1.cMemo}%", SoCodes = info1.SoCodes, info1.jandate, info1.wfiQuantity, info1.kcyl, }); } catch { return null; } } diff --git a/NX.ERP.WebAPi/Controllers/Pmc/PmcController.cs b/NX.ERP.WebAPi/Controllers/Pmc/PmcController.cs index 4e85b97..6296a0a 100644 --- a/NX.ERP.WebAPi/Controllers/Pmc/PmcController.cs +++ b/NX.ERP.WebAPi/Controllers/Pmc/PmcController.cs @@ -47,10 +47,10 @@ namespace NX.ERP.WebAPi.Controllers [HttpPost] [Route("api/Pmc/InventorySale")] - public IEnumerable InventorySale(NX.ERP.Model.Request.SaleinvRequest info1) + public IEnumerable InventorySale(NX.ERP.Model.Request.SaleinvRequest info1) { var PmcQuery = new NX.ERP.U8.Pmc.PmcQuery(); - return PmcQuery.InventorySale(info1); + return PmcQuery.InventorySale(info1).OrderBy(m => m.DPreDate).ThenBy(m => m.CInvStd).ThenBy(m => m.CInvName); } [Obsolete] [HttpPost]