diff --git a/src/main/resources/mapper/board/BoardMapper.xml b/src/main/resources/mapper/board/BoardMapper.xml index 7b76fa5..5c638ab 100644 --- a/src/main/resources/mapper/board/BoardMapper.xml +++ b/src/main/resources/mapper/board/BoardMapper.xml @@ -104,8 +104,8 @@ a.QtyReported,a.QtyApprove,isnull(SOP.TotalFinishedQty,0) lastApproveQty,b.NeedDate as planFinishTime,dbo.Get_SORouting_ClosedFlag(a.site,a.OrderNo,a.ItemNo) as ClosedFlag from SORouting a left join ShopOrder b on a.site=b.site and a.orderNo=b.orderNo LEFT JOIN SORoutingOutput SOP ON a.site=SOP.site and a.OrderNo=SOP.OrderNo and SOP.itemNo=dbo.Get_SORouting_PreviousOperationItemNo(a.site,a.OrderNo,a.itemNo) - where b.E_Levels =0 and (b.status not in ('已取消','已关闭','已停工') and a.QtyRequired>a.QtyReported ) and dbo.Get_WorkCenter_ProLineNo(a.site,a.WorkCenterNo)='TRIMMING' - and( (isnull(SOP.TotalFinishedQty,0)>0 and isnull(SOP.TotalFinishedQty,0)>a.QtyReported) or a.itemNo=10) + where b.E_Levels =0 and (b.status not in ('已取消','已关闭','已停工','已计划') and a.QtyRequired>a.QtyReported ) and dbo.Get_WorkCenter_ProLineNo(a.site,a.WorkCenterNo)='TRIMMING' + and( (isnull(SOP.TotalFinishedQty,0)>0 and isnull(SOP.TotalFinishedQty,0)>a.QtyReported) or a.itemNo=10) and b.enterDate>'2022-01-01' order by planFinishTime @@ -114,8 +114,8 @@ a.QtyReported,a.QtyApprove,isnull(SOP.TotalFinishedQty,0) lastApproveQty,b.NeedDate as planFinishTime,dbo.Get_SORouting_ClosedFlag(a.site,a.OrderNo,a.ItemNo) as ClosedFlag from SORouting a left join ShopOrder b on a.site=b.site and a.orderNo=b.orderNo LEFT JOIN SORoutingOutput SOP ON a.site=SOP.site and a.OrderNo=SOP.OrderNo and SOP.itemNo=dbo.Get_SORouting_PreviousOperationItemNo(a.site,a.OrderNo,a.itemNo) - where b.E_Levels =0 and (b.status not in ('已取消','已关闭','已停工') and a.QtyRequired>a.QtyReported) and dbo.Get_WorkCenter_ProLineNo(a.site,a.WorkCenterNo)='INSPECT' - and( (isnull(SOP.TotalFinishedQty,0)>0 and isnull(SOP.TotalFinishedQty,0)>a.QtyReported) or a.itemNo=10) + where b.E_Levels =0 and (b.status not in ('已取消','已关闭','已停工','已计划') and a.QtyRequired>a.QtyReported) and dbo.Get_WorkCenter_ProLineNo(a.site,a.WorkCenterNo)='INSPECT' + and( (isnull(SOP.TotalFinishedQty,0)>0 and isnull(SOP.TotalFinishedQty,0)>a.QtyReported) or a.itemNo=10) and b.enterDate>'2022-01-01' order by planFinishTime @@ -124,8 +124,8 @@ a.QtyReported,a.QtyApprove,isnull(SOP.TotalFinishedQty,0) lastApproveQty,b.NeedDate as planFinishTime,dbo.Get_SORouting_ClosedFlag(a.site,a.OrderNo,a.ItemNo) as ClosedFlag from SORouting a left join ShopOrder b on a.site=b.site and a.orderNo=b.orderNo LEFT JOIN SORoutingOutput SOP ON a.site=SOP.site and a.OrderNo=SOP.OrderNo and SOP.itemNo=dbo.Get_SORouting_PreviousOperationItemNo(a.site,a.OrderNo,a.itemNo) - where b.E_Levels =0 and (b.status not in ('已取消','已关闭','已停工') and a.QtyRequired>a.QtyReported) and dbo.Get_WorkCenter_ProLineNo(a.site,a.WorkCenterNo)='TREAT' - and( (isnull(SOP.TotalFinishedQty,0)>0 and isnull(SOP.TotalFinishedQty,0)>a.QtyReported) or a.itemNo=10) + where b.E_Levels =0 and (b.status not in ('已取消','已关闭','已停工','已计划') and a.QtyRequired>a.QtyReported) and dbo.Get_WorkCenter_ProLineNo(a.site,a.WorkCenterNo)='TREAT' + and( (isnull(SOP.TotalFinishedQty,0)>0 and isnull(SOP.TotalFinishedQty,0)>a.QtyReported) or a.itemNo=10) and b.enterDate>'2022-01-01' order by planFinishTime @@ -135,7 +135,7 @@ from SORouting a left join ShopOrder b on a.site=b.site and a.orderNo=b.orderNo LEFT JOIN SORoutingOutput SOP ON a.site=SOP.site and a.OrderNo=SOP.OrderNo and SOP.itemNo=dbo.Get_SORouting_PreviousOperationItemNo(a.site,a.OrderNo,a.itemNo) where b.E_Levels =0 and (b.status not in ('已取消','已关闭','已停工') and a.QtyRequired>a.QtyReported) and dbo.Get_WorkCenter_ProLineNo(a.site,a.WorkCenterNo)='PACKING' - and( (isnull(SOP.TotalFinishedQty,0)>0 and isnull(SOP.TotalFinishedQty,0) >a.QtyReported) or a.itemNo=10) + and( (isnull(SOP.TotalFinishedQty,0)>0 and isnull(SOP.TotalFinishedQty,0) >a.QtyReported) or a.itemNo=10) and b.enterDate>'2022-01-01' order by planFinishTime