修改
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
}); ;
|
||||
|
||||
|
||||
@@ -21,9 +21,9 @@ namespace NX.ERP.U8.Mom
|
||||
using (var conn = U8LoginContext.Instance.Connection)
|
||||
{
|
||||
string strSQL = @"select
|
||||
a.MoId as ProductOrderId,a.moCode as ProductOrderNo,ISNULL( ModifyDate,createDate) as ModifyDate,a.CreateDate as ProductDate,a.CreateUser as PreparedBy,
|
||||
a.MoId as ProductOrderId,a.moCode as ProductOrderNo,ISNULL( ModifyDate,createDate) as ModifyDate,CONVERT(BIGINT,a.Ufts) AS pubufts,a.CreateDate as ProductDate,a.CreateUser as PreparedBy,
|
||||
b.MoId as id ,b.MoDId as ProductOrderDtlId,b.MoId as ProductOrderId,b.MoTypeId,d.DueDate,ISNULL( b.MDeptCode,'53') as MDeptCode,a.MoCode as ProductOrderNo,
|
||||
a.CreateDate as ProductOrderDate,b.InvCode as ProductCode,b.Qty as Qty,b.SortSeq,b.SoCode,
|
||||
a.CreateDate as ProductOrderDate,b.InvCode as ProductCode,b.Qty as Qty,b.SortSeq,b.SoCode,b.Status,
|
||||
c.AllocateId as id ,c.AllocateId as AllocateId,c.MoDId as ProductOrderDtlId,c.InvCode as MaterialCode,b.MoId as ProductOrderId, c.IssQty as IssQty,c.Qty,
|
||||
e.cInvSN as ID
|
||||
from mom_order as a
|
||||
@@ -101,7 +101,14 @@ namespace NX.ERP.U8.Mom
|
||||
|
||||
if (Params.ModifyDate!=null)
|
||||
{
|
||||
where.Add(" ISNULL( a.ModifyDate,createDate) >= @ModifyDate ");
|
||||
where.Add(" ISNULL( a.ModifyDate,createDate) >= @ModifyDate or a.RelsTime>=@ModifyDate ");
|
||||
}
|
||||
|
||||
|
||||
if (Params.Pubufts != null)
|
||||
{
|
||||
where.Add("CONVERT(BIGINT,a.Ufts) >=@Pubufts ");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +117,8 @@ namespace NX.ERP.U8.Mom
|
||||
ProductCode = $"%{Params.ProductCode}%",
|
||||
ProductOrderNo = $"{Params.ProductOrderNo}",
|
||||
Params.ProductOrderendID,
|
||||
Params.ModifyDate
|
||||
Params.ModifyDate,
|
||||
Params.Pubufts
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user