| | |
| | | <select id="hollowIsAll" resultMap="baseMap"> |
| | | WITH sum_flow_layer_count AS ( SELECT flow_card_id, layer, min( films_id ) AS films_id, min(thickness) as |
| | | thickness,count(*) AS sum_count FROM hollow_glass_relation_info GROUP BY flow_card_id, layer ), |
| | | real_flow_layer_count AS ( SELECT flow_card_id, layer, count(*) AS real_count FROM |
| | | real_flow_layer_count AS ( SELECT flow_card_id, layer, count(*) AS real_count, count(distinct slot) as slot_count FROM |
| | | hollow_big_storage_cage_details t WHERE state = 100 GROUP BY flow_card_id, layer ), |
| | | damage_flow_layer_count AS ( SELECT process_id AS flow_card_id, technology_number AS layer, count(*) as |
| | | damage_count FROM damage where type in(8,9) GROUP BY process_id, technology_number ), |
| | |
| | | IFNULL( t3.pair_count, 0 ) AS pair_count, |
| | | IFNULL( real_count, 0 ) AS real_count, |
| | | IFNULL( damage_count, 0 ) AS damage_count, |
| | | IFNULL( lack_count, 0 ) AS lack_count |
| | | IFNULL( lack_count, 0 ) AS lack_count, |
| | | IFNULL(slot_count,0) AS slot_count |
| | | FROM |
| | | sum_flow_layer_count t |
| | | LEFT JOIN real_flow_layer_count t1 ON t.flow_card_id = t1.flow_card_id |