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.
546 lines
24 KiB
546 lines
24 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.QuotationInformationMapper">
|
|
|
|
<resultMap id="getQuotation" type="com.xujie.sys.modules.quote.entity.vo.QuotationInformationVo">
|
|
<result column="site" property="site"/>
|
|
<result column="quotation_no" property="quotationNo"/>
|
|
<result column="customer_no" property="customerNo"/>
|
|
<result column="customerDesc" property="customerDesc"/>
|
|
<result column="customerCurrency" property="customerCurrency"/>
|
|
<result column="project_id" property="projectId"/>
|
|
<result column="project_no" property="projectNo"/>
|
|
<result column="project_desc" property="projectDesc"/>
|
|
<result column="tracker" property="tracker"/>
|
|
<result column="quoter" property="quoter"/>
|
|
<result column="quoterName" property="quoterName"/>
|
|
<result column="quotation_status" property="quotationStatus"/>
|
|
<result column="projectPartId" property="projectPartId"/>
|
|
<result column="test_part_no" property="testPartNo"/>
|
|
<result column="part_desc" property="partDesc"/>
|
|
<result column="priority_level" property="priorityLevel"/>
|
|
<result column="required_completion_date" property="requiredCompletionDate"/>
|
|
<result column="remark" property="remark"/>
|
|
<result column="technical_considerations" property="technicalConsiderations"/>
|
|
<result column="customer_responsible_person" property="customerResponsiblePerson"/>
|
|
<result column="customer_responsible_person_phone" property="customerResponsiblePersonPhone"/>
|
|
<result column="create_date" property="createDate"/>
|
|
<result column="create_by" property="createBy"/>
|
|
<result column="update_date" property="updateDate"/>
|
|
<result column="update_by" property="updateBy"/>
|
|
<result column="next_to_do" property="nextToDo"/>
|
|
<result column="actuality_quotation_date" property="actualityQuotationDate"/>
|
|
<result column="quotation_result_information" property="quotationResultInformation"/>
|
|
<result column="actuality_submission_date" property="actualitySubmissionDate"/>
|
|
<result column="submission_method" property="submissionMethod"/>
|
|
<result column="submission_remark" property="submissionRemark"/>
|
|
<result column="actuality_reply_date" property="actualityReplyDate"/>
|
|
<result column="confirm_results" property="confirmResults"/>
|
|
<result column="confirm_by" property="confirmBy"/>
|
|
<result column="confirm_information" property="confirmInformation"/>
|
|
<result column="quotation_result_status" property="quotationResultStatus"/>
|
|
<result column="quotation_batch_no" property="quotationBatchNo"/>
|
|
<result column="quotation_item_no" property="quotationItemNo"/>
|
|
<result column="delivery_terms" property="deliveryTerms"/>
|
|
<result column="quote_type" property="quoteType"/>
|
|
<result column="quoteTypeLabel" property="quoteTypeLabel"/>
|
|
<result column="deliveryTermsLabel" property="deliveryTermsLabel"/>
|
|
<result column="finalCustomerId" property="finalCustomerId"/>
|
|
<result column="sourcing" property="sourcing"/>
|
|
<result column="finalCustomerName" property="finalCustomerName"/>
|
|
<result column="quotation_amount" property="quotationAmount"/>
|
|
<result column="customer_quote_no" property="customerQuoteNo"/>
|
|
<result column="is_reject" property="isReject"/>
|
|
<result column="node_id" property="nodeId"/>
|
|
<result column="node_name" property="nodeName"/>
|
|
<!-- <association property="priceCheckDetail" javaType="com.xujie.sys.modules.quote.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>-->
|
|
</resultMap>
|
|
<!-- 报价信息列表 -->
|
|
<select id="quotationInformationSearch" resultMap="getQuotation" parameterType="com.xujie.sys.modules.quote.entity.vo.QuotationInformationVo">
|
|
SELECT
|
|
a.site,
|
|
a.quotation_no,
|
|
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,
|
|
b.project_no,
|
|
b.project_desc,
|
|
b.project_manager,
|
|
b.project_owner,
|
|
dbo.plm_get_project_final_customer_id(a.project_id) as finalCustomerId,
|
|
dbo.plm_get_customer_desc(a.site, dbo.plm_get_project_final_customer_id(a.project_id)) as finalCustomerName,
|
|
a.quoter,
|
|
dbo.plm_get_user_display(a.site, quoter) as quoterName,
|
|
a.quotation_status,
|
|
a.test_part_id as projectPartId,
|
|
c.test_part_no,
|
|
c.part_desc,
|
|
a.priority_level,
|
|
a.required_completion_date,
|
|
a.remark,
|
|
a.technical_considerations,
|
|
a.customer_responsible_person,
|
|
a.customer_responsible_person_phone,
|
|
a.create_date,
|
|
a.create_by,
|
|
a.update_date,
|
|
a.update_by,
|
|
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
|
|
FROM plm_request_for_quotation as a
|
|
left join plm_project_info as b on a.project_id = b.id
|
|
left join plm_project_part as c on a.test_part_id = c.id
|
|
<where>
|
|
a.site = #{query.site}
|
|
<if test="query.quotationNo != null and query.quotationNo != ''">
|
|
AND a.quotation_no = #{query.quotationNo}
|
|
</if>
|
|
<if test="query.quotationBatchNo != null and query.quotationBatchNo != ''">
|
|
AND a.quotation_batch_no like #{query.quotationBatchNo}
|
|
</if>
|
|
<if test="query.quotationItemNo != null and query.quotationItemNo != ''">
|
|
AND a.quotation_item_no = #{query.quotationItemNo}
|
|
</if>
|
|
<if test="query.customerNo != null and 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, a.customer_no) like #{query.customerDesc}
|
|
</if>
|
|
<if test="query.projectNo != null and query.projectNo != ''">
|
|
AND b.project_no like #{query.projectNo}
|
|
</if>
|
|
<if test="query.projectDesc != null and query.projectDesc != ''">
|
|
AND b.projectDesc like #{query.projectDesc}
|
|
</if>
|
|
<if test="query.quoterName != null and 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_id like #{query.testPartNo}
|
|
</if>
|
|
<if test="query.partDesc != null and query.partDesc != ''">
|
|
AND dbo.plm_get_part_desc(a.test_part_id) like #{query.partDesc}
|
|
</if>
|
|
<if test="query.quotationStatus != null and query.quotationStatus != ''">
|
|
AND a.quotation_status = #{query.quotationStatus}
|
|
</if>
|
|
<if test="query.priorityLevel != null and query.priorityLevel != ''">
|
|
AND a.priority_level = #{query.priorityLevel}
|
|
</if>
|
|
<if test="query.startDate != null">
|
|
AND a.required_completion_date >= #{query.startDate}
|
|
</if>
|
|
<if test="query.endDate != null">
|
|
AND #{query.endDate} >= a.required_completion_date
|
|
</if>
|
|
<if test="query.quotationResultStatus != null and query.quotationResultStatus != ''">
|
|
AND a.quotation_result_status = #{query.quotationResultStatus}
|
|
</if>
|
|
order by a.quotation_batch_no desc, a.quotation_item_no
|
|
</where>
|
|
</select>
|
|
|
|
<!--按照orderRef1查询文件文件参数-->
|
|
<select id="getFileContentList" resultType="SysOssEntity" parameterType="SysOssEntity">
|
|
SELECT
|
|
id,
|
|
url,
|
|
create_date,
|
|
file_name,
|
|
new_file_name,
|
|
created_by,
|
|
order_ref1,
|
|
order_ref2,
|
|
order_ref3,
|
|
file_type,
|
|
file_suffix,
|
|
file_type_code,
|
|
FROM sys_oss
|
|
<where>
|
|
<if test="orderRef1 != '' and orderRef1 != null ">
|
|
and order_ref1 = #{orderRef1}
|
|
</if>
|
|
<if test="orderRef2 != '' and orderRef2 != null ">
|
|
and order_ref2 = #{orderRef2}
|
|
</if>
|
|
<!-- <if test="orderRef2 != '' and orderRef2 != null ">-->
|
|
<!-- and order_ref2 in-->
|
|
<!-- <foreach collection="refArr" item="item" open="(" separator="," close=")">-->
|
|
<!-- #{item}-->
|
|
<!-- </foreach>-->
|
|
<!-- </if>-->
|
|
<if test="orderRef3 != '' and orderRef3 != null ">
|
|
and order_ref3 = #{orderRef3}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
<!-- 获得报价单号 -->
|
|
<select id="getQuotationNo" resultType="string" parameterType="QuotationInformationEntity">
|
|
SELECT
|
|
Right('0000000000' + convert(VARCHAR(10), isnull(max(convert(INT, SUBSTRING(quotation_batch_no, 3, 10))), 0) + 1), 8)
|
|
FROM plm_request_for_quotation
|
|
WHERE site = #{site}
|
|
</select>
|
|
|
|
|
|
<!-- 批量删除文件-->
|
|
<delete id="batchDeleteQuotationFile" parameterType="com.xujie.sys.modules.quote.entity.vo.SysOssVo">
|
|
DELETE FROM sys_oss
|
|
<where>
|
|
order_ref1 = #{orderRef1} and order_ref2 = #{orderRef2}
|
|
<if test = "fileName != null and fileName != ''">
|
|
AND file_name = #{fileName}
|
|
</if>
|
|
</where>
|
|
</delete>
|
|
|
|
<select id="searchQuotationByQuotationNo" resultType="com.xujie.sys.modules.quote.entity.vo.QuotationInformationVo">
|
|
SELECT
|
|
site,
|
|
quotation_no,
|
|
customer_no,
|
|
dbo.plm_get_customer_desc(site, customer_no) as customerDesc,
|
|
dbo.plm_get_customer_currency(site, customer_no) as customerCurrency,
|
|
project_id,
|
|
dbo.plm_get_project_desc(project_id) as projectDesc,
|
|
tracker,
|
|
dbo.plm_get_user_display(site, tracker) as trackerName,
|
|
quoter,
|
|
dbo.plm_get_user_display(site, quoter) as quoterName,
|
|
quotation_status,
|
|
test_part_id,
|
|
dbo.plm_get_part_desc(test_part_id) as partDesc,
|
|
priority_level,
|
|
required_completion_date,
|
|
remark,
|
|
technical_considerations,
|
|
customer_responsible_person,
|
|
customer_responsible_person_phone,
|
|
create_date,
|
|
create_by,
|
|
update_date,
|
|
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
|
|
FROM plm_request_for_quotation
|
|
<where>
|
|
site = #{site}
|
|
<if test = "quotationNo != null and quotationNo != ''">
|
|
AND quotation_no like #{quotationNo}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="searchQuotationByQuotationNoList" resultType="com.xujie.sys.modules.quote.entity.vo.QuotationInformationVo">
|
|
SELECT
|
|
site,
|
|
quotation_no,
|
|
customer_no,
|
|
dbo.plm_get_customer_desc(site, customer_no) as customerDesc,
|
|
dbo.plm_get_customer_currency(site, customer_no) as customerCurrency,
|
|
project_id,
|
|
dbo.plm_get_project_desc(project_id) as projectDesc,
|
|
dbo.plm_get_project_final_customer_id(project_id) as finalCustomerId,
|
|
dbo.plm_get_customer_desc(site, dbo.plm_get_project_final_customer_id(project_id)) as finalCustomerName,
|
|
tracker,
|
|
dbo.plm_get_user_display(site, tracker) as trackerName,
|
|
quoter,
|
|
dbo.plm_get_user_display(site, quoter) as quoterName,
|
|
quotation_status,
|
|
test_part_id,
|
|
dbo.plm_get_part_desc(test_part_id) as partDesc,
|
|
priority_level,
|
|
required_completion_date,
|
|
remark,
|
|
technical_considerations,
|
|
customer_responsible_person,
|
|
customer_responsible_person_phone,
|
|
create_date,
|
|
create_by,
|
|
update_date,
|
|
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,
|
|
quotation_amount
|
|
FROM plm_request_for_quotation
|
|
<where>
|
|
site = #{site}
|
|
<if test = "quotationNo != null and quotationNo != ''">
|
|
AND quotation_no like #{quotationNo}
|
|
</if>
|
|
<if test = "quotationBatchNo != null and quotationBatchNo != ''">
|
|
AND quotation_batch_no like #{quotationBatchNo}
|
|
</if>
|
|
<if test = "quotationItemNo != null">
|
|
AND quotation_item_no = #{quotationItemNo}
|
|
</if>
|
|
<if test = "testPartNo != null and testPartNo != ''">
|
|
AND test_part_id like #{testPartNo}
|
|
</if>
|
|
<if test = "partDesc != null and partDesc != ''">
|
|
AND dbo.plm_get_part_desc(test_part_id) like #{partDesc}
|
|
</if>
|
|
order by quotation_batch_no desc,quotation_item_no
|
|
</where>
|
|
</select>
|
|
|
|
<resultMap id="getTestPropertiesVo" type="com.xujie.sys.modules.quote.entity.vo.PriceCheckPropertiesVo">
|
|
<result column="site" property="site"/>
|
|
<result column="quotation_no" property="quotationNo"/>
|
|
<result column="function_type" property="functionType"/>
|
|
<result column="item_no" property="itemNo"/>
|
|
<result column="seq_no" property="seqNo"/>
|
|
<result column="item_desc" property="itemDesc"/>
|
|
<result column="default_value" property="defaultValue"/>
|
|
<result column="value_type" property="valueType"/>
|
|
<result column="value_type_db" property="valueTypeDb"/>
|
|
<result column="value_choose_flag" property="valueChooseFlag"/>
|
|
<result column="max_value" property="maxValue"/>
|
|
<result column="min_value" property="minValue"/>
|
|
<result column="text_value" property="textValue"/>
|
|
<result column="num_value" property="numValue"/>
|
|
<!-- <collection select="com.spring.modules.test.mapper.TestInformationMapper.selectAvailBleValue" column="{site=site,itemNo=item_no,functionType=function_type}" property="list" ofType="com.xujie.sys.modules.part.entity.PlmPropertiesItemAvailable">-->
|
|
|
|
<!-- </collection>-->
|
|
</resultMap>
|
|
<select id="searchPriceCheckPropertiesVo" resultMap="getTestPropertiesVo">
|
|
SELECT
|
|
a.site,
|
|
a.function_type,
|
|
a.item_no,
|
|
a.seq_no,
|
|
a.item_desc,
|
|
a.default_value,
|
|
a.value_type,
|
|
a.value_type_db,
|
|
a.value_choose_flag,
|
|
a.max_value,
|
|
a.min_value,
|
|
a.text_value,
|
|
a.num_value,
|
|
a.quotation_no
|
|
FROM plm_price_check_properties a
|
|
left join plm_properties_model_detail b on a.site = b.site and a.function_type = b.function_type and b.code_no = 'XJ001' and a.item_no = b.properties_item_no
|
|
where quotation_no = #{quotationNo} and a.site = #{site} order by b.order_id
|
|
</select>
|
|
|
|
<select id="searchPriceCheckProperties" resultType="com.xujie.sys.modules.quote.entity.PriceCheckProperties">
|
|
SELECT
|
|
a.site,
|
|
a.function_type,
|
|
a.properties_item_no as itemNo,
|
|
a.seq_no,
|
|
b.item_desc,
|
|
b.default_value,
|
|
b.value_type,
|
|
b.value_type_db,
|
|
b.value_choose_flag,
|
|
b.max_value,
|
|
b.min_value
|
|
FROM plm_properties_model_detail a
|
|
left join plm_properties_item b on a.function_type = b.item_type and a.properties_item_no = b.item_no and a.site = b.site
|
|
where a.function_type = #{type} and a.code_no = #{code} and a.site = #{site}
|
|
order by a.order_id
|
|
</select>
|
|
|
|
<select id="searchPriceCheckPropertiesItemList"
|
|
resultType="com.xujie.sys.modules.quote.entity.PriceCheckProperties">
|
|
select
|
|
site,
|
|
item_type as functionType,
|
|
item_no,
|
|
item_desc,
|
|
default_value,
|
|
value_type,
|
|
value_type_db,
|
|
value_choose_flag,
|
|
max_value,
|
|
min_value
|
|
from plm_properties_item where item_type = #{type} and site = #{site}
|
|
<if test="itemNo != null and itemNo != ''">
|
|
AND item_no = #{itemNo}
|
|
</if>
|
|
<if test="itemDesc != null and itemDesc != ''">
|
|
AND item_desc like #{itemDesc}
|
|
</if>
|
|
<if test="list != null and list.size() != 0">
|
|
and item_no not in (
|
|
<foreach collection="list" item="item" separator=",">
|
|
#{item}
|
|
</foreach>
|
|
)
|
|
</if>
|
|
</select>
|
|
<select id="getProjectIdByNo" resultType="integer">
|
|
select id as projectId from plm_project_info where project_no = #{projectNo} and site = #{site}
|
|
</select>
|
|
<select id="getQuoterByName" resultType="java.lang.String">
|
|
select username from CKT_MES_II_REAL.dbo.sys_user where user_display = #{userDisplay} and site = #{site}
|
|
</select>
|
|
<select id="getProjectPartIdByNo" resultType="java.lang.Integer">
|
|
select id as projectPartId from plm_project_part where test_part_no = #{testPartNo} and site = #{site} and project_id = #{projectId}
|
|
</select>
|
|
<select id="queryQuotationInformationByPage"
|
|
resultType="com.xujie.sys.modules.quote.entity.vo.QuotationInformationVo">
|
|
SELECT
|
|
a.site,
|
|
a.quotation_no,
|
|
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,
|
|
b.project_no,
|
|
b.project_desc,
|
|
b.project_manager,
|
|
b.project_owner,
|
|
dbo.plm_get_project_final_customer_id(a.project_id) as finalCustomerId,
|
|
dbo.plm_get_customer_desc(a.site,
|
|
dbo.plm_get_project_final_customer_id(a.project_id)) as finalCustomerName,
|
|
a.quoter,
|
|
dbo.plm_get_user_display(a.site, quoter) as quoterName,
|
|
a.quotation_status,
|
|
a.test_part_id as projectPartId,
|
|
c.test_part_no,
|
|
c.part_desc,
|
|
a.priority_level,
|
|
a.required_completion_date,
|
|
a.remark,
|
|
a.technical_considerations,
|
|
a.customer_responsible_person,
|
|
a.customer_responsible_person_phone,
|
|
a.create_date,
|
|
a.create_by,
|
|
a.update_date,
|
|
a.update_by,
|
|
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,
|
|
bu.id as buId
|
|
FROM plm_request_for_quotation as a
|
|
left join plm_project_info as b on a.project_id = b.id
|
|
left join plm_project_part as c on a.test_part_id = c.id
|
|
left join BU as bu on b.site = bu.site and b.bu_no = bu.bu_no
|
|
<where>
|
|
a.site in (select site from eam_access_site where username = #{params.createBy})
|
|
<if test="params.quotationNo != null and params.quotationNo != ''">
|
|
AND a.quotation_no = #{params.quotationNo}
|
|
</if>
|
|
<if test="params.quotationBatchNo != null and params.quotationBatchNo != ''">
|
|
AND a.quotation_batch_no like #{params.quotationBatchNo}
|
|
</if>
|
|
<if test="params.quotationItemNo != null and params.quotationItemNo != ''">
|
|
AND a.quotation_item_no = #{params.quotationItemNo}
|
|
</if>
|
|
<if test="params.customerNo != null and params.customerNo != ''">
|
|
AND a.customer_no like #{params.customerNo}
|
|
</if>
|
|
<if test="params.customerDesc != null and params.customerDesc != ''">
|
|
AND dbo.plm_get_customer_desc(a.site, a.customer_no) like #{params.customerDesc}
|
|
</if>
|
|
<if test="params.projectNo != null and params.projectNo != ''">
|
|
AND b.project_no like #{params.projectNo}
|
|
</if>
|
|
<if test="params.projectDesc != null and params.projectDesc != ''">
|
|
AND b.project_desc like #{params.projectDesc}
|
|
</if>
|
|
<if test="params.quoterName != null and params.quoterName != ''">
|
|
AND dbo.plm_get_user_display(a.site, a.quoter) like #{params.quoterName}
|
|
</if>
|
|
<if test="params.testPartNo != null and params.testPartNo != ''">
|
|
AND test_part_id like #{params.testPartNo}
|
|
</if>
|
|
<if test="params.partDesc != null and params.partDesc != ''">
|
|
AND dbo.plm_get_part_desc(a.test_part_id) like #{params.partDesc}
|
|
</if>
|
|
<if test="params.quotationStatus != null and params.quotationStatus != ''">
|
|
AND a.quotation_status = #{params.quotationStatus}
|
|
</if>
|
|
<if test="params.priorityLevel != null and params.priorityLevel != ''">
|
|
AND a.priority_level = #{params.priorityLevel}
|
|
</if>
|
|
<if test="params.startDate != null">
|
|
AND a.required_completion_date >= #{params.startDate}
|
|
</if>
|
|
<if test="params.endDate != null">
|
|
AND #{params.endDate} >= a.required_completion_date
|
|
</if>
|
|
<if test="params.quotationResultStatus != null and params.quotationResultStatus != ''">
|
|
AND a.quotation_result_status = #{params.quotationResultStatus}
|
|
</if>
|
|
order by a.quotation_batch_no desc, a.quotation_item_no
|
|
</where>
|
|
</select>
|
|
</mapper>
|