S_WorkCenterNo, EnteredDate,scheduleType,operatorId,partNo,dbo.Get_PartDesc(Site,partNo) as partDesc,
dbo.Get_OperatorDesc(Site,operatorId) as operatorName,dbo.Get_ItemDesc(site,orderRef1) as itemDesc,orderRef1 ,
dbo.Get_OperatorDesc(Site,operatorId) as operatorName,dbo.Get_ItemDesc(site,OrderNo) as itemDesc,orderRef1 ,
dbo.Get_WorkCenterDesc(Site,S_WorkCenterNo) as workCenterDesc , dbo.Get_Part_DescSpec(Site,partNo) as partSpec,circulation_seqNo,circulation_qty from SOScheduledRouting
<where>
<iftest="site != null and site != ''">
@ -485,9 +485,7 @@
site=#{site} and seqNo=#{seqNo}
</select>
<selectid="getNextSeqNo"resultType="Integer">
select isnull(Max(SeqNo),0)+1 from SOScheduledRouting where site=#{site}
</select>
<updateid="closeOldSchedule">
update SOScheduledRouting set ClosedFlag='Y',circulation_seqNo=#{newSeqNo},circulation_qty=#{circulationQty} where site=#{site} and seqNo=#{oldSeqNo}