|
|
|
@ -113,8 +113,14 @@ RecordVersion,OutWorkOrderFlag,ProjectID,OrderType,AuthRuleID,bu) |
|
|
|
|
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="searchOtherPart" resultType="SOIssueNotifyOrderMaterialListData"> |
|
|
|
select NotifyNo,Site,ItemNo,BOMItemNo,ComponentPartNo,QtyToIssue,QtyToIssue_Original,issueType |
|
|
|
,dbo.Get_PartDesc(site,ComponentPartNo) partDesc |
|
|
|
from SOIssueNotifyOrderMaterialList where NotifyNo=#{notifyNo} and site=#{site} and issueType=#{issueType} |
|
|
|
</select> |
|
|
|
<select id="getNextItemForSOIssueNotifyOrderList" resultType="Double"> |
|
|
|
select isnull(max(ItemNo),0)+1 from SOIssueNotifyOrderList where site=#{site} and NotifyNo=#{notifyNo} |
|
|
|
select isnull(max(ItemNo),0)+1 from SOIssueNotifyOrderList where site=#{site} and NotifyNo=#{notifyNo} and 998>ItemNo |
|
|
|
</select> |
|
|
|
|
|
|
|
<insert id="saveSOIssueNotifyOrderList"> |
|
|
|
@ -220,7 +226,7 @@ RecordVersion,OutWorkOrderFlag,ProjectID,OrderType,AuthRuleID,bu) |
|
|
|
select top 1000 part_no,part_desc,umid,spec,sku,cinv_source_code |
|
|
|
from part |
|
|
|
<where> |
|
|
|
and site = #{site} and sourceBu = #{sourceBu} |
|
|
|
and site = #{site} and sourceBu = #{sourceBu} and control_mes='G' |
|
|
|
<if test="partNo != null and partNo != ''"> |
|
|
|
AND part_no LIKE '%'+ #{partNo} + '%' |
|
|
|
</if> |
|
|
|
@ -288,8 +294,8 @@ RecordVersion,OutWorkOrderFlag,ProjectID,OrderType,AuthRuleID,bu) |
|
|
|
and ItemNo=#{itemNo} and BOMItemNo=#{bOMItemNo} |
|
|
|
</select> |
|
|
|
<insert id="saveIssueNotifyChangeLog"> |
|
|
|
insert into IssueNotifyChangeLog (Site,NotifyNo,ItemNo,SOOrderNo,SeqNo,ComponentPartNo,QtyToIssue,updateType,updateBy,updateDate) |
|
|
|
values (#{site},#{notifyNo},#{itemNo},#{sOOrderNo},#{seqNo},#{componentPartNo},#{qtyToIssue,jdbcType=DOUBLE},#{updateType},#{updateBy},#{updateDate}) |
|
|
|
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> |
|
|
|
|
|
|
|
<select id="getSOIssueNotifyOrderListData" resultType="com.xujie.sys.modules.orderIssure.vo.SOIssueNotifyOrderList"> |
|
|
|
@ -299,7 +305,8 @@ RecordVersion,OutWorkOrderFlag,ProjectID,OrderType,AuthRuleID,bu) |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="checkOtherPart" resultType="SOIssueNotifyOrderMaterialListData"> |
|
|
|
select NotifyNo,Site,ItemNo,BOMItemNo,ComponentPartNo,QtyToIssue,QtyToIssue_Original |
|
|
|
select NotifyNo,Site,ItemNo,BOMItemNo,ComponentPartNo,QtyToIssue,QtyToIssue_Original |
|
|
|
|
|
|
|
from SOIssueNotifyOrderMaterialList where Site=#{site} and NotifyNo=#{notifyNo} |
|
|
|
and ComponentPartNo=#{componentPartNo} |
|
|
|
</select> |
|
|
|
@ -307,11 +314,16 @@ RecordVersion,OutWorkOrderFlag,ProjectID,OrderType,AuthRuleID,bu) |
|
|
|
<select id="getNextBomItemNo" resultType="String"> |
|
|
|
|
|
|
|
SELECT #{str}+ |
|
|
|
CONVERT(VARCHAR(50),isnull( max(CONVERT(int,SUBSTRING(BOMItemNo, LEN(#{str}), LEN(BOMItemNo)))+1),1)) |
|
|
|
CONVERT(VARCHAR(50),isnull( max(CONVERT(int,SUBSTRING(BOMItemNo, LEN(#{str})+1, LEN(BOMItemNo)))+1),1)) |
|
|
|
|
|
|
|
|
|
|
|
FROM SOIssueNotifyOrderMaterialList where Site=#{site} and NotifyNo=#{notifyNo} |
|
|
|
and BOMItemNo like #{str}+'%' |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="searchIssueNotifyChangeLog" resultType="com.xujie.sys.modules.orderIssure.vo.IssueNotifyChangeLog"> |
|
|
|
select Site,NotifyNo,ItemNo,SOOrderNo,SeqNo,ComponentPartNo,QtyToIssue,updateType,updateBy,updateDate,issueType |
|
|
|
from IssueNotifyChangeLog where Site=#{site} and NotifyNo=#{notifyNo} |
|
|
|
</select> |
|
|
|
</mapper> |