You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
98 lines
3.0 KiB
98 lines
3.0 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.xujie.sys.modules.quote.mapper.QuoteDetailBomMapper">
|
|
|
|
<select id="queryQuoteDetailBom" resultType="com.xujie.sys.modules.quote.entity.QuoteDetailBom">
|
|
select
|
|
qdb.id,
|
|
qdb.quote_id,
|
|
qdb.quote_detail_id,
|
|
qdb.quote_detail_item_no,
|
|
qdb.site,
|
|
qdb.bu_no,
|
|
qdb.quote_no,
|
|
qdb.version_no,
|
|
qdb.part_no,
|
|
qdb.eng_chg_level,
|
|
qdb.bom_type,
|
|
qdb.alternative_no,
|
|
qdb.component_part,
|
|
<!-- qdb.print_unit,-->
|
|
dbo.qc_get_um_name(qdb.site, qdb.print_unit) as print_unit,
|
|
qdb.qty_per_assembly,
|
|
qdb.component_scrap,
|
|
qdb.issue_type,
|
|
qdb.shrinkage_factor,
|
|
(100-qdb.shrinkage_factor) as yield_rate,
|
|
qdb.line_item_no,
|
|
qdb.operation_id,
|
|
qdb.issue_to_loc,
|
|
qdb.note_text,
|
|
qdb.line_sequence,
|
|
qdb.consumption_item,
|
|
qdb.create_by,
|
|
qdb.create_date,
|
|
qdb.tree_id,
|
|
p.part_desc,
|
|
qdb.unit_price,
|
|
qdb.actual_price,
|
|
qdb.quote_price
|
|
from plm_quote_detail_bom qdb
|
|
left join part p on qdb.site = p.site and qdb.component_part = p.part_no
|
|
where quote_detail_id = #{quoteDetailId}
|
|
<if test="treeId!= null">
|
|
and tree_id = #{treeId}
|
|
</if>
|
|
order by tree_id
|
|
</select>
|
|
<select id="queryQuoteDetailBomByIds" resultType="com.xujie.sys.modules.quote.entity.QuoteDetailBom">
|
|
select
|
|
qdb.id,
|
|
qdb.quote_id,
|
|
qdb.quote_detail_id,
|
|
qdb.quote_detail_item_no,
|
|
qdb.site,
|
|
qdb.bu_no,
|
|
qdb.quote_no,
|
|
qdb.version_no,
|
|
qdb.part_no,
|
|
qdb.eng_chg_level,
|
|
qdb.bom_type,
|
|
qdb.alternative_no,
|
|
qdb.component_part,
|
|
<!-- qdb.print_unit,-->
|
|
dbo.qc_get_um_name(qdb.site, qdb.print_unit) as print_unit,
|
|
qdb.qty_per_assembly,
|
|
qdb.component_scrap,
|
|
qdb.issue_type,
|
|
qdb.shrinkage_factor,
|
|
(100-qdb.shrinkage_factor) as yield_rate,
|
|
qdb.line_item_no,
|
|
qdb.operation_id,
|
|
qdb.issue_to_loc,
|
|
qdb.note_text,
|
|
qdb.line_sequence,
|
|
qdb.consumption_item,
|
|
qdb.create_by,
|
|
qdb.create_date,
|
|
qdb.tree_id,
|
|
p.part_desc,
|
|
qdb.unit_price,
|
|
qdb.actual_price,
|
|
qdb.quote_price
|
|
from plm_quote_detail_bom qdb
|
|
left join part p on qdb.site = p.site and qdb.component_part = p.part_no
|
|
<where>
|
|
<if test="quoteDetailId != null">
|
|
and qdb.quote_detail_id = #{quoteDetailId}
|
|
</if>
|
|
<if test="ids != null and ids.size() > 0">
|
|
and qdb.tree_id in
|
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</if>
|
|
</where>
|
|
order by tree_id
|
|
</select>
|
|
</mapper>
|