Browse Source

联产品条码生成 获取计划数量时 判断是否开启辅计量 如是根据工单子件汇总的最小比例*辅计量 未开启则*主计量

工单成品与工单子件条码已生成数量分开统计
master
Juj 4 months ago
parent
commit
02644f75eb
  1. 8
      WMS-BS/NFine.Application/OMAY/ICSMoCreateLotApp.cs

8
WMS-BS/NFine.Application/OMAY/ICSMoCreateLotApp.cs

@ -584,7 +584,7 @@ a.InvCode,b.InvName,b.ClassCode,b.InvStd,b.InvUnit, a.Quantity as Quantity,
9999 as AbsolveQty, 9999 as AbsolveQty,
cast( isnull(h.BL,0)*a.Amount AS DECIMAL(18,4)) as AbsolveAmount, cast( isnull(h.BL,0)*a.Amount AS DECIMAL(18,4)) as AbsolveAmount,
cast( isnull(c.LOTQTY,0)+isnull(f.GDQTY,0) as DECIMAL(18,4)) as CreatedQty, cast( isnull(c.LOTQTY,0)+isnull(f.GDQTY,0) as DECIMAL(18,4)) as CreatedQty,
CAST( ((isnull(h.BL,0)*a.Amount) -(isnull(c.LOTQTY,0)+isnull(f.GDQTY,0))) as DECIMAL(18,4)) as thisCreateQty,
CAST( ((isnull(h.BL,0)* case when b.AmountEnable='1' then a.Amount else a.Quantity end) -(isnull(c.LOTQTY,0)+isnull(f.GDQTY,0))) as DECIMAL(18,4)) as thisCreateQty,
cast( a.Amount as DECIMAL(18,4)) as Amount, cast( a.Amount as DECIMAL(18,4)) as Amount,
isnull(b.EffectiveEnable,0) as EffectiveEnable, isnull(b.EffectiveEnable,0) as EffectiveEnable,
cast( isnull(b.EffectiveDays,0) as DECIMAL(18,4)) as EffectiveDays cast( isnull(b.EffectiveDays,0) as DECIMAL(18,4)) as EffectiveDays
@ -605,7 +605,7 @@ where isnull(a.EATTRIBUTE1,'')=''
left join ICSInventoryLotDetail b on a.LotNo=b.LotNo and a.Type='3' left join ICSInventoryLotDetail b on a.LotNo=b.LotNo and a.Type='3'
where isnull(a.EATTRIBUTE1,'')='' where isnull(a.EATTRIBUTE1,'')=''
group by b.TransCode,b.TransSequence group by b.TransCode,b.TransSequence
) f on d.MOCode=f.TransCode and d.Sequence=f.TransSequence
) f on d.MOCode=f.TransCode and d.Sequence+'~'+a.Sequence=f.TransSequence
left join left join
(select case when Flag>0 then ( case when PSLNUM>MLNUM then MLNUM else PSLNUM end) else PSLNUM end as BL ,MODetailID from ( (select case when Flag>0 then ( case when PSLNUM>MLNUM then MLNUM else PSLNUM end) else PSLNUM end as BL ,MODetailID from (
select a.MODetailID, select a.MODetailID,
@ -637,7 +637,7 @@ a.InvCode,b.InvName,b.ClassCode,b.InvStd,b.InvUnit, a.Quantity as Quantity,
9999 as AbsolveQty, 9999 as AbsolveQty,
cast( isnull(h.BL,0)*a.Amount AS DECIMAL(18,4)) as AbsolveAmount, cast( isnull(h.BL,0)*a.Amount AS DECIMAL(18,4)) as AbsolveAmount,
cast( isnull(c.LOTQTY,0)+isnull(f.GDQTY,0) as DECIMAL(18,4)) as CreatedQty, cast( isnull(c.LOTQTY,0)+isnull(f.GDQTY,0) as DECIMAL(18,4)) as CreatedQty,
CAST( ((isnull(h.BL,0)*a.Amount) -(isnull(c.LOTQTY,0)+isnull(f.GDQTY,0))) as DECIMAL(18,4)) as thisCreateQty,
CAST( ((isnull(h.BL,0)* case when b.AmountEnable='1' then a.Amount else a.Quantity end ) -(isnull(c.LOTQTY,0)+isnull(f.GDQTY,0))) as DECIMAL(18,4)) as thisCreateQty,
cast( a.Amount as DECIMAL(18,4)) as Amount, cast( a.Amount as DECIMAL(18,4)) as Amount,
isnull(b.EffectiveEnable,0) as EffectiveEnable, isnull(b.EffectiveEnable,0) as EffectiveEnable,
cast( isnull(b.EffectiveDays,0) as DECIMAL(18,4)) as EffectiveDays cast( isnull(b.EffectiveDays,0) as DECIMAL(18,4)) as EffectiveDays
@ -658,7 +658,7 @@ where isnull(a.EATTRIBUTE1,'')=''
left join ICSInventoryLotDetail b on a.LotNo=b.LotNo and a.Type='3' left join ICSInventoryLotDetail b on a.LotNo=b.LotNo and a.Type='3'
where isnull(a.EATTRIBUTE1,'')='' where isnull(a.EATTRIBUTE1,'')=''
group by b.TransCode,b.TransSequence group by b.TransCode,b.TransSequence
) f on d.MOCode=f.TransCode and d.Sequence=f.TransSequence
) f on d.MOCode=f.TransCode and d.Sequence+'~'+a.Sequence=f.TransSequence
left join left join
(select MinBL as BL ,MODetailID from ( (select MinBL as BL ,MODetailID from (
select a.MODetailID, select a.MODetailID,

Loading…
Cancel
Save