|
|
|
@ -747,27 +747,27 @@ |
|
|
|
<select id="getOrderBomByCon" parameterType="SearchScheduleData" resultType="OrderBomData"> |
|
|
|
SELECT vss.Site site, vss.OrderNo orderNo, vss.ItemNo itemNo, vss.ComponentPartNo componentPartNo, |
|
|
|
/*动态sql语句*/ |
|
|
|
<if test="referenceCustomerId != null and referenceCustomerId != ''"> |
|
|
|
<choose> |
|
|
|
<when test="referenceCustomerId != null and referenceCustomerId != ''"> |
|
|
|
ISNULL(rpi.ReferencePartDesc, P.PartDescription) partDesc, '' partSpec, |
|
|
|
</when> |
|
|
|
<otherwise> |
|
|
|
<!-- <if test="referenceCustomerId != null and referenceCustomerId != ''">--> |
|
|
|
<!-- <choose>--> |
|
|
|
<!-- <when test="referenceCustomerId != null and referenceCustomerId != ''">--> |
|
|
|
<!-- ISNULL(rpi.ReferencePartDesc, P.PartDescription) partDesc, '' partSpec,--> |
|
|
|
<!-- </when>--> |
|
|
|
<!-- <otherwise>--> |
|
|
|
P.PartDescription partDesc, P.Spec partSpec, |
|
|
|
</otherwise> |
|
|
|
</choose> |
|
|
|
</if> |
|
|
|
<!-- </otherwise>--> |
|
|
|
<!-- </choose>--> |
|
|
|
<!-- </if>--> |
|
|
|
P.UMid partUm, vss.QtyAssembly qtyAssembly, vss.QtyFixedScrapt qtyFixedScrapt, vss.ScraptFactor scraptFactor, |
|
|
|
vss.Remark remark, |
|
|
|
vss.QtyRequired qtyRequired, vss.QtyIssue qtyIssue, vss.IssueDate issueDate, vss.QtyReserved qtyReserved, |
|
|
|
vss.MatGroup matGroup, vss.RMType_DB rmTypeDb |
|
|
|
FROM dbo.view_SAP_SOBOM vss |
|
|
|
/*动态sql语句*/ |
|
|
|
<if test="referenceCustomerId != null and referenceCustomerId != ''"> |
|
|
|
LEFT JOIN ReferencePartInfo rpi ON vss.Site = rpi.Site AND vss.ComponentPartNo = rpi.PartNo AND |
|
|
|
rpi.CustomerID = #{referenceCustomerId} |
|
|
|
AND (rpi.FGPartNo = #{partNo} OR rpi.FGPartNo = '全部') |
|
|
|
</if> |
|
|
|
<!-- <if test="referenceCustomerId != null and referenceCustomerId != ''">--> |
|
|
|
<!-- LEFT JOIN ReferencePartInfo rpi ON vss.Site = rpi.Site AND vss.ComponentPartNo = rpi.PartNo AND--> |
|
|
|
<!-- rpi.CustomerID = #{referenceCustomerId}--> |
|
|
|
<!-- AND (rpi.FGPartNo = #{partNo} OR rpi.FGPartNo = '全部')--> |
|
|
|
<!-- </if>--> |
|
|
|
LEFT JOIN Part P ON vss.Site = P.Site AND vss.ComponentPartNo = P.PartNo |
|
|
|
<where> |
|
|
|
vss.Site = P.Site AND vss.ComponentPartNo = P.PartNo |
|
|
|
|