This commit is contained in:
杰 朱
2021-12-06 16:25:48 +08:00
parent 319c8860fc
commit 1c4a7994ee
4 changed files with 167 additions and 5 deletions

View File

@@ -87,8 +87,9 @@
<Compile Include="Request\Stock.cs" /> <Compile Include="Request\Stock.cs" />
<Compile Include="Request\Userrequest.cs" /> <Compile Include="Request\Userrequest.cs" />
<Compile Include="Response\MOM\Bom.cs" /> <Compile Include="Response\MOM\Bom.cs" />
<Compile Include="Response\Pmc\PmcWwInvlRes.cs" />
<Compile Include="Response\Pmc\PmcInventoryallRes.cs" /> <Compile Include="Response\Pmc\PmcInventoryallRes.cs" />
<Compile Include="Response\Pmc\PmcWwInvlRes.cs" />
<Compile Include="Response\Pmc\PmcInventoryallsaleRes.cs" />
<Compile Include="Response\Pmc\PmcInventorymomRes.cs" /> <Compile Include="Response\Pmc\PmcInventorymomRes.cs" />
<Compile Include="Response\Qmcheck\Qmcheckvoucher.cs" /> <Compile Include="Response\Qmcheck\Qmcheckvoucher.cs" />
<Compile Include="Response\Store\MaterialApp.cs" /> <Compile Include="Response\Store\MaterialApp.cs" />

View File

@@ -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;
/// <summary>
///
/// </summary>
public string CCusAbbName
{
get { return this.cCusAbbName; }
set { this.cCusAbbName = value; }
}
/// <summary>
///
/// </summary>
public string DDate
{
get { return this.dDate; }
set { this.dDate = value; }
}
/// <summary>
///
/// </summary>
public string CSoCode
{
get { return this.cSoCode; }
set { this.cSoCode = value; }
}
/// <summary>
///
/// </summary>
public string CInvCode
{
get { return this.cInvCode; }
set { this.cInvCode = value; }
}
/// <summary>
///
/// </summary>
public string CInvName
{
get { return this.cInvName; }
set { this.cInvName = value; }
}
/// <summary>
///
/// </summary>
public string CInvStd
{
get { return this.cInvStd; }
set { this.cInvStd = value; }
}
/// <summary>
///
/// </summary>
public string WfiQuantity
{
get { return this.wfiQuantity; }
set { this.wfiQuantity = value; }
}
/// <summary>
///
/// </summary>
public string CCloser
{
get { return this.cCloser; }
set { this.cCloser = value; }
}
/// <summary>
///
/// </summary>
public string Xcl
{
get { return this.xcl; }
set { this.xcl = value; }
}
/// <summary>
///
/// </summary>
public string CVerifier
{
get { return this.cVerifier; }
set { this.cVerifier = value; }
}
/// <summary>
///
/// </summary>
public string Kcyl
{
get { return this.kcyl; }
set { this.kcyl = value; }
}
/// <summary>
///
/// </summary>
public string DPreDate
{
get { return this.dPreDate; }
set { this.dPreDate = value; }
}
/// <summary>
///
/// </summary>
public string CMemo
{
get { return this.cMemo; }
set { this.cMemo = value; }
}
/// <summary>
///
/// </summary>
public string Datewaring
{
get { return this.datewaring; }
set { this.datewaring = value; }
}
/// <summary>
///
/// </summary>
public int Jandate
{
get { return this.jandate; }
set { this.jandate = value; }
}
}
}

View File

@@ -852,7 +852,7 @@ select *from tempdb..tablepzck20210526
} }
public IEnumerable<object> InventorySale(NX.ERP.Model.Request.SaleinvRequest info1) public IEnumerable<NX.ERP.Model.PmcInventoryallsaleRes> InventorySale(NX.ERP.Model.Request.SaleinvRequest info1)
{ {
string sql = $@" string sql = $@"
select *from ( select *from (
@@ -1080,7 +1080,7 @@ select *from tempdb..tablepzck20210526
using (var conn = NX.ERP.U8.U8LoginContext.Instance.Connection) using (var conn = NX.ERP.U8.U8LoginContext.Instance.Connection)
{ {
try { return conn.Query<object>(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<NX.ERP.Model.PmcInventoryallsaleRes>(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; } catch { return null; }
} }

View File

@@ -47,10 +47,10 @@ namespace NX.ERP.WebAPi.Controllers
[HttpPost] [HttpPost]
[Route("api/Pmc/InventorySale")] [Route("api/Pmc/InventorySale")]
public IEnumerable<object> InventorySale(NX.ERP.Model.Request.SaleinvRequest info1) public IEnumerable<NX.ERP.Model.PmcInventoryallsaleRes> InventorySale(NX.ERP.Model.Request.SaleinvRequest info1)
{ {
var PmcQuery = new NX.ERP.U8.Pmc.PmcQuery(); 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] [Obsolete]
[HttpPost] [HttpPost]