|
|
|
@ -4,91 +4,97 @@ |
|
|
|
|
|
|
|
<!-- 打样信息列表 --> |
|
|
|
<select id="proofingInformationSearch" parameterType="com.spring.modules.proofing.vo.ProofingInformationVo" resultType="com.spring.modules.proofing.vo.ProofingInformationVo"> |
|
|
|
SELECT |
|
|
|
id, |
|
|
|
site, |
|
|
|
proofing_no, |
|
|
|
project_id, |
|
|
|
dbo.plm_get_project_name(site, project_id) as projectName, |
|
|
|
test_part_no, |
|
|
|
dbo.plm_get_test_part_desc(site, test_part_no) as partName, |
|
|
|
customer_no, |
|
|
|
dbo.plm_get_customer_desc(site, customer_no) as customerDesc, |
|
|
|
tracker, |
|
|
|
dbo.plm_get_user_display(site, tracker) as trackerName, |
|
|
|
engineer, |
|
|
|
dbo.plm_get_user_display(site, engineer) as engineerName, |
|
|
|
approver, |
|
|
|
dbo.plm_get_user_display(site, approver) as approverName, |
|
|
|
priority_level, |
|
|
|
proofing_number, |
|
|
|
required_delivery_date, |
|
|
|
remark, |
|
|
|
technical_considerations, |
|
|
|
is_need_to_send_samples, |
|
|
|
send_samples_address, |
|
|
|
consignee, |
|
|
|
consignee_contact, |
|
|
|
actuality_delivery_date, |
|
|
|
proofing_result_information, |
|
|
|
actuality_send_samples_date, |
|
|
|
send_samples_method, |
|
|
|
deliver_goods_information, |
|
|
|
deliver_goods_remark, |
|
|
|
actuality_reply_date, |
|
|
|
confirm_results, |
|
|
|
confirm_by, |
|
|
|
confirm_information, |
|
|
|
proofing_status, |
|
|
|
proofing_result_status, |
|
|
|
next_to_do, |
|
|
|
create_date, |
|
|
|
create_by, |
|
|
|
update_date, |
|
|
|
update_by |
|
|
|
FROM plm_proofing_information |
|
|
|
SELECT a.id, |
|
|
|
a.site, |
|
|
|
proofing_no, |
|
|
|
project_id, |
|
|
|
dbo.plm_get_project_name(a.site, project_id) as projectName, |
|
|
|
test_part_no, |
|
|
|
dbo.plm_get_test_part_desc(a.site, test_part_no) as partName, |
|
|
|
customer_no, |
|
|
|
dbo.plm_get_customer_desc(a.site, customer_no) as customerDesc, |
|
|
|
tracker, |
|
|
|
dbo.plm_get_user_display(a.site, tracker) as trackerName, |
|
|
|
engineer, |
|
|
|
dbo.plm_get_user_display(a.site, engineer) as engineerName, |
|
|
|
approver, |
|
|
|
dbo.plm_get_user_display(a.site, approver) as approverName, |
|
|
|
priority_level, |
|
|
|
proofing_number, |
|
|
|
required_delivery_date, |
|
|
|
a.remark, |
|
|
|
technical_considerations, |
|
|
|
is_need_to_send_samples, |
|
|
|
send_samples_address, |
|
|
|
consignee, |
|
|
|
consignee_contact, |
|
|
|
actuality_delivery_date, |
|
|
|
proofing_result_information, |
|
|
|
actuality_send_samples_date, |
|
|
|
send_samples_method, |
|
|
|
deliver_goods_information, |
|
|
|
deliver_goods_remark, |
|
|
|
actuality_reply_date, |
|
|
|
confirm_results, |
|
|
|
confirm_by, |
|
|
|
confirm_information, |
|
|
|
proofing_status, |
|
|
|
proofing_result_status, |
|
|
|
next_to_do, |
|
|
|
a.create_date, |
|
|
|
a.create_by, |
|
|
|
a.update_date, |
|
|
|
a.update_by, |
|
|
|
a.step_id, |
|
|
|
reject_flag, |
|
|
|
reject_step_id, |
|
|
|
d.is_reject |
|
|
|
FROM plm_proofing_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 |
|
|
|
<where> |
|
|
|
site = #{query.site} |
|
|
|
<if test = "query.customerNo != null and query.customerNo != ''"> |
|
|
|
a.site = #{query.site} |
|
|
|
<if test="query.customerNo != null and query.customerNo != ''"> |
|
|
|
AND customer_no like #{query.customerNo} |
|
|
|
</if> |
|
|
|
<if test = "query.proofingNo != null and query.proofingNo != ''"> |
|
|
|
<if test="query.proofingNo != null and query.proofingNo != ''"> |
|
|
|
AND proofing_no like #{query.proofingNo} |
|
|
|
</if> |
|
|
|
<if test = "query.customerDesc != null and query.customerDesc != ''"> |
|
|
|
AND customer_desc like #{query.customerDesc} |
|
|
|
<if test="query.customerDesc != null and query.customerDesc != ''"> |
|
|
|
AND dbo.plm_get_customer_desc(a.site, customer_no) like #{query.customerDesc} |
|
|
|
</if> |
|
|
|
<if test = "query.projectId != null and query.projectId != ''"> |
|
|
|
<if test="query.projectId != null and query.projectId != ''"> |
|
|
|
AND project_id like #{query.projectId} |
|
|
|
</if> |
|
|
|
<if test = "query.projectName != null and query.projectName != ''"> |
|
|
|
AND project_name like #{query.projectName} |
|
|
|
<if test="query.projectName != null and query.projectName != ''"> |
|
|
|
AND dbo.plm_get_project_name(a.site, project_id) like #{query.projectName} |
|
|
|
</if> |
|
|
|
<if test = "query.trackerName != null and query.trackerName != ''"> |
|
|
|
AND dbo.plm_get_user_display(site, tracker) like #{query.trackerName} |
|
|
|
<if test="query.trackerName != null and query.trackerName != ''"> |
|
|
|
AND dbo.plm_get_user_display(a.site, tracker) like #{query.trackerName} |
|
|
|
</if> |
|
|
|
<if test = "query.engineerName != null and query.engineerName != ''"> |
|
|
|
AND dbo.plm_get_user_display(site, engineer) like #{query.engineerName} |
|
|
|
<if test="query.engineerName != null and query.engineerName != ''"> |
|
|
|
AND dbo.plm_get_user_display(a.site, engineer) like #{query.engineerName} |
|
|
|
</if> |
|
|
|
<if test = "query.testPartNo != null and query.testPartNo != ''"> |
|
|
|
<if test="query.testPartNo != null and query.testPartNo != ''"> |
|
|
|
AND test_part_no like #{query.testPartNo} |
|
|
|
</if> |
|
|
|
<if test = "query.partName != null and query.partName != ''"> |
|
|
|
AND dbo.plm_get_test_part_desc(site, test_part_no) like #{query.partName} |
|
|
|
<if test="query.partName != null and query.partName != ''"> |
|
|
|
AND dbo.plm_get_test_part_desc(a.site, test_part_no) like #{query.partName} |
|
|
|
</if> |
|
|
|
<if test = "query.proofingStatus != null and query.proofingStatus != ''"> |
|
|
|
<if test="query.proofingStatus != null and query.proofingStatus != ''"> |
|
|
|
AND proofing_status = #{query.proofingStatus} |
|
|
|
</if> |
|
|
|
<if test = "query.proofingResultStatus != null and query.proofingResultStatus != ''"> |
|
|
|
<if test="query.proofingResultStatus != null and query.proofingResultStatus != ''"> |
|
|
|
AND proofing_result_status = #{query.proofingResultStatus} |
|
|
|
</if> |
|
|
|
<if test = "query.priorityLevel != null and query.priorityLevel != ''"> |
|
|
|
<if test="query.priorityLevel != null and query.priorityLevel != ''"> |
|
|
|
AND priority_level = #{query.priorityLevel} |
|
|
|
</if> |
|
|
|
<if test="query.startDate != null "> |
|
|
|
<if test="query.startDate != null"> |
|
|
|
AND required_delivery_date >= #{query.startDate} |
|
|
|
</if> |
|
|
|
<if test="query.endDate != null "> |
|
|
|
<if test="query.endDate != null"> |
|
|
|
AND #{query.endDate} >= required_delivery_date |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
|