This commit is contained in:
gongxh
2021-05-24 14:59:32 +08:00
parent 08dd23a9c6
commit c968d25062
8 changed files with 62 additions and 32 deletions

View File

@@ -30,10 +30,10 @@ namespace NX.ERP.U8.Mom
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 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>();
@@ -59,7 +59,10 @@ namespace NX.ERP.U8.Mom
{
OrderDetail = momDetail;
}
OrderDetail.SN.Add(SN);
if (SN != null)
{
OrderDetail.SN.Add(SN);
}
Order.Allocates.Add(MoAllocate);
OrderDetail.ProductAllocateOrderLst.Add(MoAllocate);
MoAllocate.momDetail = OrderDetail;
@@ -162,9 +165,7 @@ namespace NX.ERP.U8.Mom
a.MoId as id ,a.MoDId as ProductOrderDtlId,a.MoId as ProductOrderId,a.MoCode as ProductOrderNo,a.MakeDate as ProductOrderDate,a.InvCode as ProductCode,a.Qty as Qty
FROM v_st_mom_orderdetail a with (nolock) Where ( (1>0) AND (1>0) )
AND ( 1>0 ) and (case when ISNULL(SfcFlag,0)=1 then iquantity+QualifiedInQty else 1 end)<>0
and ISNULL(QCFLAG,0)=0 and ISNULL(Status,0) = 3 and (ISNULL(iQuantity,0))>0 and isnull(MrpQty,0)<>0 and 1=1
";
and ISNULL(QCFLAG,0)=0 and ISNULL(Status,0) = 3 and (ISNULL(iQuantity,0))>0 and isnull(MrpQty,0)<>0 and 1=1";
if (!string.IsNullOrEmpty(strWhere))
{
strSQL += $" and {strWhere} ";