| and t1.Layer=t2.Layer
and t2.IsInSC <> 1
and t1.Qnty>0
and t1.ProcCode not in(''''990'''',''''000'''')
and t1.Partnum = t3.Partnum
and t1.Revision = t3.Revision
--and t1.Layer = t3.Layer
and t2.PoNum*=t4.PoNum
and t2.Poitem *=t4.SerialNum
and t1.ProcCode = t6.ProcCode
and t5.Id = t6.Id
and (( t1.PartNum >= @InBPartnum or @InBPartnum='''''''')
and (t1.PartNum <= @InEPartnum or @InEPartnum=''''''''))
and ((t1.Revision = @InBRevision or @InBRevision ='''''''')
and (t1.Revision = @InERevision or @InERevision =''''''''))
Group By t1.Partnum, t1.Revision,
t3.LPiece , t3.LLPiece , t5.Id ,t5.name
Order By t5.Id , t1.partnum
/*wip完整性生成*/
Declare @CheckPartNum varchar(20) , @CheckRevision varchar(5)
Declare @WipProcCode varchar(20) , @WipId varchar(5)
Select Top 1 @CheckPartNum= Partnum , @CheckRevision = Revision From #tmpStknwip
DECLARE CheckWip INSENSITIVE CURSOR
FOR
Select ProcName = RTrim(LTrim(t1.Name)) , Id = RTrim(LTrim(t1.Id))
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>
|