@ -7,7 +7,8 @@
a.OutWorkFlag,a.S_ScheduledDate,a.S_ResourceID,a.S_ShiftNo,e.NeedDate,
a.OutWorkFlag,a.S_ScheduledDate,a.S_ResourceID,a.S_ShiftNo,e.NeedDate,
a.S_WorkCenterNo,a.mat_issueflag,a.partNo,b.QtyRequired lastRequireQty,b.QtyReported lastReportQty,
a.S_WorkCenterNo,a.mat_issueflag,a.partNo,b.QtyRequired lastRequireQty,b.QtyReported lastReportQty,
dbo.Get_ProductionLineDesc(a.Site,dbo.Get_WorkCenter_ProLineNo(b.site,b.S_WorkCenterNo)) lastLineName,
dbo.Get_ProductionLineDesc(a.Site,dbo.Get_WorkCenter_ProLineNo(b.site,b.S_WorkCenterNo)) lastLineName,
a.previousSeqNo lastSeqNoDoing,c.operationDesc,d.operationDesc as lastOperationDesc,dbo.Get_ProductionLineDesc(a.Site,dbo.Get_WorkCenter_ProLineNo(a.site,sos.S_WorkCenterNo)) ProductionLineDesc
a.previousSeqNo lastSeqNoDoing,c.operationDesc,d.operationDesc as lastOperationDesc,dbo.Get_ProductionLineDesc(a.Site,dbo.Get_WorkCenter_ProLineNo(a.site,a.S_WorkCenterNo)) ProductionLineDesc
,dbo.Get_OperatorDesc(a.Site,a.operatorId) operatorName
from SOScheduledRouting a left join SOScheduledRouting b on a.Site=b.Site and a.previousSeqNo=b.SeqNo
from SOScheduledRouting a left join SOScheduledRouting b on a.Site=b.Site and a.previousSeqNo=b.SeqNo
left join v_sorouting c on a.Site=c.Site and a.OrderNo=c.OrderNo and a.ItemNo=c.ItemNo
left join v_sorouting c on a.Site=c.Site and a.OrderNo=c.OrderNo and a.ItemNo=c.ItemNo
left join v_sorouting d on b.Site=d.Site and b.OrderNo=d.OrderNo and b.ItemNo=d.ItemNo
left join v_sorouting d on b.Site=d.Site and b.OrderNo=d.OrderNo and b.ItemNo=d.ItemNo
@ -17,6 +18,9 @@
<if test= "text2 != null and text2 != ''" >
<if test= "text2 != null and text2 != ''" >
AND dbo.Get_WorkCenter_ProLineNo(a.Site,a.S_WorkCenterNo) in ${text2}
AND dbo.Get_WorkCenter_ProLineNo(a.Site,a.S_WorkCenterNo) in ${text2}
</if>
</if>
<if test= "text2 == null || text2 == ''" >
AND dbo.Get_WorkCenter_ProLineNo(a.Site,a.S_WorkCenterNo) in ('CX03','CX05','CX06')
</if>
</where>
</where>
order by a.S_ScheduledDate
order by a.S_ScheduledDate
</select>
</select>