修改接口参数
This commit is contained in:
@@ -97,7 +97,7 @@ namespace NX.ERP.U8.Pmc
|
||||
where.Add(" c.cinvcode in @cinvcode");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -341,7 +341,7 @@ namespace NX.ERP.U8.Pmc
|
||||
}
|
||||
|
||||
|
||||
public IEnumerable<object> Inventorysocode(NX.ERP.Model.Request.Inventoryall info1)
|
||||
public IEnumerable<object> Inventorysocode(NX.ERP.Model.Request.SaleOrderRequest info1)
|
||||
{
|
||||
string sql = $@"
|
||||
select j.cSTName,b.cSOCode,b.dDate,a.iRowNo,f.cCusAbbName,a.cInvCode,a.cInvName,g.cInvStd,a.iQuantity, h.dDate as fhdDate ,isnull(c.fqty,0)fqty,isnull(d.cqty,0)cqty
|
||||
@@ -380,11 +380,23 @@ namespace NX.ERP.U8.Pmc
|
||||
{
|
||||
where.Add(" g.cInvStd like @cInvStd ");
|
||||
}
|
||||
if (!string.IsNullOrEmpty(info1.SoCode))
|
||||
if (info1.SoCodes != null)
|
||||
{
|
||||
where.Add(" b.cSOCode like @cSOCode ");
|
||||
where.Add(" b.cSOCode in @cSOCode ");
|
||||
}
|
||||
|
||||
if (info1.BeginDate != null && info1.EndDate != null)
|
||||
{
|
||||
where.Add(" b.dDate between @beginDate and @endDate ");
|
||||
|
||||
}
|
||||
|
||||
if (!info1.byFinish)
|
||||
{
|
||||
where.Add(" h.dDate is null ");
|
||||
}
|
||||
|
||||
|
||||
var aa = string.Join(" and ", where.ToArray());
|
||||
|
||||
if (!string.IsNullOrEmpty(aa))
|
||||
@@ -394,7 +406,7 @@ namespace NX.ERP.U8.Pmc
|
||||
|
||||
using (var conn = NX.ERP.U8.U8LoginContext.Instance.Connection)
|
||||
{
|
||||
return conn.Query<object>(sql, new { cinvcode = info1.InvCodes, cInvStd = $"%{info1.InvStd}%", cSOCode = $"%{info1.SoCode}%" });
|
||||
return conn.Query<object>(sql, new { cinvcode = info1.InvCodes, cInvStd = $"%{info1.InvStd}%", cSOCode = info1.SoCodes, info1.BeginDate, info1.EndDate });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user