|
|
|
@ -199,5 +199,97 @@ |
|
|
|
select ISNULL(max(item_no),0)+1 from plm_quote_detail where quote_id = #{quoteId} |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<select id="queryQuoteDetailByInquiry" resultType="com.spring.modules.quote.entity.QuoteDetail"> |
|
|
|
select qd.id, |
|
|
|
qd.quote_id, |
|
|
|
qd.site, |
|
|
|
qd.bu_no, |
|
|
|
qd.quote_no, |
|
|
|
qd.version_no, |
|
|
|
qd.item_no, |
|
|
|
qd.part_id, |
|
|
|
pp.test_part_no as partNo, |
|
|
|
pp.part_desc, |
|
|
|
qd.internal_inquiry_no, |
|
|
|
qd.qty, |
|
|
|
qd.quote_count, |
|
|
|
qd.status, |
|
|
|
qd.part_cost, |
|
|
|
qd.adjust_part_cost, |
|
|
|
qd.labour_cost, |
|
|
|
qd.adjust_labour_cost, |
|
|
|
qd.fabricate_cost, |
|
|
|
qd.adjust_fabricate_cost, |
|
|
|
qd.tool_cost, |
|
|
|
qd.adjust_tool_cost, |
|
|
|
qd.machine_cost, |
|
|
|
qd.adjust_machine_cost, |
|
|
|
qd.other_cost, |
|
|
|
qd.manage_cost, |
|
|
|
qd.total_cost, |
|
|
|
qd.profit_rate, |
|
|
|
qd.profit_amount, |
|
|
|
qd.total_price, |
|
|
|
qd.unit_price, |
|
|
|
qd.tax_rate, |
|
|
|
qd.tax_total_price, |
|
|
|
qd.tax_unit_price, |
|
|
|
qd.remark, |
|
|
|
qd.active, |
|
|
|
qd.create_by, |
|
|
|
qd.create_date, |
|
|
|
qd.update_by, |
|
|
|
qd.update_date, |
|
|
|
qd.pack_cost, |
|
|
|
qd.shipping_cost, |
|
|
|
qd.process_time, |
|
|
|
qd.yield, |
|
|
|
qd.bom_un_yield, |
|
|
|
qd.bom_yield, |
|
|
|
qd.parent_attrition_rate, |
|
|
|
qd.child_attrition_rate, |
|
|
|
qd.adjust_bom_un_yield, |
|
|
|
qd.quote_cost, |
|
|
|
qd.adjust_quote_cost, |
|
|
|
qd.quote_total_cost, |
|
|
|
qd.quote_profit_rate, |
|
|
|
qd.quote_profit_amount, |
|
|
|
qd.quote_total_price, |
|
|
|
qd.quote_unit_price, |
|
|
|
qd.quote_tax_rate, |
|
|
|
qd.quote_tax_total_price, |
|
|
|
qd.quote_tax_unit_price, |
|
|
|
qd.currency1, |
|
|
|
dbo.plm_get_dictDataLabel('plm_customer_information_customer_customer_currency', qd.currency1, |
|
|
|
qd.site) as currencyDesc1, |
|
|
|
qd.exchange_rate1, |
|
|
|
qd.currency2, |
|
|
|
qd.exchange_rate2, |
|
|
|
qd.moq, |
|
|
|
qd.currency_total_cost1, |
|
|
|
qd.currency_total_cost2, |
|
|
|
qd.quote_currency_total_cost1, |
|
|
|
qd.quote_currency_total_cost2, |
|
|
|
q.quote_date, |
|
|
|
q.quote_version_no, |
|
|
|
q.inside_inquiry_no |
|
|
|
from plm_quote_detail qd |
|
|
|
left join plm_quote q on qd.quote_id = q.id |
|
|
|
left join view_Project_Part pp |
|
|
|
on q.project_no = pp.project_id and qd.part_no = pp.test_part_no and qd.site = pp.site |
|
|
|
<where> |
|
|
|
<if test="site != null and site != ''"> |
|
|
|
and qd.site = #{site} |
|
|
|
</if> |
|
|
|
<if test="internalInquiryNo != null and internalInquiryNo != ''"> |
|
|
|
and q.inside_inquiry_no = #{internalInquiryNo} |
|
|
|
</if> |
|
|
|
<if test="projectNo != null and projectNo != ''"> |
|
|
|
and q.project_no = #{projectNo} |
|
|
|
</if> |
|
|
|
<if test="partNo != null and partNo != ''"> |
|
|
|
and qd.part_no = #{partNo} |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
</mapper> |