diff --git a/src/main/resources/mapper/pms/QcMapper.xml b/src/main/resources/mapper/pms/QcMapper.xml index 215692a2..f6a5b5b4 100644 --- a/src/main/resources/mapper/pms/QcMapper.xml +++ b/src/main/resources/mapper/pms/QcMapper.xml @@ -524,7 +524,7 @@ a.MinValue FROM eam_properties_item a LEFT JOIN qc_template_detailed b ON b.template_id = #{templateId} and b.ItemNo = a.ItemNo and a.site = b.site and a.bu_no = b.bu_no - WHERE a.ItemType = #{itemType} and a.site = #{site} and b.template_id is null and a.bu_no = #{buNo} + WHERE a.ItemType = #{itemType} and a.site = #{site} and b.template_id is null and a.bu_no = #{buNo} and dbo.qc_get_inspection_type_name(a.site, a.inspection_type_no) = #{inspectionTypeName} @@ -540,7 +540,7 @@ FROM eam_properties_item a LEFT JOIN qc_template_detailed b ON b.template_id = #{templateId} and b.ItemNo = a.ItemNo and a.site = b.site and a.bu_no = b.bu_no - a.ItemType = #{itemType} and a.site = #{site} and b.template_id is null and a.bu_no = #{buNo} + a.ItemType = #{itemType} and a.site = #{site} and b.template_id is null and a.bu_no = #{buNo} and dbo.qc_get_inspection_type_name(a.site, a.inspection_type_no) = #{inspectionTypeName} AND a.ItemNo LIKE '%' + #{itemNo} + '%' @@ -2864,7 +2864,7 @@ dbo.qc_get_inspection_type_name(site, inspection_type_no) as inspectionTypeName FROM qc_template - site = #{site} and bu_no = #{buNo} + site = #{site} and bu_no = #{buNo} and dbo.qc_get_inspection_type_name(site, inspection_type_no) = #{inspectionTypeName} AND template_id LIKE '%' + #{templateId}+'%'