BOM 和MO 添加名称个物料规格

This commit is contained in:
gongxh
2021-06-04 14:48:56 +08:00
parent 43b9e3473a
commit cd8d10ddae
8 changed files with 36 additions and 28 deletions

View File

@@ -20,20 +20,21 @@ 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,CONVERT(BIGINT,a.Ufts) AS pubufts,a.CreateDate as ProductDate,a.CreateUser as PreparedBy,
string strSQL = @" select 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,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,
a.CreateDate as ProductOrderDate,b.InvCode as ProductCode,b.Qty as Qty,b.SortSeq,b.SoCode,b.Status,InvDetail.cInvName as ProductName ,InvDetail.cInvStd ProductSpecsModel,
c.AllocateId as id ,c.AllocateId as AllocateId,c.MoDId as ProductOrderDtlId,c.InvCode as MaterialCode,InvLocate.cInvName as MaterialName,InvLocate.cInvStd as MaterialSpecsModel,b.MoId as ProductOrderId, c.IssQty as IssQty,c.Qty,
e.cInvSN as ID
from mom_order as a
left join mom_orderdetail as b on a.MoId=b.MoId
left join mom_morder as d on b.MoDId=d.MoDId
left join mom_SNDetail as e on b.MoDId=e.iVouchsID
left join mom_moallocate as c on b.MoDId=c.MoDId ";
left join mom_moallocate as c on b.MoDId=c.MoDId
left join Inventory as InvDetail on b.InvCode =InvDetail.cInvCode
left join Inventory as InvLocate on c.InvCode =InvLocate.cInvCode where b.Status<>'4' ";
if (!string.IsNullOrEmpty(strWhere))
{
strSQL += $" where {strWhere} ";
strSQL += $" and {strWhere} ";
}
var lookupDetail = new Dictionary<int, Model.MOM.MomDetail>();
var lookupOrder = new Dictionary<int, Model.MOM.MomOrder>();
@@ -98,7 +99,7 @@ namespace NX.ERP.U8.Mom
if (!string.IsNullOrEmpty(Params.ProductCode))
{
where.Add(" a.InvCode like @ProductCode");
where.Add(" b.InvCode like @ProductCode");
}
if (!string.IsNullOrEmpty(Params.ProductOrderNo))
{
@@ -111,7 +112,7 @@ namespace NX.ERP.U8.Mom
if (Params.ModifyDate != null)
{
where.Add(" ISNULL( a.ModifyDate,createDate) >= @ModifyDate or a.RelsTime>=@ModifyDate ");
where.Add(" ISNULL( b.ModifyDate,createDate) >= @ModifyDate or b.RelsTime>=@ModifyDate ");
}