修复错误

This commit is contained in:
admin
2021-01-22 13:48:45 +08:00
parent 81a2b8e614
commit b6f3578e51
3 changed files with 8 additions and 8 deletions

View File

@@ -36,12 +36,12 @@ namespace NX.ERP.U8
where.Add(" cInvCName like @MaterielTypeName "); where.Add(" cInvCName like @MaterielTypeName ");
} }
if (materielType.MaterialTypeGrade.HasValue) if (!materielType.MaterialTypeGrade.HasValue)
{ {
where.Add(" iInvCGrade=@Level "); where.Add(" iInvCGrade=@Level ");
} }
if (materielType.MaterialTypeIsend.HasValue) if (!materielType.MaterialTypeIsend.HasValue)
{ {
where.Add(" bInvCEnd=@MaterialTypeIsend "); where.Add(" bInvCEnd=@MaterialTypeIsend ");
} }

View File

@@ -26,7 +26,7 @@ namespace NX.ERP.U8
{ {
sql += $" where {strWhere}"; sql += $" where {strWhere}";
} }
return conn.Query<Supplier>(sql, null); return conn.Query<Supplier>(sql, Param);
} }
} }
@@ -34,13 +34,13 @@ namespace NX.ERP.U8
public IEnumerable<Supplier> GetList(NX.ERP.Model.Request.Supplier Params) public IEnumerable<Supplier> GetList(NX.ERP.Model.Request.Supplier Params)
{ {
IList<string> where = new List<string>(); IList<string> where = new List<string>();
if (string.IsNullOrEmpty(Params.SupplierCode)) if (!string.IsNullOrEmpty(Params.SupplierCode))
{ {
where.Add(" cVenCode like @SupplierCode "); where.Add(" cVenCode like @SupplierCode ");
} }
if (string.IsNullOrEmpty(Params.SupplierName)) if (!string.IsNullOrEmpty(Params.SupplierName))
{ {
where.Add(" cVenName like @SupplierName "); where.Add(" cVenName like @SupplierName ");
} }

View File

@@ -21,7 +21,7 @@ namespace NX.ERP.U8
{ {
sql += $" where {strWhere}"; sql += $" where {strWhere}";
} }
return conn.Query<Unit>(sql, null); return conn.Query<Unit>(sql, Param);
} }
} }
@@ -29,13 +29,13 @@ namespace NX.ERP.U8
public IEnumerable<Unit> GetList(NX.ERP.Model.Request.Unit Params) public IEnumerable<Unit> GetList(NX.ERP.Model.Request.Unit Params)
{ {
IList<string> where = new List<string>(); IList<string> where = new List<string>();
if (string.IsNullOrEmpty(Params.UnitCode)) if (!string.IsNullOrEmpty(Params.UnitCode))
{ {
where.Add(" cComunitCode like @UnitCode "); where.Add(" cComunitCode like @UnitCode ");
} }
if (string.IsNullOrEmpty(Params.UnitName)) if (!string.IsNullOrEmpty(Params.UnitName))
{ {
where.Add(" cComUnitName like @UnitName "); where.Add(" cComUnitName like @UnitName ");
} }