Browse Source

2024.1.26 检验模板查询条件变更

java8
yuejiayang 2 years ago
parent
commit
b674071b40
  1. 6
      src/main/resources/mapper/pms/QcMapper.xml

6
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}
</select>
<!-- 查询项目 -->
@ -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
<where>
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}
<if test = "itemNo != null and itemNo != ''">
AND a.ItemNo LIKE '%' + #{itemNo} + '%'
</if>
@ -2864,7 +2864,7 @@
dbo.qc_get_inspection_type_name(site, inspection_type_no) as inspectionTypeName
FROM qc_template
<where>
site = #{site} and bu_no = #{buNo}
site = #{site} and bu_no = #{buNo} and dbo.qc_get_inspection_type_name(site, inspection_type_no) = #{inspectionTypeName}
<if test = "templateId != null and templateId != ''">
AND template_id LIKE '%' + #{templateId}+'%'
</if>

Loading…
Cancel
Save