|
|
|
@ -485,12 +485,41 @@ |
|
|
|
SELECT |
|
|
|
a.site, |
|
|
|
a.itemNo, |
|
|
|
a.ItemDesc |
|
|
|
a.ItemDesc, |
|
|
|
a.DefaultValue, |
|
|
|
a.MaxValue, |
|
|
|
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 |
|
|
|
WHERE a.ItemType = #{itemType} and a.site = #{site} and b.template_id is null |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 查询项目 --> |
|
|
|
<select id="getItem" resultType="QcTemplateData"> |
|
|
|
SELECT |
|
|
|
a.site, |
|
|
|
a.itemNo, |
|
|
|
a.ItemDesc, |
|
|
|
a.DefaultValue, |
|
|
|
a.MaxValue, |
|
|
|
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 |
|
|
|
<where> |
|
|
|
a.ItemType = #{itemType} and a.site = #{site} and b.template_id is null |
|
|
|
<if test = "itemNo != null and itemNo != ''"> |
|
|
|
AND a.ItemNo LIKE '%' + #{itemNo} + '%' |
|
|
|
</if> |
|
|
|
<if test = "itemDesc != null and itemDesc != ''"> |
|
|
|
AND a.ItemDesc LIKE '%' + #{itemDesc} + '%' |
|
|
|
</if> |
|
|
|
<if test = "inspectionTypeNo != null and inspectionTypeNo != ''"> |
|
|
|
AND a.inspection_type_no = #{inspectionTypeNo} |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 删除模板 --> |
|
|
|
<delete id="templateDelete" parameterType="QcTemplateData"> |
|
|
|
DELETE FROM qc_template |
|
|
|
|