修正API

This commit is contained in:
gongxh
2021-05-21 13:06:45 +08:00
parent edae082c51
commit 4abb93fd80
23 changed files with 201 additions and 28 deletions

View File

@@ -54,5 +54,47 @@ namespace NX.ERP.U8.Mom
}
public IEnumerable<NX.ERP.Model.Response.MOM.Bom> GetList(NX.ERP.Model.Request.Bom bom)
{
List<string> where = new List<string>();
if (!string.IsNullOrEmpty(bom.ParentCode))
{
where.Add(" c.InvCode = @ParentCode ");
}
if (!string.IsNullOrEmpty(bom.VersionDesc))
{
where.Add(" a.VersionDesc like @VersionDesc ");
}
if (bom.BomType.HasValue)
{
where.Add(" a.BomType = @BomType ");
}
if (bom.Version.HasValue)
{
where.Add(" a.Version = @Version ");
}
return this.GetList(string.Join(" and ", where.ToArray()), new
{
ParentCode = bom.ParentCode,
VersionDesc =$"%{bom.VersionDesc}%",
BomType = bom.BomType,
Version =bom.Version,
}); ;
}
}
}