|
|
|
@ -466,7 +466,7 @@ |
|
|
|
a.template_id, |
|
|
|
a.ItemNo, |
|
|
|
b.ItemDesc, |
|
|
|
a.default_value, |
|
|
|
ISNULL(ad.default_value,a.default_value) AS default_value , |
|
|
|
b.ValueType, |
|
|
|
b.ValueType_DB, |
|
|
|
a.max_value, |
|
|
|
@ -483,11 +483,12 @@ |
|
|
|
b.default_sampling_proportion,a.order_id |
|
|
|
FROM qc_template_detailed a |
|
|
|
INNER JOIN eam_properties_item b ON a.ItemNo = b.ItemNo and a.site = b.site |
|
|
|
left join qc_part_attr_detailed ad on ad.item_no = b.ItemNo and b.site = ad.site and ad.attribute_no =#{attributeNo} |
|
|
|
left join qc_sampling_inspection_programme as c on b.site = c.site and b.sampling_programme_no = c.sampling_programme_no |
|
|
|
left join qc_sampling_inspection_level as d on b.site = d.site and b.sampling_level_no = d.sampling_level_no |
|
|
|
LEFT JOIN eam_object eo ON a.object_id = eo.ObjectID and a.site = b.site |
|
|
|
WHERE a.template_id = #{templateId} AND b.ItemType = #{itemType} and a.site = #{site} |
|
|
|
order by order_id,a.ItemNo |
|
|
|
order by a.order_id,a.ItemNo |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|