|
|
|
@ -150,6 +150,7 @@ |
|
|
|
left join part h on b.site = h.site and |
|
|
|
(case when b.final_part_no is not null then final_part_no else test_part_no end) = h.part_no |
|
|
|
<where> |
|
|
|
|
|
|
|
<if test="params.site != null and params.site != ''"> |
|
|
|
and b.site = #{params.site} |
|
|
|
</if> |
|
|
|
@ -177,9 +178,27 @@ |
|
|
|
<if test="params.toolNo != null and params.toolNo != ''"> |
|
|
|
and e.tool_id like #{params.toolNo} |
|
|
|
</if> |
|
|
|
<if test="params.toolId != null and params.toolId != ''"> |
|
|
|
and e.tool_id like #{params.toolId} |
|
|
|
</if> |
|
|
|
<if test="params.toolDesc != null and params.toolDesc != ''"> |
|
|
|
and e.tool_description like #{params.toolDesc} |
|
|
|
</if> |
|
|
|
<if test="params.toolDescription != null and params.toolDescription != ''"> |
|
|
|
and e.tool_description like #{params.toolDescription} |
|
|
|
</if> |
|
|
|
<if test="params.testPartNo != null and params.testPartNo != ''"> |
|
|
|
and h.plm_part_no like #{params.testPartNo} |
|
|
|
</if> |
|
|
|
<if test="params.finalPartNo != null and params.finalPartNo != ''"> |
|
|
|
and h.ifs_part_no like #{params.finalPartNo} |
|
|
|
</if> |
|
|
|
<if test="params.partName != null and params.partName != ''"> |
|
|
|
and h.part_desc like #{params.partName} |
|
|
|
</if> |
|
|
|
<if test="params.customerPartNo != null and params.customerPartNo != ''"> |
|
|
|
and g.customer_part_no like #{params.customerPartNo} |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
order by b.project_id, d.part_no, c.routing_revision, c.routing_type, c.alternative_no, c.operation_no |
|
|
|
</select> |
|
|
|
@ -203,6 +222,16 @@ |
|
|
|
#{item.orderRef2}, #{item.orderRef3}, #{item.orderRef4}, #{item.orderRef5}, #{item.orderRef6}) |
|
|
|
</foreach> |
|
|
|
</insert> |
|
|
|
<insert id="toolDetailBatchSave"> |
|
|
|
insert into plm_project_tool_applyDetail (site, apply_no, seqNo, tool_id, standard_cost, applyQty, remark, |
|
|
|
orderRef1, orderRef2, orderRef3, orderRef4, orderRef5, |
|
|
|
orderRef6) values |
|
|
|
<foreach collection="list" item="item" index="index" separator=","> |
|
|
|
(#{item.site}, #{item.applyNo}, #{item.seqNo}, #{item.toolId}, #{item.standardCost}, #{item.applyQty}, |
|
|
|
#{item.remark}, #{item.projectId}, |
|
|
|
#{item.testPartNo}, #{item.routingRevision}, #{item.routingType}, #{item.alternativeNo}, #{item.operationId}) |
|
|
|
</foreach> |
|
|
|
</insert> |
|
|
|
<update id="updateRoutingToolRequireFlag"> |
|
|
|
update routing_tool |
|
|
|
set ApplyFlag='Y' |
|
|
|
@ -395,9 +424,9 @@ |
|
|
|
|
|
|
|
<delete id="toolDetailBatchDelete"> |
|
|
|
delete from plm_project_tool_applyDetail |
|
|
|
WHERE (site, apply_no, seq_no) IN |
|
|
|
<foreach collection="list" item="item" open="(" separator="," close=")"> |
|
|
|
(#{item.site}, #{item.applyNo}, #{item.seqNo}) |
|
|
|
WHERE |
|
|
|
<foreach collection="list" item="item" separator=" OR "> |
|
|
|
(site = #{item.site} AND apply_no = #{item.applyNo} AND seqNo = #{item.seqNo}) |
|
|
|
</foreach> |
|
|
|
</delete> |
|
|
|
|
|
|
|
|