|
|
|
@ -52,125 +52,129 @@ |
|
|
|
<result column="is_reject" property="isReject"/> |
|
|
|
<result column="node_id" property="nodeId"/> |
|
|
|
<result column="node_name" property="nodeName"/> |
|
|
|
<!-- <association property="priceCheckDetail" javaType="com.spring.modules.quotation.entity.PriceCheckDetail">--> |
|
|
|
<!-- <result column="site" property="site"/>--> |
|
|
|
<!-- <result column="quotation_no" property="quotationNo"/>--> |
|
|
|
<!-- <result column="associated_part_no" property="associatedPartNo"/>--> |
|
|
|
<!-- <result column="material_required" property="materialRequired"/>--> |
|
|
|
<!-- <result column="yearly_or_monthly_required" property="yearlyOrMonthlyRequirement"/>--> |
|
|
|
<!-- <result column="running_width" property="runningWidth"/>--> |
|
|
|
<!-- </association>--> |
|
|
|
<result column="bu_no" property="buNo"/> |
|
|
|
<result column="bu_desc" property="buDesc"/> |
|
|
|
</resultMap> |
|
|
|
<!-- 报价信息列表 --> |
|
|
|
<select id="quotationInformationSearch" resultMap="getQuotation" parameterType="com.spring.modules.quotation.vo.QuotationInformationVo"> |
|
|
|
SELECT a.site, |
|
|
|
a.quotation_no, |
|
|
|
customer_no, |
|
|
|
dbo.plm_get_customer_desc(a.site, customer_no) as customerDesc, |
|
|
|
dbo.plm_get_customer_currency(a.site, customer_no) as customerCurrency, |
|
|
|
project_id, |
|
|
|
dbo.plm_get_project_name(a.site, project_id) as projectName, |
|
|
|
dbo.plm_get_project_final_customer_id(a.site, project_id) as finalCustomerId, |
|
|
|
a.customer_no, |
|
|
|
dbo.plm_get_customer_desc(a.site, a.customer_no) as customerDesc, |
|
|
|
dbo.plm_get_customer_currency(a.site, a.customer_no) as customerCurrency, |
|
|
|
a.project_id, |
|
|
|
dbo.plm_get_project_name(a.site, a.project_id) as projectName, |
|
|
|
dbo.plm_get_project_final_customer_id(a.site, a.project_id) as finalCustomerId, |
|
|
|
dbo.plm_get_customer_desc(a.site, |
|
|
|
dbo.plm_get_project_final_customer_id(a.site, project_id)) as finalCustomerName, |
|
|
|
tracker, |
|
|
|
dbo.plm_get_user_display(a.site, tracker) as trackerName, |
|
|
|
dbo.plm_get_project_final_customer_id(a.site, a.project_id)) as finalCustomerName, |
|
|
|
a.tracker, |
|
|
|
dbo.plm_get_user_display(a.site, a.tracker) as trackerName, |
|
|
|
quoter, |
|
|
|
dbo.plm_get_user_display(a.site, quoter) as quoterName, |
|
|
|
quotation_status, |
|
|
|
test_part_no, |
|
|
|
dbo.plm_get_test_part_desc(a.site, test_part_no) as partName, |
|
|
|
priority_level, |
|
|
|
required_completion_date, |
|
|
|
dbo.plm_get_user_display(a.site, a.quoter) as quoterName, |
|
|
|
a.quotation_status, |
|
|
|
a.test_part_no, |
|
|
|
dbo.plm_get_test_part_desc(a.site, a.test_part_no) as partName, |
|
|
|
a.priority_level, |
|
|
|
a.required_completion_date, |
|
|
|
a.remark, |
|
|
|
technical_considerations, |
|
|
|
customer_responsible_person, |
|
|
|
customer_responsible_person_phone, |
|
|
|
a.technical_considerations, |
|
|
|
a.customer_responsible_person, |
|
|
|
a.customer_responsible_person_phone, |
|
|
|
a.create_date, |
|
|
|
a.create_by, |
|
|
|
a.update_date, |
|
|
|
a.update_by, |
|
|
|
next_to_do, |
|
|
|
actuality_quotation_date, |
|
|
|
quotation_result_information, |
|
|
|
actuality_submission_date, |
|
|
|
submission_method, |
|
|
|
submission_remark, |
|
|
|
actuality_reply_date, |
|
|
|
confirm_results, |
|
|
|
confirm_by, |
|
|
|
confirm_information, |
|
|
|
quotation_result_status, |
|
|
|
quotation_batch_no, |
|
|
|
quotation_item_no, |
|
|
|
delivery_terms, |
|
|
|
quote_type, |
|
|
|
dbo.plm_get_dictDataLabel('quote_type', quote_type, a.site) as quoteTypeLabel, |
|
|
|
dbo.plm_get_dictDataLabel('delivery_terms', delivery_terms, a.site) as deliveryTermsLabel, |
|
|
|
quotation_amount, |
|
|
|
customer_quote_no, |
|
|
|
sourcing, |
|
|
|
a.next_to_do, |
|
|
|
a.actuality_quotation_date, |
|
|
|
a.quotation_result_information, |
|
|
|
a.actuality_submission_date, |
|
|
|
a.submission_method, |
|
|
|
a.submission_remark, |
|
|
|
a.actuality_reply_date, |
|
|
|
a.confirm_results, |
|
|
|
a.confirm_by, |
|
|
|
a.confirm_information, |
|
|
|
a.quotation_result_status, |
|
|
|
a.quotation_batch_no, |
|
|
|
a.quotation_item_no, |
|
|
|
a.delivery_terms, |
|
|
|
a.quote_type, |
|
|
|
dbo.plm_get_dictDataLabel('quote_type', a.quote_type, a.site) as quoteTypeLabel, |
|
|
|
dbo.plm_get_dictDataLabel('delivery_terms', a.delivery_terms, |
|
|
|
a.site) as deliveryTermsLabel, |
|
|
|
a.quotation_amount, |
|
|
|
a.customer_quote_no, |
|
|
|
a.sourcing, |
|
|
|
a.step_id, |
|
|
|
a.reject_flag, |
|
|
|
a.reject_step_id, |
|
|
|
d.is_reject, |
|
|
|
d.node_id, |
|
|
|
d.node_name |
|
|
|
d.node_name, |
|
|
|
vpp.bu_no, |
|
|
|
b.bu_desc |
|
|
|
FROM plm_quotation_information as a |
|
|
|
left join plm_request_header as prh on a.site = prh.site and prh.menu_id = #{query.menuId} |
|
|
|
left join plm_request_node as d on a.site = d.site and prh.classification_no = d.classification_no and |
|
|
|
prh.workflow_id = d.workflow_id and a.step_id = d.step_id |
|
|
|
left join view_Project_Part vpp |
|
|
|
on vpp.site = a.site and vpp.test_part_no = a.test_part_no and vpp.project_id = a.project_id |
|
|
|
left join BU b on vpp.bu_no = b.bu_no and a.site = b.site |
|
|
|
<where> |
|
|
|
a.site = #{query.site} |
|
|
|
a.site = #{query.site} and |
|
|
|
vpp.bu_no in ( select bu_No from dbo.Get_Now_BU_chooseAble (a.site,#{query.createBy})) |
|
|
|
<if test="query.quotationNo != null and query.quotationNo != ''"> |
|
|
|
AND a.quotation_no = #{query.quotationNo} |
|
|
|
</if> |
|
|
|
<if test="query.quotationBatchNo != null and query.quotationBatchNo != ''"> |
|
|
|
AND quotation_batch_no like #{query.quotationBatchNo} |
|
|
|
AND a.quotation_batch_no like #{query.quotationBatchNo} |
|
|
|
</if> |
|
|
|
<if test="query.quotationItemNo != null and query.quotationItemNo != ''"> |
|
|
|
AND quotation_item_no = #{query.quotationItemNo} |
|
|
|
AND a.quotation_item_no = #{query.quotationItemNo} |
|
|
|
</if> |
|
|
|
<if test="query.customerNo != null and query.customerNo != ''"> |
|
|
|
AND customer_no like #{query.customerNo} |
|
|
|
AND a.customer_no like #{query.customerNo} |
|
|
|
</if> |
|
|
|
<if test="query.customerDesc != null and query.customerDesc != ''"> |
|
|
|
AND dbo.plm_get_customer_desc(a.site, customer_no) like #{query.customerDesc} |
|
|
|
AND dbo.plm_get_customer_desc(a.site, a.customer_no) like #{query.customerDesc} |
|
|
|
</if> |
|
|
|
<if test="query.projectId != null and query.projectId != ''"> |
|
|
|
AND project_id like #{query.projectId} |
|
|
|
AND a.project_id like #{query.projectId} |
|
|
|
</if> |
|
|
|
<if test="query.projectName != null and query.projectName != ''"> |
|
|
|
AND dbo.plm_get_project_name(a.site, project_id) like #{query.projectName} |
|
|
|
AND dbo.plm_get_project_name(a.site, a.project_id) like #{query.projectName} |
|
|
|
</if> |
|
|
|
<if test="query.trackerName != null and query.trackerName != ''"> |
|
|
|
AND dbo.plm_get_user_display(a.site, tracker) like #{query.trackerName} |
|
|
|
AND dbo.plm_get_user_display(a.site, a.tracker) like #{query.trackerName} |
|
|
|
</if> |
|
|
|
<if test="query.quoterName != null and query.quoterName != ''"> |
|
|
|
AND dbo.plm_get_user_display(a.site, quoter) like #{query.quoterName} |
|
|
|
AND dbo.plm_get_user_display(a.site, a.quoter) like #{query.quoterName} |
|
|
|
</if> |
|
|
|
<if test="query.testPartNo != null and query.testPartNo != ''"> |
|
|
|
AND test_part_no like #{query.testPartNo} |
|
|
|
AND a.test_part_no like #{query.testPartNo} |
|
|
|
</if> |
|
|
|
<if test="query.partName != null and query.partName != ''"> |
|
|
|
AND dbo.plm_get_test_part_desc(a.site, test_part_no) like #{query.partName} |
|
|
|
AND dbo.plm_get_test_part_desc(a.site, a.test_part_no) like #{query.partName} |
|
|
|
</if> |
|
|
|
<if test="query.quotationStatus != null and query.quotationStatus != ''"> |
|
|
|
AND quotation_status = #{query.quotationStatus} |
|
|
|
AND a.quotation_status = #{query.quotationStatus} |
|
|
|
</if> |
|
|
|
<if test="query.priorityLevel != null and query.priorityLevel != ''"> |
|
|
|
AND priority_level = #{query.priorityLevel} |
|
|
|
AND a.priority_level = #{query.priorityLevel} |
|
|
|
</if> |
|
|
|
<if test="query.startDate != null"> |
|
|
|
AND required_completion_date >= #{query.startDate} |
|
|
|
AND a.required_completion_date >= #{query.startDate} |
|
|
|
</if> |
|
|
|
<if test="query.endDate != null"> |
|
|
|
AND #{query.endDate} >= required_completion_date |
|
|
|
AND #{query.endDate} >= a.required_completion_date |
|
|
|
</if> |
|
|
|
<if test="query.quotationResultStatus != null and query.quotationResultStatus != ''"> |
|
|
|
AND quotation_result_status = #{query.quotationResultStatus} |
|
|
|
AND a.quotation_result_status = #{query.quotationResultStatus} |
|
|
|
</if> |
|
|
|
order by quotation_batch_no desc, quotation_item_no |
|
|
|
<if test="query.buNo != null and query.buNo != ''"> |
|
|
|
and b.bu_no = #{query.buNo} |
|
|
|
</if> |
|
|
|
order by a.quotation_batch_no desc, a.quotation_item_no |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
|
|
|
|
|