This commit is contained in:
杰 朱
2021-10-21 11:52:48 +08:00
parent e65a9ca44a
commit 802b5279d4
3 changed files with 161 additions and 35 deletions

View File

@@ -905,65 +905,80 @@ select *from tempdb..tablepzck20210526
// where.Add(" a.iQuantity - isnull(d.cqty,0) >0 and b.cVerifier is not null ");
where.Add(" mm.wfiQuantity >0 and mm.cVerifier is not null ");
if(info1 !=null)
{
if(info1 ==null)
{
info1 = new NX.ERP.Model.Request.SaleinvRequest();
info1.cCusAbbName = null;
info1.dDate = null;
info1.cSOCode = null;
info1.cInvCode = null;
info1.cInvName = null;
info1.cInvStd = null;
info1.cMemo = null;
info1.dPreDate = null;
info1.wfiQuantity = null;
info1.kcyl = null;
info1.jandate = null;
info1.kcyl2 = null;
info1.datewaring = null;
}
if (!string.IsNullOrEmpty(info1.cCusAbbName))
if (!string.IsNullOrEmpty(info1.cCusAbbName))
{
where.Add(" mm.cCusAbbName like @cCusAbbName ");
}
if (!string.IsNullOrEmpty(info1.dDate))
if (!string.IsNullOrEmpty(info1.dDate))
{
where.Add(" mm.dDate = @dDate ");
}
if (!string.IsNullOrEmpty(info1.cSOCode))
if (!string.IsNullOrEmpty(info1.cSOCode))
{
where.Add(" mm.cSOCode = @cSOCode ");
where.Add(" mm.cSOCode like @cSOCode ");
}
if (!string.IsNullOrEmpty(info1.cInvCode))
if (!string.IsNullOrEmpty(info1.cInvCode))
{
where.Add(" mm.cInvCode like @cInvCode ");
}
if (!string.IsNullOrEmpty(info1.cInvName))
if (!string.IsNullOrEmpty(info1.cInvName))
{
where.Add(" mm.cInvName like @cInvName ");
}
if (!string.IsNullOrEmpty(info1.cInvStd))
if (!string.IsNullOrEmpty(info1.cInvStd))
{
where.Add(" mm.cInvStd like @cInvStd ");
}
if (!string.IsNullOrEmpty(info1.cMemo))
if (!string.IsNullOrEmpty(info1.cMemo))
{
where.Add(" mm.cMemo like @cMemo ");
}
if (!string.IsNullOrEmpty(info1.dPreDate))
if (!string.IsNullOrEmpty(info1.dPreDate))
{
where.Add(" mm.dPreDate = @dPreDate ");
}
if (!string.IsNullOrEmpty(info1.wfiQuantity))
if (!string.IsNullOrEmpty(info1.wfiQuantity))
{
where.Add(" mm.wfiQuantity = @wfiQuantity ");
}
if (!string.IsNullOrEmpty(info1.kcyl))
if (!string.IsNullOrEmpty(info1.kcyl))
{
where.Add(" mm.kcyl = @kcyl ");
}
if (!string.IsNullOrEmpty(info1.jandate))
if (!string.IsNullOrEmpty(info1.jandate))
{
where.Add(" mm.jandate = @jandate ");
}
if (!string.IsNullOrEmpty(info1.kcyl2))
if (!string.IsNullOrEmpty(info1.kcyl2))
{
if (info1.kcyl2 == "1")
{
@@ -976,7 +991,7 @@ select *from tempdb..tablepzck20210526
}
if (!string.IsNullOrEmpty(info1.datewaring))
if (!string.IsNullOrEmpty(info1.datewaring))
{
if (info1.datewaring == "1")
{
@@ -1011,7 +1026,7 @@ select *from tempdb..tablepzck20210526
*/
if (info1.flag != null && info1.flag.ToList().Count>0)
if (info1.flag != null && info1.flag.ToList().Count>0)
{
List<string> str = new List<string>();
@@ -1039,8 +1054,8 @@ select *from tempdb..tablepzck20210526
strs = " ( " + strs + " ) ";
where.Add(strs);
}
}
var aa = string.Join(" and ", where.ToArray());
@@ -1051,7 +1066,7 @@ select *from tempdb..tablepzck20210526
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<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, }); }
catch { return null; }
}