Browse Source

2024-05-09

master
zelian_wu 2 years ago
parent
commit
c96c83558b
  1. 74
      src/main/resources/mapper/quotation/QuotationDetailMapper.xml

74
src/main/resources/mapper/quotation/QuotationDetailMapper.xml

@ -82,6 +82,7 @@
<result column="compute_machine_cost" jdbcType="DECIMAL" property="computeMachineCost" />
<result column="adjust_machine_cost" jdbcType="DECIMAL" property="adjustMachineCost" />
<result column="tax_rate" jdbcType="DECIMAL" property="taxRate" />
<result column="active" property="active" />
</resultMap>
<select id="getQuotationDetailVoList" resultMap="quotationDetailVo">
@ -197,47 +198,44 @@
</select>
<select id="getQuotationDetailVoListByPage" resultMap="quotationDetail">
select
qd.quotation_detail_id,
qd.quotation_header_id,
qd.site,
qd.product_no,
CASE WHEN qd.product_no = '*' THEN qd.product_desc
ELSE ppp.part_desc
END as product_desc,
qd.internal_inquiry_no,
qd.quotation_detail_quantity,
qd.quotation_detail_count,
qd.quotation_detail_status,
qd.compute_part_cost,
qd.compute_labour_cost,
qd.compute_fabricate_cost,
qd.compute_tool_cost,
qd.adjust_part_cost,
qd.adjust_labour_cost,
qd.adjust_fabricate_cost,
qd.adjust_tool_cost,
qd.detail_other_cost,
qd.detail_manage_cost,
qd.detail_total_cost,
qd.detail_profit_rate,
qd.detail_profit_amount,
qd.system_compute_amount,
qd.system_compute_price,
qd.final_untaxed_price,
qd.final_taxed_price,
qd.remark,
qd.compute_machine_cost,
qd.adjust_machine_cost,
qd.tax_rate
from dbo.quotation_detail qd
left join dbo.quotation_header qh on qd.quotation_header_id = qh.quotation_header_id
left join dbo.view_Project_Part ppp on qd.product_no = ppp.test_part_no and qd.site = ppp.site and qh.project_id = ppp.project_id
select quotation_detail_id,
quotation_header_id,
site,
product_no,
dbo.get_part_name(site, product_no) as product_desc,
internal_inquiry_no,
quotation_detail_quantity,
quotation_detail_count,
quotation_detail_status,
compute_part_cost,
compute_labour_cost,
compute_fabricate_cost,
compute_tool_cost,
adjust_part_cost,
adjust_labour_cost,
adjust_fabricate_cost,
adjust_tool_cost,
detail_other_cost,
detail_manage_cost,
detail_total_cost,
detail_profit_rate,
detail_profit_amount,
system_compute_amount,
system_compute_price,
final_untaxed_price,
final_taxed_price,
remark,
compute_machine_cost,
adjust_machine_cost,
tax_rate,
active
from quotation_detail qd
<where>
qd.active = 'Y'
and active = 'Y'
<if test="quotationHeaderId != null">
and qd.quotation_header_id = #{quotationHeaderId}
and quotation_header_id = #{quotationHeaderId}
</if>
</where>
order by quotation_detail_id
</select>
</mapper>
Loading…
Cancel
Save