|
|
|
@ -78,7 +78,8 @@ RecordVersion,OutWorkOrderFlag,ProjectID,OrderType,AuthRuleID,bu) |
|
|
|
select a.site,a.OrderNo orderno,a.ItemNo itemNo,b.OperationDesc itemDesc,a.seqno ,a.qtyrequired,a.qtyreported,a.remark, |
|
|
|
a.s_scheduleddate,a.S_ResourceID sResourceid,dbo.getResourceDesc(a.site,a.S_ResourceID) resourceDesc,a.S_ShiftNo sShiftno, |
|
|
|
dbo.getScheduleShiftDesc(a.site,a.s_shiftno) shiftDesc,a.s_workcenterno,s.PartNo partNo, |
|
|
|
c.WorkCenterDesc workCenterDesc,dbo.Get_PartDesc(a.site,s.PartNo) partDesc |
|
|
|
c.WorkCenterDesc workCenterDesc,dbo.Get_PartDesc(a.site,s.PartNo) partDesc, |
|
|
|
(SELECT ROUND(SUM(issureQty),3) FROM SOIssueNotifyOrderList where Site = a.site and seqNo = a.seqno) alreadyApplyTotal |
|
|
|
from SOScheduledRouting a |
|
|
|
left join ShopOrder s on a.site=s.site and a.OrderNo=s.OrderNo |
|
|
|
left join SORouting b on a.site=b.site and a.OrderNo=b.OrderNo and b.ItemNo=a.ItemNo |
|
|
|
@ -246,17 +247,17 @@ RecordVersion,OutWorkOrderFlag,ProjectID,OrderType,AuthRuleID,bu) |
|
|
|
|
|
|
|
<select id="searchNotifyOrderList" resultType="SOIssueNotifyOrderListData"> |
|
|
|
select a.NotifyNo,a.Site,a.ItemNo,a.FGPartNo,a.SOOrderNo,a.OpsItemNo,a.SeqNo, |
|
|
|
a.IssureQty,a.OutWorkOrderFlag ,b.operation_desc itemDesc,a.locationNo,a.needDate, |
|
|
|
dbo.Get_PartDesc(a.site,a.FGPartNo) partDesc |
|
|
|
a.IssureQty,a.OutWorkOrderFlag ,b.OperationDesc itemDesc,a.locationNo,a.needDate, |
|
|
|
dbo.Get_PartDesc(a.site,a.FGPartNo) partDesc, a.resourceId |
|
|
|
from SOIssueNotifyOrderList a |
|
|
|
left join so_routing b on a.site=b.site and a.SOOrderNo=b.order_no and a.OpsItemNo=b.item_no |
|
|
|
where a.NotifyNo=#{notifyNo} and a.site=#{site} |
|
|
|
left join SORouting b on a.site=b.site and a.SOOrderNo=b.OrderNo and a.OpsItemNo=b.ItemNo |
|
|
|
where a.site=#{site} and a.NotifyNo=#{notifyNo} |
|
|
|
order by a.ItemNo |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<select id="searchNotifyMaterialList" resultType="SOIssueNotifyOrderMaterialListData"> |
|
|
|
select a.NotifyNo,a.Site,a.ItemNo,a.BOMItemNo,a.ComponentPartNo,a.QtyToIssue,a.QtyToIssue_Original |
|
|
|
select a.NotifyNo,a.Site,a.ItemNo,a.ComponentPartNo,a.QtyToIssue,a.QtyToIssue_Original |
|
|
|
,b.FGPartNo,b.OpsItemNo,b.SOOrderNo orderNo,b.SeqNo, dbo.Get_PartDesc(a.site,a.ComponentPartNo) partDesc |
|
|
|
,b.locationNo,a.issueType,b.needDate,a.remark |
|
|
|
from SOIssueNotifyOrderMaterialList a |
|
|
|
@ -342,7 +343,7 @@ RecordVersion,OutWorkOrderFlag,ProjectID,OrderType,AuthRuleID,bu) |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="checkDeleteOrderList" resultType="SOIssueNotifyOrderMaterialListData" > |
|
|
|
select NotifyNo,Site,ItemNo,BOMItemNo,ComponentPartNo,QtyToIssue,QtyToIssue_Original |
|
|
|
select NotifyNo,Site,ItemNo,ComponentPartNo,QtyToIssue,QtyToIssue_Original |
|
|
|
from SOIssueNotifyOrderMaterialList where Site=#{site} and NotifyNo=#{notifyNo} |
|
|
|
and ItemNo=#{itemNo,jdbcType=DOUBLE} |
|
|
|
</select> |
|
|
|
@ -352,18 +353,26 @@ RecordVersion,OutWorkOrderFlag,ProjectID,OrderType,AuthRuleID,bu) |
|
|
|
where Site=#{site} and NotifyNo=#{notifyNo} |
|
|
|
</update> |
|
|
|
<select id="checkDeleteMaterial" resultType="SOIssueNotifyOrderMaterialListData"> |
|
|
|
select NotifyNo,Site,ItemNo,BOMItemNo,ComponentPartNo,QtyToIssue,QtyToIssue_Original |
|
|
|
select NotifyNo,Site,ItemNo,ComponentPartNo,QtyToIssue,QtyToIssue_Original,issueType |
|
|
|
from SOIssueNotifyOrderMaterialList where Site=#{site} and NotifyNo=#{notifyNo} |
|
|
|
and ItemNo=#{itemNo} and BOMItemNo=#{bOMItemNo} |
|
|
|
and ItemNo=#{itemNo} |
|
|
|
</select> |
|
|
|
<select id="deleteNotifyMaterial"> |
|
|
|
delete from SOIssueNotifyOrderMaterialList where Site=#{site} and NotifyNo=#{notifyNo} |
|
|
|
and ItemNo=#{itemNo} and BOMItemNo=#{bOMItemNo} |
|
|
|
and ItemNo=#{itemNo} |
|
|
|
</select> |
|
|
|
<insert id="saveIssueNotifyChangeLog"> |
|
|
|
insert into IssueNotifyChangeLog (Site,NotifyNo,ItemNo,SOOrderNo,SeqNo,ComponentPartNo,QtyToIssue,updateType,updateBy,updateDate,issueType) |
|
|
|
values (#{site},#{notifyNo},#{itemNo},#{sOOrderNo},#{seqNo},#{componentPartNo},#{qtyToIssue,jdbcType=DOUBLE},#{updateType},#{updateBy},#{updateDate},#{issueType}) |
|
|
|
</insert> |
|
|
|
<insert id="batchSaveIssueNotifyChangeLog"> |
|
|
|
insert into IssueNotifyChangeLog (Site,NotifyNo,ItemNo,SOOrderNo,SeqNo,ComponentPartNo,QtyToIssue,updateType,updateBy,updateDate,issueType) |
|
|
|
values |
|
|
|
<foreach collection="list" separator="," item="item"> |
|
|
|
(#{item.site},#{item.notifyNo},#{item.itemNo},#{item.sOOrderNo},#{item.seqNo},#{item.componentPartNo},#{item.qtyToIssue,jdbcType=DOUBLE},#{item.updateType},#{item.updateBy},#{item.updateDate},#{item.issueType}) |
|
|
|
</foreach> |
|
|
|
</insert> |
|
|
|
|
|
|
|
|
|
|
|
<select id="getSOIssueNotifyOrderListData" resultType="com.gaotao.modules.orderIssure.vo.SOIssueNotifyOrderList"> |
|
|
|
select NotifyNo,Site,ItemNo,FGPartNo,SOOrderNo,OpsItemNo,SeqNo,IssureQty,OutWorkOrderFlag,LocationNo,needDate |
|
|
|
|