| | |
| | | ip.inspection_item, |
| | | if(ip.inspection_item_subclass is not null and ip.inspection_item_subclass != '', |
| | | ip.inspection_item_subclass, ip.inspection_item) inspection_item_subclass, |
| | | TRIM(BOTH '["]' FROM SUBSTRING_INDEX(REPLACE(ip.sample, '[["', ''), '"]]', 1)) sample, |
| | | ddc.formula, |
| | | ddc.referx, |
| | | ddc.refery, |
| | | ddc.x, |
| | | ddc.y, |
| | | ddc.id |
| | | ddc.id, |
| | | ip.id structureItemParameterId |
| | | FROM device d |
| | | left join structure_item_parameter ip on FIND_IN_SET(ip.id, d.ins_product_ids) |
| | | left join device_data_config ddc on ddc.device_id = d.id and |
| | | if(ip.inspection_item_subclass is not null and |
| | | ip.inspection_item_subclass != '', ip.inspection_item_subclass, |
| | | ip.inspection_item) = ddc.inspection_item_subclass and |
| | | ip.inspection_item = ddc.inspection_item |
| | | left join device_data_config ddc on ddc.device_id = d.id and ddc.structure_item_parameter_id = ip.id |
| | | where d.id = #{deviceId} |
| | | </select> |
| | | |
| | | <select id="deleteDataConfig" resultType="com.yuanchu.mom.pojo.DataConfig"> |
| | | SELECT ddc.* |
| | | FROM device d |
| | | left join structure_item_parameter ip on not FIND_IN_SET(ip.id, d.ins_product_ids) |
| | | inner join device_data_config ddc on ddc.device_id = d.id and ddc.structure_item_parameter_id = ip.id |
| | | </select> |
| | | </mapper> |