This commit is contained in:
gongxh
2021-06-03 12:06:26 +08:00
parent 90a28851f8
commit 9eeda5bf94
8 changed files with 44 additions and 10 deletions

View File

@@ -18,7 +18,7 @@ namespace NX.ERP.U8.Mom
/// <returns></returns>
public IEnumerable<NX.ERP.Model.Response.MOM.Bom> GetList(string strWhere="", object Params = null)
{
var strSQL = @"select ISNULL(a.ModifyDate,CreateDate) ModifyDate,a.BomId,a.Version, a.VersionDesc,a.BomType,c.InvCode as ParentCode ,' ' as id ,d.BomId, d.SortSeq,
var strSQL = @"select ISNULL(a.ModifyDate,CreateDate) ModifyDate,CONVERT(BIGINT,a.Ufts) AS pubufts,a.BomId,a.Version,a.Status, a.VersionDesc,a.BomType,c.InvCode as ParentCode ,' ' as id ,d.BomId, d.SortSeq,
e.InvCode as ComponentCode ,d.BaseQtyN, d.BaseQtyD ,f.WIPType,d.EffBegDate,d.EffEndDate from bom_bom as a
left join bom_parent as b on a.BomId=b.BomId
left join bas_part as c on b.ParentId=c.PartId
@@ -82,18 +82,28 @@ namespace NX.ERP.U8.Mom
if (bom.ModifyDate!=null)
{
where.Add(" ISNULL(a.ModifyDate,CreateDate) >=@ModifyDate ");
where.Add(" ISNULL(a.ModifyDate,CreateDate) >=@ModifyDate or a.RelsTime>=@ModifyDate ");
}
if (bom.Pubufts != null)
{
where.Add("CONVERT(BIGINT,a.Ufts) >=@Pubufts ");
}
return this.GetList(string.Join(" and ", where.ToArray()), new
{
ParentCode = bom.ParentCode,
VersionDesc =$"%{bom.VersionDesc}%",
BomType = bom.BomType,
Version =bom.Version,
bom.ModifyDate
bom.ModifyDate,
bom.Pubufts
}); ;