|
|
@ -927,22 +927,38 @@ |
|
|
</select> |
|
|
</select> |
|
|
<!--=================维护工艺路线信息===================--> |
|
|
<!--=================维护工艺路线信息===================--> |
|
|
<select id="searchRoutingWithPartNo" resultType="com.gaotao.modules.base.entity.RoutingHeaderData"> |
|
|
<select id="searchRoutingWithPartNo" resultType="com.gaotao.modules.base.entity.RoutingHeaderData"> |
|
|
Select top 1000 |
|
|
|
|
|
|
|
|
SELECT |
|
|
r.Site,r.PartNo,r.RevNo,r.PhaseInDate,r.PhaseOutDate,r.RoutingType_DB,r.RoutingType,r.Status,r.Status_DB, |
|
|
r.Site,r.PartNo,r.RevNo,r.PhaseInDate,r.PhaseOutDate,r.RoutingType_DB,r.RoutingType,r.Status,r.Status_DB, |
|
|
r.Defaultflag,r.Remark,r.RepairFlag,p.PartDescription+' / '+isnull(p.Spec,'') as spec,p.umid |
|
|
r.Defaultflag,r.Remark,r.RepairFlag,p.PartDescription+' / '+isnull(p.Spec,'') as spec,p.umid |
|
|
from RoutingHeader r |
|
|
|
|
|
LEFT JOIN Part p on p.partNo=r.partNo and p.site=r.site |
|
|
|
|
|
|
|
|
FROM RoutingHeader r WITH(NOLOCK) |
|
|
|
|
|
LEFT JOIN Part p WITH(NOLOCK) on p.partNo=r.partNo and p.site=r.site |
|
|
<where> |
|
|
<where> |
|
|
<if test="partNo != null and partNo != ''"> |
|
|
<if test="partNo != null and partNo != ''"> |
|
|
and r.partNo like #{partNo} |
|
|
|
|
|
|
|
|
and r.partNo like '%'+#{partNo}+'%' |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="spec != null and spec != ''"> |
|
|
|
|
|
and (p.PartDescription like '%'+#{spec}+'%' OR p.Spec like '%'+#{spec}+'%') |
|
|
</if> |
|
|
</if> |
|
|
<if test="site != null and site != ''"> |
|
|
<if test="site != null and site != ''"> |
|
|
and r.site = #{site} |
|
|
and r.site = #{site} |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
<if test="status != null and status != ''"> |
|
|
|
|
|
and r.Status = #{status} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="routingType != null and routingType != ''"> |
|
|
|
|
|
and r.RoutingType like '%'+#{routingType}+'%' |
|
|
|
|
|
</if> |
|
|
<if test="revNo != null and revNo != ''"> |
|
|
<if test="revNo != null and revNo != ''"> |
|
|
and r.revNo = #{revNo} |
|
|
|
|
|
|
|
|
and r.revNo like '%'+#{revNo}+'%' |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="umid != null and umid != ''"> |
|
|
|
|
|
and p.umid like '%'+#{umid}+'%' |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="phaseInDate != null and phaseInDate != ''"> |
|
|
|
|
|
and r.PhaseInDate >= #{phaseInDate} |
|
|
</if> |
|
|
</if> |
|
|
</where> |
|
|
</where> |
|
|
|
|
|
ORDER BY r.PartNo, r.RevNo DESC |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<select id="searchBomWithPartNo" resultType="BOMHeader"> |
|
|
<select id="searchBomWithPartNo" resultType="BOMHeader"> |
|
|
|