|
|
|
@ -2522,13 +2522,20 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="queryChangeLog" resultType="com.spring.modules.change.vo.ChangeRequestVo"> |
|
|
|
WITH SpecCode AS (SELECT ori_code_no |
|
|
|
FROM plm_technical_specification_sheet |
|
|
|
WHERE site = #{site} |
|
|
|
AND code_no = #{codeNo}), |
|
|
|
TargetCode AS (SELECT code_no |
|
|
|
FROM plm_technical_specification_sheet |
|
|
|
WHERE ori_code_no IN (SELECT ori_code_no FROM SpecCode)) |
|
|
|
SELECT a.site, |
|
|
|
a.bu_no, |
|
|
|
a.change_no, |
|
|
|
a.applicant_id, |
|
|
|
dbo.get_userDisPlay(a.applicant_id) as applicantName, |
|
|
|
b.department_no as applicationDepartmentId, |
|
|
|
dbo.get_department_name(a.site, b.department_no) as applicationDepartmentName, |
|
|
|
dbo.get_userDisPlay(a.applicant_id) AS applicantName, |
|
|
|
b.department_no AS applicationDepartmentId, |
|
|
|
dbo.get_department_name(a.site, b.department_no) AS applicationDepartmentName, |
|
|
|
a.apply_date, |
|
|
|
a.ecn_type, |
|
|
|
a.change_impact, |
|
|
|
@ -2536,7 +2543,7 @@ |
|
|
|
a.ecn_stage, |
|
|
|
a.change_type, |
|
|
|
a.tp_engineer_id, |
|
|
|
dbo.get_userDisPlay(a.tp_engineer_id) as tpEngineerName, |
|
|
|
dbo.get_userDisPlay(a.tp_engineer_id) AS tpEngineerName, |
|
|
|
a.change_phase_in_date, |
|
|
|
a.df_is_product, |
|
|
|
a.printing, |
|
|
|
@ -2552,23 +2559,75 @@ |
|
|
|
a.update_date, |
|
|
|
a.update_by, |
|
|
|
a.industrial_engineer_id, |
|
|
|
dbo.get_userDisPlay(a.industrial_engineer_id) as industrialEngineerName, |
|
|
|
dbo.get_userDisPlay(a.industrial_engineer_id) AS industrialEngineerName, |
|
|
|
a.change_status, |
|
|
|
a.cqc_operator_id, |
|
|
|
dbo.get_userDisPlay(a.cqc_operator_id) as cqcOperatorName, |
|
|
|
dbo.get_userDisPlay(a.cqc_operator_id) AS cqcOperatorName, |
|
|
|
a.fai_operator_id, |
|
|
|
dbo.get_userDisPlay(a.fai_operator_id) as faiOperatorName, |
|
|
|
dbo.get_userDisPlay(a.fai_operator_id) AS faiOperatorName, |
|
|
|
a.step_id, |
|
|
|
a.reject_flag, |
|
|
|
a.reject_step_id |
|
|
|
FROM plm_change_request a |
|
|
|
LEFT JOIN sys_user as b on a.site = b.site and a.applicant_id = b.username |
|
|
|
left join plm_change_request_detail pcrd on a.site = pcrd.site and a.change_no = pcrd.change_no |
|
|
|
where a.site = #{site} |
|
|
|
and a.show_in_query_flag = 'Y' |
|
|
|
and pcrd.code_no IN |
|
|
|
(SELECT code_no FROM plm_technical_specification_sheet WHERE site = #{site} AND ori_code_no = #{codeNo}) |
|
|
|
</select> |
|
|
|
LEFT JOIN sys_user b |
|
|
|
ON a.site = b.site AND a.applicant_id = b.username |
|
|
|
LEFT JOIN plm_change_request_detail pcrd |
|
|
|
ON a.site = pcrd.site AND a.change_no = pcrd.change_no |
|
|
|
WHERE a.site = #{site} |
|
|
|
AND a.show_in_query_flag = 'Y' |
|
|
|
AND pcrd.code_no IN (SELECT code_no FROM TargetCode) |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- <select id="queryChangeLog" resultType="com.spring.modules.change.vo.ChangeRequestVo">--> |
|
|
|
<!-- SELECT a.site,--> |
|
|
|
<!-- a.bu_no,--> |
|
|
|
<!-- a.change_no,--> |
|
|
|
<!-- a.applicant_id,--> |
|
|
|
<!-- dbo.get_userDisPlay(a.applicant_id) as applicantName,--> |
|
|
|
<!-- b.department_no as applicationDepartmentId,--> |
|
|
|
<!-- dbo.get_department_name(a.site, b.department_no) as applicationDepartmentName,--> |
|
|
|
<!-- a.apply_date,--> |
|
|
|
<!-- a.ecn_type,--> |
|
|
|
<!-- a.change_impact,--> |
|
|
|
<!-- a.change_impact_desc,--> |
|
|
|
<!-- a.ecn_stage,--> |
|
|
|
<!-- a.change_type,--> |
|
|
|
<!-- a.tp_engineer_id,--> |
|
|
|
<!-- dbo.get_userDisPlay(a.tp_engineer_id) as tpEngineerName,--> |
|
|
|
<!-- a.change_phase_in_date,--> |
|
|
|
<!-- a.df_is_product,--> |
|
|
|
<!-- a.printing,--> |
|
|
|
<!-- a.manufacturing_cost_is_change,--> |
|
|
|
<!-- a.change_request_desc,--> |
|
|
|
<!-- a.is_re_quote,--> |
|
|
|
<!-- a.ul_certification_requirements,--> |
|
|
|
<!-- a.ul_continue_to_meet_demand,--> |
|
|
|
<!-- a.gp_certification_requirements,--> |
|
|
|
<!-- a.gp_continue_to_meet_demand,--> |
|
|
|
<!-- a.create_date,--> |
|
|
|
<!-- a.create_by,--> |
|
|
|
<!-- a.update_date,--> |
|
|
|
<!-- a.update_by,--> |
|
|
|
<!-- a.industrial_engineer_id,--> |
|
|
|
<!-- dbo.get_userDisPlay(a.industrial_engineer_id) as industrialEngineerName,--> |
|
|
|
<!-- a.change_status,--> |
|
|
|
<!-- a.cqc_operator_id,--> |
|
|
|
<!-- dbo.get_userDisPlay(a.cqc_operator_id) as cqcOperatorName,--> |
|
|
|
<!-- a.fai_operator_id,--> |
|
|
|
<!-- dbo.get_userDisPlay(a.fai_operator_id) as faiOperatorName,--> |
|
|
|
<!-- a.step_id,--> |
|
|
|
<!-- a.reject_flag,--> |
|
|
|
<!-- a.reject_step_id--> |
|
|
|
<!-- FROM plm_change_request a--> |
|
|
|
<!-- LEFT JOIN sys_user as b on a.site = b.site and a.applicant_id = b.username--> |
|
|
|
<!-- left join plm_change_request_detail pcrd on a.site = pcrd.site and a.change_no = pcrd.change_no--> |
|
|
|
<!-- where a.site = #{site}--> |
|
|
|
<!-- and a.show_in_query_flag = 'Y'--> |
|
|
|
<!-- and pcrd.code_no IN--> |
|
|
|
<!-- (SELECT code_no FROM plm_technical_specification_sheet WHERE site = #{site} AND ori_code_no = #{codeNo})--> |
|
|
|
<!-- </select>--> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<update id="updateBMStepId" parameterType="PlmTechnicalSpecificationSheetData"> |
|
|
|
update plm_technical_specification_sheet |
|
|
|
|