| | |
| | | sp.id |
| | | ) SELECT |
| | | sp.inspection_item AS inspectionItem, |
| | | sm.`code`, |
| | | sm.id |
| | | GROUP_CONCAT(DISTINCT sm.`code` SEPARATOR ',') AS standard, |
| | | sp.frequency |
| | | FROM |
| | | flattened_samples fs |
| | | JOIN structure_item_parameter sp ON fs.id = sp.id |
| | | JOIN reliability_plan_product rp ON JSON_OVERLAPS (fs.flattened_sample, JSON_ARRAY(rp.product_name)) |
| | | LEFT JOIN standard_product_list spl ON spl.structure_item_parameter_id = sp.id |
| | | AND spl.model = rp.product_type |
| | | AND spl.state = 1 |
| | | LEFT JOIN standard_method sm ON sm.id = spl.standard_method_list_id |
| | | WHERE rp.id = #{planId} |
| | | WHERE |
| | | rp.id = #{planId} |
| | | GROUP BY |
| | | sp.inspection_item, sp.frequency |
| | | </select> |
| | | <select id="codeList" resultType="java.util.Map"> |
| | | WITH flattened_samples AS ( |