|
|
|
@ -3,101 +3,60 @@ |
|
|
|
<mapper namespace="com.spring.modules.sampleManagement.dao.TechnicalSpecificationMapper"> |
|
|
|
|
|
|
|
<select id="technicalSpecificationListSearch" parameterType="PlmTechnicalSpecificationSheetData" resultType="PlmTechnicalSpecificationSheetData"> |
|
|
|
SELECT a.id, |
|
|
|
a.site, |
|
|
|
a.code_no, |
|
|
|
a.project_id, |
|
|
|
a.test_part_no, |
|
|
|
a.status, |
|
|
|
a.rev_no, |
|
|
|
a.work_center_no, |
|
|
|
a.ECN_flag, |
|
|
|
a.ECN_no, |
|
|
|
a.ori_code_no, |
|
|
|
a.ECN_address, |
|
|
|
a.remark, |
|
|
|
a.create_date, |
|
|
|
a.create_by, |
|
|
|
a.update_date, |
|
|
|
a.update_by, |
|
|
|
b.final_part_no, |
|
|
|
b.part_type partTypeDesc, |
|
|
|
b.part_type, |
|
|
|
b.part_name, |
|
|
|
b.part_desc, |
|
|
|
b.part_spec, |
|
|
|
dbo.plm_get_technicalBaseDesc(a.status, 'status') statusDesc, |
|
|
|
a.proofing_no, |
|
|
|
b.bu_no, |
|
|
|
dbo.plm_get_bu_desc(a.site, b.bu_no) buDesc, |
|
|
|
dbo.get_technicalSpecificationTeamName(a.site, a.code_no, 'engineer') engineer, |
|
|
|
dbo.get_technicalSpecificationTeamName(a.site, a.code_no, 'technician') technician, |
|
|
|
process, |
|
|
|
dbo.get_technicalSpecificationTeamName(a.site, a.code_no, 'quotationOfficer') quotationOfficer, |
|
|
|
c.customer_Id |
|
|
|
, |
|
|
|
a.picture_addess, |
|
|
|
a.customerPictureChangeRemark, |
|
|
|
a.productionFileComments, |
|
|
|
a.bom_type, |
|
|
|
a.eng_chg_level, |
|
|
|
a.bom_alternative_no, |
|
|
|
a.routing_type, |
|
|
|
a.routing_revision, |
|
|
|
a.routing_alternative_no, |
|
|
|
a.pod, |
|
|
|
a.mpOperator, |
|
|
|
dbo.get_userDisPlay(a.mpOperator) mpOperatorName |
|
|
|
, |
|
|
|
a.cqcOperator, |
|
|
|
dbo.get_userDisPlay(a.cqcOperator) cqcOperatorName |
|
|
|
, |
|
|
|
a.faiOperator, |
|
|
|
dbo.get_userDisPlay(a.faiOperator) faiOperatorName |
|
|
|
, |
|
|
|
a.peOperater, |
|
|
|
dbo.get_userDisPlay(a.peOperater) peOperaterName |
|
|
|
, |
|
|
|
a.csOperater, |
|
|
|
dbo.get_userDisPlay(a.csOperater) csOperaterName |
|
|
|
, |
|
|
|
a.dccOperater, |
|
|
|
dbo.get_userDisPlay(a.dccOperater) dccOperaterName |
|
|
|
|
|
|
|
FROM plm_technical_specification_sheet a |
|
|
|
left join view_Project_final_Part b |
|
|
|
on a.site = b.site and a.project_id = b.project_id and a.test_part_no = b.test_part_no |
|
|
|
left join plm_project_info c on a.site = c.site and a.project_id = c.project_id |
|
|
|
<where> |
|
|
|
<if test="query.id != null"> |
|
|
|
AND a.id = #{query.id} |
|
|
|
</if> |
|
|
|
<if test="query.site != null and query.site != ''"> |
|
|
|
AND a.site = #{query.site} |
|
|
|
</if> |
|
|
|
<if test="query.oriCodeNo != null and query.oriCodeNo != ''"> |
|
|
|
AND a.ori_code_no like #{query.oriCodeNo} |
|
|
|
</if> |
|
|
|
<if test="query.codeNo != null and query.codeNo != ''"> |
|
|
|
AND a.code_no like #{query.codeNo} |
|
|
|
</if> |
|
|
|
<if test="query.projectId != null and query.projectId != ''"> |
|
|
|
AND a.project_id like #{query.projectId} |
|
|
|
</if> |
|
|
|
<if test="query.testPartNo != null and query.testPartNo != ''"> |
|
|
|
AND a.test_part_no like #{query.testPartNo} |
|
|
|
</if> |
|
|
|
<if test="query.statusDesc != null and query.statusDesc != ''"> |
|
|
|
AND dbo.plm_get_technicalBaseDesc(a.status, 'status') like #{query.statusDesc} |
|
|
|
</if> |
|
|
|
<if test="query.buNo == null || query.buNo == ''"> |
|
|
|
AND b.bu_no in (select bu_No from dbo.Get_Now_BU_chooseAble(#{query.site}, #{query.userName})) |
|
|
|
</if> |
|
|
|
<if test="query.buNo != null and query.buNo != ''"> |
|
|
|
AND b.bu_no like #{query.buNo} |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
order by a.code_no desc |
|
|
|
SELECT a.id,a.site,a.code_no,a.project_id,a.test_part_no,a.status,a.rev_no,a.work_center_no,a.ECN_flag,a.ECN_no,a.ori_code_no, |
|
|
|
a.ECN_address,a.remark,a.create_date,a.create_by,a.update_date,a.update_by,b.final_part_no,b.part_type partTypeDesc, |
|
|
|
b.part_type,b.part_name,b.part_desc,b.part_spec,dbo.plm_get_technicalBaseDesc(a.status,'status') statusDesc,a.proofing_no,b.bu_no,dbo.plm_get_bu_desc(a.site,b.bu_no) buDesc, |
|
|
|
dbo.get_technicalSpecificationTeamName(a.site,a.code_no,'engineer') engineer, |
|
|
|
dbo.get_technicalSpecificationTeamName(a.site,a.code_no,'technician') technician,process, |
|
|
|
dbo.get_technicalSpecificationTeamName(a.site,a.code_no,'quotationOfficer') quotationOfficer,c.customer_Id |
|
|
|
,a.picture_addess,a.customerPictureChangeRemark,a.productionFileComments,a.bom_type,a.eng_chg_level,a.bom_alternative_no,a.routing_type,a.routing_revision, |
|
|
|
a.routing_alternative_no,a.pod, |
|
|
|
a.mpOperator,dbo.get_userDisPlay(a.mpOperator) mpOperatorName |
|
|
|
, a.cqcOperator,dbo.get_userDisPlay(a.cqcOperator) cqcOperatorName |
|
|
|
, a.faiOperator,dbo.get_userDisPlay(a.faiOperator) faiOperatorName |
|
|
|
,a.peOperater,dbo.get_userDisPlay(a.peOperater) peOperaterName |
|
|
|
,a.csOperater,dbo.get_userDisPlay(a.csOperater) csOperaterName |
|
|
|
,a.dccOperater,dbo.get_userDisPlay(a.dccOperater) dccOperaterName, |
|
|
|
d.is_reject, |
|
|
|
d.node_id, |
|
|
|
d.node_name |
|
|
|
|
|
|
|
FROM plm_technical_specification_sheet a |
|
|
|
left join view_Project_final_Part b on a.site=b.site and a.project_id=b.project_id and a.test_part_no=b.test_part_no |
|
|
|
left join plm_project_info c on a.site=c.site and a.project_id=c.project_id |
|
|
|
left join plm_request_header as prh on a.site = prh.site and prh.menu_id = '103002' |
|
|
|
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> |
|
|
|
<if test="query.id != null"> |
|
|
|
AND a.id = #{query.id} |
|
|
|
</if> |
|
|
|
<if test="query.site != null and query.site != ''"> |
|
|
|
AND a.site = #{query.site} |
|
|
|
</if> |
|
|
|
<if test="query.oriCodeNo != null and query.oriCodeNo != ''"> |
|
|
|
AND a.ori_code_no like #{query.oriCodeNo} |
|
|
|
</if> |
|
|
|
<if test="query.codeNo != null and query.codeNo != ''"> |
|
|
|
AND a.code_no like #{query.codeNo} |
|
|
|
</if> |
|
|
|
<if test="query.projectId != null and query.projectId != ''"> |
|
|
|
AND a.project_id like #{query.projectId} |
|
|
|
</if> |
|
|
|
<if test="query.testPartNo != null and query.testPartNo != ''"> |
|
|
|
AND a.test_part_no like #{query.testPartNo} |
|
|
|
</if> |
|
|
|
<if test="query.statusDesc != null and query.statusDesc != ''"> |
|
|
|
AND dbo.plm_get_technicalBaseDesc(a.status,'status') like #{query.statusDesc} |
|
|
|
</if> |
|
|
|
<if test="query.buNo == null || query.buNo == ''"> |
|
|
|
AND b.bu_no in ( select bu_No from dbo.Get_Now_BU_chooseAble ( #{query.site}, #{query.userName})) |
|
|
|
</if> |
|
|
|
<if test="query.buNo != null and query.buNo != ''"> |
|
|
|
AND b.bu_no like #{query.buNo} |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
order by a.code_no desc |
|
|
|
</select> |
|
|
|
|
|
|
|
<insert id="saveTechnicalSpecificationSheet"> |
|
|
|
|